YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOLS_Localpotato
Detects LocalPotato
- Author
- ditekShen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 73
What this rule detects
Detects LocalPotato
Targets: Windows PE.
It defines 19 patterns (12 text, 7 hex, 0 regex).
YARA-X says: warning[text_as_hex]: hex pattern could be written as text literal
Summary generated from the rule's metadata and condition.
Rule source
indicator-tools-localpotato.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOLS_Localpotato : FILE
{
meta:
= "Detects LocalPotato"
= "ditekShen"
= "65f8305b-b830-58e7-970b-da1df9a06e9b"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1712-L1743"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "88fba16a6eec6d2c23331642041c6adfddddeb21ba8e74b6959bd48c90f73cbb"
= 75
= 73
= "FILE"
strings:
$x1 = "LocalPotato.stg" fullword wide
$x2 = "we always love potatoes" fullword ascii
$s1 = "{00000306-0000-0000-c000-000000000046}" wide
$s2 = "{854A20FB-2D44-457D-992F-EF13785D2B51}" wide
$s3 = "cifs/127.0.0.1" wide
$s4 = "\\\\127.0.0.1\\c$" wide
$s5 = "complete failed: 0x%08x" ascii
$s6 = "Authorization: NTLM %s" ascii
$s7 = "Objref Moniker Display Name = %S" ascii
$s8 = "SMB Connect Tree: %S" ascii
$s9 = "b64type=%s" fullword ascii
$s10 = "decodes=%s" fullword ascii
$s11 = { 53 4d 42 72 00 00 00 00 18 01 48 00 00 00 00 00
00 00 00 00 00 00 00 ff ff ac 7b 00 00 00 00 00
22 00 02 4e 54 20 4c 4d 20 30 2e 31 32 00 02 53
4d 42 20 32 2e 30 30 32 00 02 53 4d 42 20 32 2e
3f 3f 3f 00 00 00 00 00 00 00 00 00 00 00 68 fe
53 4d 42 40 }
$o1 = { 44 8b 4c 24 34 48 8d 44 24 38 48 89 44 24 28 4c }
$o2 = { e8 c4 ff ff ff 33 d2 48 8d 4d f0 41 b8 d0 04 00 }
$o3 = { 83 7b 0c 00 75 42 8b 03 25 ff ff ff 1f 3d 21 05 }
$o4 = { 3c 68 74 6c 3c 6a 74 5c 3c 6c 74 34 3c 74 74 24 }
$o5 = { e9 39 ff ff ff cc 48 89 5c 24 08 4c 89 4c 24 20 }
$o6 = { 48 b9 ff ff ff ff ff ff 0f 00 48 8b c2 41 b8 0c }
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or ( 1 of ( $x* ) and 5 of ( $s* ) ) or 8 of ( $s* ) or ( 4 of ( $o* ) and ( 1 of ( $x* ) or 5 of ( $s* ) ) ) )
}
Strings (19 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "LocalPotato.stg" | fullword wide |
| $x2 | text | "we always love potatoes" | fullword ascii |
| $s1 | text | "{00000306-0000-0000-c000-000000000046}" | wide |
| $s2 | text | "{854A20FB-2D44-457D-992F-EF13785D2B51}" | wide |
| $s3 | text | "cifs/127.0.0.1" | wide |
| $s4 | text | "\\\\127.0.0.1\\c$" | wide |
| $s5 | text | "complete failed: 0x%08x" | ascii |
| $s6 | text | "Authorization: NTLM %s" | ascii |
| $s7 | text | "Objref Moniker Display Name = %S" | ascii |
| $s8 | text | "SMB Connect Tree: %S" | ascii |
| $s9 | text | "b64type=%s" | fullword ascii |
| $s10 | text | "decodes=%s" | fullword ascii |
| $s11 | hex | { 53 4d 42 72 00 00 00 00 18 01 48 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ac 7b 00 00 00 00 00 22 00 02 4e 54 20 4c 4d 20 30 2e … | |
| $o1 | hex | { 44 8b 4c 24 34 48 8d 44 24 38 48 89 44 24 28 4c } | |
| $o2 | hex | { e8 c4 ff ff ff 33 d2 48 8d 4d f0 41 b8 d0 04 00 } | |
| $o3 | hex | { 83 7b 0c 00 75 42 8b 03 25 ff ff ff 1f 3d 21 05 } | |
| $o4 | hex | { 3c 68 74 6c 3c 6a 74 5c 3c 6c 74 34 3c 74 74 24 } | |
| $o5 | hex | { e9 39 ff ff ff cc 48 89 5c 24 08 4c 89 4c 24 20 } | |
| $o6 | hex | { 48 b9 ff ff ff ff ff ff 0f 00 48 8b c2 41 b8 0c } |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or ( 1 of ( $x* ) and 5 of ( $s* ) ) or 8 of ( $s* ) or ( 4 of ( $o* ) and ( 1 of ( $x* ) or 5 of ( $s* ) ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $x* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 5 patterns in ( $s* ) must match.
- At least 8 patterns in ( $s* ) must match.
- At least 4 patterns in ( $o* ) 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: ditekShen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 65f8305b-b830-58e7-970b-da1df9a06e9b
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21