Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Blacknet

Detects BlackNET RAT

MalwareBlacknetditekSHen 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 BlackNET RAT

Associated malware family: Blacknet.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-blacknet.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Blacknet : FILE
{
	meta:
		description = "Detects BlackNET RAT"
		author = "ditekSHen"
		id = "c1ece46a-3cd9-54aa-a105-1c5b19357a7e"
		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#L2222-L2250"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "64e00325a5a6a595067c6133800e73d943f45e2783475c24ed4a9bd9937fe0d6"
		score = 75
		quality = 75
		tags = "FILE"
		snort2_sid = "920079-920082"
		snort3_sid = "920079-920082"
		clamav_sig = "MALWARE.Win.Trojan.BlackNET"

	strings:
		$s1 = "SbieCtrl" fullword wide
		$s2 = "SpyTheSpy" fullword wide
		$s3 = "\\BlackNET.dat" fullword wide
		$s4 = "StartDDOS" fullword wide
		$s5 = "UDPAttack" fullword wide
		$s6 = "ARMEAttack" fullword wide
		$s7 = "TCPAttack" fullword wide
		$s8 = "HTTPGetAttack" fullword wide
		$s9 = "RetriveLogs" fullword wide
		$s10 = "StealPassword" fullword wide
		$s11 = "/create /f /sc ONSTART /RL HIGHEST /tn \"'" fullword wide
		$b1 = "DeleteScript|BN|" fullword wide
		$b2 = "|BN|Online" fullword wide
		$b3 = "NewLog|BN|" fullword wide
		$cnc1 = "/getCommand.php?id=" fullword wide
		$cnc2 = "/upload.php?id=" fullword wide
		$cnc3 = "connection.php?data=" fullword wide
		$cnc4 = "/receive.php?command=" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 9 of ( $s* ) or all of ( $cnc* ) or all of ( $b* ) or 12 of them )
}

Strings (18 patterns)

IdentifierTypeValueModifiers
$s1text"SbieCtrl"fullword wide
$s2text"SpyTheSpy"fullword wide
$s3text"\\BlackNET.dat"fullword wide
$s4text"StartDDOS"fullword wide
$s5text"UDPAttack"fullword wide
$s6text"ARMEAttack"fullword wide
$s7text"TCPAttack"fullword wide
$s8text"HTTPGetAttack"fullword wide
$s9text"RetriveLogs"fullword wide
$s10text"StealPassword"fullword wide
$s11text"/create /f /sc ONSTART /RL HIGHEST /tn \"'"fullword wide
$b1text"DeleteScript|BN|"fullword wide
$b2text"|BN|Online"fullword wide
$b3text"NewLog|BN|"fullword wide
$cnc1text"/getCommand.php?id="fullword wide
$cnc2text"/upload.php?id="fullword wide
$cnc3text"connection.php?data="fullword wide
$cnc4text"/receive.php?command="fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( 9 of ( $s* ) or all of ( $cnc* ) or all of ( $b* ) or 12 of them )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $cnc* ) must match.
  • All patterns in ( $b* ) must match.
  • At least 9 patterns in ( $s* ) must match.
  • At least 12 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: 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: c1ece46a-3cd9-54aa-a105-1c5b19357a7e

Metadata

snort2_sid920079-920082
snort3_sid920079-920082
clamav_sigMALWARE.Win.Trojan.BlackNET

Tags:FILE