YARA · CAPE Sandbox (CAPEv2)
CAPE_Nightshadec2
NightshadeC2 AKA CastleRAT - https://x.com/YungBinary/status/1963751038340534482
- Author
- YungBinary
- Date
- 2025-09-04
- Modified
- 2025-09-12
- Score / Quality
- 75 / 70
What this rule detects
NightshadeC2 AKA CastleRAT - https://x.com/YungBinary/status/1963751038340534482
Associated malware family: Nightshade C2.
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule CAPE_Nightshadec2 : FILE
{
meta:
= "NightshadeC2 AKA CastleRAT - https://x.com/YungBinary/status/1963751038340534482"
= "YungBinary"
= "d70f9051-c7ab-537a-ab80-03ae7ef80b81"
= "2025-09-04"
= "2025-09-12"
= "https://github.com/kevoreilly/CAPEv2"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/data/yara/CAPE/NightshadeC2.yar#L1-L20"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
= "963c012d56c62093d105ab5044517fdcce4ab826f7782b3e377932da1df6896d"
= "f9fabc391e21180a1c92abea0a5ded6d7669e8d8f2330b69d6c1227c9b4237a0"
= 75
= 70
= "FILE"
= "NightshadeC2 Payload"
strings:
$s1 = "keylog.txt" fullword wide
$s2 = "\"%ws\" --mute-audio --do-not-de-elevate" fullword wide
$s3 = "\"%ws\" -no-deelevate" fullword wide
$s4 = "MachineGuid" fullword wide
$s5 = "www.ip-api.com" fullword wide
$s6 = "rundll32 \"C:\\Windows\\System32\\shell32.dll\" #61" fullword wide
$s7 = "IsabellaWine" fullword wide
$s8 = "Shell_TrayWnd" fullword wide
condition:
uint16( 0 ) == 0x5A4D and 3 of them
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "keylog.txt" | fullword wide |
| $s2 | text | "\"%ws\" --mute-audio --do-not-de-elevate" | fullword wide |
| $s3 | text | "\"%ws\" -no-deelevate" | fullword wide |
| $s4 | text | "MachineGuid" | fullword wide |
| $s5 | text | "www.ip-api.com" | fullword wide |
| $s6 | text | "rundll32 \"C:\\Windows\\System32\\shell32.dll\" #61" | fullword wide |
| $s7 | text | "IsabellaWine" | fullword wide |
| $s8 | text | "Shell_TrayWnd" | fullword wide |
Condition
uint16( 0 ) == 0x5A4D and 3 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 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.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 963c012d56c62093d105ab5044517fdcce4ab826f7782b3e377932da1df6896d
Licence & attribution
Author: YungBinary
Source repository: CAPE Sandbox (CAPEv2) @ 6b15e76f28
Licence: GNU General Public License v3.0 (repository licence)
Copyright notice: Cuckoo Sandbox is copyrighted by the Cuckoo Foundation.
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: d70f9051-c7ab-537a-ab80-03ae7ef80b81
Metadata
| cape_type | NightshadeC2 Payload |
|---|
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareCAPE Sandbox (CAPEv2)· YungBinary· 2024-10-25
- MalwareCAPE Sandbox (CAPEv2)· YungBinary· 2025-10-17
- GenericCAPE Sandbox (CAPEv2)· YungBinary· 2026-04-11
- GenericCAPE Sandbox (CAPEv2)· YungBinary· 2025-10-24