YARA · WithSecure Labs IOCs
WITHSECURELABS_Andariel_Gopherrat
Detects GopherRAT samples
- Author
- WithSecure
- Date
- 2026-01-22
- Score / Quality
- 75 / 75
What this rule detects
Detects GopherRAT samples
Targets: Windows PE.
It defines 8 patterns (7 text, 1 hex, 0 regex). YARA modules used: pe.
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
andariel-gopherrat.yarBSD 2-Clause License
import "pe"
rule WITHSECURELABS_Andariel_Gopherrat
{
meta:
= "Detects GopherRAT samples"
= "WithSecure"
= "88627e61-43fa-5d5b-94f3-77d540131f90"
= "2026-01-22"
= "2026-01-22"
= "https://github.com/WithSecureLabs/iocs"
= "https://github.com/WithSecureLabs/iocs/blob/1a8384468dd292c6d2c5114c32e42dc0da1f5ae1/Andariel2025/andariel.yara#L86-L105"
= "https://github.com/WithSecureLabs/iocs/blob/1a8384468dd292c6d2c5114c32e42dc0da1f5ae1/LICENSE"
= "2a42590be19b4b9a258c63f683c724165d64cc7bf22e4b7e7dec3ff73ea9175c"
= 75
= 75
= ""
strings:
$cmdName1 = "GetMACHashID"
$cmdName2 = "startHeartbeat"
$cmdName3 = "encodeTo949"
$cmdName4 = "xorDecrypt"
$cmdName5 = "StartShell"
$cmdName6 = "getLogicalDrives"
$cmdName7 = "sendSocksCommand"
$xorKey = {357095A221F033AC}
condition:
pe.is_pe and ( 3 of ( $cmdName* ) or $xorKey )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $cmdName1 | text | "GetMACHashID" | |
| $cmdName2 | text | "startHeartbeat" | |
| $cmdName3 | text | "encodeTo949" | |
| $cmdName4 | text | "xorDecrypt" | |
| $cmdName5 | text | "StartShell" | |
| $cmdName6 | text | "getLogicalDrives" | |
| $cmdName7 | text | "sendSocksCommand" | |
| $xorKey | hex | {357095A221F033AC} |
Condition
pe.is_pe and ( 3 of ( $cmdName* ) or $xorKey )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 patterns in ( $cmdName* ) must match.
- Uses the pe module.
- Pattern $xorKey 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: WithSecure
Source repository: WithSecure Labs IOCs @ 1a8384468d
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright (c) 2022, WithSecure Oyj
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 88627e61-43fa-5d5b-94f3-77d540131f90
Related rules
- Suspicious / huntingWithSecure Labs IOCs· WithSecure· 2026-01-22
- MalwareWithSecure Labs IOCs· WithSecure· 2026-01-22
- MalwareWithSecure Labs IOCs· WithSecure· 2022-11-17
- GenericWithSecure Labs IOCs· WithSecure· 2026-01-22
- GenericWithSecure Labs IOCs· WithSecure· 2026-01-22
- GenericWithSecure Labs IOCs· WithSecure· 2026-01-22
- GenericWithSecure Labs IOCs· WithSecure· 2026-01-22
- GenericWithSecure Labs IOCs· WithSecure· 2026-01-22