Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_LOG_Exchange_Forensic_Artefacts_Cleanup_Activity_Mar21_1

Detects forensic artefacts showing cleanup activity found in HAFNIUM intrusions exploiting

ExploitSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2021-03-08
Modified
2023-12-05
Score / Quality
70 / 85

What this rule detects

Detects forensic artefacts showing cleanup activity found in HAFNIUM intrusions exploiting

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

Summary generated from the rule's metadata and condition.

Rule source

log-exchange-forensic-artefacts-cleanup-activity-mar21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_LOG_Exchange_Forensic_Artefacts_Cleanup_Activity_Mar21_1 : LOG
{
	meta:
		description = "Detects forensic artefacts showing cleanup activity found in HAFNIUM intrusions exploiting"
		author = "Florian Roth (Nextron Systems)"
		id = "95b19544-147b-5496-b717-669cbc488179"
		date = "2021-03-08"
		modified = "2023-12-05"
		reference = "https://twitter.com/jdferrell3/status/1368626281970024448"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_hafnium_log_sigs.yar#L48-L65"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "12e5b76dafcae13f1eb21913ae0bde233152fd8b9d29f073893418ac9f742de3"
		score = 70
		quality = 85
		tags = "LOG"

	strings:
		$x1 = "cmd.exe /c cd /d C:/inetpub/wwwroot/aspnet_client" ascii wide
		$x2 = "cmd.exe /c cd /d C:\\inetpub\\wwwroot\\aspnet_client" ascii wide
		$s1 = "aspnet_client&del '"
		$s2 = "aspnet_client&attrib +h +s +r "
		$s3 = "&echo [S]"

	condition:
		1 of ( $x* ) or 2 of them
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$x1text"cmd.exe /c cd /d C:/inetpub/wwwroot/aspnet_client"ascii wide
$x2text"cmd.exe /c cd /d C:\\inetpub\\wwwroot\\aspnet_client"ascii wide
$s1text"aspnet_client&del '"
$s2text"aspnet_client&attrib +h +s +r "
$s3text"&echo [S]"

Condition

1 of ( $x* ) or 2 of them

In plain words (Heuristic)

  • At least 1 patterns in ( $x* ) must match.
  • At least 2 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: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: 95b19544-147b-5496-b717-669cbc488179

Tags:LOG