Question
index="main" sourcetype="WinEventLog:Sysmon" EventCode=1 CommandLine="*PsExec*"
| rex field=CommandLine "(?i)(?:-p[:=]?\s*['\"]?(?<psexec_password>[^'\"\s]+)['\"]?)|(?:-password[:=]?\s*['\"]?(?<psexec_password2>[^'\"\s]+)['\"]?)"
| eval password=coalesce(psexec_password, psexec_password2)
| where isnotnull(password)
| table _time, Host, User, CommandLine, password
| dedup password
| sort 0 _time
Last updated