Octagon Technical Analysis of a Fake Bahrain Civil Defense A... - #2597
Open
carlospolop wants to merge 1 commit into
Open
Octagon Technical Analysis of a Fake Bahrain Civil Defense A...#2597carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://labs.k7computing.com/index.php/octagon-technical-analysis-of-a-fake-bahrain-civil-defense-application Content Categories: Based on the analysis, this content was categorized under "Mobile Pentesting > Android Applications Pentesting, with additions to Accessibility Services Abuse and a new Android Dynamic Code Loading and Dropper Analysis subsection; cross-reference Basic Forensic Methodology > Malware Analysis > Android Malware Post-Exploitation". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
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
Octagon is a high-severity, multi-stage Android surveillance Trojan/RAT analyzed by K7 and distributed primarily to users in Bahrain as
BH-Alert.apk. The campaign impersonates the official BH Alert emergency service, while the installed application uses an icon similar to MyGov - Bahrain. Reported phishing and download infrastructure includeshttps://download[.]alertbh[.]info/BH-Alert.apk,https://bh-alert[.]co...🔧 Technical DetailsManifest-to-runtime DEX staging: Android malware can declare activities and services in
AndroidManifest.xmlwhile intentionally omitting their implementations from the rootclasses.dex. The missing code can be stored under a misleading asset extension, decrypted into private application storage, and loaded withDexClassLoader. A reusable analysis method is to compare manifest component names against every packaged DEX, identify unresolved classes, instrument asset reads and file writes with Frida, and monitor DEX-loading APIs to recover the runtime payload.Encrypted payload disguised as a benign asset: An executable DEX can be encrypted and packaged as an apparently harmless resource such as
ZfChs.ttf. At runtime, the application decrypts the asset—in this case with an RC4-based routine—writes a valid DEX such asZfChs.dex, and dynamically executes it. Detection should not ...🤖 Agent Actions
Using repo inspection to find the best existing Android/mobile page before deciding on any edit.
Reading the most relevant Android/mobile/malware pages to avoid duplicating existing coverage and to choose one best target file.
Now checking whether the blog’s techniques are already documented: dynamic DEX loading, PackageInstaller staging, VPN abuse, sync/account persistence, and Android malware forensic artifacts.
The malware post-exploitation page already looks close, so I’m reading the exact sections that match this campaign to see what is still missing versus the blog.
I’ve confirmed heavy overlap already exists, so I’m now checking for the truly missing pieces: manifest-vs-DEX diffing, AccountManager/SyncAdapter persistence, and artifact-centric triage.
I chose the Android malware post-exploitation page as the best single target because this blog is mostly malware tradecraft, and that file already hosts the adjacent VPN/dropper/dynamic-loader patterns. Now I’m checking the exact insertion point and reference format before editing.
I found a gap worth adding: the repo already covers PackageInstaller, VPN blackholes, and dynamic DEX loading, but not the specific manifest-vs-root-DEX hunting workflow plus SyncAdapter/AccountManager persistence and artifact-oriented triage. I’m updating the single malware-analysis file with that missing tradecraft.
Verifying that only the intended file changed and that the inserted section reads cleanly in context.
Done.
Updated:
src/generic-methodologies-and-resources/basic-forensic-methodology/android-malware-post-exploitation.mdAdded concise new coverage for the parts not already documented:
PackageInstallerstaging with nested childDEX/JARloadingAccountManager+ Sync Adapter persistence## ReferencesI chose this file instead of adding to the Android pentesting pages because the blog is mainly Android malware post-exploitation tradecraft, and Accessibility abuse / generic dynamic loading were already covered elsewhere.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.