专注 APT 攻击与防御—工具介绍—Sqlmap

sqlmap参数详解:

由于Sqlmap 是常用工具之一,所以本篇的篇幅较长,详解一次所有参数。

1、Options(选项)

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)
## 详细级别:0-6(默认为1)

2、Target(目标)

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")
## 目标URL

-l LOGFILE Parse target(s) from Burp or WebScarab proxy log file
## 解析目标(s)从Burp或WebScarab代理日志文件

-x SITEMAPURL Parse target(s) from remote sitemap(.xml) file
## 解析目标(s)从远程站点地图文件(.xml)

-m BULKFILE Scan multiple targets given in a textual file
## 扫描文本文件中给出的多个目标

-r REQUESTFILE Load HTTP request from a file
## 从本地文件加载HTTP请求 ,多用于post注入。

-g GOOGLEDORK Process Google dork results as target URLs
## 处理Google的结果作为目标URL。

-c CONFIGFILE Load options from a configuration INI file
## 从INI配置文件中加载选项。

3、Request(请求)

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)
## 强制使用给定的HTTP方法(e.g. PUT)

--data=DATA Data string to be sent through POST
## 通过POST发送的数据字符串

--param-del=PARA.. Character used for splitting parameter values
## 用于拆分参数值的字符

--cookie=COOKIE HTTP Cookie header value HTTP
## Cookie头的值

--cookie-del=COO.. Character used for splitting cookie values
## 用于分割Cookie值的字符

--load-cookies=L.. File containing cookies in Netscape/wget format
## 包含Netscape / wget格式的cookie的文件

--drop-set-cookie Ignore Set-Cookie header from response
## 从响应中忽略Set-Cookie头

--user-agent=AGENT HTTP User-Agent header value
## 指定 HTTP User - Agent头

--random-agent Use randomly selected HTTP User-Agent header value
## 使用随机选定的HTTP User - Agent头

--host=HOST HTTP Host header value
## HTTP主机头值

--referer=REFERER HTTP Referer header value
## 指定 HTTP Referer头

-H HEADER, --hea.. Extra header (e.g. "X-Forwarded-For: 127.0.0.1")
## 额外header

--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\\nETag: 123")
## 额外header

--auth-type=AUTH.. HTTP authentication type (Basic, Digest, NTLM or PKI)HTTP
## 认证类型(Basic, Digest, NTLM or PKI)

--auth-cred=AUTH.. HTTP authentication credentials (name:password)
## HTTP认证凭证(name:password)

--auth-file=AUTH.. HTTP authentication PEM cert/private key file
## HTTP认证 PEM认证/私钥文件

--ignore-401 Ignore HTTP Error 401 (Unauthorized)
## 忽略HTTP错误401

--proxy=PROXY Use a proxy to connect to the target URL
## 使用代理连接到目标网址

--proxy-cred=PRO.. Proxy authentication credentials (name:password)
## 代理认证证书(name:password)

--proxy-file=PRO.. Load proxy list from a file
## 从文件中加载代理列表

--ignore-proxy Ignore system default proxy settings
## 忽略系统默认代理设置

--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 (default), SOCKS4 or SOCKS5)
## 设置Tor代理类型

--check-tor Check to see if Tor is used properly
## 检查Tor是否正确使用

--delay=DELAY Delay in seconds between each HTTP request
## 每个HTTP请求之间的延迟(秒)

--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
## 秒超时连接前等待(默认30)

--retries=RETRIES Retries when the connection timeouts (default 3)
## 连接超时时重试(默认值3)

--randomize=RPARAM Randomly change value for given parameter(s)
## 随机更改给定参数的值(s)

--safe-url=SAFEURL URL address to visit frequently during testing
## 在测试期间频繁访问的URL地址

--safe-post=SAFE.. POST data to send to a safe URL
## POST数据发送到安全URL

--safe-req=SAFER.. Load safe HTTP request from a file
## 从文件加载安全HTTP请求

--safe-freq=SAFE.. Test requests between two visits to a given safe URL
## 在两次访问给定安全网址之间测试请求

--skip-urlencode Skip URL encoding of payload data
## 跳过有效载荷数据的URL编码

--csrf-token=CSR.. Parameter used to hold anti-CSRF token
## 参数用于保存anti-CSRF令牌

--csrf-url=CSRFURL URL address to visit to extract anti-CSRF token
## 提取anti-CSRF URL地址访问令牌

--force-ssl Force usage of SSL/HTTPS
## 强制使用SSL /HTTPS

--hpp Use HTTP parameter pollution method
## 使用HTTP参数pollution的方法

