Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Crimeware_Njrat_Strings

Detects njRAT based on some strings

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

What this rule detects

Detects njRAT based on some strings

Associated malware family: Njrat.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

crimeware-njrat-strings.yarDetection Rule License 1.1
rule SEKOIA_Crimeware_Njrat_Strings : FILE
{
	meta:
		description = "Detects njRAT based on some strings"
		author = "Sekoia.io"
		id = "215807ae-fbcb-478d-8941-e0787b883669"
		date = "2022-08-22"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/crimeware_njrat_strings.yar#L1-L24"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "47102adde81682c3c1c856c3495c6f98a9e39aa052eac2ab0a803dab44d19c26"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "set cdaudio door closed" wide
		$ = "set cdaudio door open" wide
		$ = "ping 0" wide
		$ = "[endof]" wide
		$ = "TiGeR-Firewall" wide
		$ = "NetSnifferCs" wide
		$ = "IPBlocker" wide
		$ = "Sandboxie Control" wide

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 1MB and 5 of them
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$text"set cdaudio door closed"wide
$text"set cdaudio door open"wide
$text"ping 0"wide
$text"[endof]"wide
$text"TiGeR-Firewall"wide
$text"NetSnifferCs"wide
$text"IPBlocker"wide
$text"Sandboxie Control"wide

Condition

uint16be( 0 ) == 0x4d5a and filesize < 1MB and 5 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • At least 5 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: 215807ae-fbcb-478d-8941-e0787b883669

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE

More Njrat rules