Skip to content

Add new Quark rule for BrainTest malware detection - #92

Merged
haeter525 merged 1 commit into
ev-flow:masterfrom
pulorsok:rules-for-braintest
Oct 1, 2026
Merged

haeter525 merged 1 commit into
ev-flow:masterfrom
pulorsok:rules-for-braintest

Conversation

@pulorsok

Copy link
Copy Markdown
Member

Four BrainTest samples — MITRE S0293 — joined the malware corpus. This adds one new rule and resyncs the retrained weights.

New rule #00280 — Runtime.exec + Process.getErrorStream, "Execute shell command and capture error output".

  • Trained score +0.62
  • Fires at level 5 in 24 of 725 malware samples and 0 of 190 benign samples; benign hits never reach level 3
  • The pool's existing shell rules pair exec with Process.getOutputStream (Add Rules to detect TrickMo Family #69) or DataOutputStream.writeBytes (#00155); none covers reading the error stream back
  • In BrainTest it fires in the family's root-shell helper (Lcom/android/system/certificate/h;g and Lcom/android/music/helper/i;C), which execs a command, writes command lines to its input stream and reads both output streams

The rule the pruning step auto-selected (SharedPreferences.getString + Editor.remove) trained to -2.41 and was discarded.

Score resync — existing rules retrained against the enlarged corpus; the diff on existing files touches only the score field.

The accompanying analysis report is submitted separately to quark-engine.

🤖 Generated with Claude Code

New rule #00280 pairs Runtime.exec with Process.getErrorStream, flagging
code that runs a shell command and reads back its error output. Scores for
the existing pool are resynced after retraining against the enlarged corpus.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@haeter525 haeter525 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haeter525
haeter525 merged commit 80c902f into ev-flow:master Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants