Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Win_Disabledefender

detects strings and imphash

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

What this rule detects

detects strings and imphash

Targets: Windows PE.

It defines 5 patterns (5 text, 0 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.

apt-win-disabledefender.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Apt_Win_Disabledefender
{
	meta:
		description = "detects strings and imphash"
		author = "Sekoia.io"
		id = "a7b124ab-4c9d-47c0-a59e-211cc713b9b3"
		date = "2022-09-23"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_win_disabledefender.yar#L3-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "3b8c8d9144d9f97ee053c7cefc30d3920940bc33efcd1d7f5c61666217ef7896"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "Restarting with privileges"
		$ = "Windows defender is currently ACTIVE"
		$ = "Windows defender is currently OFF"
		$ = "Disabled windows defender"
		$ = "Failed to disable defender..."

	condition:
		4 of them or pe.imphash ( ) == "74a6ef9e7b49c71341e439022f643c8e"
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$text"Restarting with privileges"
$text"Windows defender is currently ACTIVE"
$text"Windows defender is currently OFF"
$text"Disabled windows defender"
$text"Failed to disable defender..."

Condition

4 of them or pe.imphash ( ) == "74a6ef9e7b49c71341e439022f643c8e"

In plain words (Heuristic)

  • At least 4 patterns in the rule must match.
  • Uses the pe module.
  • Checks the PE import hash (imphash).

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: a7b124ab-4c9d-47c0-a59e-211cc713b9b3

Metadata

version1.0
classificationTLP:CLEAR