This challenge is fairly simple, a first binary (dharma
) drops a second one (2O3naSbh
, but let's call it stage2
) using a well-known in-memory loading technique (please refer to this article for details).
As this is a CTF challenge, we're looking for the shortest path to get the flag: let's just patch the binary to make it drops the binary to a common file descriptor (e.g., stdout
, stdin
, stderr
).
Because I'm lazy, I decided to apply the following patch:
--- dharma