R&D's R&D
Socials
  • General
    • About Me
    • Some information about the content of this blog
  • MMO
    • So, I'm doing an MMO
    • Weekly updates
      • Weekly update #1
      • Week 2 through 5 updates
      • Weekly update #6
      • Weekly update #7
      • Weekly update #8
      • Weekly update #?
  • Reverse engineering
    • Beginner's guide to reverse engineering
      • Intro to the subject
      • An introduction to x86 assembly
    • HackTheBox Cyber Apocalypse 2024
      • BoxCutter analysis write-up
  • Malware Analysis
    • Intro to the subject
    • Sample Triage Checklist
    • Process of analysis
      • Sample Triage
  • Malware development
    • Beginner's guide to malware development
      • Intro to the subject
    • What I'm learning
      • Bypassing conditional statements.
Powered by GitBook
On this page

Was this helpful?

  1. Malware development
  2. What I'm learning

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;
};

PreviousWhat I'm learning

Last updated 1 year ago

Was this helpful?