Potential PowerShell Pass-the-Hash/Relay Script

Last updated 8 days ago on 2026-01-26
Created 2 years ago on 2024-03-27

About

Detects PowerShell scripts associated with NTLM relay or pass-the-hash tooling and SMB/NTLM negotiation artifacts. Attackers use relay and PtH techniques to authenticate without passwords and pivot to other systems.
Tags
Domain: EndpointOS: WindowsUse Case: Threat DetectionTactic: Credential AccessData Source: PowerShell LogsLanguage: kuery
Severity
high
Risk Score
73
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

Execution (TA0002)(external, opens in a new tab or window)

Lateral Movement (TA0008)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Query (Kibana Query Language)
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
winlogbeat-*logs-windows.powershell*
Related Integrations

windows(external, opens in a new tab or window)

Query
text code block:
event.category:process and host.os.type:windows and powershell.file.script_block_text : ( ("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or "4E544C4D53535000" or "0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" or "0x4e,0x54,0x20,0x4c,0x4d" or "0x53,0x4d,0x42,0x20,0x32" or "0x81,0xbb,0x7a,0x36,0x44,0x98,0xf1,0x35,0xad,0x32,0x98,0xf0,0x38" ) and not file.directory : "C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads"

Install detection rules in Elastic Security

Detect Potential PowerShell Pass-the-Hash/Relay Script in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).