YARA · SEKOIA.IO Community
SEKOIA_Apt_Windows_Wip19_Screencap
Detects ScreenCap resource
- Author
- Sekoia.io
- Date
- 2022-10-18
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects ScreenCap resource
Associated malware family: Screencap.
Targets: Windows PE, Linux ELF.
It has no patterns: the condition alone decides (modules, file properties or other rules). YARA modules used: pe, hash.
YARA-X says: warning[deprecated_field]: field `number_of_resources` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
import "hash"
rule SEKOIA_Apt_Windows_Wip19_Screencap : FILE
{
meta:
= "Detects ScreenCap resource"
= "Sekoia.io"
= "ebf5d2c5-81c9-45c3-aa61-05870f800f6b"
= "2022-10-18"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_windows_wip19_screencap.yar#L4-L18"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "02479f0c8199b31f089608da0f44f1487b75790cb31c77bb65ca1fb0fd57ac0d"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
condition:
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "89f4d0e3f7f3318270aa9c8345c1402202b1a02ffefc03c7a86636e297aa0ffc" ) and filesize < 2MB
}
Condition
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "89f4d0e3f7f3318270aa9c8345c1402202b1a02ffefc03c7a86636e297aa0ffc" ) and filesize < 2MBIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must start with the ELF header — a Linux/Unix executable.
- The file must be smaller than 2MB (a cheap guard that skips large files).
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Uses the hash module.
- Compares a hash of the file or a part of it.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
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: ebf5d2c5-81c9-45c3-aa61-05870f800f6b
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11