sqlmap help

Usage: python sqlmap.py [options]

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)

-u URL, --url=URL   Target URL (e.g. "http://www.site.com/vuln.php?id=1")

-g GOOGLEDORK       Process Google dork results as target URLs

Request:

These options can be used to specify how to connect to the target URL

--data=DATA         Data string to be sent through POST

--cookie=COOKIE     HTTP Cookie header value

--random-agent      Use randomly selected HTTP User-Agent header value

--proxy=PROXY       Use a proxy to connect to the target URL

--tor               Use Tor anonymity network

--check-tor         Check to see if Tor is used properly

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 this value

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 (1-3, default 1)

Techniques:

These options can be used to tweak testing of specific SQL injection

techniques

--technique=TECH    SQL injection techniques to use (default "BEUSTQ")

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

--passwords         Enumerate DBMS users password hashes

--tables            Enumerate DBMS database tables

--columns           Enumerate DBMS database table columns

--schema            Enumerate DBMS schema

--dump              Dump DBMS database table entries

--dump-all          Dump all DBMS databases tables entries

-D DB               DBMS database to enumerate

-T TBL              DBMS database table(s) to enumerate

-C COL              DBMS database table column(s) to enumerate

Operating system access:

These options can be used to access the back-end database management

system underlying operating system

--os-shell          Prompt for an interactive operating system shell

--os-pwn            Prompt for an OOB shell, Meterpreter or VNC

General:

These options can be used to set some general working parameters

--batch             Never ask for user input, use the default behaviour

--flush-session     Flush session files for current target

Miscellaneous:

--sqlmap-shell      Prompt for an interactive sqlmap shell

--wizard            Simple wizard interface for beginner users

[!] to see full list of options run with ‘-hh‘

Misaki:sqlmap Misaki$ python sqlmap.py -hh

Usage: python sqlmap.py [options]

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=SAFEURL  URL address to visit frequently during testing

--safe-post=SAFE..  POST data to send to a safe URL

--safe-req=SAFER..  Load safe HTTP request from a file

--safe-freq=SAFE..  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 (1-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

--crawl-exclude=..  Regexp to exclude pages from crawling (e.g. "logout")

--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 thorough 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 thorough tests only if positive heuristic(s)

--sqlmap-shell      Prompt for an interactive sqlmap shell

--wizard            Simple wizard interface for beginner users

Misaki:sqlmap Misaki$

时间: 2024-10-27 22:23:45

sqlmap help的相关文章

BurpSuite日志分析导入SqlMap进行批量扫描-BurpLogFilter

https://github.com/tony1016/BurpLogFilter    一个python3写的,用于过滤BurpSuite日志的小程序 WHY? 为什么要写这个程序呢?强大的SqlMap支持使用BurpSuite的日志进行批量分析,但是BurpSuite的日志记录了所有走代理的流量,包括静态资源啊,重复的提交啊,这些都会影响SqlMap的分析效率.于是打算写一个小程序,可以做到: 可以按照域名过滤请求 可以自动过滤静态资源请求 可以自动按照模式过滤URL,即相同URL和参数的请

SQL注入之SQLmap入门

什么是SQLmap? SQLmap是一款用来检测与利用SQL注入漏洞的免费开源工具,有一个非常棒的特性,即对检测与利用的自动化处理(数据库指纹.访问底层文件系统.执行命令). 读者可以通过位于SourceForge的官方网站下载SQLmap源码:http://sourceforge.net/projects/sqlmap/ SQLmap的作者是谁? Bernardo DameleAssumpcao Guimaraes (@inquisb),读者可以通过[email protected]与他取得联

SQLMAP 注射工具用法

1 . 介绍1.1 要求 1.2 网应用情节 1.3 SQL 射入技术 1.4 特点 1.5 下载和更新sqlmap 1.6 执照 2 . 用法2.1 帮助 2.2 目标URL 2.3 目标URL 和verbosity 2.4 URL 参量 2.5 Google dork 2.6 HTTP 方法: 得到或张贴 2.7 张贴的数据串 2.8 HTTP 曲奇饼倒栽跳水 2.9 HTTP 用户代理倒栽跳水 2.10 任意HTTP 用户代理倒栽跳水 2.11 HTTP 认证 2.12 HTTP 代理人 

sqlmap批量扫描burpsuite拦截的日志记录

1.功能上,sqlmap具备对burpsuite拦截的request日志进行批量扫描的能力 python sqlmap.py -l hermes.log --batch -v 3 --batch:会自动选择yes -l : 指定日志文件 -v: 调试信息等级,3级的话,可以看大注入的payload信息 2.如何配置burpsuite拦截扫描对象? 4.其他方式拦截的request日志文件,也可以 5.使用--smart智能探测效果不是很好,还是采用一些配置,加深扫描比较好 python sqlm

sqlmap的简要使用方法

仅作为备忘!!! sqlmap使用: 注入类型有四种分别为:boolean-based blind.error-based.stacked queries.inline query. sqlmap -u 'http://192.168.87.19/index.php?r=default/news/content&id=12' #-u 注入点 检测注入点是否可用sqlmap -u 'http://192.168.87.19/index.php?r=default/news/content&i

sqlmap的小试牛刀

这次算是一次用sqlmap的例子 目的:通过工具扫描到了后台的数据库的地址(如下图),想进入后台数据库(首先可以尝试一下root:root的情况,这个网站是用户名和密码都是root) 扫描还发现了有sql目录,考虑注入: 语句 python sqlmap.py -u 192.168.50.134/sql/index.php?id=1 -v 1 --current-user --threads 3 --passwords 运行结果: root的password hash 复制到这个网站http:/

sqlmap里如何添加字典

在sqlmap的目录下有那么一个目录.即"TXT"目录. 该目录下是放字典的. 我在日一个站的时候没有破解出表明.然后不小心下载到了数据库. sqlmap无法猜出表是啥.ps:access数据库 便有了此文: 算一个小知识点把.

sqlmap用户手册 | WooYun知识库

sqlmap用户手册 说明:本文为转载,对原文中一些明显的拼写错误进行修正,并标注对自己有用的信息. 原文:http://drops.wooyun.org/tips/143 =================================================================== 当给sqlmap这么一个url (http://192.168.136.131/sqlmap/mysql/get_int.php?id=1) 的时候,它会: 1.判断可注入的参数 2.判断可

SQLMap用户手册【超详细】

http://192.168.136.131/sqlmap/mysql/get_int.php?id=1 当给sqlmap这么一个url的时候,它会: 1.判断可注入的参数 2.判断可以用那种SQL注入技术来注入 3.识别出哪种数据库 4.根据用户选择,读取哪些数据 sqlmap支持五种不同的注入模式: 1.基于布尔的盲注,即可以根据返回页面判断条件真假的注入. 2.基于时间的盲注,即不能根据页面返回内容判断任何信息,用条件语句查看时间延迟语句是否执行(即页面返回时间是否增加)来判断. 3.基于

小白日记44:kali渗透测试之Web渗透-SqlMap自动注入(二)-sqlmap参数详解REQUEST

Sqlmap自动注入(二) Request ################################################### #inurl:.php?id= 1. 数据段:--data Get/post都使用 [POST方法]Sqlmap -u "http://1.1.1.1/a.php" --data="user=1&pass=2" –f #sqlmap可自动识别"&" [GET方法]Sqlmap –u &