Skip to content

Latest commit

 

History

History
93 lines (47 loc) · 2.6 KB

Buffer_Overflow_Prep3.md

File metadata and controls

93 lines (47 loc) · 2.6 KB

TRYHACKME OSCP PREP 3

Offset

fuzzer.py

image

Crash:

image

Program crash with 1300

I recommend put 400 bytes more than crasher.

Create pattern:

image

Put in payload of exploit.py:

image

Offset Discover

image

Let's put EIP Register with BBBB its same than 42424242 in Hex.

image

I run exploit:

image

BadChars

!mona bytearray -b "\x00"

image

I put payload in exploit.py:

image

I run exploit:

!mona compare -a esp -f bytearray.bin

image

BadChars are:

\x00\x11\x40\x5f\xb8\xee

Comprove:

!mona bytearray -b "\x00\x11\x40\x5f\xb8\xee"

I put in exploit and i run exploit:

0 badchars!!

image

!mona jmp -r esp -cbq "\x00\x11\x40\x5f\xb8\xee"

I choose first jmp:

image

I put in retn with little-endian:

image

image

I copy new payload in my exploit

Add padding:

image

I put listener:

image

I run exploit:

image

DONE :)