Вы находитесь на странице: 1из 13

NETWORKS & SECURITY

Design and Implementation of an SDN-Enabled DNS


Security Framework
Zhenpeng Wang, Hongchao Hu*, Guozhen Cheng
National Digital Switching System Engineering and Technological Research Center, Zhengzhou 450002, China
* The corresponding author, email: 13633833568@139.com

Abstract: The Domain Name System (DNS) services. Many internet applications, such as
is suffering from the vulnerabilities exploited http, email and ftp, indirectly or directly de-
to launch the cache poisoning attack. Inspired pend on the security of the DNS infrastructure
by biodiversity, we design and implement a to resolve a given domain name to its corre-
non-intrusive and tolerant secure architecture sponding IP address to establishing connec-
Multi-DNS (MDNS) to deal with it. MDNS tions. Unfortunately, security was not one of
consists of Scheduling Proxy and DNS server the design considerations for DNS, and it has
pool with heterogeneous DNSs in it. And the always been an attractive target to attackers
Scheduling Proxy dynamically schedules m [1], [2], [3].
DNSs to provide service in parallel and adopts DNS cache poisoning is arguably one of the
the vote results from majority of DNSs to most damaging attacks on DNS [4]. It refers
decide valid replies. And benefit from the cen- to cases where the cache of a DNS server is
tralized control of software defined network- injected with invalid or malicious mappings
ing (SDN), we implement a proof of concept between domain names and IP addresses.
for it. Evaluation results prove the validity and There are numerous ways to poison the cache,
availability of MDNS and its intrusion/fault such as by compromising an authoritative
tolerance, while the average delay can be con- DNS or forging a reply to cheat the recursive
trolled in 0.3s. DNS. And Dan Kaminsky [3] discovered a
Keywords: DNS cache poisoning attack; novel DNS cache poisoning attack in 2008,
software defined networking; moving target while the contamination target in conventional
defense; dynamic heterogeneous redundant DNS cache poisoning is the answer resource
records, the Kaminsky attack’s target is the
I. INTRODUCTION authority resource records, which is more de-
structive.
As one of the most critical components of the Although a suite of complicated cryptology
Internet, the Domain Name System (DNS) and authorization mechanisms like DNSSEC
provides not only resolution (or mapping) [6] has been deployed to secure DNS servers
between human-friendly domain names and and clients, there are still a few problems when
Received: Jun. 30, 2017
machine-friendly IP addresses, but also fun- deploying DNSSEC on a large scale. First, Revised: Apr. 26, 2018
damental trust anchors for accessing Internet DNSSEC incurs a significant performance Editor: Jun Bi

China Communications • February 2019 233


penalty for the computationally intensive PKI neous redundant architecture to safeguard
We propose MDNS, operations. Second, the signed DNS packets the DNS without any modification to the
a d y n a m i c h e t e ro - could be much larger than original, which will DNS protocol;
geneous redundant lead to other problems, such as the fragmenta- • We implement MDNS based on software
architecture based on
tion attacks [7], R-DDoS and DR-DDoS [8]. defined networking and propose the finger-
software defined net-
working to safeguard
Many non-cryptographic defenses have been print masking method, handoff mechanism
the DNS. put forward to solve the problem of the easy- and time saving strategy to enhance the
to-guess transaction IDs (TxID) by increasing performance of MDNS further;
the entropy of DNS query components such • We test the intrusion/fault tolerance and
as TxIDs, query labels and port numbers [12], performance of MDNS.
[13], [14]. However, these defenses have to This paper is organized as follows. We
change the DNS protocol which makes them discuss the cache poisoning attack and relat-
difficult to deploy. ed work in Section 2. To solve the problem,
Inspired by biodiversity and Evolving we present the design of MDNS with its core
Defense Mechanism (EMD) [9], we present components in Section 3. In Section 4, we
Multi-DNS (MDNS) with heterogeneous present the implementation of MDNS based
DNSs to enhance the security of DNS, which on SDN. And we evaluate the performance of
doesn’t require any modification to the current MDNS in Section 5. At last we conclude this
DNS system and protocol. EDM is also based paper in Section 6.
on a bio-inspired idea of network configura-
tion variations. EDM selects an efficient net- II. RELATED WORK
work configuration variation strategy to pre-
vent corresponding security threats according
2.1 DNS cache poisoning attack
to the security requirements of the system, the
user, and the network security state. And we The mapping between a domain name and IP
add dynamic and redundant characteristics to address is called DNS resolution (DNS look-
MDNS learning from Moving Target Defense up). Figure 1 shows the workflow of DNS
(MTD) [10]. Moving Target Defense technol- lookup when client visits www.example.com
ogy is proposed by Federal Networking and for the first time, which means the recursive
Information technology Research and Devel- DNS (RNS) server hasn’t cached the answers
opment (NITRD) in recent years, whose main before. The stub resolver on the client sends
concept is to raise the complexity and costs a recursive query to its RNS (1). In the event
for attackers to deal with a great deal of uncer- of a cache miss, RNS will query recursively
tainty by making systems dynamic and hard to to the root server, the .com Top Level Do-
predict. main (TLD) server, and the authoritative DNS
In order to realize the dynamic and redun- (ANS) server of example.com (2~6). Finally,
dant characteristics of MDNS, we leverage the the ANS will respond with the IP address of
emerging software defined networking tech- www.example.com (7~8). When client gets the
niques [11]. SDN offers a greater control of IP address 93.184.216.34, it can visit the web
network through programming by decoupling server (9~10).
of control and data planes. In SDN, unification The basic DNS protocol is UDP-based
of the control plane over all kinds of network and doesn’t authenticate replies. The only
devices, renders it possible to manage network checks are: (1) the query section and 16-bit
traffic from a single point, automatically via transaction ID (TxID), and (2) the source IP
SouthBound Interface (i.e., OpenFlow). and destination port of the reply must match,
The main contributions of this paper are as respectively, the destination IP and source
follows: port of the query. The first arriving packet that
• We propose MDNS, a dynamic heteroge- satisfies these conditions is treated as a valid

