Repository navigation
Fix (Babel_NET): fix Decrypter4 AES key initialization and update MethodsDecrypter heuristics - #48
Merged
Conversation
Initialize and populate the key array prior to handling public key offsets in Decrypter4. This prevents passing an invalid key length to the AES transform when processing resources that derive keys from the assembly public key or end-of-stream header boundaries.
Remove the mandatory 'System.Collections.Hashtable' field requirement from the decrypter detection heuristic. This allows Babel helper types to be detected when caching tables are relocated into nested or internal classes.
meck-gd
reviewed
Oct 12, 2026
meck-gd
left a comment
There was a problem hiding this comment.
Hi, thanks for the PR. Your commits introduce a bunch of surplus whitespaces. Please remove them and amend the commits.
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.
Summary of Changes
This pull request addresses two issues in the Babel .NET deobfuscator module:
Fix AES key buffer initialization in
Decrypter4(ResourceDecrypter.cs):pubKeyOffset.ArgumentException(Specified key is not a valid size for this algorithm) when processing encrypted resources where the AES key is derived from the assembly strong-name public key or stream boundary.Relax decrypter type heuristic in
MethodsDecrypter.cs:System.Collections.Hashtablerequirement fromrequiredFields.Affected Components
de4dot.code/deobfuscators/Babel_NET/ResourceDecrypter.csde4dot.code/deobfuscators/Babel_NET/MethodsDecrypter.csTesting
ArgumentExceptionorEndOfStreamExceptionon Babel .NET protected targets.