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.
- 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
rule SIGNATURE_BASE_HKTL_Koh_Tokenstealer : FILE
{
meta:
= "The TypeLibGUID present in a .NET binary maps directly to the ProjectGuid found in the '.csproj' file of a .NET project."
= "Will Schroeder (@harmj0y)"
= "76b6cc9f-5db7-5e9b-939c-e713bad8137a"
= "2022-07-09"
= "2023-12-05"
= "https://github.com/GhostPack/Koh"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_hktl_koh_tokenstealer.yar#L2-L18"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "e2c4d948e23f1a3a92689f35fedde6e041d09cd88deac9ff3249556be0b8f789"
= 75
= 85
= "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)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x_typelibguid | text | "4d5350c8-7f8c-47cf-8cde-c752018af17e" | ascii |
| $s1 | text | "[*] Already SYSTEM, not elevating" | wide fullword |
| $s2 | text | "S-1-[0-59]-\\d{2}-\\d{8,10}-\\d{8,10}-\\d{8,10}-[1-9]\\d{2}" | wide |
| $s3 | text | "0x[0-9A-Fa-f]+$" | wide |
| $s4 | text | "\\Koh.pdb" | ascii |
Condition
uint16( 0 ) == 0x5A4D and 1 of ( $x* ) or 3 of themIn 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.
References
Licence & attribution
Author: Will Schroeder (@harmj0y)
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
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