Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_PWS_Mimikatz

Detects Mimikatz

Suspicious / huntingMimikatzditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-09-25
Score / Quality
75 / 73

What this rule detects

Detects Mimikatz

Associated malware family: Mimikatz.

Targets: Windows PE.

It defines 23 patterns (15 text, 7 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-pws-mimikatz.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_PWS_Mimikatz : FILE
{
	meta:
		description = "Detects Mimikatz"
		author = "ditekSHen"
		id = "feb236c0-6e0d-5c2c-a050-cf1d000aaf38"
		date = "2020-11-06"
		modified = "2024-09-25"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L131-L164"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "42c9c78c88bb7c427d5f0bf1d3b0113205780142b499eb17858037ded0f2971e"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$s1 = "mimilib.dll" ascii
		$s2 = "mimidrv.sys" ascii
		$s3 = "mimikatz.exe" ascii
		$s4 = "\\mimidrv.pdb" ascii
		$s5 = "mimikatz" ascii
		$s6 = { 6d 00 69 00 6d 00 69 00 6b 00 61 00 74 00 7a }
		$s7 = { 5c 00 6d 00 69 00 6d 00 69 00 64 00 72 00 76 }
		$s8 = { 6d 00 69 00 6d 00 69 00 64 00 72 00 76 }
		$s9 = "Lecture KIWI_MSV1_0_" ascii
		$s10 = "Search for LSASS process" ascii
		$f1 = "SspCredentialList" ascii
		$f2 = "KerbGlobalLogonSessionTable" ascii
		$f3 = "LiveGlobalLogonSessionList" ascii
		$f4 = "TSGlobalCredTable" ascii
		$f5 = "g_MasterKeyCacheList" ascii
		$f6 = "l_LogSessList" ascii
		$f7 = "lsasrv!" ascii
		$f8 = "SekurLSA" ascii
		$f9 = /Cached(Unlock|Interative|RemoteInteractive)/ ascii
		$dll_1 = { c7 0? 00 00 01 00 [4-14] c7 0? 01 00 00 00 }
		$dll_2 = { c7 0? 10 02 00 00 ?? 89 4? }
		$sys_x86 = { a0 00 00 00 24 02 00 00 40 00 00 00 [0-4] b8 00 00 00 6c 02 00 00 40 00 00 00 }
		$sys_x64 = { 88 01 00 00 3c 04 00 00 40 00 00 00 [0-4] e8 02 00 00 f8 02 00 00 40 00 00 00 }

	condition:
		uint16( 0 ) == 0x5a4d and ( 2 of ( $* ) or 3 of ( $f* ) or all of ( $dll_* ) or any of ( $sys_* ) )
}

Strings (23 patterns)

IdentifierTypeValueModifiers
$s1text"mimilib.dll"ascii
$s2text"mimidrv.sys"ascii
$s3text"mimikatz.exe"ascii
$s4text"\\mimidrv.pdb"ascii
$s5text"mimikatz"ascii
$s6hex{ 6d 00 69 00 6d 00 69 00 6b 00 61 00 74 00 7a }
$s7hex{ 5c 00 6d 00 69 00 6d 00 69 00 64 00 72 00 76 }
$s8hex{ 6d 00 69 00 6d 00 69 00 64 00 72 00 76 }
$s9text"Lecture KIWI_MSV1_0_"ascii
$s10text"Search for LSASS process"ascii
$f1text"SspCredentialList"ascii
$f2text"KerbGlobalLogonSessionTable"ascii
$f3text"LiveGlobalLogonSessionList"ascii
$f4text"TSGlobalCredTable"ascii
$f5text"g_MasterKeyCacheList"ascii
$f6text"l_LogSessList"ascii
$f7text"lsasrv!"ascii
$f8text"SekurLSA"ascii
$f9regex/Cached(Unlock|Interative|RemoteInteractive)/ascii
$dll_1hex{ c7 0? 00 00 01 00 [4-14] c7 0? 01 00 00 00 }
$dll_2hex{ c7 0? 10 02 00 00 ?? 89 4? }
$sys_x86hex{ a0 00 00 00 24 02 00 00 40 00 00 00 [0-4] b8 00 00 00 6c 02 00 00 40 00 00 00 }
$sys_x64hex{ 88 01 00 00 3c 04 00 00 40 00 00 00 [0-4] e8 02 00 00 f8 02 00 00 40 00 00 00 }

Condition

uint16( 0 ) == 0x5a4d and ( 2 of ( $* ) or 3 of ( $f* ) or all of ( $dll_* ) or any of ( $sys_* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $dll_* ) must match.
  • At least one pattern in ( $sys_* ) must match.
  • At least 2 patterns in ( $* ) must match.
  • At least 3 patterns in ( $f* ) 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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: feb236c0-6e0d-5c2c-a050-cf1d000aaf38

Tags:FILE

More Mimikatz rules