Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Kimsuky_Konni_Dll

Rule based on structure offset and file extension

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

What this rule detects

Rule based on structure offset and file extension

Associated malware family: Kimsuky, Konni.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

kimsuky-konni-dll.yarDetection Rule License 1.1
rule SEKOIA_Kimsuky_Konni_Dll : FILE
{
	meta:
		description = "Rule based on structure offset and file extension"
		author = "Sekoia.io"
		id = "6a20c492-e932-41bd-ac4a-01d35bfb0c49"
		date = "2022-09-12"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/kimsuky_konni_dll.yar#L1-L29"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "7099156decdfe35cde22958133d851479f12180fff7b5744af0c549ab8259636"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ext_1 = ".zip" wide ascii fullword
		$ext_2 = ".cab" wide ascii fullword
		$ext_3 = ".rar" wide ascii fullword
		$ext_4 = ".ini" wide ascii fullword
		$ext_5 = ".dat" wide ascii fullword
		$offset_structure_1 = { 8d ?? 08 02 00 00 }
		$offset_structure_2 = { 8d ?? 10 04 00 00 }
		$offset_structure_3 = { 8d ?? 18 06 00 00 }
		$offset_structure_4 = { 8d ?? 20 08 00 00 }
		$offset_structure_5 = { 8d ?? 28 0a 00 00 }
		$offset_structure_6 = { 89 ?? f8 11 00 00 }
		$offset_structure_7 = { 8d ?? fc 11 00 00 }
		$offset_structure_8 = { 89 ?? 0c 12 00 00 }
		$offset_structure_9 = { 89 ?? 10 12 00 00 }

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 11MB and all of them
}

Strings (14 patterns)

IdentifierTypeValueModifiers
$ext_1text".zip"wide ascii fullword
$ext_2text".cab"wide ascii fullword
$ext_3text".rar"wide ascii fullword
$ext_4text".ini"wide ascii fullword
$ext_5text".dat"wide ascii fullword
$offset_structure_1hex{ 8d ?? 08 02 00 00 }
$offset_structure_2hex{ 8d ?? 10 04 00 00 }
$offset_structure_3hex{ 8d ?? 18 06 00 00 }
$offset_structure_4hex{ 8d ?? 20 08 00 00 }
$offset_structure_5hex{ 8d ?? 28 0a 00 00 }
$offset_structure_6hex{ 89 ?? f8 11 00 00 }
$offset_structure_7hex{ 8d ?? fc 11 00 00 }
$offset_structure_8hex{ 89 ?? 0c 12 00 00 }
$offset_structure_9hex{ 89 ?? 10 12 00 00 }

Condition

uint16be( 0 ) == 0x4d5a and filesize < 11MB and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 11MB (a cheap guard that skips large files).
  • All 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: 6a20c492-e932-41bd-ac4a-01d35bfb0c49

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE

More Kimsuky rules