Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Koh_Tokenstealer

The TypeLibGUID present in a .NET binary maps directly to the ProjectGuid found in the '.csproj' file of a .NET project.

Hack toolSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Will Schroeder (@harmj0y)
Date
2022-07-09
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

The TypeLibGUID present in a .NET binary maps directly to the ProjectGuid found in the '.csproj' file of a .NET project.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

hktl-koh-tokenstealer.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Koh_Tokenstealer : FILE
{
	meta:
		description = "The TypeLibGUID present in a .NET binary maps directly to the ProjectGuid found in the '.csproj' file of a .NET project."
		author = "Will Schroeder (@harmj0y)"
		id = "76b6cc9f-5db7-5e9b-939c-e713bad8137a"
		date = "2022-07-09"
		modified = "2023-12-05"
		reference = "https://github.com/GhostPack/Koh"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_hktl_koh_tokenstealer.yar#L2-L18"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "e2c4d948e23f1a3a92689f35fedde6e041d09cd88deac9ff3249556be0b8f789"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$x_typelibguid = "4d5350c8-7f8c-47cf-8cde-c752018af17e" ascii
		$s1 = "[*] Already SYSTEM, not elevating" wide fullword
		$s2 = "S-1-[0-59]-\\d{2}-\\d{8,10}-\\d{8,10}-\\d{8,10}-[1-9]\\d{2}" wide
		$s3 = "0x[0-9A-Fa-f]+$" wide
		$s4 = "\\Koh.pdb" ascii

	condition:
		uint16( 0 ) == 0x5A4D and 1 of ( $x* ) or 3 of them
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$x_typelibguidtext"4d5350c8-7f8c-47cf-8cde-c752018af17e"ascii
$s1text"[*] Already SYSTEM, not elevating"wide fullword
$s2text"S-1-[0-59]-\\d{2}-\\d{8,10}-\\d{8,10}-\\d{8,10}-[1-9]\\d{2}"wide
$s3text"0x[0-9A-Fa-f]+$"wide
$s4text"\\Koh.pdb"ascii

Condition

uint16( 0 ) == 0x5A4D and 1 of ( $x* ) or 3 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 1 patterns in ( $x* ) must match.
  • 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: Will Schroeder (@harmj0y)

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: 76b6cc9f-5db7-5e9b-939c-e713bad8137a

Tags:FILE