News for hackers. Stuff that matters.
Re:A Sampling of Anti-Decompilation Techniques by psykotic on Thursday November 16, 2017 @09:54PM (#15718559)
That's an issue for static disassembly, which is step one of decompilation. Your snippet is a classic example that can throw off naive linear-scan disassemblers. Recursive disassemblers can handle it easily if (and it's a big if) they can identify the basic block entry points. If you have top-level entry points (which can also be a problem), the main problem for a recursive disassembler are indirect jumps that don't fit standard patterns like switch jump tables.

All of this gets easier if you can augment your static analysis with control flow traces from program executions with coverage of the relevant branches, so you don't miss basic block entry points.

Re:A Sampling of Anti-Decompilation Techniques by munin on Thursday November 16, 2017 @10:24PM (#15718650)
> All of this gets easier if you can augment your static analysis with control flow traces from program executions with coverage of the relevant branches, so you don't miss basic block entry points.

That's only true if the traces you can generate do a reasonable job at covering the states the application can find itself in, which is a big assumption.

Re:A Sampling of Anti-Decompilation Techniques by psykotic on Friday November 17, 2017 @01:19AM (#15719484)
Yes, that's what I meant by coverage of the relevant branches. But the good news is that all these partial, heuristic sources of information can be combined. E.g. for detecting function entry points, you can combine information from ELF/PE export tables (if present), function prologues detected by a linear scan, vtables, static CALL targets, dynamic CALL targets from run-time traces, etc.