HackTheBox x Synack CTF 2021: Split
TL;DR
- The binary uses
ptrace as an anti-debugging mechanism. - Debugging is blocked by terminating execution when
ptrace is detected. - The
ptrace call can be patched to immediately return. - Removing the anti-debug allows normal analysis and execution.
Video Walkthrough

Solution
backdoor.py
from pwn import *
# Load our binary
exe = 'split'
elf = context.binary = ELF(exe, checksec=False)
# Patch out the call to ptrace ;)
elf.asm(elf.symbols.ptrace, 'ret')
# Save the patched binary
elf.save('patched')