YARA · SEKOIA.IO Community
SEKOIA_Generic_Bat_Script_Mock_Http_Services
Generic rule detecting BAT script using mock HTTP services (used by APT28)
- Author
- Sekoia.io
- Date
- 2023-09-07
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Generic rule detecting BAT script using mock HTTP services (used by APT28)
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
generic-bat-script-mock-http-services.yarDetection Rule License 1.1
rule SEKOIA_Generic_Bat_Script_Mock_Http_Services : FILE
{
meta:
= "Generic rule detecting BAT script using mock HTTP services (used by APT28)"
= "Sekoia.io"
= "1cfbe5ba-6304-476d-8308-928100a85c16"
= "2023-09-07"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/generic_bat_script_mock_http_services.yar#L1-L23"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "d34be59cfb054895381580e7852bba6b899cfb680882b7fd24a72438131c3bee"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$bat1 = "@echo off"
$bat2 = "chcp 65001"
$ps1 = "WebClient"
$ps2 = "UploadString"
$dom1 = "mockbin.org"
$dom2 = "webhook.site"
$dom3 = "mocky.io"
$dom4 = "pipedream.com"
condition:
(1 of ( $bat* ) or 1 of ( $ps* ) ) and 1 of ( $dom* ) and filesize < 2000
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $bat1 | text | "@echo off" | |
| $bat2 | text | "chcp 65001" | |
| $ps1 | text | "WebClient" | |
| $ps2 | text | "UploadString" | |
| $dom1 | text | "mockbin.org" | |
| $dom2 | text | "webhook.site" | |
| $dom3 | text | "mocky.io" | |
| $dom4 | text | "pipedream.com" |
Condition
(1 of ( $bat* ) or 1 of ( $ps* ) ) and 1 of ( $dom* ) and filesize < 2000In plain words (Heuristic)
- The file must be smaller than 2000 (a cheap guard that skips large files).
- At least 1 patterns in ( $bat* ) must match.
- At least 1 patterns in ( $ps* ) must match.
- At least 1 patterns in ( $dom* ) 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: 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: 1cfbe5ba-6304-476d-8308-928100a85c16
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- 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
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06