This YARA rule detects the presence of Pass-the-Hash (PtH) executable artifacts, indicating an adversary is likely leveraging stolen credential hashes to authenticate without a password. Proactively hunting for these specific binaries in Azure Sentinel allows the SOC to identify lateral movement attempts and unauthorized access before they escalate to privilege escalation or data exfiltration.
rule PassEXEv20
{
meta:
author="malware-lu"
strings:
$a0 = { 06 1E 0E 0E 07 1F BE [2] B9 [2] 87 14 81 [3] EB ?? C7 [3] 84 00 87 [3] FB 1F 58 4A }
condition:
$a0 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
PASSWORD attribute or embeds a password string in the PE header/metadata, triggering the YARA rule.
powershell.exe or pwsh.exe and the command line contains arguments like -Pass, -Password, or Set-ItemProperty targeting System.Security.Cryptography. Alternatively, whitelist specific script paths under C:\Scripts\InternalTools\.ccmexec.exe or msiexec.exe) creates a temporary password-protected executable in the %TEMP% or %APPDATA% directory during the installation phase.
%TEMP%, %TMP%, C:\Windows\Temp) if the parent process is a known deployment agent (ccmexec.exe, msiexec.exe, intunecompanion.exe). Add a path exclusion for C:\Windows\Installer\ and C:\ProgramData\Microsoft\Intune\.