Rust Privilege Escalation

Last modified: 2023-06-27

Linux Privilege Escalation

Rust is a multi-paradigm, general-purpose programming language that emphasizes performance, type safety, and concurrency. If we have a write permission of a Rust file, we may be able to inject arbitrary code to escalate privileges.

Reverse Shell


We can create a binary or module to reverse shell.

cd /path/to/rust/project/src
(In vim editor, insert a reverse shell code into a file)
cargo build