Skip to content

Instantly share code, notes, and snippets.

@sudoaza
Last active April 8, 2023 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudoaza/64ec85b50cddd327a91cda0c439c003b to your computer and use it in GitHub Desktop.
Save sudoaza/64ec85b50cddd327a91cda0c439c003b to your computer and use it in GitHub Desktop.
Shellcode to binary c
int main(int argc, char** argv) {
__asm__ (
"nop \n\t"
// );
// return 0;
// }
// python -c 'print(" \"nop \\n\\t\"\n"*2000)' >> hollow.c
// echo -e " );\n return 0;\n}" >> hollow.c
// gcc hollow.c -o hollow # gcc hollow.c -m32 -o hollow # i686-w64-mingw32-gcc -o hollow.exe hollow.c # x86_64-w64-mingw32-gcc -o hollow.exe hollow.c
// msfvenom ... > shellcode.asm
// dd if=shellcode.asm of=hollow seek=$(grep -Eab $(echo -e '\x90{100}') hollow | cut -d : -f 1) bs=1 conv=notrunc
// -------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment