Hints for Patching EXEs with Ollydbg

Hint 1: Patch Better

Don't settle for the patched file from the instructions. Modify it more so you don't even have to guess the launch code at all.

Hint 2: Automatic Patching with Python

You can install Python on Windows to easily automate tasks. Suppose I have a file containing eight bytes like this:

And I want to change one byte to 10 like this:

This Python script does that job:

Here's how to run it:

Hint 3: Automating Execution with Python

Here's a Python script that runs the command line command whoami and appends the output to a file named "out.txt".

Hint 4: Processing All Files in a Directory

Here's a Python script that prints all the filenames in a directory.


Modified 12-22-17