標籤:
#HiRoot‘s Blog
Options(選項):
--version 顯示程式的版本號碼並退出
-h, --help 顯示此協助訊息並退出
-v VERBOSE 詳細資訊層級:0-6(預設為1)
Target(目標):
以下至少需要設定其中一個選項,設定目標URL。
-d DIRECT 直接連接到資料庫。
-u URL, --url=URL 目標URL。
-l LIST 從Burp或WebScarab代理的日誌中解析目標。
-r REQUESTFILE 從一個檔案中載入HTTP請求。
-g GOOGLEDORK 處理Google dork的結果作為目標URL。
-c CONFIGFILE 從INI設定檔中載入選項。
Request(請求):
這些選項可以用來指定如何串連到目標URL。
--data=DATA 通過POST發送的資料字串
--cookie=COOKIE HTTP Cookie頭
--cookie-urlencode URL 編碼產生的cookie注入
--drop-set-cookie 忽略響應的Set - Cookie頭資訊
--user-agent=AGENT 指定 HTTP User - Agent頭
--random-agent 使用隨機選定的HTTP User - Agent頭
--referer=REFERER 指定 HTTP Referer頭
--headers=HEADERS 換行分開,加入其他的HTTP頭
--auth-type=ATYPE HTTP身分識別驗證類型(基本,摘要或NTLM)(Basic, Digest or NTLM)
--auth-cred=ACRED HTTP身分識別驗證憑據(使用者名稱:密碼)
--auth-cert=ACERT HTTP認證認證(key_file,cert_file)
--proxy=PROXY 使用HTTP代理串連到目標URL
--proxy-cred=PCRED HTTPProxy 驗證憑據(使用者名稱:密碼)
--ignore-proxy 忽略系統預設的HTTP代理
--delay=DELAY 在每個HTTP請求之間的延遲時間,單位為秒
--timeout=TIMEOUT 等待連線逾時的時間(預設為30秒)
--retries=RETRIES 連線逾時後重新串連的時間(預設3)
--scope=SCOPE 從所提供的代理日誌中過濾器目標的Regex
--safe-url=SAFURL 在測試過程中經常訪問的url地址
--safe-freq=SAFREQ 兩次訪問之間測試請求,給出安全的URL
Optimization(最佳化):
這些選項可用於最佳化SqlMap的效能。
-o 開啟所有最佳化開關
--predict-output 預測常見的查詢輸出
--keep-alive 使用持久的HTTP(S)串連
--null-connection 從沒有實際的HTTP響應體中檢索頁面長度
--threads=THREADS 最大的HTTP(S)請求並發量(預設為1)
Injection(注入):
這些選項可以用來指定測試哪些參數, 提供自訂的注入payloads和可選篡改指令碼。
-p TESTPARAMETER 可測試的參數(S)
--dbms=DBMS 強制後端的DBMS為此值
--os=OS 強制後端的DBMS作業系統為這個值
--prefix=PREFIX 注入payload字串首碼
--suffix=SUFFIX 注入payload字串尾碼
--tamper=TAMPER 使用給定的指令碼(S)篡改注入資料
Detection(檢測):
這些選項可以用來指定在SQL盲注時如何解析和比較HTTP響應頁面的內容。
--level=LEVEL 執行測試的等級(1-5,預設為1)
--risk=RISK 執行測試的風險(0-3,預設為1)
--string=STRING 查詢時有效時在頁面匹配字串
--regexp=REGEXP 查詢時有效時在頁面匹配Regex
--text-only 僅基於在常值內容比較網頁
Techniques(技巧):
這些選項可用於調整具體的SQL注入測試。
--technique=TECH SQL注入技術測試(預設BEUST)
--time-sec=TIMESEC DBMS響應的延遲時間(預設為5秒)
--union-cols=UCOLS 定列範圍用於測試UNION查詢注入
--union-char=UCHAR 用於暴力猜解列數的字元
Fingerprint(指紋):
-f, --fingerprint 執行檢查廣泛的DBMS版本指紋
Enumeration(枚舉):
這些選項可以用來列舉後端資料庫管理系統的資訊、表中的結構和資料。此外,您還可以運行您自己
的SQL語句。
-b, --banner 檢索資料庫管理系統的標識
--current-user 檢索資料庫管理系統目前使用者
--current-db 檢索資料庫管理系統當前資料庫
--is-dba 檢測DBMS目前使用者是否DBA
--users 枚舉資料庫管理系統使用者
--passwords 枚舉資料庫管理系統使用者密碼雜湊
--privileges 枚舉資料庫管理系統使用者的許可權
--roles 枚舉資料庫管理系統使用者的角色
--dbs 枚舉資料庫管理系統資料庫
--tables 枚舉的DBMS資料庫中的表
--columns 枚舉DBMS資料庫表列
--dump 轉儲資料庫管理系統的資料庫中的表項
--dump-all 轉儲所有的DBMS資料庫表中的條目
--search 搜尋列(S),表(S)和/或資料庫名稱(S)
-D DB 要進行枚舉的資料庫名
-T TBL 要進行枚舉的資料庫表
-C COL 要進行枚舉的資料庫列
-U USER 用來進行枚舉的資料庫使用者
--exclude-sysdbs 枚舉表時排除系統資料庫
--start=LIMITSTART 第一個查詢輸出進入檢索
--stop=LIMITSTOP 最後查詢的輸出進入檢索
--first=FIRSTCHAR 第一個查詢輸出字的字元檢索
--last=LASTCHAR 最後查詢的輸出字字元檢索
--sql-query=QUERY 要執行的SQL語句
--sql-shell 提示互動式SQL的shell
Brute force(蠻力):
這些選項可以被用來運行蠻力檢查。
--common-tables 檢查存在共同表
--common-columns 檢查存在共同列
User-defined function injection(使用者自訂函數注入):
這些選項可以用來建立使用者自訂函數。
--udf-inject 注入使用者自訂函數
--shared-lib=SHLIB 共用庫的本地路徑
File system access(訪問檔案系統):
這些選項可以被用來訪問後端資料庫管理系統的底層檔案系統。
--file-read=RFILE 從後端的資料庫管理系統檔案系統讀取檔案
--file-write=WFILE 編輯後端的資料庫管理系統檔案系統上的本地檔案
--file-dest=DFILE 後端的資料庫管理系統寫入檔案的絕對路徑
Operating system access(作業系統訪問):
這些選項可以用於訪問後端資料庫管理系統的底層作業系統。
--os-cmd=OSCMD 執行作業系統命令
--os-shell 互動作業系統的shell
--os-pwn 擷取一個OOB shell,meterpreter或VNC
--os-smbrelay 一鍵擷取一個OOB shell,meterpreter或VNC
--os-bof 預存程序緩衝區溢位利用
--priv-esc 資料庫進程使用者權限提升
--msf-path=MSFPATH Metasploit Framework本地的安裝路徑
--tmp-path=TMPPATH 遠程臨時檔案目錄的絕對路徑
Windows註冊表訪問:
這些選項可以被用來訪問後端資料庫管理系統Windows註冊表。
--reg-read 讀一個Windows登錄機碼值
--reg-add 寫一個Windows登錄機碼值資料
--reg-del 刪除Windows註冊表索引值
--reg-key=REGKEY Windows註冊表鍵
--reg-value=REGVAL Windows登錄機碼值
--reg-data=REGDATA Windows註冊表索引值資料
--reg-type=REGTYPE Windows登錄機碼實值型別
General(一般):
這些選項可以用來設定一些一般的工作參數。
-t TRAFFICFILE 記錄所有HTTP流量到一個文字檔中
-s SESSIONFILE 儲存和恢複檢索會話檔案的所有資料
--flush-session 重新整理當前目標的會話檔案
--fresh-queries 忽略在會話檔案中儲存的查詢結果
--eta 顯示每個輸出的預計到達時間
--update 更新SqlMap
--save file儲存選項到INI設定檔
--batch 從不詢問使用者輸入,使用所有預設配置。
Miscellaneous(雜項):
--beep 發現SQL注入時提醒
--check-payload IDS對注入payloads的檢測測試
--cleanup SqlMap具體的UDF和表清理DBMS
--forms 對目標URL的解析和測試形式
--gpage=GOOGLEPAGE 從指定的頁碼使用Googledork結果
--page-rank Google dork結果顯示網頁排名(PR)
--parse-errors 從響應頁面解析資料庫管理系統的錯誤訊息
--replicate 複製轉儲的資料到一個sqlite3資料庫
--tor 使用預設的Tor(Vidalia/ Privoxy/ Polipo)Proxy 位址
--wizard 給初級使用者的簡單嚮導介面
更詳細解釋參考:
http://drops.wooyun.org/tips/143
http://drops.wooyun.org/tips/401
http://www.waitalone.cn/sqlmap-users-manual.html
Options:
-h, --help Show basic help message and exit
-hh Show advanced help message and exit
--version Show program‘s version number and exit
-v VERBOSE Verbosity level: 0-6 (default 1)
Target:
At least one of these options has to be provided to define the
target(s)
-d DIRECT Connection string for direct database connection
-u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1")
-l LOGFILE Parse target(s) from Burp or WebScarab proxy log file
-x SITEMAPURL Parse target(s) from remote sitemap(.xml) file
-m BULKFILE Scan multiple targets given in a textual file
-r REQUESTFILE Load HTTP request from a file
-g GOOGLEDORK Process Google dork results as target URLs
-c CONFIGFILE Load options from a configuration INI file
Request:
These options can be used to specify how to connect to the target URL
--method=METHOD Force usage of given HTTP method (e.g. PUT)
--data=DATA Data string to be sent through POST
--param-del=PARA.. Character used for splitting parameter values
--cookie=COOKIE HTTP Cookie header value
--cookie-del=COO.. Character used for splitting cookie values
--load-cookies=L.. File containing cookies in Netscape/wget format
--drop-set-cookie Ignore Set-Cookie header from response
--user-agent=AGENT HTTP User-Agent header value
--random-agent Use randomly selected HTTP User-Agent header value
--host=HOST HTTP Host header value
--referer=REFERER HTTP Referer header value
--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\nETag: 123")
--auth-type=AUTH.. HTTP authentication type (Basic, Digest, NTLM or PKI)
--auth-cred=AUTH.. HTTP authentication credentials (name:password)
--auth-private=A.. HTTP authentication PEM private key file
--ignore-401 Ignore HTTP Error 401 (Unauthorized)
--proxy=PROXY Use a proxy to connect to the target URL
--proxy-cred=PRO.. Proxy authentication credentials (name:password)
--proxy-file=PRO.. Load proxy list from a file
--ignore-proxy Ignore system default proxy settings
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP (default), SOCKS4 or SOCKS5)
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFURL URL address to visit frequently during testing
--safe-freq=SAFREQ Test requests between two visits to a given safe URL
--skip-urlencode Skip URL encoding of payload data
--csrf-token=CSR.. Parameter used to hold anti-CSRF token
--csrf-url=CSRFURL URL address to visit to extract anti-CSRF token
--force-ssl Force usage of SSL/HTTPS
--hpp Use HTTP parameter pollution method
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")
Optimization:
These options can be used to optimize the performance of sqlmap
-o Turn on all optimization switches
--predict-output Predict common queries output
--keep-alive Use persistent HTTP(s) connections
--null-connection Retrieve page length without actual HTTP response body
--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)
--skip=SKIP Skip testing for given parameter(s)
--dbms=DBMS Force back-end DBMS to this value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to this value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--invalid-string Use random strings for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data
Detection:
These options can be used to customize the detection phase
--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (0-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles
Techniques:
These options can be used to tweak testing of specific SQL injection
techniques
--technique=TECH SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-order=S.. Resulting page URL searched for second-order response
Fingerprint:
-f, --fingerprint Perform an extensive DBMS version fingerprint
Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables. Moreover you can run your own SQL statements
-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
--comments Retrieve DBMS comments
-D DB DBMS database to enumerate
-T TBL DBMS database table(s) to enumerate
-C COL DBMS database table column(s) to enumerate
-X EXCLUDECOL DBMS database table column(s) to not enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--where=DUMPWHERE Use WHERE condition while table dumping
--start=LIMITSTART First query output entry to retrieve
--stop=LIMITSTOP Last query output entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=QUERY SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)
Brute force:
These options can be used to run brute force checks
--common-tables Check existence of common tables
--common-columns Check existence of common columns
User-defined function injection:
These options can be used to create custom user-defined functions
--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library
File system access:
These options can be used to access the back-end database management
system underlying file system
--file-read=RFILE Read a file from the back-end DBMS file system
--file-write=WFILE Write a local file on the back-end DBMS file system
--file-dest=DFILE Back-end DBMS absolute filepath to write to
Operating system access:
These options can be used to access the back-end database management
system underlying operating system
--os-cmd=OSCMD Execute an operating system command
--os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, Meterpreter or VNC
--os-smbrelay One click prompt for an OOB shell, Meterpreter or VNC
--os-bof Stored procedure buffer overflow exploitation
--priv-esc Database process user privilege escalation
--msf-path=MSFPATH Local path where Metasploit Framework is installed
--tmp-path=TMPPATH Remote absolute path of temporary files directory
Windows registry access:
These options can be used to access the back-end database management
system Windows registry
--reg-read Read a Windows registry key value
--reg-add Write a Windows registry key value data
--reg-del Delete a Windows registry key value
--reg-key=REGKEY Windows registry key
--reg-value=REGVAL Windows registry key value
--reg-data=REGDATA Windows registry key value data
--reg-type=REGTYPE Windows registry key value type
General:
These options can be used to set some general working parameters
-s SESSIONFILE Load session from a stored (.sqlite) file
-t TRAFFICFILE Log all HTTP traffic into a textual file
--batch Never ask for user input, use the default behaviour
--charset=CHARSET Force character encoding used for data retrieval
--crawl=CRAWLDEPTH Crawl the website starting from the target URL
--csv-del=CSVDEL Delimiting character used in CSV output (default ",")
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
--eta Display for each output the estimated time of arrival
--flush-session Flush session files for current target
--forms Parse and test forms on target URL
--fresh-queries Ignore query results stored in session file
--hex Use DBMS hex function(s) for data retrieval
--output-dir=OUT.. Custom output directory path
--parse-errors Parse and display DBMS error messages from responses
--pivot-column=P.. Pivot column name
--save Save options to a configuration INI file
--scope=SCOPE Regexp to filter targets from provided proxy log
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
--update Update sqlmap
Miscellaneous:
-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
--alert=ALERT Run host OS command(s) when SQL injection is found
--answers=ANSWERS Set question answers (e.g. "quit=N,follow=N")
--beep Make a beep sound when SQL injection is found
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
--dependencies Check for missing (non-core) sqlmap dependencies
--disable-coloring Disable console output coloring
--gpage=GOOGLEPAGE Use Google dork results from specified page number
--identify-waf Make a through testing for a WAF/IPS/IDS protection
--mobile Imitate smartphone through HTTP User-Agent header
--page-rank Display page rank (PR) for Google dork results
--purge-output Safely remove all content from output directory
--smart Conduct through tests only if positive heuristic(s)
--sqlmap-shell Prompt for an interactive sqlmap shell
--wizard Simple wizard interface for beginner users
MySQL-sqlmap常用參數的中文解釋