Skip to content

YARA · WithSecure Labs IOCs

WITHSECURELABS_Ducktail_Nativeaot

Detects NativeAOT variants of DUCKTAIL malware

MalwareDucktailWithSecure Labs IOCsBSD 2-Clause LicenseCompiles with YARA-X
Author
WithSecure
Date
2022-11-17
Modified
2022-11-22
Score / Quality
75 / 75

What this rule detects

Detects NativeAOT variants of DUCKTAIL malware

Associated malware family: Ducktail.

Targets: Windows PE.

It has no patterns: the condition alone decides (modules, file properties or other rules). 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.

ducktail-nativeaot.yarBSD 2-Clause License
import "pe"

rule WITHSECURELABS_Ducktail_Nativeaot : FILE
{
	meta:
		description = "Detects NativeAOT variants of DUCKTAIL malware"
		author = "WithSecure"
		id = "1961d3e1-987b-588b-bfc2-8239797cd049"
		date = "2022-11-17"
		modified = "2022-11-22"
		reference = "https://labs.withsecure.com/publications/ducktail_returns"
		source_url = "https://github.com/WithSecureLabs/iocs/blob/1a8384468dd292c6d2c5114c32e42dc0da1f5ae1/DUCKTAIL/ducktail_nativeaot.yara#L2-L22"
		license_url = "https://github.com/WithSecureLabs/iocs/blob/1a8384468dd292c6d2c5114c32e42dc0da1f5ae1/LICENSE"
		hash = "b043e4639f89459cae85161e6fbf73b22470979e"
		hash = "073b092bf949c31628ee20f7458067bbb05fda3a"
		hash = "d1f6b5f9718a2fe9eaac0c1a627228d3f3b86f87"
		logic_hash = "976b28ac45e5a13d4ce900b857e6bd3afc82b65b0235791fd698b762287cd60e"
		score = 75
		quality = 75
		tags = "FILE"
		version = "1.0"

	condition:
		uint16( 0 ) == 0x5A4D and filesize > 15MB and ( pe.section_index ( ".managed" ) >= 0 or pe.exports ( "DotNetRuntimeDebugHeader" ) ) and pe.exports ( "SendFile" ) and pe.exports ( "Start" ) and pe.exports ( "Open" )
}

Condition

uint16( 0 ) == 0x5A4D and filesize > 15MB and ( pe.section_index ( ".managed" ) >= 0 or pe.exports ( "DotNetRuntimeDebugHeader" ) ) and pe.exports ( "SendFile" ) and pe.exports ( "Start" ) and pe.exports ( "Open" )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be larger than 15MB.
  • Uses the pe module.
  • Checks exported functions or the DLL name.
  • Checks PE sections (names, count or properties).

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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • b043e4639f89459cae85161e6fbf73b22470979e
  • 073b092bf949c31628ee20f7458067bbb05fda3a
  • d1f6b5f9718a2fe9eaac0c1a627228d3f3b86f87

Licence & attribution

Author: WithSecure

Source repository: WithSecure Labs IOCs @ 1a8384468d

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright (c) 2022, WithSecure Oyj

Original rule

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

Rule id: 1961d3e1-987b-588b-bfc2-8239797cd049

Metadata

version1.0

Tags:FILE

More Ducktail rules