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?

【Write Up】 picoCTF 2025 hash-only-1

Posted at

問題

あるサーバー上でroot権限が付与されてるコードを使って権限昇格をしてみよう

解き方

ssh接続して、flaghasherという実行ファイルがあるので、まずこの実行ファイルを解析します。
ghidra等でデコンパイルを行うと、

Web上でデコンパイル行ってくれるサイト

/bin/bash -c 'md5sum /root/flag'

これをsystem関数使って実行しているらしい

なんとなくmd5sumの権限を確認してみると、

Screenshot_20250319_000007.png

なんで書き込み権限あんねんwww

md5sumcatに置き換えたら

Screenshot_20250319_000214.png

いけました

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?