shellforge 0.1.0

a highly customizable crate for generating assembly noops and junk code
Documentation
  • Coverage
  • 3.7%
    1 out of 27 items documented0 out of 24 items with examples
  • Size
  • Source code size: 51.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 29s Average build duration of successful builds.
  • all releases: 1m 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KawaiiKraken

ShellForge

ShellForge - a highly customizable crate for generating assembly noops and junk code

Features

  • Generation of random noop or junk assembly
  • Seeded generation for reproducible outputs
  • Fake control flow to real functions in junk assembly
  • Prologue/Epilogue and fake function generation
  • SIMD instructions

Example Usage

let generated = ShellForge::default()
    .with_seed(0x1337)
    .allow_junk(true)
    .generate(36);

let shellcode = ShellForge::encode_assembly(&generated);

assert_eq!(
    shellcode,
    [
        0x48, 0x81, 0xCB, 0x39, 0x0E, 0x2B, 0x4D, 0xFF, 0xE5, 0x48, 0x83, 0xF2, 0xC5, 0x48,
        0x2D, 0xA1, 0x24, 0x5C, 0x78, 0x49, 0xC1, 0xE7, 0x07, 0x0F, 0x0B, 0x41, 0xFF, 0xE3,
        0x48, 0x25, 0x63, 0x54, 0xA1, 0x4A, 0x50, 0xC3
    ]
);
or rbx,4D2B0E39h
jmp rbp
xor rdx,0FFFFFFFFFFFFFFC5h
sub rax,785C24A1h
shl r15,7
ud2
jmp r11
and rax,4AA15463h
push rax
ret