YARA · SEKOIA.IO Community
SEKOIA_Apt_Konni
Rule based on structure offsets and file extension
- Author
- Sekoia.io
- Date
- 2022-09-12
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Rule based on structure offsets and file extension
Associated malware family: Konni.
Targets: Windows PE.
It defines 9 patterns (6 text, 3 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-konni.yarDetection Rule License 1.1
rule SEKOIA_Apt_Konni : FILE
{
meta:
= "Rule based on structure offsets and file extension"
= "Sekoia.io"
= "6a20c492-e932-41bd-ac4a-01d35bfb0c49"
= "2022-09-12"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_konni.yar#L1-L25"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "8f178421fd0968f4ce809054022579c7fc8dede5f6514e89966d13acb83d75d9"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ext_1 = ".zip" wide ascii fullword
$ext_2 = ".cab" wide ascii fullword
$ext_3 = ".rar" wide ascii fullword
$ext_4 = ".ini" wide ascii fullword
$ext_5 = ".dat" wide ascii fullword
$offset_structure_1 = { 8d ?? 08 02 00 00 }
$offset_structure_2 = { 8d ?? 10 04 00 00 }
$offset_structure_3 = { 8d ?? 18 06 00 00 }
$url = "%s/dn.php?name=%s&prefix=%s" wide
condition:
uint16be( 0 ) == 0x4d5a and filesize < 3MB and 3 of ( $ext_* ) and all of ( $offset_structure_* ) and $url
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ext_1 | text | ".zip" | wide ascii fullword |
| $ext_2 | text | ".cab" | wide ascii fullword |
| $ext_3 | text | ".rar" | wide ascii fullword |
| $ext_4 | text | ".ini" | wide ascii fullword |
| $ext_5 | text | ".dat" | wide ascii fullword |
| $offset_structure_1 | hex | { 8d ?? 08 02 00 00 } | |
| $offset_structure_2 | hex | { 8d ?? 10 04 00 00 } | |
| $offset_structure_3 | hex | { 8d ?? 18 06 00 00 } | |
| $url | text | "%s/dn.php?name=%s&prefix=%s" | wide |
Condition
uint16be( 0 ) == 0x4d5a and filesize < 3MB and 3 of ( $ext_* ) and all of ( $offset_structure_* ) and $urlIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 3MB (a cheap guard that skips large files).
- All patterns in ( $offset_structure_* ) must match.
- At least 3 patterns in ( $ext_* ) must match.
- Pattern $url must be present.
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: 6a20c492-e932-41bd-ac4a-01d35bfb0c49
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-11-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-11-27
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-09-26
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-09-26
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-09-26
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-09-12
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10