234 China Communications • February 2019


reply from the ANS. Therefore, what the at- suspicious replies (Re-Query). And Jin C [5]
tacker needs to do is to send a reply forgery proposed to use multiple ANS to provide ser-
1.1.1.1 (7’ in red) satisfying these conditions vice to increase the entropy of the DNS query.
and arriving before the reply from the legit- Encryption and authentication technolo-
imate ANS (7 in black). What’s more, the gy: In order to solve the availability problems
probability of guessing the right transaction DNSSEC suffers from due to the packet frag-
ID could be much higher due to weaknesses in mentation attack [7], R. van Rijswijk-Deij [19]
the random number generators, use of multiple proposed to use elliptic curve cryptography
queries and the consequent birthday paradox. (ECC) as default signature algorithm rather
And it will be much easier if the client and at- than the RSA, which is because the ECC sig-
tacker is the same person. natures are much smaller in size, leading to
smaller replies. And Ramzi Bassil [20] pro-
2.2 Defense strategies
posed to use Identify-Based Encryption (IBE)
Since security researcher Dan Kaminsky [3] key management scheme to take over the
discovered the DNS vulnerability and pre- traditional complex Public-Key Infrastructure
sented the new extension of the DNS cache (PKI). IBE is cryptosystem where the public
poisoning attack, significant research efforts key can be any public string, such as a host
have been devoted to studying the security of name, an IP address and email address etc., so
DNS. The security policies fall into two types: there is no need for a public key lookup phase
(1) increasing the entropy of DNS query, (2) from a trusted-keys repository.
encryption and authentication technology. Although the two methods above can en-
Increasing the entropy of DNS query: hance the security, they all need to change the
David Dagon [12] presented a practical tech- DNS protocol and it’s not practical to verify
nique to make DNS queries more resistant to every record with the ANS using data encryp-
cache poisoning attack by mix the upper and tion and authentication techniques, which will
lower case spelling of the domain name in the render the caching mechanism ineffective.
query, [13] used the similar idea. However,
the amount of additional entropy introduced III. DESIGN
by the 0x20-bit encoding is a function of the
length of the queried domain name. For exam- In this paper, we propose Multi-DNS (MDNS),
ple, it offers only 3 additional bits of entropy a dynamic heterogeneous redundant archi-
for 163.com, 126.com, etc. Roberto Perdisci tecture [25] to solve the problem. The main
[14] used wildcard domain name to increase point is that DNS replies are no longer from a
the entropy of DNS query. The key idea of this single DNS, for multiple DNSs will take part
method is to use wildcard domains and add in judging which DNS produces valid replies.
a random string instead of “*” to the queries’
domain name and still obtain a correct answer. Web Hosting
And some researches put forward new ways
to increase the overall entropy of the DNS 93.184.216.34 1.1.1.1
Root
queries. Lihua Yuan [15] proposed a peer to (9) (2)
RNS
peer based scheme to detect and correct pol-
(10) (3)
www.example.com
(1)

luted DNS records caused by cache poisoning (8)


IP: 93.184.216.34
(4)
(5)

attacks. Its main idea is that it’s difficult for TLD(.com)


