YARA · SEKOIA.IO Community
SEKOIA_Apt_Gamaredon_Gamaredon_Lnk_Usb_Spreader_Encoded
Detects encoded version of Gamaredon LNK USB Spreader
- Author
- Sekoia.io
- Date
- 2023-06-19
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects encoded version of Gamaredon LNK USB Spreader
It defines 4 patterns (4 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-gamaredon-gamaredon-lnk-usb-spreader-encoded.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Gamaredon_Lnk_Usb_Spreader_Encoded : FILE
{
meta:
= "Detects encoded version of Gamaredon LNK USB Spreader"
= "Sekoia.io"
= "e42bb654-d1aa-4219-b3da-dd4053d59a83"
= "2023-06-19"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_gamaredon_gamaredon_lnk_usb_spreader_encoded.yar#L1-L19"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "28358a4a6acdcdfc6d41ea642220ef98c63b9c3ef2268449bb02d2e2e71e7c01"
= "81ab55330b3003cb698ade7e14eaea5fb03e5d2d3dd310b7db682aeef9b51f6e"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = "[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(" ascii
$s2 = " 1000000){" base64
$s3 = "+\"\\$" base64
$s4 = ",3\";" base64
condition:
$s1 at 0 and 3 of them and filesize < 4000
}
Strings (4 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(" | ascii |
| $s2 | text | " 1000000){" | base64 |
| $s3 | text | "+\"\\$" | base64 |
| $s4 | text | ",3\";" | base64 |
Condition
$s1 at 0 and 3 of them and filesize < 4000In plain words (Heuristic)
- The file must be smaller than 4000 (a cheap guard that skips large files).
- At least 3 patterns in the rule must match.
- Pattern $s1 must be found at offset 0.
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
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 28358a4a6acdcdfc6d41ea642220ef98c63b9c3ef2268449bb02d2e2e71e7c01
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: e42bb654-d1aa-4219-b3da-dd4053d59a83
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