YARA · SEKOIA.IO Community
SEKOIA_Tool_Exploit_Badpotato_Strings
Detects BadPotato compiled exploit
- Author
- Sekoia.io
- Date
- 2022-09-09
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects BadPotato compiled exploit
Targets: Windows PE.
It defines 6 patterns (6 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
tool-exploit-badpotato-strings.yarDetection Rule License 1.1
rule SEKOIA_Tool_Exploit_Badpotato_Strings : FILE
{
meta:
= "Detects BadPotato compiled exploit"
= "Sekoia.io"
= "079aabbc-6978-4d71-92d2-d2a7ce1cc915"
= "2022-09-09"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_exploit_badpotato_strings.yar#L1-L22"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "a45935ea5877a4b81468cbe0e1a4a7232b955771442f84bb3b88b7992ed23937"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "RpcStringBindingCompose failed with status 0x" wide
$ = "RpcBindingFromStringBinding failed with status 0x" wide
$ = "RpcBindingSetAuthInfoEx failed with status 0x" wide
$ = "RpcBindingSetOption failed with status 0x" wide
$ = "\\\\.\\pipe\\{0}\\pipe\\spoolss" wide
$ = "[*] {0} Success! ProcessPid:{1}" wide
condition:
uint16be( 0 ) == 0x4d5a and filesize < 1MB and 5 of them
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "RpcStringBindingCompose failed with status 0x" | wide |
| $ | text | "RpcBindingFromStringBinding failed with status 0x" | wide |
| $ | text | "RpcBindingSetAuthInfoEx failed with status 0x" | wide |
| $ | text | "RpcBindingSetOption failed with status 0x" | wide |
| $ | text | "\\\\.\\pipe\\{0}\\pipe\\spoolss" | wide |
| $ | text | "[*] {0} Success! ProcessPid:{1}" | wide |
Condition
uint16be( 0 ) == 0x4d5a and filesize < 1MB and 5 of themIn 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: 079aabbc-6978-4d71-92d2-d2a7ce1cc915
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-09-09