Fix IDA script invalid labels + Add Frida Closure/Map/Set support#195
Open
fewhakko wants to merge 2 commits intoworawit:mainfrom
Open
Fix IDA script invalid labels + Add Frida Closure/Map/Set support#195fewhakko wants to merge 2 commits intoworawit:mainfrom
fewhakko wants to merge 2 commits intoworawit:mainfrom
Conversation
Skip add_func when function size is 0 or negative to avoid zero-sized function boundaries in IDA. Skip _miss label when PayloadAddress is 0 (invalid) and _check label when MonomorphicAddress is shared across many functions, preventing thousands of labels colliding at the same address. Tested with obfuscated app: eliminated 5206 set_name(0x0) and 5207 colliding _check labels.
Add getDartClosure to read closure's function entry point. Add getDartMap and getDartSet to read LinkedHashBase data. Handle CidClosure/CidMap/CidSet in getObjectValue switch, which previously fell through to "Unhandle class id" error.
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.
IDA Script Fix (
DartDumper.cpp)When analyzing obfuscated apps, the generated
addNames.pyhad issues:set_name(0x0, ...)— 5206_misslabels pointed to address 0x0 becausePayloadAddress()returns 0 for functions with no code body. These all overwrote each other at address 0.set_name(0x320080, ...)— 5207_checklabels pointed to the same sharedMonomorphicAddress, overwriting each other.add_func(addr, addr)— 5206 functions had zero size (start == end), giving IDA no boundary information.Fix: validate addresses before emitting labels, skip
add_funcwhen size ≤ 0.Frida Template Fix (
frida.template.js)getObjectValue()did not handleClosure,Map, orSettypes. These fell through to"Unhandle class id"error despite having CID constants and struct offsets already exported.Added:
getDartClosure()— reads closure's function entry pointgetDartMap()/getDartSet()— reads LinkedHashBase data arrayCidClosure,CidMap,CidSetcases ingetObjectValue()switchTested with obfuscated Flutter app (Dart 3.5.4, arm64).