Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Oilrig_Maliciousdocument_May2022

Detects OilRig Malicious Document

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-05-13
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects OilRig Malicious Document

Targets: OLE / legacy Office.

It defines 7 patterns (7 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

apt-oilrig-maliciousdocument-may2022.yarDetection Rule License 1.1
rule SEKOIA_Apt_Oilrig_Maliciousdocument_May2022 : FILE
{
	meta:
		description = "Detects OilRig Malicious Document"
		author = "Sekoia.io"
		id = "cb4ab310-e24c-4edc-8804-0c49c30124fb"
		date = "2022-05-13"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_oilrig_maliciousdocument_may2022.yar#L1-L22"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "d4aa960d4471ddf66ec6f98a5c883177763771ba9960b749509311a05384d9a7"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "<LogonType>InteractiveToken</LogonType>"
		$s2 = "Select * From Win32_PingStatus Where Address"
		$s3 = "She@et1"
		$s4 = "_VBA_PROJECT" wide
		$s5 = "This program cannot be run in DOS mode." base64
		$s6 = ".Agent.pdb" base64
		$s7 = "GetAgentID" base64

	condition:
		uint32be( 0 ) == 0xD0CF11E0 and 3 of them
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text"<LogonType>InteractiveToken</LogonType>"
$s2text"Select * From Win32_PingStatus Where Address"
$s3text"She@et1"
$s4text"_VBA_PROJECT"wide
$s5text"This program cannot be run in DOS mode."base64
$s6text".Agent.pdb"base64
$s7text"GetAgentID"base64

Condition

uint32be( 0 ) == 0xD0CF11E0 and 3 of them

In plain words (Heuristic)

  • The file must start with the OLE header — legacy Office documents, MSI.
  • At least 3 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.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: cb4ab310-e24c-4edc-8804-0c49c30124fb

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE