mirror of
https://codeberg.org/smukx/Rust-for-Malware-Development
synced 2026-06-06 20:22:59 +00:00
28e7fac1d3
Rust-for-Malware-Development is an collection of proof of concepts with techniques and advanced evasion methods
28 lines
1.6 KiB
Markdown
28 lines
1.6 KiB
Markdown
## Custom Shellcode
|
|
|
|
Welcome to the **Custom_Shellcode** directory of [`Rust-for-Malware-Development`](https://github.com/Whitecat18/Rust-for-Malware-Development).
|
|
Drop-in shellcode samples for testing your own loaders, plus a small helper for pulling shellcode out of a compiled binary. Every payload in this folder just pops `calc.exe`, so it is safe to detonate inside a VM.
|
|
|
|
## Cargo Projects
|
|
|
|
- [shellcode_extract](https://github.com/Whitecat18/Rust-for-Malware-Development/tree/main/Custom_Shellcode/shellcode_extract):
|
|
Reads a PE on disk and dumps the bytes of a chosen section (`.text` by default) as raw shellcode. Handy for turning your own Rust binary into a payload.
|
|
|
|
## Standalone Calc Payloads
|
|
|
|
Each of these is a Rust source file containing a different `calc.exe` shellcode variant. Copy the byte array straight into your loader.
|
|
|
|
- [calc_shellcode1.rs](https://github.com/Whitecat18/Rust-for-Malware-Development/blob/main/Custom_Shellcode/calc_shellcode1.rs)
|
|
- [calc_shellcode2.rs](https://github.com/Whitecat18/Rust-for-Malware-Development/blob/main/Custom_Shellcode/calc_shellcode2.rs)
|
|
- [calc_shellcode3.rs](https://github.com/Whitecat18/Rust-for-Malware-Development/blob/main/Custom_Shellcode/calc_shellcode3.rs)
|
|
- [calc_shellcode4.rs](https://github.com/Whitecat18/Rust-for-Malware-Development/blob/main/Custom_Shellcode/calc_shellcode4.rs)
|
|
|
|
## How to Use
|
|
|
|
```bash
|
|
git clone https://github.com/Whitecat18/Rust-for-Malware-Development.git
|
|
cd Rust-for-Malware-Development/Custom_Shellcode
|
|
```
|
|
|
|
For `shellcode_extract`, `cd` into the folder and run `cargo build --release`. For the loose `.rs` files, copy the shellcode array into your loader's source.
|