sqlmap中文手册 (19)

HTTP参数污染是绕过WAF/IPS/IDS的一种技术,详情见此处。这一技术针对ASP/IIS和ASP.NET/IIS平台尤其有效。如果怀疑目标受WAF/IPS/IDS保护,可以尝试用此参数进行绕过。

10.彻底检测WAF/IPS/IDS

参数:–identify-waf

Sqlmap可以识别WAF/IPS/IDS以便用户进行针对性操作(如:添加“–tamper”)。目前Sqlmap支持检测30多种不同的WAF/IPS/IDS,如Airlock和Barracuda WAF等。检测WAF的脚本可以在安装目录的waf目录中找到。

下例的目标是MySQL,受ModSecurity WAF保护:

  python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?id=1" --identify-waf -v 3

部分输出如下:

  [xx:xx:23] [INFO] testing connection to the target URL

  [xx:xx:23] [INFO] heuristics detected web page charset 'ascii'

  [xx:xx:23] [INFO] using WAF scripts to detect backend WAF/IPS/IDS protection

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'USP Secure Entry Server (United Security Providers)'[xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'BinarySEC Web Application Firewall (BinarySEC)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetContinuum Web Application Firewall (NetContinuum/Barracuda Networks)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Hyperguard Web Application Firewall (art of defence Inc.)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Cisco ACE XML Gateway (Cisco Systems)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'TrafficShield (F5 Networks)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Teros/Citrix Application Firewall Enterprise (Teros/Citrix Systems)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KONA Security Solutions (Akamai Technologies)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Incapsula Web Application Firewall (Incapsula/Imperva)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'CloudFlare Web Application Firewall (CloudFlare)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Barracuda Web Application Firewall (Barracuda Networks)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'webApp.secure (webScurity)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Proventia Web Application Security (IBM)'

  [xx:xx:23] [DEBUG] declared web page charset 'iso-8859-1'

  [xx:xx:23] [DEBUG] page not found (404)

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'KS-WAF (Knownsec)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'NetScaler (Citrix Systems)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'Jiasule Web Application Firewall (Jiasule)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'WebKnight Application Firewall (AQTRONIX)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'AppWall (Radware)'

  [xx:xx:23] [DEBUG] checking for WAF/IDS/IPS product 'ModSecurity: Open Source Web Application Firewall (Trustwave)'

  [xx:xx:23] [CRITICAL] WAF/IDS/IPS identified 'ModSecurity: Open Source Web Application Firewall (Trustwave)'. Please consider usage of tamper scripts (option '--tamper')

参数:–skip-waf

默认地Sqlmap会发送虚假的SQL注入playload以试探目标是否有保护措施。如有任何问题,用户可以使用参数“–skip-waf”来禁用这一技术。

11.模仿智能手机

参数:–mobile

有些网站对智能手机和桌面环境的返回是不同的。当需要测试这种网站的智能手机页面时可以设置一个智能手机的User-Agent,或者更简单地,使用此参数,Sqlmap会在执行时询问要模仿成流行的手机中的哪种,如:

  $ python sqlmap.py -u "http://www.target.com/vuln.php?id=1" --mobile

  [...]

  which smartphone do you want sqlmap to imitate through HTTP User-Agent header?

  [1] Apple iPhone 4s (default)

  [2] BlackBerry 9900

  [3] Google Nexus 7

  [4] HP iPAQ 6365

  [5] HTC Sensation

  [6] Nokia N97

  [7] Samsung Galaxy S

  > 1

  [...]

12.离线模式(仅仅使用会话数据)

参数:–offline

添加此参数,Sqlmap将仅仅使用以前存储的会话数据做测试而不向目标发送任何数据包。

13.在Google dork中展示页面权重

参数:–page-rank

与参数“-g”一起使用,这会使Sqlmap向Google发起更多的请求并展示页面权重。

14.从输出目录中安全移除所有内容

参数:–purge-output

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

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