Skip to content

YARA · Embee Research

EMBEERESEARCH_Win_Njrat_Strings_Oct_2023

MalwareNjratEmbee ResearchDetection Rule License 1.1Compiles with YARA-X
Author
Matthew @ Embee_Research
Date
2023-10-03
Score / Quality
75 / 75

What this rule detects

Associated malware family: Njrat.

Targets: .NET assembly.

It defines 6 patterns (6 text, 0 hex, 0 regex). YARA modules used: dotnet.

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

win-njrat-strings-oct-2023.yarDetection Rule License 1.1
import "dotnet"

rule EMBEERESEARCH_Win_Njrat_Strings_Oct_2023
{
	meta:
		description = ""
		author = "Matthew @ Embee_Research"
		id = "c89711cb-aae9-5409-80c2-145a8d5fca56"
		date = "2023-10-03"
		modified = "2023-10-03"
		reference = "https://github.com/embee-research/Yara-detection-rules/"
		source_url = "https://github.com/embee-research/Yara-detection-rules//blob/ac56d6f6fd2a30c8cb6e5c0455d6519210a8b0f4/Rules/win_njrat_strings_oct_2023.yar#L3-L25"
		license_url = "N/A"
		hash = "59d6e2958780d15131c102a93fefce6e388e81da7dc78d9c230aeb6cab7e3474"
		logic_hash = "ed36a991aa2699486f1ef34f4f4d559a3dd351180602f017ad7d868e146c703b"
		score = 75
		quality = 75
		tags = ""

	strings:
		$s1 = "netsh firewall delete allowedprogram" wide
		$s2 = "cmd.exe /c ping 0 -n 2 & del" wide
		$s3 = "netsh firewall add allowedprogram" wide
		$s4 = "Execute ERROR" wide
		$s5 = "Update ERROR" wide
		$s6 = "Download ERROR" wide

	condition:
		dotnet.is_dotnet and ( all of ( $s* ) )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$s1text"netsh firewall delete allowedprogram"wide
$s2text"cmd.exe /c ping 0 -n 2 & del"wide
$s3text"netsh firewall add allowedprogram"wide
$s4text"Execute ERROR"wide
$s5text"Update ERROR"wide
$s6text"Download ERROR"wide

Condition

dotnet.is_dotnet and ( all of ( $s* ) )

In plain words (Heuristic)

  • All patterns in ( $s* ) must match.
  • Uses the dotnet module.

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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 59d6e2958780d15131c102a93fefce6e388e81da7dc78d9c230aeb6cab7e3474

Licence & attribution

Author: Matthew @ Embee_Research

Source repository: Embee Research @ ac56d6f6fd

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: c89711cb-aae9-5409-80c2-145a8d5fca56

More Njrat rules