Space Noise
TCP covert channel using Morse Code
Last updated
TCP covert channel using Morse Code
Last updated
We just intercepted a secret transmission from the Secret Space Agency, but the traffic looks really weird... Wireshark shows so much red! Can you help us to figure out what's going on?
The flag is in the flag format: STC{...}
Author: zeyu2001
We are provided with a PCAP file containing packets sent between 192.168.1.1 and 192.168.1.2.
Let's find some patterns!
First, notice that the SYN-PSH pair is sent at regular intervals. Perhaps this is a delimiter of sorts. The SYN packet is sent from 192.168.1.1 to 192.168.1.2, while the PSH packet is sent from 192.168.1.2 to 192.168.1.1.
Next, in between the SYN-PSH pairs, there are RST and URG packets. Since only two different packets are used, binary and morse code comes to mind.
Notice that there are up to 5 packets between the SYN-PSH pairs. If this was a 5-bit encoding, it wouldn't make much sense for the number of bits to vary from 1 to 5. In morse code, however, alphanumeric characters are represented by up to 5 dots and slashes.
This is a covert TCP channel, implemented using morse code. The protocol is as follows:
RST = .
URG = -
SYN = I have finished sending a character.
PSH = I acknowledge this character. Send the next character.
Decoding the morse code gives the flag in hex.
The following script implements the solution.
The flag is STC{I believe that this Nation should commit itself to achieving the goal, before this decade is out, of landing a man on the Moon and returning him safely to Earth.}