• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    Rust
  • Created almost 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Another shellcode runner ๐Ÿฆ€ ๐Ÿš

rs-shellcode

A shellcode runner write in Rust use windows-rs.

how to use it

Install rustup, use nightly toochain.

rustup default nightly

Use msfvenom generate shellcode for test.

msfvenom -p windows/x64/exec CMD=calc.exe  --platform win -f raw -o calc64.raw

Build:

cargo build

Usage:

rs_shellcode 

USAGE:
    rs_shellcode.exe [FLAGS] [OPTIONS] -f <file>

FLAGS:
    -b               set breakpoint in debugger
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f <file>          shellcode path
    -o <offset>        shellcode offset

Run:

./target/debug/rs_shellcode.exe -f <SHELLCODE_PATH>

When your shellcode not start at offset 0, you can specify the offset use -o:

./target/debug/rs_shellcode.exe -f <SHELLCODE_PATH> -o 0x30

Run with breakpoint flag (-b):

./target/debug/rs_shellcode.exe -f <SHELLCODE_PATH> -b

use this flag, you can break just before your shellcode in the debugger, which will make your life easier.

breakpoint in windbg