TryHackMe 歴1ヵ月半が参加する Advent of Cyber 2022 [Day 19]

19 日目。

[Day 19] Wiggles go brrr

今回はなにやら胡散臭いデバイスが見つかったのでその通信を解析しようというお話(だと思う)。

まずはハードウェアにおける通信プロトコルとして USART、SPI、I2C を紹介する。見つかった胡散臭いデバイスでは USART プロトコルで通信が行われていることがわかった。そこで、出力された通信の結果を Saleae と呼ばれる Logic Analyser で解析することにした――(という流れだと思う)。

What device can be used to probe the signals being sent on electrical wires between two devices?

解説の Welcome to the Matrix の箇所に以下の記述がある。

In this task, we will use a logic analyser to determine the communication between two devices in the rogue implant.

USART is faster than SPI for communication? (Yea,Nay)

SPI の解説文に以下の記述がある。

Separating the clock (SCK) from the data (DATA) line allows for synchronous communication, which is faster and more reliable.

USART communication uses fewer wires than SPI? (Yea,Nay)

同じくSPI の解説文に以下の記述がある。

While USART communication has the clock built into the TX and RX lines, SPI uses a separate clock wire.

USART is faster than I2C for communication? (Yea,Nay)

I2C の解説文に USART に関する以下の記述がある。

Because USART is asynchronous and has the clock built into the transmit and receive lines, devices have to agree ahead of time on the configuration of communication.

また、I2C の特徴として以下の記述がある。

I2C attempts to solve these problems

I2C uses more wires than SPI for communication? (Yea,Nay)

同じく I2C の解説文に以下の記述がある。

Similar to USART, I2C only makes use of two lines for communication.

SPI is faster than I2C for communication? (Yea,Nay)

同じく I2C の解説文に以下の記述がある。

..., and while it is slightly slower than SPI, ...

What is the maximum number of devices that can be connected on a single pair of I2C lines?

同じく I2C の解説文に以下の記述がある。

... , the use of the Address signal means up to 1008 devices can be connected to the same two lines and will be able to communicate.

What is the new baud rate that is negotiated between the microprocessor and ESP32 chip?

まずは Saleae を起動し、santa ファイルを読み込む。読み込んだ後は右側の Analyzers アイコンをクリックし、+ マークを押して Async Serial を選択する。

設定は以下の通りにして Save する。

保存後にターミナルアイコンをクリックするとデータが見られる。

これだけではよくわからないので Channel 0 についても同様に設定して見てみると回答すべき baud rate が見て取れる。

What is the flag that is transmitted once the new baud rate was accepted?

前問から、新たな baud rate で通信を行う旨のネゴシエーションが行われている(?)ので、Edit で再び設定を開き、Bit Rate を先ほどの 4800 から 9600 に変更する(もう片方の channel についても同様)。

するとターミナルの画面に回答すべき flag が見て取れる。

Looking for a challenge? Try our Recent Threats module!

No answer needed

感想

ハードウェア難しい……。低レイヤが得意な人ってそれだけでザ・機械オタクという感じがしてすごいなぁと(誉め言葉)。今回はほぼ未知のエリアだったがやけに英語が読みやすかった気がする。自分の英語力が上がったのか、それとも今回の担当者が優しかったのか――。