Zumpyx's Blog

Spring Boot 渗透笔记

webjavaspring

信息泄露

  • Web 路径
/api-docs
/api.html
/api/index.html
/api/swagger-ui.html
/api/v2/api-docs
/distv2/index.html
/dubbo-provider/distv2/index.html
/spring-security-oauth-resource/swagger-ui.html
/spring-security-rest/api/swagger-ui.html
/static/swagger.json
/swagger
/swagger/codes
/swagger-dubbo/api-docs
/swagger/index.html
/swagger/static/index.html
/swagger-ui
/swagger-ui.html
/swagger-ui/html
/swagger-ui/index.html
/sw/swagger-ui.html
/template/swagger-ui.html
/user/swagger-ui.html
/v2/api-docs
/v2/swagger.json
  • Actuator
/mappings
/metrics
/beans
/configprops
/actuator/metrics
/actuator/mappings
/actuator/beans
/actuator/configprops
  • Druid
html:
/druid/index.html             #Druid Index
/druid/sql.html               #Druid sql监控页面
/druid/weburi.html            #Druid Web URI监控页面
/druid/websession.html        #Druid Web Session监控页面

json:
/druid/weburi.json            #Druid Web URI json
/druid/websession.json        #Druid Web Session json

Druid 登录接口:
/druid/login.html            #Druid登录认证页面

其他:
/system/druid/login.html
/webpage/system/druid/login.html
/druid/datasource.html
/druid/wall.html
/druid/webapp.html
/system/druid/websession.html
/webpage/system/druid/websession.html
/druid/spring.html
/druid/api.html
  • 危险路由
/actuator
/auditevents
/autoconfig
/beans
/caches
/conditions
/configprops
/docs
/dump
/env
/flyway
/health
/heapdump
/httptrace
/info
/intergrationgraph
/jolokia
/logfile
/loggers
/liquibase
/metrics
/mappings
/prometheus
/refresh
/scheduledtasks
/sessions
/shutdown
/trace
/threaddump
/gateway
/actuator/auditevents
/actuator/beans
/actuator/health
/actuator/conditions
/actuator/configprops
/actuator/env
/actuator/info
/actuator/loggers
/actuator/heapdump
/actuator/threaddump
/actuator/metrics
/actuator/scheduledtasks
/actuator/httptrace
/actuator/mappings
/actuator/jolokia
/actuator/hystrix.stream
/actuator/gateway
/actuator/gateway/routes

暴露出 spring boot 应用的相关接口和传参信息并不能算是漏洞,但攻击者可以通过审计暴露出的接口以增加对业务系统的了解,并会检查应用系统是否存在未授权访问、越权等其他业务类型漏洞。

重要接口

  • /env/actuator/env

GET 请求 /env 会直接泄露环境变量、内网地址、配置中的用户名等信息,当程序员针对密码变量命名不是password时,会泄露铭文密码。

  • /refreshactuator/refresh

POST 请求 /env 接口设置属性后,可同时配合 POST 请求 /refresh 接口刷新属性变量来触发相关 RCE 漏洞。

/restart/actuator/restart

POST请求 /env 接口设置属性后,再 POST 请求 /restart 接口重启应用来触发相关 RCE 漏洞。

  • /jolokia/actuator/jolokia

可以通过 /jolokia/list 接口寻找可以利用的 MBean,间接触发相关 RCE 漏洞、获得星号遮掩的重要隐私信息的明文等。

  • /trace/actuator/httptrace

一些 http 请求包访问跟踪信息,有可能在其中发现内网应用系统的一些请求信息详情;以及有效用户或管理员的 cookie、jwt token 等信息。