Diary

Description

By tomadimitrie

How was your day?

Downloads: diaryarrow-up-right

Solution

Basis file checks:

└─$ file diary       
diary: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b2f2295d7671e60292eff44fc0840c947545e67e, for GNU/Linux 3.2.0, not stripped

└─$ checksec  ./diary
[*] '/home/kali/Desktop/TFC-CTF-2023/diary/diary'
    Arch:     amd64-64-little
    RELRO:    Partial RELRO
    Stack:    No canary found
    NX:       NX disabled
    PIE:      No PIE (0x400000)
    RWX:      Has RWX segments

vuln function (from Ghidra):

The input buffer is undefined so let's to overflow and see what happens.

To jump to address in 64x we need jmp rsp gadget.

Finally let's assembly the pwn script.

circle-check

Last updated