YARA · SEKOIA.IO Community
SEKOIA_Backdoor_Powershellempire_Csharp
Detects CSharp version of Empire
- Author
- Sekoia.io
- Date
- 2022-04-15
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects CSharp version of Empire
Targets: Windows PE.
It defines 9 patterns (9 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
backdoor-powershellempire-csharp.yarDetection Rule License 1.1
rule SEKOIA_Backdoor_Powershellempire_Csharp : FILE
{
meta:
= "Detects CSharp version of Empire"
= "Sekoia.io"
= "952e8e9b-8e4d-4550-9cf4-7ffd2f9d0672"
= "2022-04-15"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_powershellempire_csharp.yar#L1-L23"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "536ef1167627c3dadb866d55e7eae2220c3fbd6961e2cfa71656656d984b9b90"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "[-] Catastrophic .Net Agent Failure, Attempting Agent Restart:" ascii wide
$ = "[!] Upload failed - No Delimiter" ascii wide
$ = "SELECT * FROM Win32_IP4RouteTable" ascii wide
$ = "no shell command supplied" ascii wide
$ = "[-] CmdletInvocationException:" ascii wide
$ = "[*] File download of" ascii wide
$ = "Script successfully saved in memory" ascii wide
$ = "Invoke-Empire" ascii wide
$ = "website to reach:" ascii wide
condition:
uint16be( 0 ) == 0x4d5a and 5 of them and filesize < 1MB
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "[-] Catastrophic .Net Agent Failure, Attempting Agent Restart:" | ascii wide |
| $ | text | "[!] Upload failed - No Delimiter" | ascii wide |
| $ | text | "SELECT * FROM Win32_IP4RouteTable" | ascii wide |
| $ | text | "no shell command supplied" | ascii wide |
| $ | text | "[-] CmdletInvocationException:" | ascii wide |
| $ | text | "[*] File download of" | ascii wide |
| $ | text | "Script successfully saved in memory" | ascii wide |
| $ | text | "Invoke-Empire" | ascii wide |
| $ | text | "website to reach:" | ascii wide |
Condition
uint16be( 0 ) == 0x4d5a and 5 of them and filesize < 1MBIn 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.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 952e8e9b-8e4d-4550-9cf4-7ffd2f9d0672
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-04-22
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20