writeup 15 Feb 2017 Linux ELF binary and a service port is given. So I assume it’s a pwnable task.
1. First look
This binary receives 10 byte input and checks its MD5 hash. If the check passes, the string is used to decrypt two data blobs. Then two decrypted blobs are mmap
ed to fixed addresses 0x12000 and 0x14000 with RWE permission. Then at the end of the program, we can ‘call’ the code at 0x12000 just like a function.
Since finding preimage of the MD5 hash is hopeless, our goal is now finding the 10 byte key that makes the decoded blob plausible. To do that, we had to analyze the decryption function 0xD1D
. But I felt I will definitely make mistake during understanding it. So my teammate took another way.
2. Simplifying the decryption routine
The decryption seemed to be composed of simple XORs. So we used angr to derive the symbolic relation between input and output.
First load the binary in angr.
import angr
proj = angr.Project('./meow')
Read more