(8')
client IP: 1.1.1.1 (6)

attackers to compromise several DNS servers


(7') (7)

Spoofed Answer: with


with the same false records at the same time. IP 1.1.1.1
ns.example.com
And Lejun Fan [17] proposed to use a proxy attacker
between RNS and ANS to enhance the securi-
ty by sending an extra DNS query to check the Fig. 1. DNS cache poisoning attack.

China Communications • February 2019 235


As the difficulty and cost are increased tre- virtual functions modules: Scheduler, Decider
mendously when attackers try to compromise and Scrubber whose functions are depicted as
numerous DNSs simultaneously. Hence, the follows.
defense strategy offered by this mechanism • Scheduler: Its main work is randomly se-
can improve the robustness and resilience of lecting m (m should be an odd number and
the holistic network without any change to the 3 ≤ m ≤ N) DNSs to be active from server
DNS protocol. pool and forwarding the DNS requests from
clients to them to provide service. There
3.1 MDNS architecture
are two cases in which the Scheduler would
In addition to the client and DNS servers, a switch the active DNSs. One is timing
Scheduling Proxy is introduced between them switch mechanism that the Scheduler will
to assist the deployment of virtual functions in re-select new m DNSs at fixed intervals.
MDNS (figure 2). The constitution and func- The other is event trigger mechanism that
tions are described below: the Scheduler will execute the scheduling
DNS server pool: Instead of deploying when it receives an alert message from De-
one DNS, it’s composed of N (N ≥ 3) DNSs, cider.
each of which installed different kinds of DNS • Decider: The core function of the Decider
software, such as BIND, NSD, and so on. Al- is judging whether DNSs are in benign
though DNSs are achieved on heterogeneous conditions by comparing their replies.
structures, they will generate the same replies Then it sends the most trusted replies to
in case they receive the identical DNS query. clients. The choice is made on the follow-
What’s more, to enhance the security further, ing assumption: it is difficult for attackers
DNSs are deployed on diverse hosts with to compromise majority of DNS servers
different operation systems (Linux, Window, simultaneously with the same false data
etc.). There is no doubt that increasing the [15]. And the heterogeneous structures will
number of different software systems can min- increase the difficulty further. Thus, the
imize the effectiveness of a single system-spe- identical replies can be considered correct,
cific attack [24]. Through this, the attackers secure and valid replies. Finally, an alert
have to mine the vulnerabilities of different message will be transmitted to notify the
kinds of DNS server software simultaneously. Scheduler and Scrubber of the information
Scheduling Proxy: It’s the critical unit and about the suspecting DNSs if it discovers
responsible for the scheduling, decision-mak- incongruous replies.
ing and so on. And it is comprised of three • Scrubber: Its chief duty is responsible for
manage the DNSs in the server pool. Once
receiving the alert message from the De-
cider, it will scrub the suspecting DNSs
according to the Decider’s orders: if it’s the
first time for a DNS to return an incongru-
ous reply, the Scrubber will clear its cache;
req rep
otherwise, restart it. After that, a notifica-
req rep tion message will be transmitted to the De-
req cider and Scheduler.
rep req rep

3.2 Workflow
First, the Scheduler picks m DNSs to provide
reps
service and the Decider sends the valid replies
back to clients. Then, once any mechanism of
Fig. 2. Overview of MDNS. the Scheduler is triggered, new active DNSs

236 China Communications • February 2019


will be selected. As for the DNSs whose re- that there are some reasons other than cache
plies are different from that of the most DNSs, poisoning attack that lead to inconsistence
the Decider will notify the Scrubber to clear among DNSs :
their cache or restart them and the Scheduler • Stale Cache: To improve efficiency, DNS
to pick from the rest DNSs next round. Finally, uses the cache mechanism which is TTL-
above actions will be repeated to maintain the based mechanism that could store and re-
DNSs in a secure, robust and resilient state. turn stale records. In this case, Decider just
equates this with a cache poisoning attack;
3.3 Scheduling and decision-making
• Load Distribution: For some big compa-
mechanism
nies, they may own several IP addresses
In different time intervals, the Scheduler dy- for their domain name, and to realize load
namically selects DNSs according to sched- balancing, DNS commonly uses round rob-
uling algorithm. Obviously, what Scheduler in mechanism that rotates the order of the
needs to do is to increase the amount of unpre- records mapped to the same domain name.
dictability of scheduling. In this case, we uses set comparison just
From information theory’s point of view, the same with [15], which means that for
uncertainty or randomness can be character- a domain name that has three IP addresses
ized by information entropy. Let pi denote A1 , A2 , A3 , the answer A1 , A2 , A3 is equal to
the probability of the DNSi being selected, A3 , A2 , A1.
then the total uncertainty can be calculated
H = −∑ i =1 pi log( pi ). It is easy to prove that
N
IV. IMPLEMENTATION
H gets its maximum value H max = log N when
p=
1 p=
2 ,...,
= p=N 1 / N . So Scheduler first 4.1 MDNS based on SDN
randomly chooses a number m (m ≤ N) as the To implement the dynamic and redundant
expected value of the active DNSs’ number, characteristics of MDNS, we propose to lever-
and then randomly selects each DNS to be ac- age the emerging software defined networking
tive with the same probability m / N. techniques. The architecture is illustrated in
Decider makes decision on the DNS replies figure 3.
received from the active DNSs so as to detect We use Ryu controller (APP) to realize the
the cache poisoning attacks and send the final three virtual functions of Scheduling Proxy:
decision outcomes to the clients. In the Byz- (1) Scheduler, dynamically determines
antine fault systems, scholars have conducted where DNS queries should be forwarded. In
extensive researches on the decision fusion. detail, Scheduler selects several DNSs to be
In this paper, we use a simple majority-based
decision fusion rule, for example, there are
three active DNSs, and Decider receives DNS server pool

three replies with the answer (IP addresses) Scheduler Scrubber Decider

93.184.216.34, 93.184.216.34, and 1.1.1.1 (6) replies DNS1

switch1
respectively, then the Decider will determine (1) select active
DNSs
(7) final answer DNS2
93.184.216.34 should be the right answer and switch2

send it to client. As for the third DNS respond- (2) request (3) multicast
(4) request
(5) replies
DNS3

ing 1.1.1.1, the Decider will originally suspect Client


(8) reply
switch0 switch3

that it has been attacked and let it reload the


...

...

record from ANS, and just let Scrubber clear


DNSN
the cache if its reply is different from the ma-
switchN
jority next time.
And we also need take into consideration
Fig. 3. Workflow of SDN-based MDNS

China Communications • February 2019 237


active, and then sends instruction to switch0 DNSs’ IP are 192.168.56.101, 192.168.56.102,
(the blue switch in figure 3) for steering DNS and so on. If DNS1 is one of the active DNSs,
data flow. For example, if DNS1~3 are se- the switch1 will modify the requests’ destina-
lected, Scheduler will send the instruction tion IP to 192.168.56.101 before outputting to
like Code1 shows to switch0, and after that, DNS1 and modify the replies’ source IP back
switch0 will output DNS queries to DNS1~3 to 192.168.56.7 before outputting to Decider
through switch1~3 respectively. (and to clients ultimately).
(2) Decider, receives the replies from Through this way, the clients will mistak-
switch1~N (the yellow switches in figure 3) enly believe that it was the DNS with IP ad-
which sent by active DNSs, and then decides dress 192.168.56.7 that responded to the DNS
the final answer to send to the client (through lookup, while the real DNSs’ IP addresses
switch0). were hidden. The logic of the flow entries in
(3) Scrubber, is responsible for clearing the switch1 is illustrated in Code2. And if switch-
cache in DNS according to Decider’s orders es support OpenFlow 1.1 or later, we only
and we use the rndc tool to remote control need one switch to realize the two roles above
the DNS, for example, using the “rndc flush” at the same time by using the group tables.
command to clear the cache in DNS. Code2
Code1 #requests
match = in_port: from_client, nw_dst: match = in_port: from_switch0
192.168.56.7 actions = mod_nw_dst: 192.168.56.101,\
actions = output: switch1, switch2, switch3 mod_dl_dst: 00:00:00:00:00:0a,\
From Code1 we can see that if switch0 gets output: DNS1
packets from clients and the destination IP ad- #replies
dress is 192.168.56.7, it will forward them to match = in_port: from_DNS1
switch1, switch2 and switch3. And we can add actions = mod_nw_src: 192.168.56.7,\
some match fields such as “udp”, “destination mod_dl_src: 00:00:00:00:00:07,\
port is 53” and so on. output: controller

4.2 Fingerprint masking method 4.3 Handoff mechanism


Although we adopt dynamic redundant archi- If the active DNSs’ number is different from
tecture, attackers may still locate DNS servers the one before the scheduling, the Decider
(IP addresses) through network probing or may get an “out-of-order” problem. For exam-
sniffing. So we design a fingerprint masking ple, at time t0, there were three active DNSs
method to clear the real information of DNSs. (old DNSs), and at t1 the Scheduler started
We use a “dummy” DNS to conceal DNSs’ to select five DNSs to be active and sent in-
real location from clients (and potential attack- struction to switch0 to output the queries to
ers) by stealthily modifying the packets. In our the new DNSs, then the problem is that for
implementation, SDN switches have a role of the replies received during the scheduling, the
either distributer or modifier. The distributer, Decider has no idea whether they are from the
just like switch0, (blue switch in figure 3) is old or new DNSs, so when the Decider has
used to forward DNS queries to certain yellow already received three DNS replies, it doesn’t
switches, while the modifier, like switch1~N know whether it should wait for three or five
(yellow switches), is responsible for modify- replies, thus it may wait earnestly for the rest
ing the packets’ header, such as IP address and two replies, while actually there should have
MAC address, according to the DNS it con- been only three.
nects. For example, we set the dummy DNS’s We could wait for DNS queries at the old
IP to be 192.168.56.7, which is exposed to DNSs to terminate and then set switch0 to
clients (and potential attackers), while the real output to the new DNSs, however, it will take

238 China Communications • February 2019


a long time. To solve this problem, we design mum security requirement”. As for the setting
the following handoff mechanism, as shown of tthreshold, we use the similar method with the
in figure 4, the solid arrows indicate the DNS three-sigma rule, which expresses a conven-
queries or replies and the dashed arrows indi- tional heuristic that “nearly all” values are
cate the instructions send to switch0: taken to lie within three standard deviations of
(1) At time t1, when Scheduler decides to the mean. In our case, first we get the average
change the active DNSs, it sends instruction to delay tave from previous statistics, and then we
switch0 to output DNS queries to controller; set the tthreshold to meet that nearly all (we set it
(2) At time t3, Scheduler records the TxID 99.99%) the delay less than or equal to tave+t-
of the first DNS query received from switch0, threshold
. Thus, in the first case, the delay will be
let’s call it New_TxID. Then the Scheduler the kth order statistic of T1 , T2 ,..., Tm. If the prob-
sends the first and subsequent queries to the ability density function of T is f (t )(a ≤ t ≤ b),
new DNSs; then that of MDNS-m-s (MDNS with m active
(3) Let’s assume at time t4, Decider receives DNSs using the time saving strategy) will be
the reply with New_TxID, which means it’s Eq. (1). And in the second case, the delay can
the reply of the first query; be controlled in tave+tthreshold.
(4) At last, Scheduler sends instruction  m! k −1 m−k
that let the switch0 output queries to the new  (k − 1)!(m − k )![ F (t )] [1 − F (t )]

DNSs to finish the scheduling at t5 (t5 ≈ t4). = f k (t )  f (t ) a ≤ t ≤ b
Through this way, Decider can tell the 0 others

number of the replies it should wait for based 
on the time t4: the replies received before t4 are
(1)
from old DNSs and those after t4 are from new
For example, as shown in figure 5, there
DNSs.
are five active DNSs that DNS4 and DNS5 (in
4.4 Time saving strategy orange) are not working, and DNS3 (in red)
has been attacked. At t1, controller received
And the time delay also needs to be taken into
the first reply from DNS1, and at tave+tthresh-
consideration. It is obvious that MDNS will old
, it got only three replies 93.184.216.34,
increase the time delay: if the delay with just
93.184.216.34, and 1.1.1.1 from DNS1~3
one DNS server can be described as a random
respectively. According to the strategy men-
variable T, then it will be max (T1 , T2 ,..., Tm )
tioned above, Decider will send the answer
for MDNS with m active DNSs. What’s more, 93.184.216.34 to client and the DNS3 will be
if there is one malfunctioning DNS, Decider suspected of having been attacked.
may keep waiting for too long and cause great
time delay.
In order to solve this problem, we propose
DNSs
a pretreatment stage for time saving. Let’s call Client (switch0) Controller
(switch1-5)
it t1 when Decider received the first reply of a
query, and tthreshold donates the maximum time t0

interval Decider waits for. If the Decider has t1


old
t2 output queries DNSs
received more than or equal to = k (m + 1) / 2 to controller record the New_TxID

replies with the same answer before t1+tthreshold, t3


t4
then it sends the answer to the client at once receive the reply
new
t6 t5 of New_TxID
output queries
(rather than waiting for all the m replies), to new DNSs
DNSs

otherwise, it will choose the majority of the


replies back to client if received more than or
equal to kmin replies, and we call the kmin “mini-
Fig. 4. Workflow of scheduling.

China Communications • February 2019 239


V. EVALUATION and its name server is 172.16.165.137 and
172.16.165.138 (NAT mode) respectively. The
In this section, we study the performance of Ryu controller runs on the host machine with
the MDNS. First, we conduct the Kaminsky IP 192.168.108.5. We set client’s default DNS
cache poisoning attack in a SDN network en- to be 192.168.56.7, which is not in existence
vironment to test the intrusion/fault tolerance (dummy DNS). And the reason why we use
provided by MDNS. Then, we measure the host-only mode is to add the virtual machines
delay (and handoff delay) of MDNS. Last, we to the SDN network. For example, we use
use the DNSBench [22] tool to test the perfor- openvswitch command “add-port switch0
mance of the MDNS. vmnet0” (vmnet0 is the host-only network
card used by the client) to link the client to
5.1 Experiment setup
switch0.
We setup the SDN network environment
5.2 Intrusion/fault tolerance test
using one server machine, which runs
eight virtual machines (VMware). And To prove the intrusion/fault tolerance, we use
the network topology is illustrated in fig- the Kaminsky DNS attack method provided
ure 6. The DNS server pool contains five in [23] and run the attack code on attacker to
DNSs (host-only and NAT mode) with IP flood the DNS1 with a stream of spoofed DNS
192.168.56.101~192.168.56.105 and NAT responses. The goal of the attack is to launch
address 172.16.165.131~172.16.165.135 the attack on the DNS1, such that when the
respectively. The client’s IP is 192.168.56.1 Client runs the “nslookup” command to get
(host-only mode) and the IP of attacker www.example.com’s IP address, the DNS1 will
end up going to the attacker’s name server
ns.dnslabattacker.net to get the IP address, so
Client Controller DNSs
the IP address returned is up to the attacker
www.example.com (we set it to 1.1.1.1, while the right answer is
DNS1 93.184.216.34).
t 93.184.216.34
1
DNS2 To compare the conventional DNS (just
93.184.216.34
1.1.1.1
DNS3 (attacked) DNS1 providing service) and proposed MDNS
DNS4 (error) (with DNS1~3), we set the forwarding rule
t1+tthreshold DNS5 (error)
93.184.216.34 in switch0 to output DNS queries to switch1
final answer
(DNS1) and later modify it to switch1~3
(DNS1~3).
Fig. 5. Time saving strategy. From figure 7(a), we can see that after
launching the attack, the client got the wrong
answer 1.1.1.1 (the red box), and later, after
Host switching to the MDNS, the client got the right
attacker answer 93.184.216.34 (the yellow box). And
ns.dnslabattacker.net
as shown in the figure 7(b), the Ryu controller
SDN controller
DNS1 attacker’s name server

switch1
got three replies, 1.1.1.1 from DNS1 (the red
switch2
DNS2
box), 93.184.216.34 from DNS2~3 (the blue
DNS3 Internet boxes), then Decider chose the majority an-
client switch0
switch3
swer 93.184.216.34 as the final answer sent to
switch4
DNS4 Root TLD(.com)ns.example.com the client (the yellow box).
DNS5
The results prove the intrusion/fault tol-
switch5
erance of MDNS, and it’s obvious that if we
use m active DNSs, we can tolerate up to
Fig. 6. Experiment topology. ( m +1) / 2 faulty DNSs.

240 China Communications • February 2019


Although MDNS can improve the security mode 1 to show the delay increased by send-
of DNS, the time delay increased also need to ing through controller; (3) MDNS with three
be taken into account. In next section, we will DNSs (MDNS-3); and (4) MDNS with five
test the delay of MDNS. DNSs (MDNS-5).
We send the DNS queries on the client and
5.3 Time delay test
collect the statistics delay of the four modes
We compare the time delay of the following respectively. And in order to avoid disturb-
four modes: (1) Normal, which means the ing from other network factors, we only use
switch1 outputs the replies to switch0 directly the domain name www.example.com for test.
(not through controller). We use it to simulate Before each test, we will clear the cache in
the conventional DNS situation (only DNS1 DNSs. The result is illustrated in figure 8.
providing service); (2) MDNS with one DNS From figure 8(a), we can see that the more
(MDNS-1), the only difference between mode servers MDNS uses, the larger delay it has.
1 and mode 2 is whether switch1 outputs the And as figure 8(b) shows, the delay of the first
replies to controller or not. We compare it with query (the blue line) is much larger than that

(a) Query Results on Client


(b) Replies Received on Ryu Controller

Fig. 7. Query results.

15 1500 4
Normal delay of the first query
MDNS-1 average delay of 2~100 queries
average delay of 2~100 queries /ms

MDNS-3
MDNS-5
delay of the first query /ms

10 1000 3.5
time delay /ms

5
500 3

0
0 10 20 30 40 50 60 70 80 90 100 0 2.5
queries Normal MDNS-1 MDNS-3 MDNS-5

(a) Time Delay (b) Average delay

Fig. 8. Time delay test.

China Communications • February 2019 241


of the subsequent queries (the red line) be-
cause of a cache miss at first. So we calculate
the average delay of the 2nd to 100th queries
(the red line). Comparing the result of Normal
and MDNS-1, we can see that sending the
replies to controller will increase the delay by
about 67.9% and 30% for the first query’s de-
lay and average delay of 2nd to 100th queries
respectively. And comparing the MDNS-1,
MDNS-3, and MDNS-5, we can find that the
delay of MDNS increases about linearly with
the number of DNSs we used.
Next, we test the handoff delay of MDNS.
Fig. 9. Log file of Ryu controller.
In our setting, at first, the Scheduler uses just
one DNS to provide service, and later switch-
3
es to three and five DNSs after the 50th and
10
MDNS-1 100th reply respectively.
MDNS-3
MDNS-5 The log file of controller is shown in figure
9. At t1, the controller sent the “add_flow” in-
struction to switch0 (the red box), after receiv-
2
ing it, switch0 outputted the DNS queries to
time delay /ms

10

controller. At t3, controller received the reply


of the first query (the green box). And we can
see that the replies received between t1 and t3
1
10 were from just one DNS (the black box), and
that was three after t3 (the yellow boxes).
The time delay result is illustrated in figure
10. We use three different colors to show the
0 20 40 60 80 100 120 140 160 180 200
queries number of servers MDNS used to provide ser-
vice. We mark three kind important moments
Fig. 10. Handoff delay. in figure 10: (1) the red triangles, denote t1, the
moment controller decides to schedule DNSs;
(2) the green squares, donate t3, the moment
600
controller receives the replies of the first DNS
query sent through controller; and (3) the black
500
circles, donate the time between t1 and t3.
We can intuitively find that the average
throughput responses/s

400
delay of the MDNS-1, MDNS-2, and MDNS-
3 increases just like figure 8(b) shows. And
300
we can see that the delay increased after t1,
like the black circles show, which is mainly
200
because the load of the controller increased
caused by the switch0 outputting the DNS
100
queries to it. And the delay increased sharply
at t3, like the green squares show, which is
0
Normal MDNS-1 MDNS-3 MDNS-3-s MDNS-5 MDNS-5-s mainly because the new DNSs didn’t have the
cache (cache miss) at first and the controller
Fig. 11. Throughput of MDNS. had to wait for all the replies. Thus, the delay

242 China Communications • February 2019


at t3 is just like the delay of the first query in Table I. Performance test.
figure 8(b). After t3, the delay recovered to the (a) Normal
normal level at once, which is mainly because Min Avg Max Std. Dev Reliab%
the scheduling was finished and the DNS que- Cached Named 0.000 0.000 0.001 0.000 100.0
ries were sent to switch1~5 directly again. Uncached Name 0.013 0.094 0.365 0.095 100.0
DotCom Lookup 0.032 0.096 0.268 0.075 100.0
5.4 Performance test
(b) MDNS-1
Next, we test the throughput of MDNS. While Min Avg Max Std. Dev Reliab%
test above is to send query one by one and Cached Named 0.000 0.001 0.002 0.000 100.0
record the delay (latency), we send queries all Uncached Name 0.014 0.124 0.822 0.149 100.0
the time to record the throughput of MDNS. DotCom Lookup 0.030 0.096 0.273 0.082 100.0
And the results are illustrated in figure 11. We
(c) MDNS-3
send 600 queries per second. We can see that
Min Avg Max Std. Dev Reliab%
the throughput of MDNS remains stable no
Cached Named 0.001 0.002 0.004 0.001 100.0
matter what the number of the active DNSs is
Uncached Name 0.015 0.294 1.004 0.315 100.0
and whether use our time saving strategy or
DotCom Lookup 0.038 0.207 0.888 0.251 100.0
not. That is mainly because the Decider can
(d) MDNS-3-s
perform parallel processing, which means the
Min Avg Max Std. Dev Reliab%
Decider will process the many queries at the
Cached Named 0.000 0.001 0.003 0.001 100.0
same time, rather than process on by one.
Uncached Name 0.013 0.097 0.268 0.091 100.0
We study the performance of MDNS by
using the DNS Benchmark tool [22]. DNS DotCom Lookup 0.031 0.069 0.256 0.035 100.0

Benchmark performs a detailed analysis the (e) MDNS-5


operational performance and reliability of the Min Avg Max Std. Dev Reliab%
DNS name servers (or resolvers) at once. The Cached Named 0.000 0.002 0.005 0.001 97.0
result is illustrated in Table I. Uncached Name 0.024 0.507 1.939 0.502 100.0
Table(a), Table(b), Table(c), and Table(e) DotCom Lookup 0.039 0.238 0.869 0.282 100.0
show the trend of increase in average delay (f) MDNS-5-s
is nearly same with figure 8. And contrasting Min Avg Max Std. Dev Reliab%
Table(c) with Table (d) and Table(e) with Cached Named 0.001 0.002 0.004 0.001 100.0
Table(f), we can see that the performance im- Uncached Name 0.015 0.245 1.003 0.298 100.0
provements benefiting from the time saving DotCom Lookup 0.034 0.062 0.258 0.035 100.0
strategy mentioned in Section 4.4 is signifi-
cant. The average delay is reduced by about
60%. And we can see that the delay of MDNS-
3-s is approximately equal to that of conven- VI. CONCLUSION
tional DNS, while that of MDNS-5-s can be
In this paper, we proposed MDNS, a dynamic
controlled in 0.3s. As for the delay brought
heterogeneous redundant architecture based
by MDNS, we can take one step further, let’s
on software defined networking. To enhance
take MDNS-5-s for example, we can set the
the robustness of DNS, we use Multi-DNS to
Decider to send the final answer back when
decide the valid answers and detect the cache
it receives two replies with the same answer,
poisoning attacks according to their replies.
rather than three. Obviously, it could be even
And to increase the amount of unpredictability,
shorter than the MDNS-3-s, however, this will
we adopt the idea of dynamicity in MTD and
lead to a corresponding decline in security.
realize it by dynamically controlling network
traffic with the help of SDN. And to further
increase the difficulty for attackers compro-

China Communications • February 2019 243


mising all the Multi-DNS, we use heteroge- Computer Communication Review, vol.38, no.2,
pp. 69-74, 2008.
neous DNS to avoid the same vulnerabilities.
[12] D. Dagon, M. Antonakakis, P. Vixie, et al, “in-
At last, we implement MDNS and test the creased DNS forgery resistance through 0x20-
performance of it, and the experimental results bit encoding: security via leet queries,” Proc.
prove the intrusion/fault tolerance of MDNS. ACM Conference on Computer and Communica-
tions Security, Oct. 2008, pp. 211-222.
And the average delay can be controlled in
[13] J. G. Høy, “anti DNS spoofing - extended query
0.3s when we use MDNS-5-s. id (XQID),“ http://www.jhsoft.com/dns-xqid.htm.
[14] R. Perdisci, M. Antonakakis, X. Luo, et al, “WSEC
ACKNOWLEDGEMENTS DNS: protecting recursive DNS resolvers from
poisoning attacks,” Proc. IEEE/IFIP International
This work is partly supported by the Na- Conference on Dependable Systems & Networks,
2009, pp. 3-12.
tional key Research and Development [15] L. Yuan, K. Kant, P. Mohapatra, et al, “DoX: a
Program of China (No.2016YFB0800100, peer-to-peer antidote for DNS cache poisoning
2016YFB0800101) and the National Natural attacks,” Proc. IEEE International Conference on
Science Fund for Creative Research Groups Communications, Jun. 2006, pp. 2345-2350.
[16] L. Yuan, C. Chen, P. Mohapatra, et al, “a proxy
Project (No.61521003) and the National Nat- view of quality of domain name service, poison-
ural Science Fund for Youth Found Project ing attacks and survival Strategies,” ACM Trans
(No.61602509). We gratefully acknowledge on Internet Technology, vol.12, no.3, pp. 321-
anonymous reviewers who read drafts and 329, 2013.
[17] L. Fan, Y. Wang, X. Cheng, et al, “prevent DNS
made many helpful suggestions. cache poisoning using security proxy,” Proc.
International Conference on Parallel and Distrib-
References uted Computing, Applications and Technologies,
[1] S. M. Bellovin, “using the domain name system 2011, pp. 387-393.
for system break-ins,” Proc. USENIX Security [18] R. R. Van, A. Sperotto, A. Pras, “DNSSEC and its
Symposium, Jun. 1995, pp. 199-208. potential for DDoS attacks: a comprehensive
[2] J. Jiang, J. Liang, K. Li, et al, “ghost domain measurement study,” ACM/USENIX, 2014, pp.
names: revoked Yet Still Resolvable,” Proc. An- 449-460.
nual Network & Distributed System Security [19] R. R. Van, K. Hageman, A. Sperotto, et al, “the
Symposium, Feb. 2012. performance impact of elliptic curve cryptogra-
[3] D. Kaminskey, “It’s the end of the cache as we phy on DNSSEC validation,” IEEE/ACM Transac-
know it,” Proc. In Blackhat Briefings, 2008. tions on Networking, 2017, pp. 738-750.
[4] “an analysis report on security status and situa- [20] R. Bassil, R. Hobeica, W. Itanni, et al, “security
tion of Chinese domain name service,” 2017. analysis and solution for thwarting cache poi-
[5] C. Jin, Z. Hao, Z. Wu, “principles and defense soning attacks in the Domain Name System,”
strategies of DNS cache poisoning,” China Proc. International Conference on Telecommuni-
Communications, vol.6, no.2, pp. 17-22, 2009. cations, 2012, pp. 1-6.
[6] D. Eastlake, “domain name system security ex- [21] R. V. Hogg, J. W. Mckent, A. T. Craig, “introduc-
tensions,” RFC 2535 (Proposed Standard), 1999. tion to mathematical statistics (7th ed),” China
[7] Y. Gilad, A. Herberg, “fragmentation considered Machine PRESS, 2012.
vulnerable ,“ ACM Trans on Information and Sys- [22] “domain name speed benchmark,” https://
tem Security, vol.15, no.4, pp. 16:1-16:31, 2013. www.grc.com/ dns/benchmark.htm.
[8] “DNSSEC amplification DDoS,” Security Bulletin, [23] “remote DNS attack lab,” http: //www.cis.syr.
https://www.akamai.com/cn/zh/multimedia/ edu/ ~wedu/seed/Labs_12.04/Networking/
documents/state-of-the-internet/dnssec-ampli- DNS_Remote/.
fication-ddos-security-bulletin.pdf, 2016. [24] J. Voas, A. Ghosh, F. Charron, et al, “reducing
[9] H. Zhou, C. Wu, M. Jiang, et al, “evolving de- uncertainty about common-mode failures,”
fense mechanism for future network security,” Proc. IEEE Symposium Software Reliability Engi-
IEEE Communications Magazine, vol.53, no.4, neering, 1997, pp. 308-319.
pp. 45-51, 2015. [25] J. Wu, “research on cyber mimic defense,” Jour-
[10] R. Zhuang, S. A. Deloach, X. Ou, “towards a nal of Cyber Security, vol.1, no.4, pp. 1-10, 2016.
Theory of Moving Target Defense,” Proc. ACM [26] H. Hu, F. Chen, Z. Wang, “performance evalu-
Workshop on Moving Target Defense, Nov. 2014, ations on DHR for cyberspace mimic defense,”
pp. 31-40. Journal of Cyber Security, vol.1, no.4, pp. 40-51,
[11] N. Mckeown, T. Anderson, “openFlow: enabling 2016.
innovation in campus networks,” ACM Sigcomm

244 China Communications • February 2019


Biographies Guozhen Cheng, received
Ph.D. degree from National
Zhenpeng Wang, received B.S.
Digital System Engineering &
degree from Wuhan University,
Technological R&D Center,
Wuhan, China, in 2015. He is
Zhengzhou, China. He is now a
pursuing the M.S. degree in
Research Associate in National
National Digital System Engi-
Digital System Engineering &
neering & Technological R&D
Technological R&D Center. His
Center, Zhengzhou, China. His
current research is in software defined networking,
current research is in software
active defense, and network security. Email:
defined networking, active defense, and network se-
guozhencheng@hotmail.com.
curity. Email: whuwzp@whu.edu.cn.

Hongchao Hu, received Ph.D.


degree from National Digital
System Engineering & Techno-
logical R&D Center, Zheng-
zhou, China. He is now an As-
sociate Professor in National
Digital System Engineering &
Technological R&D Center. His
current research is in software defined networking,
network function virtualization, and network security.
(Corresponding author).

China Communications • February 2019 245

Вам также может понравиться