Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Ta428_Tmanger_Strings

Detects Tmanger malware

APT / threat actorTmangerSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-09-06
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects Tmanger malware

Associated malware family: Tmanger.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-ta428-tmanger-strings.yarDetection Rule License 1.1
rule SEKOIA_Apt_Ta428_Tmanger_Strings : FILE
{
	meta:
		description = "Detects Tmanger malware"
		author = "Sekoia.io"
		id = "f600404d-3f93-4e3f-bba7-9f519f67c6cb"
		date = "2022-09-06"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_ta428_tmanger_strings.yar#L1-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "e045f38367fa7f3cdcc908e60de4386889c7878c95b1a40f63fd70683699b0f1"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "sock_hmutex" wide ascii
		$ = "cmd_hmutex" wide ascii
		$ = "%s_%d.bmp" wide ascii
		$ = "WSAStartup Error!" wide ascii
		$ = "4551-8f84-08e738aec" wide ascii
		$ = "Init failed!" wide ascii
		$ = "GetLanIP error!" wide ascii
		$ = "chcp & exit" wide ascii
		$ = "GetHostname error!" wide ascii
		$ = "[Num Lock]" wide ascii

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 200KB and 4 of them
}

Strings (10 patterns)

IdentifierTypeValueModifiers
$text"sock_hmutex"wide ascii
$text"cmd_hmutex"wide ascii
$text"%s_%d.bmp"wide ascii
$text"WSAStartup Error!"wide ascii
$text"4551-8f84-08e738aec"wide ascii
$text"Init failed!"wide ascii
$text"GetLanIP error!"wide ascii
$text"chcp & exit"wide ascii
$text"GetHostname error!"wide ascii
$text"[Num Lock]"wide ascii

Condition

uint16be( 0 ) == 0x4d5a and filesize < 200KB and 4 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 200KB (a cheap guard that skips large files).
  • At least 4 patterns in the rule 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: f600404d-3f93-4e3f-bba7-9f519f67c6cb

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE