Course navigatorUnofficial student prototype · fictional course data

Overview›Seeing Through Obfuscated Code›Week 4

Lecture 2 — Something always simplifies it for you

Three different things reduce obfuscated arithmetic, and confusing them is how people come to believe a simplifier recovered something it never touched.

All of Week 4

Opens block 2, covering weeks 4 to 6.

Three different things reduce obfuscated arithmetic:

  1. The algebra. The identity was always an identity. Simplifying it recovers nothing that was hidden, because nothing was hidden — it was inflated.
  2. The compiler backend. Instruction selection and the optimiser undo a great deal of IR-level expansion without being asked, and they do it before any analysis runs.
  3. Your own reading. You spot the cancelling constant and stop seeing the noise. This feels like analysis and leaves no record.

The lecture’s claim is that almost every overstated deobfuscation result in the field is one of these three being reported as another.

The test

Whenever a tool returns a shorter expression, the question is not “is it shorter” but what was proved, and by what. A simplifier that returns a five-term expression where there were ninety terms has done something valuable. Whether it proved the two are equivalent over 32-bit values with wraparound is a separate question with a separate answer, and the answer is frequently “UNKNOWN”.

UNKNOWN is neither an equivalence proof nor a demonstrated counterexample. Treating it as the former is the single most common error this course exists to prevent.

Demonstration content. Reused — title and argument from comp4020-ass2-Ky787 (src/content/lectures/spine-02.mdx)