Potential Credential Access via Ptrace
Description
Identifies potential credential access through ptrace. Attackers may abuse ptrace to inspect sensitive authentication processes such as sshd, su, or sudo and extract credentials or session material from memory. This rule correlates process execution with a ptrace request targeting one of these sensitive processes. Such behavior is uncommon by default and should be investigated.
Query · eql
sequence with maxspan=15s
[process where event.type == "start" and event.action == "exec" and process.name in (
"sshd", "ssh",
"su", "sudo", "sudoedit",
"passwd", "chsh", "chfn", "newgrp", "gpasswd",
"login", "agetty", "getty", "unix_chkpwd",
"pkexec", "polkitd",
"sssd", "sssd_pam", "sssd_nss",
"krb5_child", "ldap_child", "nslcd", "winbindd"
)] by process.pid
[process where event.type == "start" and event.action == "ptrace"] by process.Ext.ptrace.child_pid