高里
v1.3.8
先進的跨平台工具,可自動執行偵測並利用 SQL 注入安全漏洞的過程。
pip3
python3 -m pip install --upgrade -r requirements.txt
python3 setup.py install
或python3 -m pip install -e .
ghauri --help
命令存取並運行 ghauri。或者
您可以透過複製 GitHub 儲存庫來下載最新版本的 Ghauri。
git clone https://github.com/r0oth3x49/ghauri.git
--proxy
。-r file.txt
的開關--start 1 --stop 2
--skip-urlencode
--sql-shell
(實驗性)--fresh-queries
--hostname
--update
ghauri --update
指令取得最新版本的 ghauri。--ignore-code
--count
-m
(實驗)
Author: Nasir khan (r0ot h3x49)
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")
--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: frnETag: 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
Usage of Ghauri for attacking targets without prior mutual consent is illegal.
It is the end user's responsibility to obey all applicable local,state and federal laws.
Developer assume no liability and is not responsible for any misuse or damage caused by this program.
有大量文章和貼文強調了用戶使用 Ghauri 與 SQLMap 相比所取得的成功。雖然我沒有直接將 Ghauri 與 SQLMap 進行比較,但許多用戶已經這樣做了。我發起這個專案是因為,在我的日常工作中,我經常遇到有效配置和使用 SQLMap 的重大挑戰,即使是看似簡單的 SQL 注入。儘管這些注入看起來很簡單,但 SQLMap 經常無法偵測到它們。在朋友的鼓勵下,我決定創造自己的工具。我開發了許多用於利用的腳本,每個腳本都針對特定情況量身定制,我意識到將這些技術整合到單一模組中的潛在好處。這導致了 Ghauri 的誕生,它受到了社區的好評,因其有效性而贏得了積極的反饋和星星。
甚至斯塔帕姆也承認了 Ghauri,在推文中將其描述為“內部結構的重寫”,強調了其內部機制的重要性。
例如,您可以將易受攻擊的 HTTP 請求儲存到檔案(驗證後的 SQLi),並使用 -r 開關將其提供給 Ghauri 和 SQLMap。結果不言自明,無需自訂配置。
Ghauri 既以類似瀏覽器的方式運行,又具有自己獨特的方法,自動切換到不同的滲透技術和旁路。同樣,這不是直接比較,因為 Ghauri 仍有許多功能需要實現,而 SQLMap 已經功能豐富。然而,高里始終如一地執行所需的任務。
自從開發這個工具以來,我很少使用SQLMap,除了少數情況下Ghauri仍在改進中。
我鼓勵您親自嘗試。謝謝。