undo
Undoing obfuscated functions in Ghidra.
$ checksec undo
[*] '/home/joybuzzer/Documents/vunrotc/public/reverse-engineering/11-ghidra/undo/src/undo'
Arch: i386-32-little
RELRO: Full RELRO
Stack: Canary found
NX: NX enabled
PIE: PIE enabledStatic Analysis
void main(undefined param_1)
{
int in_GS_OFFSET;
int local_44;
char local_3d [41];
int local_14;
undefined1 *local_10;
local_10 = ¶m_1;
local_14 = *(int *)(in_GS_OFFSET + 0x14);
puts("Enter your password");
fflush(_stdout);
fgets(local_3d,0x29,_stdin);
printf("You entered: %s\n",local_3d);
fflush(_stdout);
encode((int)local_3d);
local_44 = 0;
do {
if (0x28 < local_44) {
win();
LAB_00011382:
if (local_14 != *(int *)(in_GS_OFFSET + 0x14)) {
__stack_chk_fail_local();
}
return;
}
if (enc_key[local_44] != buffer[local_44]) {
puts("You lose!");
goto LAB_00011382;
}
local_44 = local_44 + 1;
} while( true );
}Writing a Solve Script
Last updated