(2020/01/25 - 復習しました)

URL: https://www.trendmicro.com/ja_jp/campaigns/capture-the-flag.html

2019年9月のアタマ辺りにやってたCTFです。ファイルだけダウンロードして、その後スルーしたやつなんですが、後日(2020/01/25)1個だけですが復習しました。

orange_bar.png
ここから下はCTF終了後に行った復習です。他の方のWriteupとか参照してます。



[Forensics]: Forensics-exploit 100


Challenge

Analyze the pcap, check for clues, listen, follow the breadcrumbs and ultimately collect the flag!

Attachment:

  • ctf.pcap (元ファイル名はこれじゃなかったかも)


Solution

Wireshark > Statistics > Conversations

trandmicro2019_for1.png

Port Bのところに、印字可能文字コードが並んでいるので、いくつか変換してみます。

$ python
Python 3.7.3 (default, May 26 2019, 16:51:20) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> chr(84)
'T'
>>> chr(77)
'M'
>>> chr(67)
'C'
>>> exit()

フラグになりそう。

ということで、

$ tshark -r ctf.pcap -Tfields -e ip.addr -e tcp.dstport | grep "117.114.23.95" | awk '{print $2}' | tr "\n" " " ; echo
84 77 67 84 70 123 75 110 48 99 107 74 117 53 116 111 78 116 104 51 114 49 103 104 116 100 48 48 114 125 42740 125 125 42740 42740 125

$ python -c 'print("".join([chr(int(x)) for x in "84 77 67 84 70 123 75 110 48 99 107 74 117 53 116 111 78 116 104 51 114 49 103 104 116 100 48 48 114 125".split()]))'
TMCTF{Kn0ckJu5toNth3r1ghtd00r}

Flag: TMCTF{Kn0ckJu5toNth3r1ghtd00r}