picoCTF2019 dont-use-client-side [Web Exploitation]
Can you break into this super secure portal? https://2019shell1.picoctf.com/problem/45147/ (link) or http://2019shell1.picoctf.com:45147
(適当な訳)この超セキュアなサイトを突破できますか?
Hints: Never trust the client
(適当な訳)クライアントを絶対信じるな
リンクに飛ぶとパスワードの入力を求められるボックスがあるページが表示される。
ページのソースを表示させると、以下のJavaScriptの記述が見つかる。
<script type="text/javascript">
function verify() {
checkpass = document.getElementById("pass").value;
split = 4;
if (checkpass.substring(0, split) == 'pico') {
if (checkpass.substring(split*6, split*7) == 'a60f') {
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_4') {
if (checkpass.substring(split*2, split*3) == 'no_c') {
if (checkpass.substring(split*7, split*8) == '3}') {
alert("Password Verified")
}
}
}
}
}
}
}
}
else {
alert("Incorrect password");
}
}
単純に並び替えるとフラグとなる。
答え:picoCTF{no_clients_plz_4a60f3}