Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Martí
cb83c50b13 all: run gopls's modernize -fix
Except on reflect_abi_code.go, as that needs to be compatible
with older versions of Go given that we inject its code.
2025-02-22 15:05:23 +00:00
pagran
e8fe80d627 add trash block generator (#825)
add trash block generator

For making static code analysis even more difficult, added feature for
generating trash blocks that will never be executed. In combination
with control flow flattening makes it hard to separate trash code from
the real one, plus it causes a large number of trash references to
different methods.

Trash blocks contain 2 types of statements:
1. Function/method call with writing the results into local variables
and passing them to other calls
2. Shuffling or assigning random values to local variables
2024-01-16 16:01:53 +01:00
pagran
5e80f12be7 implement flattening hardening
Without hardening, obfuscation is vulnerable to analysis via symbolic
execution because all keys are opened, and it is easy to trace their
connections. Added extendable (contribution-friendly) hardening
mechanism that makes it harder to determine relationship between key and
execution block through key obfuscation.

There are 2 hardeners implemented and both are compatible with literal
obfuscation, which can make analysis even more difficult.
2023-11-12 10:34:25 +00:00
pagran
afe1aad916 Removing obsolete TODO
indirect import issue has already been fixed
2023-07-23 14:11:44 +01:00
pagran
260cad2a3f add "max" flag value and limits for control flow obfuscation parameters 2023-07-01 22:10:30 +02:00
pagran
0e2e483472 add control flow obfuscation
Implemented control flow flattening with additional features such as block splitting and junk jumps
2023-06-25 22:57:27 +02:00