YARA · Costin Raiu yararules
CRAIU_Apt_ZZ_Orangeworm_Kwampirs_Shamoon_Code
Kwampirs and Shamoon common code
- Author
- FBI / cywatch@fbi.gov
- Date
- 2020-01-14
- Modified
- 2020-03-31
- Score / Quality
- 75 / 85
What this rule detects
Kwampirs and Shamoon common code
Associated malware family: Kwampirs.
Targets: Windows PE.
It defines 3 patterns (0 text, 3 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-zz-orangeworm-kwampirs-shamoon-code.yarGNU General Public License v3.0
rule CRAIU_Apt_ZZ_Orangeworm_Kwampirs_Shamoon_Code : FILE
{
meta:
= "Kwampirs and Shamoon common code"
= "FBI / cywatch@fbi.gov"
= "0d403b3b-a5a8-5ac6-a12d-7181a1ad11b3"
= "2020-01-14"
= "2020-03-31"
= "https://assets.documentcloud.org/documents/6821582/FLASH-CP-000118-MW-Downgraded-Version.pdf"
= "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/files/apt_zz_orangeworm.yara#L85-L105"
= "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/LICENSE"
= "5ab949280be87d242ad2843dee001eee5a338e266ef52da55883f7c77e66cf5b"
= 75
= 85
= "FILE"
= "3.7.0"
strings:
$memcpy = { 56 8B F0 85 FF 74 19 85 D2 74 15 8B CF 85 F6 74 0B 2B D7 8A 04 0A 88 01 41 4E 75 F7 8B C7 5E C3 33 C0 5E C3 }
$strlenW = { 33 C0 85 C9 74 17 80 3C 41 00 75 07 80 7C 41 01 00 74 0A 3D 00 94 35 77 73 03 40 EB E9 C3 }
$strcmp = { 85 C0 75 07 85 D2 75 40 B0 01 C3 85 D2 74 39 66 83 38 00 56 74 24 0F B7 0A 66 85 C9 74 16
66 8B 30 83 C2 02 83 C0 02 66 3B F1 75 18 66 83 38 00 75 E4 EB 06 66 83 38 00 75 0A 66 83 3A 00 75 04 B0
01 5E C3 32 C0 5E C3 32 C0 C3 }
condition:
( uint16( 0 ) == 0x5a4d ) and ( 1 of them )
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $memcpy | hex | { 56 8B F0 85 FF 74 19 85 D2 74 15 8B CF 85 F6 74 0B 2B D7 8A 04 0A 88 01 41 4E 75 F7 8B C7 5E C3 33 C0 5E C3 } | |
| $strlenW | hex | { 33 C0 85 C9 74 17 80 3C 41 00 75 07 80 7C 41 01 00 74 0A 3D 00 94 35 77 73 03 40 EB E9 C3 } | |
| $strcmp | hex | { 85 C0 75 07 85 D2 75 40 B0 01 C3 85 D2 74 39 66 83 38 00 56 74 24 0F B7 0A 66 85 C9 74 16 66 8B 30 83 C2 02 83 C0 02 66 3B F1 75 18 66 83 38 00 75 E4 EB 06 … |
Condition
( uint16( 0 ) == 0x5a4d ) and ( 1 of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 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.
Licence & attribution
Author: FBI / cywatch@fbi.gov
Source repository: Costin Raiu yararules @ 23cf0ca220
Licence: GNU General Public License v3.0 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 0d403b3b-a5a8-5ac6-a12d-7181a1ad11b3
Metadata
| yara_version | 3.7.0 |
|---|
Tags:FILE
Related rules
- APT / threat actorCostin Raiu yararules· FBI / cywatch@fbi.gov· 2020-01-14
- APT / threat actorCostin Raiu yararules· FBI / cywatch@fbi.gov· 2020-01-14
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04