Strategies for Analyzing Native Code in Android Applications...#1409
Merged
carlospolop merged 3 commits intomasterfrom Sep 30, 2025
Conversation
…lications... - Remove searchindex.js (auto-generated file)
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://revflash.medium.com/strategies-for-analyzing-native-code-in-android-applications-combining-ghidra-and-symbolic-aaef4c9555df Content Categories: Based on the analysis, this content was categorized under "Basic Forensic Methodology -> Malware Analysis (add a subsection: Android/JNI native string deobfuscation with angr + Ghidra)". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
…e_in_Android_Ap_20250916_124743
Collaborator
Author
|
merge |
88a07c5 to
73b307c
Compare
…e_in_Android_Ap_20250916_124743
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.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post presents a practical reverse‑engineering workflow to statically decrypt/deobfuscate strings embedded in an Android native library by combining Ghidra (for static triage) with angr (for symbolic execution). The scenario is a RASP‑protected app that crashed on Frida attach with an “invalid JNI version” exception and stack trace, even when using Frida’s JavaScript API, Interceptor, and Stalker (Frida). T...
🔧 Technical Details
Execute in‑binary decode routines statically with angr: Treat the decoder as a callable inside the binary. Create a blank state, allocate a heap buffer, call the decode function with
(encoded_ptr, out_buf, len), then concretize the output usingresult_state.memory.load+result_state.solver.evaland parse C‑strings up to\x00. This recovers plaintext (e.g., JNI names/signatures) without live instrumentation.Keep tool address spaces synchronized: Load the binary in angr with the same image base as Ghidra (e.g.,
0x00100000) so function/data addresses line up, avoiding mismatches when referencingFUN_00100e10or data likeDAT_00100bf4.Automate at scale with Ghidra’s API: Build a call‑site → (encoded_addr, size) map; enumerate callers of the decode routine via
ReferenceManager; for each call site, run the angr decoder and insert aPRE...🤖 Agent ActionsI analyzed the blog and HackTricks repository, and determined the most appropriate place to add the new content is in Basic Forensic Methodology -> Malware Analysis. The technique is a practical malware triage/reversing workflow that combines Ghidra with angr to statically execute in-binary decode routines (e.g., JNI name/signature decoders) and annotate results back into Ghidra. This content fits well as an Android-focused malware analysis trick alongside the existing “Android in-app native telemetry (no root)” subsection.
Actions performed:
Files modified:
No new files were created, and existing structure/style were preserved with proper Markdown and code blocks. The content is technical, includes commands/code, and follows HackTricks’ guidelines.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
🗑️ File Cleanup