verify: add adversary module - generic constant-folding script
noxis-verify::adversary::fold_constants walks maximal straight-line
Const(Int/Long)+Binary{Int,Long} runs, modeling the baseline attack
any deobfuscator runs first (and the one raised on the forum: two
adjacent literals and one op, foldable in your head). Each stack slot
carries its own provenance span, so several split constants placed
back to back without a separator are reported as separate findings
instead of merging into one run.
Two uses: an honest §7 measurement (answer: every Constants scheme,
mba included, folds under a generic evaluator - only pattern matchers
hardcoded to one opcode are defeated, documented already in
constants/forms.rs) and a correctness oracle (every scheme must fold
back to the exact source value, now pinned by a regression test).
Tests: bare_literals_are_not_folded,
every_constants_scheme_folds_back_to_the_source_value.
This commit is contained in:
parent
2b19ed6096
commit
59637e50dc
4 changed files with 261 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -383,6 +383,7 @@ dependencies = [
|
|||
"noxis-classfile",
|
||||
"noxis-core",
|
||||
"noxis-jar",
|
||||
"noxis-passes",
|
||||
"noxis-structure-check",
|
||||
"regex",
|
||||
"serde",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue