0
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 1 year has passed since last update.

setodaNoteCTF - tkys_royale 120

Posted at

問題

image.png

解いてみた

ソースを見てみます。

image.png

<!-- TEST ONLY user:pass123 -->

と書かれているので入力してみます。

image.png

ログインはできたもののフラグはなさそうです。
ありがちなSQLインジェクションでもやってみます。

' or 1=1 --

をユーザ名に入力してみます。

image.png

エラー画面が出たので惜しい気はしますがフラグは出ません。
パスワードにも入力してみます。

image.png

惜しい気はする。。。
このあとorをORにしてみたり、いろいろやってみたけど同じようなエラーが出るだけ。
あきらめかけたころフラグにたどり着きました。

image.png

結局のところ、最後にスペースが必要だったようです。

' or 1=1 --

ではなく

' or 1=1 -- 

です。。。
いつも後ろにスペース入れてたっけ?
久しぶりすぎて忘れてしまいました。

0
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
0
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?