Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_PWS_Rubeus

Detects Rubeus kerberos defensive/offensive toolset

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

What this rule detects

Detects Rubeus kerberos defensive/offensive toolset

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-pws-rubeus.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_PWS_Rubeus : FILE
{
	meta:
		description = "Detects Rubeus kerberos defensive/offensive toolset"
		author = "ditekSHen"
		id = "5af8cee0-e664-5dfe-9932-0e74ed41b6b4"
		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#L514-L531"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ee817d23427970d7e77f9ce2a7cbc25c77177d81354fed83e7551cdcbc2d7cd2"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" fullword wide
		$s2 = "(!samAccountName=krbtgt)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))" fullword wide
		$s3 = "rc4opsec" fullword wide
		$s4 = "pwdlastset" fullword wide
		$s5 = "LsaEnumerateLogonSessions" fullword ascii
		$s6 = "extractKerberoastHash" fullword ascii
		$s7 = "ComputeAllKerberosPasswordHashes" fullword ascii
		$s8 = "kerberoastDomain" fullword ascii
		$s9 = "GetUsernamePasswordTGT" fullword ascii
		$s10 = "WriteUserPasswordToFile" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and 8 of them
}

Strings (10 patterns)

IdentifierTypeValueModifiers
$s1text"(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=4194304))"fullword wide
$s2text"(!samAccountName=krbtgt)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))"fullword wide
$s3text"rc4opsec"fullword wide
$s4text"pwdlastset"fullword wide
$s5text"LsaEnumerateLogonSessions"fullword ascii
$s6text"extractKerberoastHash"fullword ascii
$s7text"ComputeAllKerberosPasswordHashes"fullword ascii
$s8text"kerberoastDomain"fullword ascii
$s9text"GetUsernamePasswordTGT"fullword ascii
$s10text"WriteUserPasswordToFile"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and 8 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 8 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: 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: 5af8cee0-e664-5dfe-9932-0e74ed41b6b4

Tags:FILE