1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

picoCTF 2019 Client-side-again - Points: 200

Posted at

問題

image.png

解いてみた

サイトにアクセスしてみます。

image.png

ログイン画面がありました。
ソースを見てみます。

image.png

入力したパスワードを10行目のjavascriptが何か判定をして正解か不正解かを判定しているようです。
とりあえずjavascriptを整形してみます。

image.png

かなり厳しいif文がありますね。
webページを保存していろいろやってみようと思います。

image.png

29行目にalertを入れてcheckpassを表示してみます。

image.png

入力した文字が表示されました。

image.png

ということで、比較する右側が答えで左側が入力したもののようです。
右側を表示してみます。

image.png

最初のif文の右側を表示させてみる。

image.png

フラグと同じものを書けば最後まで行けそうな気がします。
一気に全部alertで書いてみます。

image.png

あーなんかダミーあるんですね。
左側も出力するようにします。
先に左側を全部出力して、次に右側を出力します。

image.png

こんな感じになったので、これをうまく並び替えたら答えです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?