自动检测和利用SQL注入工具

VSole2023-06-05 09:11:21

0x01 工具介绍

一个先进的跨平台工具,可以自动检测和利用SQL注入漏洞,支持布尔注入、时间注入、报错注入、堆叠查询,支持的数据库有MySQL,Microsoft SQL Server,Postgre,Oracle,支持的注入类型有GET、POST、COOKies等。

0x02 安装与使用

1、安装过程

git clone https://github.com/r0oth3x49/ghauri.gi
pip install --upgrade -r requirements.txt
python setup.py install or python -m pip install -e

2、使用方法

 ghauri http://www.site.com/vuln.php?id=1 --dbs

3、其他参数

usage: ghauri -u URL [OPTIONS]
A cross-platform python based advanced sql injections detection & exploitation tool.
General:
  -h, --help          Shows the help.
  --version           Shows the version.
  -v VERBOSE          Verbosity level: 1-5 (default 1).
  --batch             Never ask for user input, use the default behavior
  --flush-session     Flush session files for current target
Target:
  At least one of these options has to be provided to define the
  target(s)
  -u URL, --url URL   Target URL (e.g. 'http://www.site.com/vuln.php?id=1).
  -r REQUESTFILE      Load HTTP request from a file
Request:
  These options can be used to specify how to connect to the target URL
  -A , --user-agent   HTTP User-Agent header value
  -H , --header       Extra header (e.g. "X-Forwarded-For: 127.0.0.1")
  --host              HTTP Host header value
  --data              Data string to be sent through POST (e.g. "id=1")
  --cookie            HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..")
  --referer           HTTP Referer header value
  --headers           Extra headers (e.g. "Accept-Language: fr\nETag: 123")
  --proxy             Use a proxy to connect to the target URL
  --delay             Delay in seconds between each HTTP request
  --timeout           Seconds to wait before timeout connection (default 30)
  --retries           Retries when the connection related error occurs (default 3)
  --force-ssl         Force usage of SSL/HTTPS
Injection:
  These options can be used to specify which parameters to test for,
  provide custom injection payloads and optional tampering scripts
  -p TESTPARAMETER    Testable parameter(s)
  --dbms DBMS         Force back-end DBMS to provided value
  --prefix            Injection payload prefix string
  --suffix            Injection payload suffix string
Detection:
  These options can be used to customize the detection phase
  --level LEVEL       Level of tests to perform (1-3, default 1)
  --code CODE         HTTP code to match when query is evaluated to True
  --string            String to match when query is evaluated to True
  --not-string        String to match when query is evaluated to False
  --text-only         Compare pages based only on the textual content
Techniques:
  These options can be used to tweak testing of specific SQL injection
  techniques
  --technique TECH    SQL injection techniques to use (default "BEST")
  --time-sec TIMESEC  Seconds to delay the DBMS response (default 5)
Enumeration:
  These options can be used to enumerate the back-end database
  managment system information, structure and data contained in the
  tables.
  -b, --banner        Retrieve DBMS banner
  --current-user      Retrieve DBMS current user
  --current-db        Retrieve DBMS current database
  --hostname          Retrieve DBMS server hostname
  --dbs               Enumerate DBMS databases
  --tables            Enumerate DBMS database tables
  --columns           Enumerate DBMS database table columns
  --dump              Dump DBMS database table entries
  -D DB               DBMS database to enumerate
  -T TBL              DBMS database tables(s) to enumerate
  -C COLS             DBMS database table column(s) to enumerate
  --start             Retrive entries from offset for dbs/tables/columns/dump
  --stop              Retrive entries till offset for dbs/tables/columns/dump

0x03 项目链接下载

https://github.com/r0oth3x49/ghauri

sql注入target
本作品采用《CC 协议》,转载必须注明作者和本文链接
burp0_data = {"name": username, "pw": password, "repw": password, "email": email, "submit": ''}
一个先进的跨平台工具,可以自动检测和利用SQL注入漏洞,支持布尔注入、时间注入、报错注入、堆叠查询,支持的数据库有MySQL,Microsoft SQL Server,Postgre,Oracle,支持的注入类型有GET、POST、COOKies等。
漏洞评级:高危影响版本:Django 3.2、Django 3.1安全版本:Django >= 3.2.5、Django >= 3.1.13漏洞分析2.1 order_by()order_by是QuerySet下的一种查询方法,作用是将查询的结果根据某个字段进行排序,在字段前面加一个符号,结果会倒序输出。
BypassD盾之SQL注入绕过总结
今天在这篇文章中,我将分享一篇关于使用授权Header(Authorization Headers token)的 SQL 注入的文章。
今天来分享一下我是如何用几分钟发现某个漏洞赏金的目标多个 SQL 注入漏洞的,接下来以目标域名 redacted.org 为例。
Ahmad Yussef ,他是一名兼职的漏洞赏金猎手。当然,他也会使用Google Dorking和Shodan.io 来替代Httpx、Httprobe。如果没有发现任何错误,也不要那么着急放弃,可以考虑更改level和risk等级,如果是POST方式,则可以使用:sqlmap -u "target.com" --data "parameter=value" --method POST--random-agent--level 1--risk 1 --dbs.
版本:<= 4.7 测试环境:Ubuntu 18.04 CVE:CVE-2021-24750 CWE:CWE-89 描述: 4.8 之前的 WP 访问者统计(实时流量)WordPress 插件无法正确清理和转义 refDetails AJAX 操作中的 refUrl,任何经过身份验证的用户都可以使用,这可能允许角色低至订阅者的用户执行 SQL 注入攻击。 https://
基础介绍Microsoft SQL Server 是微软开发的关系型数据库管理系统。作为数据库服务器,它是一种软件产品,主要功能是根据其他软件应用程序的请求存储和检索数据,这些应用程序可以在同一台计算机上运行,也可以在网络上的另一台计算机上运行。SQL Server 默认开放的端口是 TCP 1433。判断数据库类型/*?数据库中独有的数据表,如果页面返回正常即可表示为?为便于管理数据库中的权限,SQL Server 提供了若干角色,这些角色是用于对其他主体进行分组的安全主体。
VSole
网络安全专家