一个基于事件查看器日志检测可疑特权NTLM连接(尤其是Pass-The-Hash攻击)的小工具。
该工具是"Pass-The-Hash检测"研究的一部分——更多关于"Pass-The-Hash检测"的详细信息请查看博客文章:
https://www.cyberark.com/threat-research-blog/detecting-pass-the-hash-with-windows-event-viewer
完整研究可在白皮书中找到:
https://www.cyberark.com/resource/pass-hash-detection-using-windows-events/
(直接链接:http://lp.cyberark.com/rs/cyberarksoftware/images/wp-Labs-Pass-the-hash-research-01312018.pdf)
拥有以下权限的账户:
Ketshash 是一个基于以下信息检测可疑特权 NTLM 连接的工具:
有两种选项:
Import-Module .\Ketshash.ps1 或者复制粘贴 Ketshash.ps1 的内容到 PowerShell 会话Invoke-DetectPTH <参数>alt text
Invoke-DetectPTH -TargetComputers "MARS-7" -LogFile "C:\tmp\log.txt"
alt text
Invoke-DetectPTH -TargetComputers "ComputerName" -StartTime ([datetime]"2017-12-14 12:50:00 PM") -LogFile "C:\tmp\log.txt" -UseKerberosCheck -UseNewCredentialsCheck
alt text
由于使用了线程,无法直接调试主函数的脚本块。
一种变通方法是使用 Invoke-Command,然后再调用 Detect-PTHMultithreaded:
Invoke-Command -ScriptBlock $detectPTHScriptBlock -ArgumentList $TargetComputers, $startTime, $LogFile, $UseKerberosCheck, $UseNewCredentialsCheck, $MaxHoursOfLegitLogonPriorToNTLMEvent`
仅检测一台目标计算机:
Invoke-DetectPTH -TargetComputers "<computer_name>" ...
将 $TargetComputer 改为 [string] 类型而不是 [array]。
这样可以在主函数的脚本块内设置断点。
如有更多评论和问题,可联系 Eviatar Gerzi (@g3rzi) 和 CyberArk Labs。