Step 2: Finding the Offset

pattern_create and pattern_offset

Download mona.py to local machine:

mona.py

Put mona.py in "C:\Program Files (x86)\Immunity Inc\Immunity Debugger\PyCommands". Set "C:\mona" as the workingfolder:

!mona config -set workingfolder c:\mona

Generate a pattern:

The output will be saved as "pattern.txt" in your working folder.

Write a script to feed this pattern to vulnserver through the TRUN command:

As expected, vulnserver crashes. Note that EIP value is overwritten by the pattern:

EIP

Grab the EIP content and find the offset:

The offset is 2003:

Offset

Last updated

Was this helpful?