Bypassing conditional statements.
Right. I want to learn how you could jump a conditional statement in a compiled exe. My first thought process leads me to this approach :
Reverse engineer and find the memory address of the instruction we want to jump to
Create a DLL injection program that automatically injects into the required exe
Write the DLL code that will be injected and provide the instructions for the jump
Let's begin by writing the C code that we will be trying to bypass.
#include "Windows.h"
#include "stdio.h"
int main(int argc, char** argv) {
char* key;
if ( argc > 1 ) {
key = argv[1];
if ( strcmp(key, "123456789") == 0 ) {
printf("You have entered the proper key!\n");
} else {
printf("You have entered the wrong key!\n");
}
} else {
printf("You have not entered the key!\n");
}
system("pause");
return EXIT_FAILURE;
};
Last updated
Was this helpful?