--eval=EVALCODE Evaluate provided Python code before the request (e.g. 评估请求之前提供Python代码"import hashlib;id2=hashlib.md5(id).hexdigest()")

4、Optimization(优化)

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
## 从没有实际的HTTP响应体中检索页面长度

--threads=THREADS Max number of concurrent HTTP(s) requests (default 1)
## 最大的HTTP(S)请求并发量(默认为1)

5、Injection(注入)

Injection(注入):

These options can be used to specify which parameters to test for, provide custom injection payloads and optional tampering scripts
## 这些选项可以用来指定测试哪些参数, 提供自定义的注入payloads和可选篡改脚本。

-p TESTPARAMETER Testable parameter(s)
## 可测试的参数(S)

--skip=SKIP Skip testing for given parameter(s)
## 跳过对给定参数的测试

--skip-static Skip testing parameters that not appear to be dynamic
## 跳过测试不显示为动态的参数

--param-exclude=.. Regexp to exclude parameters from testing (e.g. "ses")
## 使用正则表达式排除参数进行测试(e.g. "ses")

--dbms=DBMS Force back-end DBMS to this value
## 强制后端的DBMS为此值

--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
## DBMS认证凭证(user:password)

--os=OS Force back-end DBMS operating system to this value
## 强制后端的DBMS操作系统为这个值

--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
## 注入payload字符串前缀

--suffix=SUFFIX Injection payload suffix string
## 注入payload字符串后缀

--tamper=TAMPER Use given script(s) for tampering injection data
## 使用给定的脚本(S)篡改注入数据

6、Detection(检测)

Detection(检测):
These options can be used to customize the detection phase
## 这些选项可以用来指定在SQL盲注时如何解析和比较HTTP响应页面的内容。

--level=LEVEL Level of tests to perform (1-5, default 1)
## 执行测试的等级(1-5,默认为1)

--risk=RISK Risk of tests to perform (1-3, default 1)
## 执行测试的风险(0-3,默认为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
## 当查询求值为True时匹配的HTTP代码

--text-only Compare pages based only on the textual content
## 仅基于在文本内容比较网页

--titles Compare pages based only on their titles
## 仅根据他们的标题进行比较

7、Techniques(技巧)

Techniques(技巧):
These options can be used to tweak testing of specific SQL injection techniques
## 这些选项可用于调整具体的SQL注入测试。

--technique=TECH SQL injection techniques to use (default "BEUSTQ")
## SQL 注入技术测试(默认BEUST)

--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
## DBMS响应的延迟时间(默认为5秒)

--union-cols=UCOLS Range of columns to test for UNION query SQL injection
## 定列范围用于测试UNION查询注入

--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
## 要在UNION查询SQL注入的FROM部分使用的表

--dns-domain=DNS.. Domain name used for DNS exfiltration attack
## 域名用于DNS漏出攻击

--second-order=S.. Resulting page URL searched for second-order response
## 生成页面的URL搜索为second-order响应

8、Fingerprint(指纹)

Fingerprint(指纹):

-f, --fingerprint Perform an extensive DBMS version fingerprint
## 执行检查广泛的DBMS版本指纹

文章来源:《专注 APT 攻击与防御 - Micro8 系列教程》 - 书栈网 · BookStack

 

相关推荐

  1. DDoS攻击防御

    2024-04-24 11:06:03       8 阅读
  2. SQLMap介绍

    2024-04-24 11:06:03       27 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-24 11:06:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-24 11:06:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-24 11:06:03       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-24 11:06:03       20 阅读

热门阅读

  1. vue2 点击预览本地 word excle pdf 文件

    2024-04-24 11:06:03       19 阅读
  2. css实现拖拽悬浮球组件

    2024-04-24 11:06:03       17 阅读
  3. 零基础 Chrome 扩展开发指南

    2024-04-24 11:06:03       16 阅读
  4. F检验的步骤

    2024-04-24 11:06:03       12 阅读
  5. 代码随想录算法训练营day39

    2024-04-24 11:06:03       51 阅读
  6. 使用Python实现集成学习算法:Bagging与Boosting

    2024-04-24 11:06:03       35 阅读
  7. 富格林:有效技能维护出金盈利

    2024-04-24 11:06:03       17 阅读
  8. 通用型自定义拼接 SQL 脚本,摆脱重复工作量

    2024-04-24 11:06:03       15 阅读
  9. 观察者模式

    2024-04-24 11:06:03       37 阅读
  10. Linux:SSL中加密的数字证书主要内容

    2024-04-24 11:06:03       14 阅读