はまやんはまやんはまやん

hamayanhamayan's blog

First Day Inspection [b01lers CTF bootcamp]

First Day Inspection
It's your first day working at ENCOM, but they're asking you to figure things out yourself. What an onboarding process... take a look around and see what you can find.
http://chal.ctf.b01lers.com:3005
Author: @MDirt

調査

ソースコードを見てみる。
<!-- (1/5): flag{ -->
ふむ。

CSSに3つ目がある。
/* (3/5): 0m3_ */

JSに4つ目がある。
// (4/5): t0_E
JSの下に難読化jsがあるけど、ちょっと後回し

// don't waste your time with this
var _0x33b6=['\x6c\x6f\x63\x61\x6c\x53\x74\x6f\x72\x61\x67\x65','\x4e\x43\x30\x4d\x7d','\x28\x32\x2f\x35\x29\x3a\x20\x77\x33\x6c\x63','\x28\x35\x2f\x35\x29','\x73\x65\x74\x49\x74\x65\x6d','\x65\x72\x72\x6f\x72'];(function(_0x4acc5e,_0x589cee){var _0x4bbf29=function(_0x4be7a7){while(--_0x4be7a7){_0x4acc5e['push'](_0x4acc5e['shift']());}};_0x4bbf29(++_0x589cee);}(_0x33b6,0x2534+0x34c+-0x2695));var _0x1b3f=function(_0x4acc5e,_0x589cee){_0x4acc5e=_0x4acc5e-(0x2534+0x34c+-0x2880);var _0x4bbf29=_0x33b6[_0x4acc5e];return _0x4bbf29;};console[_0x1b3f('\x30\x78\x30')](_0x1b3f('\x30\x78\x33')),window[_0x1b3f('\x30\x78\x31')][_0x1b3f('\x30\x78\x35')](_0x1b3f('\x30\x78\x34'),_0x1b3f('\x30\x78\x32'));

難読化js部分で適当にブレークポイントで止めて、変数を見てみるとこんなものがある。

f:id:hamayanhamayan:20201005190336p:plain

2番目と5番目も得られたので、結合してフラグを得る。

flag{w3lc0m3_t0_ENC0M}