靶场介绍 & 环境信息

春秋云境 $\to$ 仿真场景 $\to$ 专业徽章 $\to$ Initial:

file-20260408200532812

开启场景后,给了一个 IP 地址:

  • 39.99.151.82

重要提醒:

由于我写 WP 并非一次性写完,而靶场一直开着会消耗沙砾(╯︿╰),每次重开靶场给的目标 IP 地址会有区别,请大家见谅。但是,内网地址都是稳定。

二、信息搜集

Rustscan 配合 Nmap 进行 TCP 全端口扫描 + 指纹识别 + 操作系统识别:


sudo rustscan -a 39.99.151.82 -r 1-65535 -- -sV -O -Pn -n -oA 39.99.151.82_TCP_Ports

结果信息:


PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0) 80/tcp open http Apache httpd 2.4.41 ((Ubuntu))

根据端口指纹可以判断对方的操作系统是 Ubuntu。

补一波 UDP 高价值端口(20个)扫描 + 指纹识别:


sudo nmap -sV -sU --top-ports 20 39.99.151.82 -Pn -n -oA 39.99.151.82_UDP_Ports

结果:

  • 所有端口的状态都是“open|filtered”

目前来看,处理 UDP 端口并不是最高的优先级,等 TCP 端口没有突破再回到 UDP 端口用特定的工具对高价值端口进行精细扫描。

根据上述信息搜集结果,最优先考虑的就是 80 端口了。

三、80 端口

1、假的登入界面

用浏览器访问:

file-20260408201919151

是一个登入界面,但是其功能并不完善:

  • 输入任意账户密码都是跳转到 /login.hrml,而目标上根本没有这个页面
  • “注册”功能也是假的,根本点不动

查看页面源码,看到注释信息中暴露了一个后端端口:


http://localhost:8080/powers/pow/regUsers"

直接访问:


http://39.99.151.82:8080/powers/pow/regUsers

但是访问不到:

file-20260408202528508

应该只有内网才能访问这个接口。

直接访问 8080 也是同样的结果。

2、目录爆破

既然没什么发现,扫一扫目录、爆一爆文件:


ffuf -u http://39.99.151.82/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -e .php,.phtml,.html,.txt,.bak,.old,.swp -ac -recursion -recursion-depth 2


robots.txt static router.php

访问 robots.txt,并没有用的内容:


User-agent: * Disallow:

static 是一个目录,存在目录遍历漏洞:

file-20260408211334403

但是没什么有价值的信息。

router.php 应该是一个后端 API 通过 POST 或者 GET 传输进行路由导航,这个和之前看到的内网 API 信息泄露似乎有所对应,尝试爆破一下参数名,先 GET 传参:


ffuf -u "http://39.99.151.82/router.php?FUZZ=test" -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -mc 200 -fs 0

POST 传参:


ffuf -u "http://39.99.151.82/router.php" -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -X POST -d "FUZZ=test" -H "Content-Type: application/x-www-form-urlencoded" -mc 200 -fs 0

都没有结果:


❯ ffuf -u "http://target/router.php" -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -X POST -d "FUZZ=test" -H "Content-Type: application/x-www-form-urlencoded" -mc 200 -fs 0 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v2.1.0-dev ________________________________________________ :: Method : POST :: URL : http://target/router.php :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt :: Header : Content-Type: application/x-www-form-urlencoded :: Data : FUZZ=test :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200 :: Filter : Response size: 0 ________________________________________________ [WARN] Caught keyboard interrupt (Ctrl-C) ❯ ffuf -u "http://39.99.151.82/router.php" -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -X POST -d "FUZZ=test" -H "Content-Type: application/x-www-form-urlencoded" -mc 200 -fs 0 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v2.1.0-dev ________________________________________________ :: Method : POST :: URL : http://39.99.151.82/router.php :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt :: Header : Content-Type: application/x-www-form-urlencoded :: Data : FUZZ=test :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200 :: Filter : Response size: 0 ________________________________________________ :: Progress: [6453/6453] :: Job [1/1] :: 760 req/sec :: Duration: [0:00:11] :: Errors: 0 ::

3、ThinkPHP

在等扫描结果的时候,我发现这个网站的图标越看越舒徐,会不会用的某种常用框架?

查找页面源码没看到"ico"的信息,按 F12 $\to$ Network:

file-20260408205547465

可以发现 favicon.ico 就在根目录下,即“ http://39.99.151.82/favicon.ico ”。

用 Python 获取其 mmh3(MurmurHash3)值


import mmh3 import base64 import requests resp = requests.get('http://39.99.151.82/favicon.ico') hash = mmh3.hash(base64.encodebytes(resp.content)) print(hash)

输出:


1165838194

去数据库(https://wiki.owasp.org/index.php/OWASP_favicon_database)中查找:

U

春秋云境 Initial 靶场 WP:ThinkPHP RCE → 内网横向 → 域控沦陷

可惜并没有找到结果,换个工具:


observer_ward -t http://39.99.151.82/favicon.ico

结果:


observer_ward -t http://39.99.151.82/favicon.ico INFO 📇probes loaded: 3183 INFO 🚀optimized probes: 9 INFO 🎯target loaded: 1 🎯:[ http://39.99.151.82/favicon.ico [apache-http,thinkphp] <> <0> (200 OK) ]

原来是 ThinkPHP,在页面乱输入一通让其报错,看看是否有版本号。

Payload:


http://39.99.151.82/index.php?s=xxx/xxx/xxx

更多推荐