articleAug 14, 2020
CodeGate 2018 RedVelvet — reverse / constraint-solving theme
High-level note on CodeGate 2018 RedVelvet: a 64-bit ELF reverse challenge with anti-debug checks, multi-stage input validation, and a final SHA-256 compare. Solve steps and PoC omitted.
CodeGate 2018 RedVelvet (high-level)
What it is. CodeGate CTF 2018 reverse-engineering challenge (RedVelvet): a dynamically linked, non-stripped 64-bit ELF.
Challenge theme.
- Fixed-length user input is checked through a long chain of small validation helpers
- A
ptrace-based anti-debug check (classicPTRACE_TRACEMEstyle) steers execution away from the success path when a debugger is attached - After validation, OpenSSL SHA-256 APIs hash a derived buffer and compare against an embedded digest
Technique class (concepts only). Constraint-heavy RE / SMT-friendly byte constraints, plus basic anti-debugging awareness — not a remote service exploit.
Impact. Contest flag recovery only.
Lessons.
- Anti-debug branches are common teaching patterns; they change analysis workflow more than they change the underlying math of the check
- Long chains of local arithmetic predicates are a natural fit for symbolic / SMT approaches in labs
- Prefer vetted crypto libraries for real integrity checks; do not invent ad-hoc encodings for production auth
Solve steps and PoC omitted.