
Uma ferramenta multiplataforma avançada que automatiza o processo de detecção e exploração de falhas de segurança de injeção SQL
Uma ferramenta avançada e multiplataforma que automatiza o processo de detecção e exploração de falhas de injeção SQL.

pip3python3 -m pip install --upgrade -r requirements.txtpython3 setup.py install ou python3 -m pip install -e .ghauri --help.OU
Pode descarregar a versão mais recente do Ghauri clonando o repositório do GitHub.
git clone https://github.com/r0oth3x49/ghauri.git
--proxy.-r ficheiro.txt--start 1 --stop 2--skip-urlencode--sql-shell (experimental)--fresh-queries--hostname
Author: Nasir khan ()
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.
--update update ghauri
-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
--fresh-queries Ignore query results stored in session file
--test-filter Select test payloads by titles (experimental)
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).
-m BULKFILE Scan multiple targets given in a textual file
-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")
--mobile Imitate smartphone through HTTP User-Agent header
--random-agent Use randomly selected HTTP User-Agent header value
--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)
--confirm Confirm the injected payloads.
--ignore-code Ignore (problematic) HTTP error code(s) (e.g. 401)
--skip-urlencode Skip URL encoding of payload data
--force-ssl Force usage of SSL/HTTPS
Optimization:
These options can be used to optimize the performance of ghauri
--threads THREADS Max number of concurrent HTTP(s) requests (default 1)
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
--safe-chars Skip URL encoding of specific character(s): (e.g:- --safe-chars="[]")
--fetch-using Fetch data using different operator(s): (e.g: --fetch-using=between/in)
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
management 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
--count Retrieve number of entries for table(s)
--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 Retrieve entries from offset for dbs/tables/columns/dump
--stop Retrieve entries till offset for dbs/tables/columns/dump
--sql-shell Prompt for an interactive SQL shell (experimental)
Example:
ghauri -u http://www.site.com/vuln.php?id=1 --dbs
A utilização do Ghauri para atacar alvos sem consentimento prévio mútuo é ilegal.
É da responsabilidade do utilizador final cumprir todas as leis locais, estaduais e federais aplicáveis.
O desenvolvedor não assume qualquer responsabilidade e não se responsabiliza por qualquer uso indevido ou dano causado por este programa.
Existem numerosos artigos e publicações destacando o sucesso que os utilizadores tiveram com o Ghauri em comparação com o SQLMap. Embora não esteja a comparar diretamente o Ghauri com o SQLMap, muitos utilizadores já o fizeram. Iniciei este projeto porque, no meu trabalho diário, frequentemente encontrava desafios significativos em configurar e usar o SQLMap de forma eficaz, mesmo para injeções SQL aparentemente simples. Apesar destas injeções parecerem diretas, o SQLMap muitas vezes falhava em detetá-las. Encorajado por um amigo, decidi criar a minha própria ferramenta. Tinha desenvolvido numerosos scripts para exploração, cada um adaptado a casos específicos, e percebi o benefício potencial de integrar estas técnicas num único módulo. Isto levou à criação do Ghauri, que tem sido bem recebido pela comunidade, recebendo feedback positivo e estrelas devido à sua eficácia.
Até o Stamparam reconheceu o Ghauri, descrevendo-o como uma "reescrita de internos" num tweet, sublinhando a importância dos seus mecanismos internos.
Por exemplo, pode guardar uma requisição HTTP vulnerável num ficheiro (um SQLi por trás de autenticação) e fornecê-la tanto ao Ghauri como ao SQLMap usando a opção -r. Os resultados falarão por si sem exigir configurações personalizadas.
O Ghauri opera tanto de forma semelhante a um navegador como com os seus próprios métodos únicos, alternando automaticamente para diferentes técnicas de exfiltração e bypass. Novamente, não é uma comparação direta, pois o Ghauri ainda tem muitas funcionalidades por implementar, enquanto o SQLMap já é rico em funcionalidades. No entanto, o Ghauri realiza consistentemente as tarefas necessárias.
Desde que desenvolvi esta ferramenta, raramente uso o SQLMap, exceto em alguns casos onde o Ghauri ainda está a ser melhorado.
Encorajo-o a experimentar por si mesmo. Obrigado.
--update
ghauri --update para obter a
versão mais recente do ghauri.--ignore-code--count-m (experimental)--random-agent, --mobile