meme / hellscape

GIMPLE obfuscator for C, C++, Go, ... all supported GCC targets and front-ends that use GIMPLE.
GNU General Public License v3.0
390 stars 34 forks source link

Junk for BCF #5

Open meme opened 4 years ago

meme commented 4 years ago

Currently the BCF "junk" is a GIMPLE NOP which is pretty ineffective at deterring reversing by itself (since it is clear which block is the opaque path)

liufengwenyu commented 4 years ago

I use gcc9.3 (ubuntu20.04) without error, but use gcc7.5 (ubuntu18.04) to report junk error: /tmp/ccnxYEFu.s: Assembler messages: /tmp/ccnxYEFu.s:15: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:18: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:19: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:39: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:68: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:83: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:104: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:119: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:148: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:168: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:202: Error: junk(%rip)' after expression /tmp/ccnxYEFu.s:205: Error: junk (%rip)' after expression /tmp/ccnxYEFu.s:206: Error: junk(%rip)' after expression`

meme commented 4 years ago

GCC >= 9 is required to use this software. In the future, please make a new issue for reporting compiler errors.

jeffli678 commented 4 years ago

Yes, the junk block is quite a "signature" for the opaque path. We probably should not insert a new thing for it at all; we should let it jump onto some existing code and confuse the reverser. I am not sure how simple/hard it is to do in gimple though.

jeffli678 commented 4 years ago

Also after the junk it jumps back to the beginning of the conditional block -- which makes it more obvious.

meme commented 4 years ago

If you'd like: describe exactly what you're looking to do and I can try to help describe the IR. The current BCF is effectively a placeholder.

liufengwenyu commented 4 years ago

I have solved this problem on GCC 7.5.0.