messy-malloc
Problem
Solution
Commands: login - login as a user print-flag - print the flag logout - log out quit - exit the program Enter your command: [anon]> login Please enter the length of your username 4 Please enter your username test Enter your command: [tes]> Invalid option Commands: login - login as a user print-flag - print the flag logout - log out quit - exit the program Enter your command: [tes]> print-flag Incorrect Access Code: "" Enter your command: [tes]> logout Enter your command: [anon]> quitstruct user { char *username; char access_code[ACCESS_CODE_LEN]; char *files; };user struct char *username: pointer (that points to a "username buffer" with the username) char access_code: unknown leftover char *files: unknown leftoverstruct user (previously: "username buffer") char *username: pointer (that points to a newly allocated block of memory containing the new username) char access_code: ACCESS_CODE (leftover from "username buffer") char *files: bbbbbbbb (leftover from "username buffer")
[*] '~/Documents/PicoCTF/Binary Exploitation/messy-malloc/auth' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000) FORTIFY: Enabled [+] Opening connection to 2019shell1.picoctf.com on port 21899: Done [+] picoCTF{g0ttA_cl3aR_y0uR_m4110c3d_m3m0rY_ac0e0e6a}
Flag
Last updated