YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Heracles
Detects Heracles infostealer
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 73
What this rule detects
Detects Heracles infostealer
Associated malware family: Heracles.
Targets: Windows PE.
It defines 21 patterns (21 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-heracles.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Heracles : FILE
{
meta:
= "Detects Heracles infostealer"
= "ditekSHen"
= "36cb9366-c70b-5117-955f-402f87f3a88c"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8833-L8861"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "1d5c80c084f9d6e4692a18f74574179095ecdd5eaadd70b5d16c19702761d74f"
= 75
= 73
= "FILE"
strings:
$x1 = "aHR0cHM6Ly9uYWNrZXIudG9hbnNlY3UuY29tL3VwbG9hZHM/a2V5PX" wide
$b1 = "XEdvb2dsZVxDaHJvbWVc" wide
$b2 = "XEJyYXZlU29mdHdhcmVcQnJhdmUtQnJvd3Nlcl" wide
$b3 = "XENvY0NvY1xCcm93c2VyX" wide
$b4 = "VXNlciBEYXRh" wide
$b5 = "RGVmYXVsdA" wide
$b6 = "UHJvZmlsZQ" wide
$b7 = "Q29va2llcw" wide
$b8 = "TG9naW4gRGF0YQ" wide
$b9 = "TG9jYWwgU3RhdGU" wide
$b10 = "bG9jYWxzdGF0ZQ" wide
$b11 = "bG9naW5kYXRh" wide
$s1 = "encrypted_key" fullword wide
$s2 = "<GetIpInfoAsync>d__" ascii
$s3 = "<reqHTML>5__" ascii
$s4 = "<idHardware>5__" ascii
$s5 = "<profilePaths>5__" ascii
$s6 = "<cookieFile>5__" ascii
$s7 = "<loginDataFile>5__" ascii
$s8 = "<localStateFile>5__" ascii
$s9 = "<postData>5__" ascii
condition:
uint16( 0 ) == 0x5a4d and ( 1 of ( $x* ) or 8 of ( $s* ) or ( 4 of ( $b* ) and 4 of ( $s* ) ) )
}
Strings (21 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "aHR0cHM6Ly9uYWNrZXIudG9hbnNlY3UuY29tL3VwbG9hZHM/a2V5PX" | wide |
| $b1 | text | "XEdvb2dsZVxDaHJvbWVc" | wide |
| $b2 | text | "XEJyYXZlU29mdHdhcmVcQnJhdmUtQnJvd3Nlcl" | wide |
| $b3 | text | "XENvY0NvY1xCcm93c2VyX" | wide |
| $b4 | text | "VXNlciBEYXRh" | wide |
| $b5 | text | "RGVmYXVsdA" | wide |
| $b6 | text | "UHJvZmlsZQ" | wide |
| $b7 | text | "Q29va2llcw" | wide |
| $b8 | text | "TG9naW4gRGF0YQ" | wide |
| $b9 | text | "TG9jYWwgU3RhdGU" | wide |
| $b10 | text | "bG9jYWxzdGF0ZQ" | wide |
| $b11 | text | "bG9naW5kYXRh" | wide |
| $s1 | text | "encrypted_key" | fullword wide |
| $s2 | text | "<GetIpInfoAsync>d__" | ascii |
| $s3 | text | "<reqHTML>5__" | ascii |
| $s4 | text | "<idHardware>5__" | ascii |
| $s5 | text | "<profilePaths>5__" | ascii |
| $s6 | text | "<cookieFile>5__" | ascii |
| $s7 | text | "<loginDataFile>5__" | ascii |
| $s8 | text | "<localStateFile>5__" | ascii |
| $s9 | text | "<postData>5__" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 1 of ( $x* ) or 8 of ( $s* ) or ( 4 of ( $b* ) and 4 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 patterns in ( $x* ) must match.
- At least 8 patterns in ( $s* ) must match.
- At least 4 patterns in ( $b* ) must match.
- At least 4 patterns in ( $s* ) 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: 36cb9366-c70b-5117-955f-402f87f3a88c
Tags:FILE
Related rules
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06