Repository navigation
fix: drop protection runners a later layer puts in decoders and wrappers under --unsafe - #469
Merged
Merged
Conversation
…r --unsafe A later obfuscation layer can put its call-controller runners (self-defending, console and debug-protection blocks) at the top of an earlier layer's decoder or wrapper. The wrapper then no longer has the wrapper shape and its forwarded call counts as a decoder escape, or the decoder reads outer bindings. Under --unsafe these runners are protections and are dropped before the string array search, but only when the rest of the function is a forwarded call, a decoder index shift or a call-controller body, and only while escape speculation is open. If the forwarded decoder survives the run, the input is run again without the strip. Escapes a control-flow speculation deferred are now checked after the protections and cleanup stages instead of at the end of the deobfuscate stage, so escapes that only a later stage removes no longer force a rerun. The call-controller shape allows unread bare var declarations in its runner.
…n runner strip on top of main
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OX2-D6:
--unsafedecoding when a later layer puts protection code inside an earlier layer's decoder machinery.A later obfuscation layer inserts its call-controller runners (self-defending, console and debug-protection blocks) into the first function scope its own code calls. In layered output that is often an earlier layer's wrapper (
function W(a, b) { <runners>; return D(a - 319, b); }), a decoder, or a call controller. The wrapper then has no wrapper shape, its forwarded call counts as a stateful-decoder escape, and the decoder reads outer bindings.Changes:
x = C(this, fn)followed byx(),C(this, fn)(), or the(function () { C(this, fn)(); })()shell, where C has the call-controller shape. The head's own bindings and the function's parameters must not be used across the cut. If the function the wrapper forwards to (or the decoder itself) survives the run, the input is run once more without the strip.vars are recognised (both lanes).Full sweep, main @1d93a3ca vs this branch (3,465 cases, 2,189 run):
Gained under unsafe: pw011-n3--objects, pw022-m3--console-test, pw022-m3--empty-log, pw022-m3--functions, pw022-m3--greeting, pw023-m3--classes, pw023-m3--control, pw024-m3--classes, pw024-m3--console-test, rnd011-n3--greeting, rnd031-m2--control, rnd031-m2--functions, rnd031-m3--control, rnd031-n3--strings. Default-lane verdicts are identical on every case.
Gates: obfuscator-io, -versions and -relayer BASELINEs 0 failed, 0 unexpected-pass. Krunker byte-identical in both lanes on all five versions; instruction counts within 1.4% of main (2.6.9 --unsafe +1.35%, others under 1%). Local untwist-ci --web green before the rebase over #459/#470 (three firefox UI tests failed under load and pass alone); after it the untwist and untwist-deobfuscate tests pass (one load-sensitive scaling test passes alone). Rows:
runners-in-wrapper(pw022-m3--empty-log) decodes fully and prints the source's output;runner-in-decoderdecodes under--unsafeand keeps the runner by default.Still open in this cluster: pw011-n3 empty-log/greeting/console-test and pw011-m3 functions/objects/classes/control/mixed (wrapper aliases read before their declaration, and a decoder passed as a value to control-flow proxies whose object escapes outside branches), pw023-m3--greeting, rnd022-m3--control (a self-defending source reader survives, so the input is passed through unchanged).