Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Trojan_Android_Brata

Detect samples of the Android banking trojan BRATA

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-01-27
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect samples of the Android banking trojan BRATA

Targets: ZIP / Office Open XML.

It defines 11 patterns (11 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

trojan-android-brata.yarDetection Rule License 1.1
rule SEKOIA_Trojan_Android_Brata : FILE
{
	meta:
		description = "Detect samples of the Android banking trojan BRATA"
		author = "Sekoia.io"
		id = "fde9b82e-c677-44ed-b512-b225a3aba201"
		date = "2022-01-27"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/trojan_android_brata.yar#L1-L29"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "0c94e5e0c01d4fa9bf28603787029938a3159f468dd3876e7d25646e93dd68b8"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$goo0 = "Google Play services error"
		$goo1 = "Error de Serveis de Google Play"
		$goo2 = "Fehler bei Zugriff auf Google Play-Dienste"
		$goo3 = "Erro nos servizos de Google Play"
		$goo4 = "Fout met Google Play-services"
		$goo5 = "Virhe Google Play -palveluissa"
		$goo6 = "Erro do Google Play Services"
		$goo7 = "Error de Google Play Services"
		$res0 = "res/xml/device_admin.xml"
		$res1 = "res/xml/windowchangedetectingservice.xml"
		$res2 = "res/xml-v22/windowchangedetectingservice.xml"

	condition:
		uint32be( 0 ) == 0x504B0304 and filesize > 2MB and filesize < 6MB and 7 of ( $goo* ) and 2 of ( $res* )
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$goo0text"Google Play services error"
$goo1text"Error de Serveis de Google Play"
$goo2text"Fehler bei Zugriff auf Google Play-Dienste"
$goo3text"Erro nos servizos de Google Play"
$goo4text"Fout met Google Play-services"
$goo5text"Virhe Google Play -palveluissa"
$goo6text"Erro do Google Play Services"
$goo7text"Error de Google Play Services"
$res0text"res/xml/device_admin.xml"
$res1text"res/xml/windowchangedetectingservice.xml"
$res2text"res/xml-v22/windowchangedetectingservice.xml"

Condition

uint32be( 0 ) == 0x504B0304 and filesize > 2MB and filesize < 6MB and 7 of ( $goo* ) and 2 of ( $res* )

In plain words (Heuristic)

  • The file must start with “PK” — a ZIP archive (also Office Open XML, JAR, APK).
  • The file must be smaller than 6MB (a cheap guard that skips large files).
  • The file must be larger than 2MB.
  • At least 7 patterns in ( $goo* ) must match.
  • At least 2 patterns in ( $res* ) must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: fde9b82e-c677-44ed-b512-b225a3aba201

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE