SQLMAP帮助文档全解析
来源:互联网 发布:软件代理销售协议 编辑:程序博客网 时间:2024/05/22 07:54
一、前言
本文章为读取sqlmap -hh详细使用帮助后进行翻译的文章,一为自己查询方便,二则是提供一个使用文档的说明参考
下面的每一个点都用横线分割开来,各位也可以在目录处找到你想要查阅的内容,文章较长,建议使用目录进行查阅
二、正文
_____H__
___ ___[,]_____ ___ ___ {1.1.7.16#dev}
|_ -| . ["] | .'| . |
|___|_ [(]_|_|_|__,| _|
|_|V |_| http://sqlmap.org
Usage: 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 thetarget(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")
设定连接的URL
-l LOGFILE Parse target(s) from Burp or WebScarab proxy log file
读取Burp或者webScarab代理的日志文件作为扫描目标
-x SITEMAPURL Parse target(s) from remote sitemap(.xml) file
使用远程sitemap文件作为扫描目标
-m BULKFILE Scan multiple targets given in a textual file
从文本中获取多个目标进行扫描
-r REQUESTFILE Load HTTP request from a file
从文件中加载HTTP请求
-g GOOGLEDORK Process Google dork results as target URLs
处理GOOGLE搜索结果(测试GOOGLE搜索结果中的GET参数,默认取前100个
-c CONFIGFILE Load options from a configuration INI file
从配置文件中读取设置
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Request
These options can be used to specify how to connect to the target URL这些选项用来指定如何连接到URL目标上
--method=METHOD Force usage of given HTTP method (e.g. PUT)
--data=DATA Data string to be sent through POST
以POST方式提交数据,会像扫描GET一样进行扫描
python sqlmap.py -u "http://www.target.com/vuln.php" --data="id=1" -f --banner --dbs --users
--param-del=PARA.. Character used for splitting parameter values
当GET或POST的数据需要用其他字符分割测试参数的时候需要用到此参数。
python sqlmap.py -u "http://www.target.com/vuln.php" --data="query=foobar;id=1" --param-del=";" -f --banner --dbs --users
--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
这个参数在以下两个方面很有用:
1、web应用需要登陆的时候。
2、你想要在这些头参数中测试SQL注入时。
可以通过抓包把cookie获取到,复制出来,然后加到--cookie参数里。
在HTTP请求中,遇到Set-Cookie的话,sqlmap会自动获取并且在以后的请求中加入,并且会尝试SQL注入。
如果你不想接受Set-Cookie可以使用--drop-set-cookie参数来拒接。
当你使用--cookie参数时,当返回一个Set-Cookie头的时候,sqlmap会询问你用哪个cookie来继续接下来的请求。当--level的参数设定为2或者2以上的时候,sqlmap会尝试注入Cookie参数。
--user-agent=AGENT HTTP User-Agent header value
--random-agent Use randomly selected HTTP User-Agent header value
参数:--user-agent,--random-agent
默认情况下sqlmap的HTTP请求头中User-Agent值是:
sqlmap/1.0-dev-xxxxxxx (http://sqlmap.org)
可以使用--user-agent参数来修改,同时也可以使用--random-agent参数来随机的从./txt/user-agents.txt中获取。
当--level参数设定为3或者3以上的时候,会尝试对User-Angent进行注入。
--host=HOST HTTP Host header value
--referer=REFERER HTTP Referer header value
sqlmap可以在请求中伪造HTTP中的referer,当--level参数设定为3或者3以上的时候会尝试对referer注入。
-H HEADER, --hea.. Extra header (e.g. "X-Forwarded-For: 127.0.0.1")
--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\nETag: 123")
额外的HTTP头
--auth-type=AUTH.. HTTP authentication type (Basic, Digest, NTLM or PKI)
--auth-cred=AUTH.. HTTP authentication credentials (name:password)
--auth-file=AUTH.. HTTP authentication PEM cert/private key file
HTTP 验证类型/验证证书/PEM证书/私钥文件
当Web服务器需要客户端证书进行身份验证时,需要提供两个文件:key_file,cert_file。
key_file是格式为PEM文件,包含着你的私钥,cert_file是格式为PEM的连接文件。
--ignore-401 Ignore HTTP Error 401 (Unauthorized)
忽略HTTP401错误
--ignore-proxy Ignore system default proxy settings
忽略系统默认代理设置
--ignore-redirects Ignore redirection attempts
忽略重定向
--ignore-timeouts Ignore connection timeouts
忽略超时
--proxy=PROXY Use a proxy to connect to the target URL
使用代理去连接目标url
--proxy-cred=PRO.. Proxy authentication credentials (name:password)
代理身份验证
--proxy-file=PRO.. Load proxy list from a file
从文件里读取代理列表
使用--proxy代理是格式为:http://url:port。
当HTTP(S)代理需要认证是可以使用--proxy-cred参数:username:password。
--ignore-proxy拒绝使用本地局域网的HTTP(S)代理。
--tor Use Tor anonymity network
使用tor匿名网络
--tor-port=TORPORT Set Tor proxy port other than default
设置Tor代理端口以此来覆盖默认端口值
--tor-type=TORTYPE Set Tor proxy type (HTTP, SOCKS4 or SOCKS5 (default))
设置Toe代理类型(HTTP,SOCKS4 or SOCKS5 (default))
--check-tor Check to see if Tor is used properly
检查Tor是否正常被使用
--delay=DELAY Delay in seconds between each HTTP request
可以设定两个HTTP(S)请求间的延迟,设定为0.5的时候是半秒,默认是没有延迟的。
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
可以设定一个HTTP(S)请求超过多久判定为超时,10.5表示10.5秒,默认是30秒。
--retries=RETRIES Retries when the connection timeouts (default 3)
当HTTP(S)超时时,可以设定重新尝试连接次数,默认是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
有的web应用程序会在你多次访问错误的请求时屏蔽掉你以后的所有请求,这样在sqlmap进行探测或者注入的时候可能造成错误请求而触发这个策略,导致以后无法进行。
绕过这个策略有两种方式:
1、--safe-url:提供一个安全不错误的连接,每隔一段时间都会去访问一下。
2、--safe-freq:提供一个安全不错误的连接,每次测试请求之后都会再访问一边安全连接。
--skip-urlencode Skip URL encoding of payload data
关掉URL参数值编码
根据参数位置,他的值默认将会被URL编码,但是有些时候后端的web服务器不遵守RFC标准,只接受不经过URL编码的值,这时候就需要用--skip-urlencode参数。
--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()")
每次请求时候执行自定义的python代码
参数:--eval
在有些时候,需要根据某个参数的变化,而修改另个一参数,才能形成正常的请求,这时可以用--eval参数在每次请求时根据所写python代码做完修改后请求。
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Optimization
These options can be used to optimize the performance of sqlmap这些适用于优化sqlmap性能的选项
-o Turn on all optimization switches
打开所有优化开关
--predict-output Predict common queries output
预测常用的查询输出
--keep-alive Use persistent HTTP(s) connections
使用持久的HTTP(s)连接
--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)
设置测试参数 例如: -p "id,user-anget"
--skip=SKIP Skip testing for given parameter(s)
设置跳过测试参数(不测试)例如:--skip="user-angent.referer"
一般在--level的值很大但是有个别参数不想测试的时候可以使用--skip参数
--skip-static Skip testing parameters that not appear to be dynamic
跳过一些静态参数
--param-exclude=.. Regexp to exclude parameters from testing (e.g. "ses")
使用正则表达式去排除一些测试的参数
--dbms=DBMS Force back-end DBMS to this value
指定数据库,默认情况下sqlmap会测试web应用后端的服务器是什么
--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
指定无效的大数字
当你想指定一个报错的数值时,可以使用这个参数,例如默认情况系id=13,sqlmap会变成id=-13来报错,你可以指定比如id=9999999来报错。
--invalid-logical Use logical operations for invalidating values
指定无效的逻辑
原因同上,可以指定id=13把原来的id=-13的报错改成id=13 AND 18=19。
--invalid-string Use random strings for invalidating values
指定无效的随机字符串
--no-cast Turn off payload casting mechanism
关闭payload生成机制
--no-escape Turn off string escaping mechanism
关闭字符串溢出机制
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
在有些环境中,需要在注入的payload的前面或者后面加一些字符,来保证payload的正常执行。
例如,代码中是这样调用数据库的:
$query = "SELECT * FROM users WHERE id=(’" . $_GET[’id’] . "’) LIMIT 0, 1";
这时你就需要--prefix和--suffix参数了:
python sqlmap.py -u "http://192.168.136.131/sqlmap/mysql/get_str_brackets.php?id=1" -p id --prefix "’)" --suffix "AND (’abc’=’abc"
这样执行的SQL语句变成:
$query = "SELECT * FROM users WHERE id=(’1’) <PAYLOAD> AND (’abc’=’abc’) LIMIT 0, 1";
--tamper=TAMPER Use given script(s) for tampering injection data
sqlmap除了使用CHAR()函数来防止出现单引号之外没有对注入的数据修改,你可以使用--tamper参数对数据做修改来绕过WAF等设备。
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Detection
These options can be used to customize the detection phase这些选项用来设置探测机制
--level=LEVEL Level of tests to perform (1-5, default 1)
设置测试级别,默认为1级
--risk=RISK Risk of tests to perform (1-3, default 1)
设置测试风险,默认为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
设置查询为真时,匹配的HTTP代码
--text-only Compare pages based only on the textual content
比较基于文本内容的页面
--titles Compare pages based only on their titles
比较基于标题的页面
默认情况下sqlmap通过判断返回页面的不同来判断真假,但有时候这会产生误差,因为有的页面在每次刷新的时候都会返回不同的代码,比如页面当中包含一个动态的广告或者其他内容,这会导致sqlmap的误判。此时用户可以提供一个字符串或者一段正则匹配,在原始页面与真条件下的页面都存在的字符串,而错误页面中不存在(使用--string参数添加字符串,--regexp添加正则),同时用户可以提供一段字符串在原始页面与真条件下的页面都不存在的字符串,而错误页面中存在的字符串(--not-string添加)。用户也可以提供真与假条件返回的HTTP状态码不一样来注入,例如,响应200的时候为真,响应401的时候为假,可以添加参数--code=200。
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Techniques
These options can be used to tweak testing of specific SQL injectiontechniques
可以使用这些选项来调整特定SQL注入的测试
--technique=TECH SQL injection techniques to use (default "BEUSTQ")
设置用于SQL注入的技术,默认为
B: Boolean-based blind SQL injection(布尔型注入)
E: Error-based SQL injection(报错型注入)
U: UNION query SQL injection(可联合查询注入)
S: Stacked queries SQL injection(可多语句查询注入)
T: Time-based blind SQL injection(基于时间延迟注入)
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
设置延迟注入的时间
当使用继续时间的盲注时,时刻使用--time-sec参数设定延时时间,默认是5秒。
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
设置UNION查询字段数
默认情况下sqlmap测试UNION查询注入会测试1-10个字段数,当--level为5的时候他会增加测试到50个字段数。设定--union-cols的值应该是一段整数,如:12-16,是测试12-16个字段数。
--union-char=UCHAR Character to use for bruteforcing number of columns
设置UNION查询使用的字符
默认情况下sqlmap针对UNION查询的注入会使用NULL字符,但是有些情况下会造成页面返回失败,而一个随机整数是成功的,这是你可以用--union-char指定UNION查询的字符。
--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
二阶SQL注入
有些时候注入点输入的数据看返回结果的时候并不是当前的页面,而是另外的一个页面,这时候就需要你指定到哪个页面获取响应判断真假。--second-order后面跟一个判断页面的URL地址。
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Fingerprint
-f, --fingerprint Perform an extensive DBMS version fingerprint——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Enumeration
These options can be used to enumerate the back-end databasemanagement system information, structure and data contained in the
tables. Moreover you can run your own SQL statements
这些选项可用于枚举web应用后端数据库管理系统的信息,结构和表中的数据。
-a, --all Retrieve everything
检索所有
-b, --banner Retrieve DBMS banner
检索DBMS的banner信息
--current-user Retrieve DBMS current user
检索DBMS当前用户
--current-db Retrieve DBMS current database
检索DBMS当前数据库
--hostname Retrieve DBMS server hostname
检索DBMS服务器主机名
--is-dba Detect if the DBMS current user is DBA
判断当前DBMS的用户是否为DBA
--users Enumerate DBMS users
枚举DBMS用户
--passwords Enumerate DBMS users password hashes
枚举DBMS用户名
--privileges Enumerate DBMS users privileges
枚举DBMS用户权限
--roles Enumerate DBMS users roles
枚举DBMS用户角色
--dbs Enumerate DBMS databases
枚举DBMS数据库
--tables Enumerate DBMS database tables
枚举DBMS数据库的表
--columns Enumerate DBMS database table columns
枚举DBMS数据库的列
--schema Enumerate DBMS schema
枚举DBMS的架构(比如MySQL里的 INFORMATION_SCHEMA)
加上--exclude-sysdbs参数,将不会获取数据库自带的系统库内容。
--count Retrieve number of entries for table(s)
检索表中数据的个数
--dump Dump DBMS database table entries
dump DBMS数据库表的entries(读取某个表的所有数据)
--dump-all Dump all DBMS databases tables entries
dump 所有DBMS数据库表的entries
--search Search column(s), table(s) and/or database name(s)
搜索列,表或数据库名字
--comments Retrieve DBMS comments
检索DBMS的注释
-D DB DBMS database to enumerate
-D 检索的database名
-T TBL DBMS database table(s) to enumerate
-T 检索的tables名
-C COL DBMS database table column(s) to enumerate
-C 检索的columns名
-X EXCLUDECOL DBMS database table column(s) to not enumerate
-X 不检索的columns名
-U USER DBMS user to enumerate
-U 检索的user名
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
只获取用户数据库的表,不会获取数据库自带的系统库内容
--pivot-column=P.. Pivot column name
--where=DUMPWHERE Use WHERE condition while table dumping
使用where选项指定dump的地址
--start=LIMITSTART First dump table entry to retrieve
指定开始dump的表
--stop=LIMITSTOP Last dump table entry to retrieve
指定停止dump的表
--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语句
--sql-shell Prompt for an interactive SQL shell
对交互式的SQL shell作提示
--sql-file=SQLFILE Execute SQL statements from given file(s)
从指定的files中执行SQL语句
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Brute force
These options can be used to run brute force checks这些选项可以用来执行爆破检查
--common-tables Check existence of common tables
暴力破解表名,当使用--tables无法获取到数据库的表时,可以使用此参数。暴力破解的表在txt/common-tables.txt文件中,你可以自己添加。
--common-columns Check existence of common columns
暴力破解列名,与暴力破解表名一样,暴力跑的列名在txt/common-columns.txt中。
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
User-defined function injection
用户自定义函数注入These options can be used to create custom user-defined functions
你可以通过编译MySQL注入你自定义的函数(UDFs)或PostgreSQL在windows中共享库,DLL,或者Linux/Unix中共享对象,sqlmap将会问你一些问题,上传到服务器数据库自定义函数,然后根据你的选择执行他们,当你注入完成后,sqlmap将会移除它们。
--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 managementsystem 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
运行任意操作系统命令,当数据库为MySQL,PostgreSQL或Microsoft SQL Server,并且当前用户有权限使用特定的函数。
在MySQL、PostgreSQL,sqlmap上传一个二进制库,包含用户自定义的函数,sys_exec()和sys_eval()。
--os-cmd=OSCMD Execute an operating system command
执行操作系统命令
--os-shell Prompt for an interactive operating system shell
模拟一个真实的shell,可输入想执行的命令
当数据库为MySQL,PostgreSQL或Microsoft SQL Server,并且当前用户有权限使用特定的函数,可以在数据库与攻击者直接建立TCP连接,这个连接可以是一个交互式命令行的Meterpreter会话,sqlmap根据Metasploit生成shellcode,并有四种方式执行它:
1、通过用户自定义的sys_bineval()函数在内存中执行Metasplit的shellcode,支持MySQL和PostgreSQL数据库,参数:--os-pwn。
2、通过用户自定义的函数上传一个独立的payload执行,MySQL和PostgreSQL的sys_exec()函数,Microsoft SQL Server的xp_cmdshell()函数,参数:--os-pwn。
3、通过SMB攻击(MS08-068)来执行Metasploit的shellcode,当sqlmap获取到的权限足够高的时候(Linux/Unix的uid=0,Windows是Administrator),--os-smbrelay。
4、通过溢出Microsoft SQL Server 2000和2005的sp_replwritetovarbin存储过程(MS09-004),在内存中执行Metasploit的payload,参数:--os-bof
--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
对windows注册表操作当数据库为MySQL,PostgreSQL或Microsoft SQL Server,并且当前web应用支持堆查询。 当然,当前连接数据库的用户也需要有权限操作注册表。
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
从sqlite中读取session
-t TRAFFICFILE Log all HTTP traffic into a textual file
将HTTP请求与响应日志保存到一个文本文件中(-t 后接一个txt)
--batch Never ask for user input, use the default behaviour
使用该选项后,不会请求用户输入,当遇到需要输入的情况,全部选择默认
--binary-fields=.. Result fields having binary values (e.g. "digest")
--charset=CHARSET Force character encoding used for data retrieval
强制指定用于retrieval的编码字符集,比如--charset==GBK
--check-internet Check Internet connection before assessing the target
在考察目标前检查网络连接
--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 ",")
规定输出到CSV中的分隔符,默认是,
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
规定dump的输出结果格式,默认是CSV
--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
自动从-u中的url获取页面中的表单进行测试
--fresh-queries Ignore query results stored in session file
忽略在会话文件中存储的查询结果,重新查询
一般我们对某一点进行查询后,会话文件会保存本次查询的结果,再次查询则会直接读出原纪录
--har=HARFILE Log all HTTP traffic into a HAR file
将所有的HTTP请求和应答记录保存到HAR文件中,后接HAR文件名
--hex Use DBMS hex function(s) for data retrieval、
为数据检索使用DBMS的十六进制函数
--output-dir=OUT.. Custom output directory path
指定用户输出的字典路径
--parse-errors Parse and display DBMS error messages from responses
从响应中展示DBMS应答错误信息
--save=SAVECONFIG Save options to a configuration INI file
将设置保存到配置文档INI文件中
--scope=SCOPE Regexp to filter targets from provided proxy log
使用正则表达式在代理日志中筛选记录
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
设置测试的filter(过滤器,and或or操作皆可
--test-skip=TEST.. Skip tests by payloads and/or titles (e.g. BENCHMARK)
设置测试的skip(白名单
--update Update sqlmap
更新sqlmap
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Miscellaneous
-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")有使用参数太长太复杂,可以使用缩写模式。 例如:
python sqlmap.py --batch --random-agent --ignore-proxy --technique=BEU -u "www.target.com/vuln.php?id=1"
可以写成:
python sqlmap.py -z "bat,randoma,ign,tec=BEU" -u "www.target.com/vuln.php?id=1"
--alert=ALERT Run host OS command(s) when SQL injection is found
当发现SQL注入点时运行主机OS的命令
--answers=ANSWERS Set question answers (e.g. "quit=N,follow=N")
当希望sqlmap提出输入时,自动输入自己想要的答案可以使用此参数
--beep Beep on question and/or when SQL injection is found
当发现SQL注入点时发出beep的声音
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
清除sqlmap在注入时产生的UDF和表
--dependencies Check for missing (non-core) sqlmap dependencies
--disable-coloring Disable console output coloring
禁止sqlmap的彩色输出(sqlmap默认彩色输出
--gpage=GOOGLEPAGE Use Google dork results from specified page number
使用指定的Google结果页面作为URL,默认sqlmap使用前100个URL地址作为注入测试,结合此选项,可以指定页面的URL测试。
--identify-waf Make a thorough testing for a WAF/IPS/IDS protection
尝试找出WAF/IPS/IDS保护机制,方便用户做出绕过方式
--mobile Imitate smartphone through HTTP User-Agent header
有时服务端只接收移动端的访问,此时可以设定一个手机的User-Agent来模仿手机登陆。
--offline Work in offline mode (only use session data)
在脱机工作下的模式,只使用会话数据
--purge-output Safely remove all content from output directory
安全地删除output文件
有时需要删除结果文件,而不被恢复,可以使用此参数,原有文件将会被随机的一些文件覆盖。
--skip-waf Skip heuristic detection of WAF/IPS/IDS protection
绕过启发式的WAF/IPS/IDS 保护探测
--smart Conduct thorough tests only if positive heuristic(s)
启发式判断注入
有时对目标非常多的URL进行测试,为节省时间,只对能够快速判断为注入的报错点进行注入,可以使用此参数。
--sqlmap-shell Prompt for an interactive sqlmap shell
--tmp-dir=TMPDIR Local directory for storing temporary files
设置存储临时文件的本地目录
--web-root=WEBROOT Web server document root directory (e.g. "/var/www")
指定web服务器的后台地址
--wizard Simple wizard interface for beginner users
初级用户向导参数
可以一步一步教你如何输入针对目标注入。
python sqlmap.py --wizard
阅读全文
0 0
- SQLMAP帮助文档全解析
- sqlmap简易教程–帮助文档个人使用经验解析
- sqlmap简易教程–帮助文档个人使用经验解析
- sqlmap简易教程–帮助文档个人使用经验解析
- sqlmap简易教程–帮助文档个人使用经验解析
- sqlmap帮助文档(配合实践翻译)
- sqlmap帮助文档(配合实践翻译)
- JAVA帮助文档全系列
- JAVA帮助文档全系列
- 一个比较全的在线帮助文档
- JAVA帮助文档全系列说明
- pom.xml 全解析文档
- 中文版iTween帮助文档、参数解析
- 中文版iTween帮助文档、参数解析
- 中文版iTween帮助文档、参数解析
- 中文版iTween帮助文档、参数解析 .
- 中文版iTween帮助文档、参数解析
- 中文版iTween帮助文档、参数解析
- 写个自己看的博客随笔_发布游戏或者应用
- 学习笔记TF046:TensoFlow开发环境,Mac、Ubuntu/Linux、Windows,CPU版本、GPU版本
- OS上误删dbf文件,未宕机情况下的应急恢复!宕机后则无法恢复!
- [bzoj 1606] [Usaco2008 Dec]Hay For Sale 购买干草 (dp)
- String,StringBuffer与StringBuilder的区别?
- SQLMAP帮助文档全解析
- Spring MVC入门之构建到运行,超详细(利用Maven构建)
- jQuery 2.0.3 源码分析core
- 架构师之路(二十四)轻松学JVM——基本原理
- Linux的iSCSI共享存储服务搭建
- 上传控件选择完图片后将其立即显示在页面上(jquery ajax)
- JavaScript中的值传递
- ajax实现动态加载组合框
- poj 3252 Round Numbers