web安全测试--sql注入攻击

时间:2020-12-16 04:59:18
  •  先要自行了解sql的几个概念:

1. or '1'='1'

2. order by

3. union : 联合查询需要表字段相同

  • sql注入攻击漏洞判断步骤:

1、‘

2、查看数据库信息

3、绕过过滤  /**/

如:url编码绕过  or 1=1即 %6f%72%20%31%3d%31      (%3d为=,%31为1,%6f%72为or)       参考:http://www.w3school.com.cn/tags/html_ref_urlencode.html

那么

1%20or%201%3d1%20union%20select%201,2

  • 工具:

使用sqlmap执行SQL注入攻击

cd到“sqlmap”目录中,用命令“python2 sqlmap.py”启动Sqlmap

执行sql注入测试:

python2 sqlmap.py -u或 -url https://xx.xx.xx.xx --dbs --tables --columns

web安全测试--sql注入攻击

参考:

11种常见SQLMAP使用方法详解

https://blog.csdn.net/whatday/article/details/54766536

sqlmap安装

https://www.cnblogs.com/TNSSTAR/p/8359781.html

https://blog.csdn.net/wn314/article/details/78872828