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】endianness の WriteUp (General Skills / Easy)

0
Posted at

1. はじめに

picoCTFのGeneral問題「endianness」の解法メモです。
ある文字列のリトルエンディアンとビッグエンディアンを答えさせる問題です。

2.問題の概要

ジャンル: General Skills
難易度: Easy
問題文:Know of little and big endian?

  1. 準備(サーバーへの接続)

インスタンスの起動

サーバ起動するとncコマンドが表示されるので、wslで接続しました。
すると文字列が与えられ、クイズが出されます。

リトルエンディアン方式の回答

こちらのQiita記事を参考にしました。
『ビッグエンディアン』と『リトルエンディアン』とその由来について浅く理解する
(https://qiita.com/celeron5576/items/e5277e33b198277e805d)
文字列の16進数はcyberchef(https://gchq.github.io/CyberChef/)
で行いました。

  • cyberchefのinputに与えられた文字列をペースト
  • RecipeにTo Hexをセットしてbake
  • 1文字ずつ16進数に直した結果がOutputされます

16進数を後ろから並べたものがリトルエンディアンです。
クイズでは空白区切りが許されなかったので、空白抜きで入力します。
例;picoの場合
p→70
i→69
c→63
o→6f
なので、リトルエンディアンの回答では「6f636970」と入力します

ビッグエンディアン方式の回答

16進数を前から並べたものがビッグエンディアンです。
例のpicoの場合「7069636f」と入力します

  1. フラグ
    リトルエンディアン、ビッグエンディアンの回答が正解だと、フラグが出力されます

  2. まとめ
    cyberchef便利です。

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?