Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Trickbotmodule

Detects Trickbot modules

MalwareTrickbotmoduleditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekshen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects Trickbot modules

Associated malware family: Trickbotmodule.

Targets: Windows PE.

It defines 14 patterns (13 text, 0 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-trickbotmodule.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Trickbotmodule : FILE
{
	meta:
		description = "Detects Trickbot modules"
		author = "ditekshen"
		id = "c56c664f-5928-5e2e-ab06-0b9d504981be"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3860-L3881"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "4d06653dad5f8a18598855212548364b3c3d2b68b99784846b494fcb1d1c8df9"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$mc = "<moduleconfig>" ascii
		$s1 = "<autostart>" ascii
		$s2 = "<nohead>" ascii
		$s3 = "<needinfo" ascii
		$s4 = "<conf ctl" ascii
		$s5 = "<limit>" ascii
		$w1 = "<sys>yes</sys>" ascii
		$w2 = "<sys>no</sys>" ascii
		$w3 = "<autostart>yes</autostart>" ascii
		$w4 = "<autostart>no</autostart>" ascii
		$w5 = "<nohead>yes</nohead>" ascii
		$w6 = "<nohead>no</nohead>" ascii
		$w7 = /<limit>\d+<\/limit>/ ascii
		$w8 = "<moduleconfig> </moduleconfig" ascii

	condition:
		uint16( 0 ) == 0x5a4d and $mc and ( 2 of ( $s* ) or ( 1 of ( $s* ) and 1 of ( $w* ) ) or 1 of ( $w* ) )
}

Strings (14 patterns)

IdentifierTypeValueModifiers
$mctext"<moduleconfig>"ascii
$s1text"<autostart>"ascii
$s2text"<nohead>"ascii
$s3text"<needinfo"ascii
$s4text"<conf ctl"ascii
$s5text"<limit>"ascii
$w1text"<sys>yes</sys>"ascii
$w2text"<sys>no</sys>"ascii
$w3text"<autostart>yes</autostart>"ascii
$w4text"<autostart>no</autostart>"ascii
$w5text"<nohead>yes</nohead>"ascii
$w6text"<nohead>no</nohead>"ascii
$w7regex/<limit>\d+<\/limit>/ascii
$w8text"<moduleconfig> </moduleconfig"ascii

Condition

uint16( 0 ) == 0x5a4d and $mc and ( 2 of ( $s* ) or ( 1 of ( $s* ) and 1 of ( $w* ) ) or 1 of ( $w* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $w* ) must match.
  • Pattern $mc must be present.

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: ditekshen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: c56c664f-5928-5e2e-ab06-0b9d504981be

Tags:FILE