एक attacker क्या recover कर सकता है (reversal classes)

Static-attacker classes जिनमें AfterPack के transforms आते हैं, और हर एक को recover करने से attacker को क्या मिलता है।

AfterPack अपनी protections को classes में बाँटता है। हर class reversal की लागत अलग तरह से बढ़ाती है। यह जानना कि आपके code के किसी region को कौन-सी class कवर करती है, आपको बताता है कि उसे पढ़ने पर attacker क्या recover करता है। Protection Map हर token को उसके complexity score के आधार पर रंगता है और आपके चुने हुए code की class बताता है।

Static attacker, परिभाषा

ये static-attacker classes हैं। ये बताती हैं कि bytes पढ़ने वाले व्यक्ति के सामने क्या आता है: grep, AST tooling, एक deobfuscator pass, या एक LLM जो code को चलाए बिना समझाता है। जो attacker artifact को instrumentation के तहत चलाता है, वह एक अलग और ज़्यादा मज़बूत मामला है, जिसे threat model में कवर किया गया है।

The three reversal-complexity classesRenamed & encodedPolynomial-injectiveAttacker gets:the structure, after real workFreeFlattened & fusedPolynomial-non-injectiveAttacker gets:an equivalent program, not yoursReservedDestroyed & fusedExponential — provenance, staticAttacker gets:behaviour, not your structureReservedFree spans the first two classes. Provenance-destroying fusion is planned and not available on any tier today.Each class is a cost, not a wall — and the cost is charged again on your next build.

Classes

Classएक static attacker क्या recover करता हैTier
Renamed & encoded (polynomial-injective)संरचना, मेहनत के साथ। नामों, literals, flatten किए गए control flow और fuse की गई identities, सभी के लिए असली pattern-recognition का काम लगता है। यह काम हर build पर फिर से करना पड़ता है।Free
Flattened & fused (polynomial-non-injective)वैसा ही व्यवहार करने वाला एक समकक्ष program। Logic को ऐसे फिर से लिखा जाता है कि कई अलग-अलग मूल computations एक ही output में सिमट जाती हैं, और यह mapping कि आपने असल में कौन-सी लिखी थी, खो जाती है। आज कोई shipped transform इस class तक नहीं पहुँचता।—

Free tier आपके पूरे bundle में renamed & encoded class बनाता है (पूरी तालिका Plans & tiers में है)। ऊँचे presets इसी class के अंदर और ज़ोर लगाते हैं। डिफ़ॉल्ट preset light है (complexity target 5); --preset=hard जैसा ज़्यादा मज़बूत preset और ज़ोर लगाता है और पूरे bundle में page का startup समय कई गुना कर देता है (load लागत)। medium और ऊपर, engine control-flow flattening, identity fusion और constant destruction को पूरे bundle में एक समान जोड़ता है, और यह सब renamed & encoded class के भीतर ही रहता है।

Flattened & fused और destroyed & fused आज नहीं बनतीं

कोई build इन तक नहीं पहुँचती, और किसी region को कभी "flattened & fused" या "destroyed & fused" class नहीं मिलती। /* @afterpack preset=extreme */ किसी region को string floor चालू रखते हुए complexity target 25 तक ले जाता है, जो renamed & encoded class के अंदर वास्तविक, मापने योग्य सुरक्षा है।

किसी class को recover करने से attacker को क्या मिलता है

किसी class से attacker को क्या मिलता है, यह इस पर निर्भर करता है कि वह किस चीज़ के पीछे था।

  • एक secret (API key, license threshold, hardcoded table): कोई भी class अपने दम पर इसे नहीं छिपाती। Secret हर उस program से निकल आता है जो आपके program जैसा व्यवहार करता है, जिसमें किसी protected region से recover किया गया program भी शामिल है। Secret को protect करने के लिए एक अलग mechanism चाहिए। देखें Secret को protect करना।
  • आपके code को समझना और clone करना: एक static reader काम करने वाला, पढ़ने योग्य समकक्ष recover कर सकता है, लेकिन केवल उस असली pattern-recognition के काम के बाद जिसकी लागत renamed & encoded class लगाती है, और यह काम हर build के लिए फिर से करना पड़ता है। इस गुण की सीमाओं के लिए देखें AfterPack किसकी जगह नहीं लेता।
  • एक check ढूँढकर patch करना (paywall बंद करना, एक return true पलटना): कोई भी class अपने आप ज़्यादा मदद नहीं करती। Attacker को बस वह एक node ढूँढना है। उसे दोबारा ढूँढने में कुछ लागत लगती है, और वह हर release पर reset होती है। Self-integrity (transforms.selfIntegrity.enabled) इसे नहीं पकड़ता: यह केवल अपनी check table में बदलाव पकड़ता है। Rotation के बारे में Best practices देखें।

अपनी build पर इसे जाँचें

Protection Map हर token का सबूत दिखाता है: आपका मूल source, हर token के complexity score के आधार पर रंगा हुआ, और hover करने पर उसकी class और उसके पीछे का transform stack। लाइव demo खोलें या npx afterpack@latest से अपना बनाएँ।

आगे

  • Threat model: attackers की वह सीढ़ी जिसके सापेक्ष ये classes तय की गई हैं।
  • Protection Map: आपकी अपनी build के लिए per-token view।
  • Best practices: क्या mark करें और क्यों।
  • Directives: वे markers जो किसी region को एक class से दूसरी में ले जाते हैं।
  • Presets: सीढ़ी, और हर पायदान द्वारा सेट किया गया complexity target।