replay
TCPサーバの接続情報と、ファイル replay.pcap
が与えられた。
replay.pcap
をWiresharkで開き、適当な行を右クリックして「追跡 → TCPストリーム」を選択すると、
何らかのデータを送った後シェルを操作している以下の様子がみられた。
Information to connect to a TCP server and a file replay.pcap
were given.
I opened replay.pcap
in Wireshark, right-clicked a line and selected "Follow → TCP Stream".
It resulted in this. This looks like the client sent some data and then did some operation in the shell.

「172.27.9.92:60572 → 35.224.47.193:1024 (425 bytes)」を選択し、「としてデータを表示」を「Raw(無加工)形式」にした上で、「…として保存」でデータを保存した。
さらに、バイナリエディタで最初の 0A
より後の部分を削除した。
以下がこの結果得られたデータである。
I selected "172.27.9.92:60572 → 35.224.47.193:1024 (425 bytes)", set "Show data as" to "Raw" and saved the data via "Save as…".
Then, I removed the part after the first 0A
using a binary editor.
This is the result:
data.dat
Tera Termでサーバに接続し、このデータを「ファイル送信」で送信すると、接続が切れてしまった。
Wiresharkで通信の状況を確認すると、replay.pcap
ではデータを1個のパケットで送信していたのに対し、
Tera Termからの通信では最初の100バイトとそれ以外の2パケットに分割して送信されていることがわかった。
TCP/IPテストツールでサーバに接続し、データを「FILE送信」で送信すると、シェルの操作が可能になった。
replay.pcap
の解析結果から flag.txt
があることがわかっているので、cat flag.txt
コマンドを実行すると、flagが得られた。
I connected to the server using Tera Term and sent the data via "Send file". As a result, the connection was closed.
Checking the communication via Wireshark, I found that Tera Term is sending the data in 2 packets (the first 100 bytes and the rest)
while the data is sent in 1 packet in replay.pcap
.
Connecting to the server via TCP/IPテストツール and sending the data via "FILE送信" made the shell available.
It is known that a file flag.txt
exists from the analysis of replay.pcap
. I executed a command cat flag.txt
and obtained the flag.
buckeye{g00d_th1ng_P1E_w4s_d1s4bl3d_0n_th3_b1n4ry}
writeup by MikeCAT
BuckeyeCTF 2021