Repository navigation
Add Quark malware analysis report for BrainTest - #977
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #977 +/- ##
=======================================
Coverage 81.28% 81.28%
=======================================
Files 84 84
Lines 7923 7923
=======================================
Hits 6440 6440
Misses 1483 1483
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
haeter525
approved these changes
Oct 3, 2026
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.
BrainTest Malware Family Analysis Report
This report analyses the BrainTest malware family using Quark's rule classification. BrainTest is Android malware Check Point found in 2015 inside a Google Play game of the same name. It runs root exploits, installs a component into the system partition so that a factory reset does not remove it, and pulls further code from its server on demand. The four samples analysed here are one chain: the game itself, the helper package it drops, and the payload that helper installs. This run added a new rule (#280) for running a shell command and capturing its error output; the rule fires inside BrainTest's own root-shell helper, but under a technique this report does not claim — see the coverage-gap note on T1404. Check here for the rule details.
Quark's rule classification flagged 4 of 4 BrainTest samples as high-risk in this experiment (detection rate 100%). Benign-cohort false-positive rate was not measured here. See tested APKs below.
Identified Well-Known Threats
This section uses MITRE ATT&CK Mobile as its reference taxonomy, anchored to the S0293 BrainTest software entry. Of the 5 techniques documented for the family, Quark's static bytecode analysis confirms the 1 listed below; see the coverage-gap notes at the end of this section for the other 4.
All behavior maps below were rendered from sample
135d6acff3ca27e6e7997429e5f8051f88215d12351e4103f8344cd66611e0f3.apk(packagecom.android.system.certificate, the payload at the end of the chain) — chosen as the representative sample whose detected behaviors most fully cover the documented profile of BrainTest. The other 3 family samples were used to compute the detection-rate figure above.Each section below corresponds to one technique from the table above. Within each section we first quote the MITRE definition, then show the Quark behavior map extracted from the representative sample's bytecode, then walk through the call sequence and list the underlying rules.
1. T1407 Download New Code at Runtime
T1407 Download New Code at Runtime — attack.mitre.org
Lcom/android/system/certificate/ConfigService$1;runcallsConfigService;f, which opens a URL and reads the server's response. The response names the file to fetch and the method to call;runthen writes that file into the app's private directory, loads it, and invokes the named method through reflection.Behaviors detected by Quark:
Coverage-gap notes
The 4 MITRE techniques documented for BrainTest that this report does NOT demonstrate, grouped by the reason Quark could not confirm them on these samples:
The evidence sits in a string argument, which Quark does not read (3) — T1404 Exploitation for Privilege Escalation, T1645 Compromise Client Software Binary and T1643 Generate Traffic from Victim. Quark's rules match API calls, not the values passed to them, and for all three techniques the API call is generic while the argument carries the meaning:
Lcom/android/system/certificate/h;gand its twinLcom/android/music/helper/i;C): it callsRuntime.exec, writes command lines to the process's input stream, and reads back both output streams. Quark confirms that helper at full data-flow depth — it is where this run's new rule Version 21.11.1 #280 fires — but whether the command is an exploit (T1404) or the system-partition copy MITRE records for T1645 is decided by the text handed to it. The commands themselves are in the samples:Lcom/android/music/helper/f$1;runassemblesmount -o remount,rw /system,mkdir /system/bin/.daemon, and acatthat writes a binary into that directory.Lcom/nn/googlePlayInstall;startInstallandLcom/nn/AutoGuideGPInstall;startInstall— each drawing a mask view over the screen while it runs — plusFileUtil;installPackageandmain;doRate. Quark flags these as "implicit intent" and "install other APKs from file". What makes them store manipulation is the intent's destination, which is not part of the API pair, so the cluster reads as ordinary intent launching and was not claimed.No rule in the pool covers the primitive (1) — T1406 Obfuscated Files or Information. MITRE records that BrainTest keeps a second Android package in its assets in encrypted form and decrypts it at runtime. One sample does carry such a package (
assets/brother), though in that sample it is stored as a plain ZIP, andLcom/android/music/helper/eholds AES-CBC and DES routines used elsewhere in the code. But of the 280 rules in the pool, only one touches cryptography at all (#24, Base64 decoding followed by a file write) and none pairs aCiphercall with anything, so the decryption step cannot fire. The rules that do fire show an asset being read, which is what every app does with its bundled resources. Separately, the game sample96f95e43…is wrapped in the Baidu packer (libbaiduprotect.so), so Quark cannot see the code it hides — which is why that sample contributes no behaviour evidence here, though the rule pool still scores it high-risk.List of Tested APKs
The table below lists the APKs we tested.
🤖 Generated with Claude Code