Awesome-POC/中间件漏洞/Apache HTTPd 换行解析漏洞 CVE-2017-15715.md
2024-11-06 14:10:36 +08:00

45 lines
995 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Apache HTTPd 换行解析漏洞 CVE-2017-15715
## 漏洞描述
Apache HTTPD是一款HTTP服务器它可以通过mod_php来运行PHP网页。其2.4.0~2.4.29版本中存在一个解析漏洞在解析PHP时`1.php\x0A`将被按照PHP后缀进行解析导致绕过一些服务器的安全策略。
## 漏洞影响
```
Apache HTTPd 2.4.0~2.4.29版本
```
## 环境搭建
```plain
https://github.com/vulhub/vulhub.git
cd vulhub/httpd/CVE-2017-15715
docker-compose up -d
```
启动后Apache运行在`http://your-ip:8080`
## 漏洞复现
直接上传恶意文件会被拦截
![image-20220221173116763](images/202202211731895.png)
抓包修改如下参数,在.php后加入16进制`0a`
![image-20220221181546680](images/202202211815804.png)
响应为200成功绕过
![image-20220221181709176](images/202202211817253.png)
访问文件,成功触发解析漏洞
```
http://192.168.174.128:8080/shell.php%0a
```
![image-20220221181913908](images/202202211819984.png)