Suspicious Credential Files Creation via Kerberos
Description
Identifies network connections to the standard Kerberos or SMB ports from an unusual process followed by the creation of a sensitive file such as kerberos ticket and certificate keys. On Windows, the only native system process that normally performs Kerberos traffic from a domain joined host is lsass.exe and SMB is the System virtual process. This may indicate an ongoing Kerberos attack.
Query · eql
sequence by process.entity_id with maxspan=1m
[network where
destination.port in (88, 445) and source.port >= 49152 and
network.direction == "egress" and network.transport == "tcp" and
process.pid != 4 and
not process.executable :
("?:\\Windows\\System32\\lsass.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\lsass.exe",
"?:\\Program Files (x86)\\*.exe",
"?:\\Program Files\\*.exe")]
[file where event.action in ("creation", "overwrite") and
/* dumping PFX, CCACHE or KIRBI via kerberos */
(file.extension in~ ("ccache", "pfx", "kirbi") or file.Ext.header_bytes : ("0504*", "3082*", "768*")) and
not (process.name : "powershell.exe" and file.path : "?:\\Windows\\ServiceProfiles\\LocalService\\AppData\\*") and
not (process.code_signature.trusted == true and process.code_signature.subject_name in ("KASEYA US LLC", "The Apache Software Foundation")) and
not file.path like "C:\\Users\\*\\AppData\\LocalLow\\Microsoft\\CryptnetUrlCache\\Content\\*"]