Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Wiper_Win_Nominatus_Toxicbattery

Detect the Nominatus_ToxicBattery malware

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-11-21
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the Nominatus_ToxicBattery malware

Targets: Windows PE.

It defines 13 patterns (13 text, 0 hex, 0 regex). YARA modules used: pe, hash.

YARA-X says: warning[deprecated_field]: field `number_of_sections` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

wiper-win-nominatus-toxicbattery.yarDetection Rule License 1.1
import "pe"
import "hash"

rule SEKOIA_Wiper_Win_Nominatus_Toxicbattery : FILE
{
	meta:
		description = "Detect the Nominatus_ToxicBattery malware"
		author = "Sekoia.io"
		id = "0262378f-f509-4ea4-a3eb-cd0183c4361d"
		date = "2022-11-21"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/wiper_win_nominatus_toxicbattery.yar#L4-L42"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "c226a4c3bcc451482eb782c1cb84f3e956be1e214368d1b315076078d3148955"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "DISK"
		$ = "FileNaME"
		$ = "FILNAME"
		$ = "runCommand"
		$ = "HAHAH"
		$ = "Damage"
		$ = "fastInfector"
		$ = "d:\\again\\SharpDevelop Projects\\RInjector\\Virus.win32RozbehStrike\\obj\\Debug\\Nominatus_ToxicBattery.pdb"
		$ = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run" wide
		$ = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon" wide
		$ = "\\Antivirus.bat" wide
		$ = "\\Antivirus3.vbs" wide
		$ = "vssadmin Delete Shadows /all /quiet" wide

	condition:
		uint16( 0 ) == 0x5A4D and 10 of them or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "e7f35c173c34b7080d437a90ec90a982" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "2e25c5d3baba182f008a5a15c6f06403" ) or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "70b1c002e4c0c9782c7ce1ef4a13c58ec1da54a26fd06dd7821a71f29431da82" )
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$text"DISK"
$text"FileNaME"
$text"FILNAME"
$text"runCommand"
$text"HAHAH"
$text"Damage"
$text"fastInfector"
$text"d:\\again\\SharpDevelop Projects\\RInjector\\Virus.win32RozbehStrike\\obj\\Debug\\Nominatus_ToxicBattery.pdb"
$text"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"wide
$text"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"wide
$text"\\Antivirus.bat"wide
$text"\\Antivirus3.vbs"wide
$text"vssadmin Delete Shadows /all /quiet"wide

Condition

uint16( 0 ) == 0x5A4D and 10 of them or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "e7f35c173c34b7080d437a90ec90a982" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "2e25c5d3baba182f008a5a15c6f06403" ) or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "70b1c002e4c0c9782c7ce1ef4a13c58ec1da54a26fd06dd7821a71f29431da82" )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 10 patterns in the rule must match.
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Uses the hash module.
  • Compares a hash of the file or a part of it.
  • Checks PE sections (names, count or properties).

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: 0262378f-f509-4ea4-a3eb-cd0183c4361d

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE