Page cover

REplay - Isolated Training

When reverse engineering applications, you may find yourself stuck occasionally, especially in real world scenarios where the applications might be super complex or just super wonky with the style/flow of the program, you will need to executed isolated training.

What is isolated training?

Isolating training is where you isolate specific flaws- for example, we create a very simple mock UAF or Use After Free vulnerability in C++. Like the code below.

#include <iostream>

int main() {
	int* someage = (int*)malloc(sizeof(int));
	*someage = 5;
	std::cout << "[+] Before free -  " << *someage << std::endl;
	free(someage);
	std::cout << "[-] After free  -  " << *someage << std::endl;
	return 0;
}

We then take this code, compile it and toss it into a framework like IDA to give us a good example of how to identify similar patterns. As you get further and further down the line into understanding how to identify these, you will make the code structure more and more complex until you can understand it.

When you understand the code enough to recognize what's happening, you can go back to the real world environment and use those skills you developed whilst training in isolation to identify higher and more complex security risks such as the ones studied in isolation.

How does this help?

Prior developing REplay, I spent a lot of my time in bigger environments right when I started. Sure, it was a great way to throw myself into the weeds and figure it out, but in the long run it hindered me a bit from being able to identify important routines and calls such as malloc or free.

By training in isolation, or in even much larger environments such as REplay (but also being able to locate the area of training easily) I was not only able to recognize when specific calls were dangerous but also able to discovery and analyze all forms of binary vulnerabilities.

Examples

For this section, I gave you some medium sized examples of what isolated training can look like and represented it in a few small sections.

Last updated