Censorship on the internet is becoming an increasingly important issue worldwide. This leads to an intensified 'arms race'—government bodies and private corporations in various countries strive to block different content and fight against means of circumventing such restrictions, while developers and researchers attempt to create effective tools to combat censorship.
Researchers from Carnegie Mellon University, Stanford University, and SRI International conducted , during which they developed a special service to mask the use of Tor—one of the most popular tools for bypassing blocks. We present to you a story about the work carried out by the researchers.
Tor Against Blocks
Tor provides user anonymity by using special relays—that is, intermediary servers between the user and the website they want to access. Usually, there are several relays between the user and the website, each of which can decrypt only a small amount of data in the transmitted packet—enough just to know the next point in the chain and send it there. Consequently, even if a relay controlled by malicious actors or censors is added to the chain, they will not be able to know both the recipient's address and the destination point of the traffic.
As a tool to combat censorship, Tor works effectively; however, censors have the possibility to block it completely. Iran and China have conducted successful campaigns to implement blockages. They managed to identify Tor traffic through scanning TLS handshakes and other distinctive characteristics of Tor.
Subsequently, developers managed to adapt the system to bypass blocks. Censors responded by blocking HTTPS connections to many sites, including Tor. The project developers created a program called obfsproxy, which further encrypts the traffic. This competition is ongoing.
Initial Data of the Experiment
The researchers decided to develop a tool that would allow masking the use of Tor, making its application possible even in regions where the system is completely blocked.
- As initial assumptions, the scientists proposed the following:
- The censor monitors an isolated internal segment of the network that connects to the external uncensored internet.
- The bodies responsible for blocking control the entire network infrastructure within the censored segment, but not the software on end users' computers.
- The censor aims to prevent users from accessing materials deemed undesirable, assuming that all such materials are located on servers outside the controlled segment of the network.
- Routers at the perimeter of this segment analyze unencrypted data from all packets to block unwanted content and prevent the corresponding packets from penetrating the perimeter.
- All Tor relays are located outside the perimeter.
How it works
To obscure the use of Tor, researchers created a tool called StegoTorus. Its main task is to enhance Tor's capabilities to resist automated protocol analysis. The tool is positioned between the client and the first relay in the chain, using its own encryption protocol and steganography modules to complicate the identification of Tor traffic.
At the first stage, a module called chopper comes into play – it transforms the traffic into a sequence of blocks of varying lengths, which are then sent out of order.

Data is encrypted using AES in GCM mode. The block header contains a 32-bit sequence number, two length fields (d and p) indicating the volume of data, a special field F, and a 56-bit checksum field, whose value must be zero. The minimum block length is 32 bytes, while the maximum is 217+32 bytes. The length is controlled by the steganography modules.
During connection establishment, the first few bytes of information are a handshake message, which allows the server to determine whether it is dealing with an existing or new connection. If the connection belongs to a new link, the server responds with a handshake, and each participant in the exchange derives session keys from it. Additionally, the system implements a rekeying mechanism – similar to deriving session keys, but using blocks instead of handshake messages. This mechanism changes the sequence number while leaving the link ID untouched.
After both participants in the data exchange have sent and received the fin block, the connection is closed. To protect against replay attacks or delays in block delivery, both participants must remember the ID for a certain period after the closure.
The built-in steganography module conceals Tor traffic within a p2p protocol – similar to how Skype operates during secure VoIP communications. The HTTP steganography module simulates unencrypted HTTP traffic. The system mimics a real user with a standard browser.
Resilience to attacks
To assess how much the proposed method improves the effectiveness of Tor, researchers developed two types of attacks.
The first involves distinguishing Tor streams from TCP streams based on the fundamental characteristics of the Tor protocol – this method was specifically used to block the system by the Chinese authorities. The second attack involves examining already known Tor streams to extract information about which websites the user visited.
Researchers confirmed the effectiveness of the first type of attack against 'vanilla Tor' – they gathered traces of website visits from the top 10 on Alexa.com twenty times through standard Tor, obfsproxy, and StegoTorus with the HTTP steganography module. A reference dataset from CAIDA with data on port 80 was used for comparison – nearly all of this is HTTP connections.
The experiment showed that calculating regular Tor is relatively easy. The Tor protocol is too specific and has a number of characteristics that can be easily calculated – for example, TCP connections last 20-30 seconds when using it. The Obfsproxy tool also hardly conceals these obvious moments. StegoTorus, on the other hand, generates traffic that is much closer to the CAIDA reference.

In the case of the site visit calculation attack, researchers compared the likelihood of such data disclosure in the case of 'vanilla Tor' and their solution, StegoTorus. They used the scale (Area Under Curve). According to the analysis results, the probability of data exposure regarding visited websites is significantly higher in the case of regular Tor without additional protection.

Conclusion
The history of the confrontation between authorities in countries imposing internet censorship and developers of circumvention systems suggests that only comprehensive protective measures can be truly effective. Relying on just one tool cannot guarantee access to the necessary data, or ensure that information about bypassing censorship remains unknown to censors.
Therefore, when using any tools for ensuring privacy and access to content, it’s important to remember that there are no perfect solutions. It's advisable to combine different methods whenever possible to achieve maximum effectiveness.
Useful links and resources from :
Source: habr.com
