sql靶场做法
1.union 联合注入
2.报错注入 updatexml(1,1,1)
3.burpsuit爆破注入
举例子:
1.联合注入例子
2.报错注入例子
http://127.0.0.1/sqlilabs/Less-7/?id=1%27))%20and%20updatexml(1,concat(0x7e,user(),0x7e),1)--+

3.bp

sql里面要注意的点:
第八关
方法:1.将table查询,列查询,数据查询
2.暴力破解
3.二分查找
因为在MySQL中链表查询有两个而前端只展示第一个若想展示给个不存在的字段还有为啥只展示username和password因为前端只写了这个牵头查不到就可以查到后面
-1永远为查不到任何有效数据
可以回显
联合查询 会把空集和后半段 1,2,3 的结果合并
页面上就会直接显示1、2、3
如何解决呢1.limit 0,1(缺点数量多麻烦)
select table_name from information_schema.tables where table_schema='security' limit 0,1--找表明
select column_name from information_schema.columns where table_schema='security' and table_name='users'--找列名
MYSQL绕过方法
1.空格
2.引号
3.逗号
4.比较符号(<>)
5.or and xor not
6.注释符 # (-- ) (--+)
7.等号(=)、关键词(如flag)被过滤
8.union,select,where
9.编码
10.函数
11.宽字节注入
12.多参数请求拆分
13.HTTP参数污染
14.生僻函数
15.寻找网站源IP waf cdn ip
16.注入参数到cookie中
截断函数
截断函数substr,substring,left,right, mid
报错注入7大常用函数
1.ST_LatFromGeoHash()(mysql>=5.7.x)
2.ST_LongFromGeoHash(mysql>=5.7.x)
3.GTID (MySQL >= 5.6.X - 显错<=200)
4.floor(8.x>mysql>5.0)
5.ST_Pointfromgeohash (mysql>=5.7)
6 updatexml
7 extractvalue