Hiding secret messages in internet traffic: a new how-to
Covert messages exploit TCP
Researchers have demonstrated a new way to hide secret messages in internet traffic that can elude even vigilant network operators.
The process is a network application of steganography, which is the ancient science and art of hiding messages in documents, pictures and other media in a way that can be easily detected by the intended recipient, but not by third parties. The researchers from the Warsaw University of Technology have found a way to apply the principle to network traffic by exploiting design weaknesses in TCP, or transmission control protocol.
RSTEG, short for Retransmission Steganography, works by manipulating the back-and-forth sequence and messages exchanged each time an internet packet is sent. Typically, a computer on the receiving end sends a confirmation each time one is successfully transmitted. RSTEG works by deliberately withholding the acknowledgment, which then prompts the packet to be resent.
"In the context of RSTEG, a sender replaces original payload with a steganogram instead of sending the same packet again," the paper, authored by Wojciech Mazurczyk, Miłosz Smolarczyk, and Krzysztof Szczypiorski, states. "When the retransmitted packet reaches the receiver, he/she can then extract hidden information."
The technique has important implications for network security because it can be used by attackers to conceal the leakage of confidential information, the paper warns. It goes on to detail four scenarios in which the attack can be used, including one that requires no control of intermediate nodes. The other three are harder to pull off, but they are also harder to detect by third parties.
"No real-world steganographic method is perfect; whatever the method, the hidden information can be potentially discovered," the researchers write. "In general, the more hidden information is inserted into the data stream, the greater the chance that it will be detected, for example, by scanning the data flow or by some other seganalysis methods."
To evade detection, those using the technique must limit the number of retransmissions to non-suspicious levels.
Steganography dates back to the Fifth Century BC at least, when Greek messengers buried messages on wax tablets before sealing them with beeswax. In more recent times, it's been used to sneak data into all kinds of electronic media, including digital photographs and executable files. The same Polish researchers who described RSTEG also developed a similar technique targeting voice over IP traffic.
While RSTEG works only with TCP, the principle can be applied to other protocols as well, including those for wireless networks. A PDF of the paper is available here. ®
Isn't SSL meant to prevent looking at the data from the server to the client EVEN WHEN YOU INTERCEPT the traffic?
What would the point of stenography be if the connection is encrypted, anyway?
If the firewall prohibits SSL traffic, then it will not be worth your time to use the network to get the information in/out anyway - use SneakerNet(tm)!
Already been done
There was a much simpler version out some years ago, filling the padding of ICMP echo packets (pings) with data. So simple, assuming ICMP is allowed through of course :-)
Anyway, this isn't really steg - its more of a covert channel.
I'll try and have a look at it all the same.
@What a load of turd.
> When a re-sent packet comes along with a completely different CRC from the first then it's
> quite obvious that something dodgy is up
It's trivial to create a new packet with the same CRC as the original.. the CRC is simply the remainder in a polynomial division (in GF_2), so a small bit of linear maths is all that's required to calculate a constant term to add to your new packet so that it has the same CRC as the original.
@May already be defeated:
> I think some firewalls already deal with this e.g. from Checkpoint SmartDefense
> you would get the message "Retransmitted data does not match original data".
It really depends on where Mallory is situated. If she's doing egress filtering on your connection to make sure that you're not sending secret messages, then it's a valid point. Packets with transmission errors are, by definition, going to have different contents in general, though. If Mallory is close to you, then she has a better chance of detecting that the error rate on your transmission link is higher than it should be... Someone eavesdropping at the far end has slightly less chance of determining this because each node the packet passes through has a cumulative chance of inserting an error. With the internetworks being quite reliable, and getting more so, though, using error packets becomes more detectable, no matter where Mallory is situated.