Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(void)
- {
- int tohack = 9;
- if (tohack == 9)
- {
- printf("you got to jump uppon me.\n");
- return 0;
- }
- printf("you got it!\n");
- return 0;
- }
- //gcc -W -Wall -o testHackJump01.exe testHackJump01.C
- //skip the test tohack is equal to 9
- //On Windows
- //Disassemble with ollydbg
- //Search for string
- //Locate JNZ change it to JZ
- //Assemble & Save
- //On linux
- //objdump -d /path/to/exe
- //Loacte JNZ (disass in gdb is clearer to identify where to mod)
- //83 7c 24 1c 09
- //0x08048422 <+22>: turn jne to je 75 13
- //c7 04 24 e0 84 04 08
- //vi /path/to/exe
- //escape+: % !xxd
- ///75 13
- //shift+r
- //replace 75 with 74
- //escape+: % !xxd -r
- //escape+: wq!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement