Detecting and Blocking Onion Router Traffic Using Deep Packet Inspection
Detecting and Blocking Onion Router Traffic Using Deep Packet Inspection
net/publication/313951935
Detecting and blocking onion router traffic using deep packet inspection
CITATIONS READS
10 5,388
3 authors, including:
Ferry Astika
Electronics Engineering Polytechnic Institute of Surabaya
31 PUBLICATIONS 80 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Ferry Astika on 05 November 2017.
Abstract—TOR (The Onion Router) has been a very popular TOR is basically created to help the internet users in their
anonymous proxy service. Since its first usage, TOR has been freedom of speech and privacy problems, including illegal
improved and become a very big network consisting more than traffic tapping, network surveillance that threatens their
7000 relays. Beside used by journalist, activist, and writer as a personal identity and privacy. TOR can also be used for
tool for their freedom of speech, its highly anonymous service is securing the user’s business or private activities, hiding their
also used by bot-nets, malware, distributed denial of service identity when executing freedom of speech, and some more
attacks, hidden services that sells illegal things, spams, and many good reasons, but just like the internet itself, TOR can also be
more. This paper will explain about a TOR usage detection misused to do some negative activities.
system by using deep packet inspection to extract and analyze its
network traffic. The result of the analysis will be used as a In Indonesia, various sites that have negative contents like
parameter for a proxy server to block TOR traffic in the pornography, online betting, malwares, are blocked by the
network. Using this network, detection, and blocking design, we government using simple DNS and IP address filtering. By
can block the Onion Router Traffic originated from TOR using TOR, people can easily bypassing those limitation
browser. enforced by the government or law.
Keywords—TOR; anonymity; detection; deep packet inspection Besides bypassing that blocking system, TOR can also be
used for other negative activities, for example, using its
I. INTRODUCTION anonym service to spread malwares and conduct illegal
hacking anonymously.
The internet has been developed, evolved, and also used by
so many positive activities, for example, by innovating our way TOR also has some special things that make it different
in information sharing and education, helps us in the field of with other anonymous service provider. Using TOR, we can
health and medical, or some other innovation that cannot be surf a hidden part of the internet that usually called the onion
listed one by one. But in other side, internet can also be websites. The onion websites are hidden websites which
misused to do negative or illegal activities, for example, illegal addresses ended with .onion. These websites are only
hacking and attacks, spreading malware or scam, pornography accessible by using TOR service. In this hidden part, we can
sites, narcotics and other illegal transaction, and many more. find so many example of negative websites, such as online
illegal drugs and narcotic store, illegal gun store, hire an
It is a common sense that when people are going to do these assassin service. All the information of these sites’ provider
activities, they will think about their privacy first, about their and users are flowing over TOR networks, so, all the
identity, whether they are doing these activities anonymously information are anonymous and really difficult to be traced.
or not, whether someone knows what they are doing or not.
Because of these reason, they will seek some technique or Just like the internet, the number of TOR users is also
method to gain more anonymity in the internet. Anonymity increasing year to year, according to the official data from the
cannot be obtained without using some special method or beginning of 2012 until the end of 2015 published in their
technique. There are many methods that can be used to obtain website, the average number of TOR users reached more than
various levels of anonymity in the internet, one of which is by 3.5 million users per day, with the highest number of more than
using TOR (The Onion Router). 11 million. This means that TOR is now commonly known and
used by the internet users.
The Onion Router, also known as TOR, is a free software
that could provide anonymity by using onion routing method.
Onion routing is a technique to redirect the user’s internet
traffic to certain servers, and hide their sent and received data
by wrapping them with some encryption layers. Those method
are used in order to anonymize the sender and the receiver
identity and data.
introduced. The research was done by Roger Dingledine
et.al[1]. The architecture and work flow of this second
generation architecture was explained in detail in their research
publication.
Research in the field of TOR user detection has also been
done by Aanders Olaus Graneud from Gjøvik Universty
College Error! Reference source not found.. The research he
did was using the TLS protocol that used by TOR. He analyzed
the differences and anomalies of TOR’s TLS with other
ordinary TLS connection.
Anders used some methodology to identify and
Figure 1: TOR Daily User Graph 2012 – 2015 (Source: differentiate the implementation of TLS in TOR’s TLS
https://metrics.torproject.org). connection with other common TLS connection. From this
research, he found some anomaly in the TOR’s TLS
In this research, we will analyze the information of internet connection, for example, the port number used by TOR was
traffic in a network that consist of TOR user and ordinary 9001, but normal TLS usually uses 443. The combination of
internet users. The TOR users are using TOR with the TOR cipher suites that offered by TOR is always consist of a same
Browser Bundle software that provided free by Tor Project in combination.
its official website, and the detection will be done by using DPI But, along with the development of TOR, some anomaly
(Deep Packet Inspection) method. and characteristics found by Anders is not valid anymore and
DPI is a packet filtering method that extract the inside of cannot be used as a reference.
the packet, including header and its payload, and then
examines them. The examination method is varies according to III. HOW TOR WORKS
its function. It can be used to examine viruses, intrusions,
Now TOR has more than 6000 active relays that provided
spams, etc. and perform some action, or just log them to collect
free and also helped by volunteers from all over the world. All
their information data.
these relays are registered in some special and trusted servers,
DPI has been used by many users, from a small these servers are called directory servers.
community, corporations to governments. In the corporation
TOR relays communicate using fixed-size cells. Those cells
level, DPI usually used for preventing a virus or worm
size are 512 bytes, consist of header and payload. These cells
spreading through network, or preventing network attacks. In
classified into 2 categories, those are control cell and relay cell.
government level, DPI usually used for law enforcement, for
All communication that passed on the TOR traffic are executed
example to block some website access, filter bad traffic like
using TLS protocol to maintain its security and secrecy.
DDoS, spam, etc. and some other cases.
DPI has been implemented by many countries as their
method for traffic filtering, limitation, and law enforcement.
The most famous is China’s, it’s called The Great Firewall of
China. China uses DPI to enforce government blocking system.
The websites they block are including Google, Wikipedia, and
some VPN websites.
There are many software that can be used to implement Figure 2: TOR Control Cell and Relay Cell Structure
DPI. In this research, Bro-IDS will be used. Bro-IDS is an
event-based network security monitoring platform that could The header of TOR cell consist of a circuit identifier
trigger some action according to events that happening in the (CircID) to define its cell’s circuit, because in one TLS
network. connection, there can be more than one multiplexed circuit),
and a command (CMD) to bring a command to the destination.
II. RELATED WORKS This command is also the one that classified either the cell is a
Onion routing method began developed in 1995, and then control or a relay cell. Control cell commands are: padding,
the architecture of onion routing was published in 1996. The create (to create a connection), created (indicates connection
first generation of onion routing was designed to hide the created), and destroy (destroy a circuit).
routing information and minimalize the potential of traffic Relay cell has a similar structure, but it has a relay header
analysis on a network. The first architecture of onion routing placed before CMD. It contains stream identifier (StreamID),
was a virtual circuit that established by the user all the way to end-to-end checksum for integrity checking, and the length of
the destination. This method can be used in two-way direction, the relay payload. The relay commands are : relay data, relay
and can be used for any protocol that can adapt to use proxy. begin, relay end, relay teardown, relay connected, relay extend,
Over time, TOR improved by many developers, and in relay extended, relay truncate, relay truncated, relay sendme,
2004, second generation onion router (TOR) architecture was and relay drop.
TOR works by first downloading the list of the relays circuit until the exit node. The exit node will then close the
provided in their respected directory servers. Then, after they connection between it and the destination.
downloaded all the relays information, TOR client will choose
some random relays to be a circuit. IV. SYSTEM DESIGN AND IMPLEMENTATION
The network topology that will be used in this research is
described in figure 4.
E. Flowchart
By using the tools that have been mentioned before, in this
research we use an algorithm that can be illustrated in figure 5.