> For the complete documentation index, see [llms.txt](https://morgan-bin-bash.gitbook.io/linux-privilege-escalation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://morgan-bin-bash.gitbook.io/linux-privilege-escalation/rust-privilege-escalation.md).

# Rust Privilege Escalation

### [Reverse Shell](https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/rust-privilege-escalation/#reverse-shell) <a href="#reverse-shell" id="reverse-shell"></a>

Reference: <https://github.com/LukeDSchenk/rust-backdoors/blob/master/reverse-shell/src/main.rs>

We can create a binary or module to reverse shell.

```bash
cd /path/to/rust/project/src
vim lib.rs
(In vim editor, insert a reverse shell code into a file)
cargo build
Copied!
```

### References

* <https://book.hacktricks.xyz/linux-hardening/privilege-escalation>
