# 11/8
[題單](https://slides.com/jellyyfish/ctf-web-one#/7)
# Unminify
:::spoiler 提示
不知道要幹嘛,要不試試看F12?
:::
:::spoiler 解法
按下挑戰會有個網址
進去有一段文字
他說瀏覽器成功收到旗幟
網頁沒啥可以按的
打開F12
滑一下原始碼就有了
:::
# Includes
:::spoiler 提示
哪裡可以看到單獨的文件呢?
:::
:::spoiler 解法
按進網頁戳一下say hello 會跳出一個視窗跟你說"This code is in a separate file!"
要找獨立的文件
所以按到Sources
只有兩個檔案 一個js一個css
裡面各有一段flag
組合起來就好了
:::
# Insp3ct0r
:::spoiler 提示
他用什麼做了這個網站
:::
:::spoiler 解法
按how 他會跟你說
`I used these to make this site:
HTML
CSS
JS (JavaScript)`
按F12找出這三個的檔案,裡面就有三段flag
組合起來就是了
:::
# dont-use-client-side
:::spoiler 提示
數字是啥意思?
:::
:::spoiler 解法
打開F12看到往網頁原代碼的地方有一堆if
```=html
if (checkpass.substring(0, split) == 'pico') {
if (checkpass.substring(split*6, split*7) == 'a3c8') {
if (checkpass.substring(split, split*2) == 'CTF{') {
if (checkpass.substring(split*4, split*5) == 'ts_p') {
if (checkpass.substring(split*3, split*4) == 'lien') {
if (checkpass.substring(split*5, split*6) == 'lz_1') {
if (checkpass.substring(split*2, split*3) == 'no_c') {
if (checkpass.substring(split*7, split*8) == '9}') {
alert("Password Verified")
}
}
}
}
}
}
}
}
```
按照那個數字排出順序就是flag了
:::
# Inspect HTML
:::spoiler 解法
F12就看的到了。
:::
# logon
:::spoiler 提示
要怎麼騙網頁我的身分
:::
:::spoiler 解法
先隨便登一組帳密
按到cookie可以發現有一個cookie名稱叫admin,然後值目前是False
把他改成True,刷新頁面就成功了
:::
# Scavenger Hunt
:::spoiler 提示
仔細看一下Information Leakage那邊,思考一下他題目的敘述跟上面寫的哪些檔案有關係
:::
:::spoiler 解法
一樣先F12
可以在HTML跟CSS找到兩部分
JS檔裡說"How can I keep Google from indexing my website?"
所以想到要看robots.txt , 在網址後加上/robots.txt 得到第三部分跟新提示"I think this is an apache server... can you Access the next flag?"
他提到這是apache server , 所以應該要找.htaccess , 獲得第四部份跟新提示" I love making websites on my Mac, I can Store a lot of information there."
提到Mac跟store information 所以要找.DS_Store
全部接起來就是flag了:D
:::
# where are the robots
:::spoiler 提示
robots跟某個檔案的名字好像挺像的
:::
:::spoiler 解法
依robots的名字聯想到要找robots.txt
robots.txt檔案裡寫了一個禁止的路徑
把他加到網址後面,找到flag了!
:::
# picobrowser
:::spoiler 提示
要怎麼騙伺服器你從哪裡來的? & HTTP的各種Header是啥意思呢
:::
:::spoiler 解法
要改回傳給伺服器的資料所以要用burp suite
先進網頁看看
直接按flag他會跟你說`You're not picobrowser! Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36`
後面那串長的跟User-Agent的一樣
所以打開攔截把User-Agent冒號後的字改成picobrowser,然後按Forward
就有了:D
:::
# GET aHEAD
:::spoiler 提示
或許除了GET跟POST還有一種?
:::
:::spoiler 解法
觀察一下可以發現按下RED的method是GET,BLUE的是POST
結合題目去看可以猜出是要用HEAD
一樣用burp suite攔截後按右鍵選「send to repeater」
然後把POST改成HEAD按send就有了
:::