DNS As a Multipurpose Attack Vector
Total Page:16
File Type:pdf, Size:1020Kb
PANEPISTHMIO AIGAIOU DIDAKTORIKH DIATRIBH To Prwtόκοllo DNS wc Poluleitουργικός Forèac EpÐjeshc Suggrafèac: Μάριoc Anagnwstόπουλος Epiblèpwn: Αναπληρωτής Kaj. Ge¸rgioc Καμπουράκης Diatrιβή gia thn aπόκτηση Didaktorikoύ Dipl¸matoc tou ErgasthrÐou Ασφάλειας Plhroforiak¸n kai Epikoinwniak¸n Συστημάτwn Τμήματoc Mhqanik¸n Plhroforiak¸n kai Epikoinwniak¸n Συστημάτwn Septèmbrioc, 2016 University of the Aegean Doctoral Thesis DNS as a multipurpose attack vector Author: Marios Anagnostopoulos Supervisor: Associate Prof. Georgios Kambourakis A thesis submitted in fulfilment of the requirements for the degree of Doctor of Philosophy at the Laboratory of Information and Communication Systems Security Department of Information and Communication Systems Engineering September, 2016 Declaration of Authorship I, Marios Anagnostopoulos, declare that this thesis entitled, \DNS as a multipurpose attack vector" and the work presented in it are my own. I confirm that: This work was done wholly while in candidature for a research degree at this University. Where I have consulted the published work of others, this is always clearly at- tributed. Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work. I have acknowledged all main sources of help. Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself. Signed: Date: September 28, 2016 i Advising Committee of this Doctoral Thesis: Georgios Kambourakis, Supervisor Department of Information and Communication Systems Engineering Panagiotis Rizomiliotis, Advisor Department of Information and Communication Systems Engineering Elisavet Konstantinou, Advisor Department of Information and Communication Systems Engineering University of the Aegean, Greece 2016 ii Approved by the Examining Committee: Stefanos Gritzalis Professor, University of the Aegean, Greece Vasilios Katos Professor, Bournemouth University, UK Georgios Kambourakis Associate Professor, University of the Aegean, Greece Panagiotis Rizomiliotis Assistant Professor, University of the Aegean, Greece Elisavet Konstantinou Assistant Professor, University of the Aegean, Greece Konstantinos Kolias Assistant Professor, George Mason University, USA Dimitrios Geneitakis Researcher, Joint Research Centre - European Commission, Italy University of the Aegean, Greece 2016 iii \Οἱ kairoÈ oÎ menetοί.’’ (JoukudÐdhc 455-399 p.Q.) Abstract Few will argue that DNS security is a complex, multi-faceted, and of growing concern research topic. This is simply because virtually any protocol or service in the Internet depends its operation on the DNS service. Putting it another way, attacks on DNS can paralyze the network infrastructure of entire countries or even continents. Even worse, the original DNS design was concentrated on availability not security, and thus up to 1997 (and practically prior to 2008) the protocol did not afford any ilk of security protection, not even origin authentication of the offered DNS data. In this context, the primary aim of this PhD thesis is to alert the community by the investigation of novel ways of DNS exploitation, and thus our work can be mainly classified under the umbrella of offensive security. Specifically, we show that DNS can be exploited as a multipurpose attack vector that may severely threaten the integrity, authenticity, confidentiality, and availability of the offered resources in the cyberspace. Nowadays, DNS security inefficiencies have been addressed in practice by DNSSEC, and at least up to now, only on a limited scale by DNSCurve. Both these mechanisms utilize public key cryptography with the aim of extending the core DNS protocol. Therefore, one of the contribution of this thesis is to provide a comprehensive and constructive side- by-side comparison among the aforementioned security mechanisms. This is anticipated to greatly aid the defenders to decide which mechanism best suits to each particular deployment. Furthermore, there are overwhelming evidences that DNS is frequently abused by cyber crooks in Denial of Service (DoS) type of attacks. This is because that - even the typical - DNS records can greatly amplify the attack effect, meaning vastly augment the volume of network traffic reflected and destined toward victims. This amplification effect is foreseen to be far more devastating in the case of DNSSEC records, which normally are considerably bigger. In this mindset, an additional contribution of the thesis at hand is the investigation and assessment (in terms of attack amplification factor) of novel types of DNSSEC-powered DoS kind of attacks. The role of DNS forwarders as reflectors in such attack incidents is studied as well. Moreover, we examine some novel options about which publicly available resources (in terms of DNS servers) could be particular fruitful for the attacker to include them to their arsenal. In this direction, the potential of entangling the infrastructure of upper DNS hierarchy as both amplifiers and reflectors is thoroughly investigated. Regarding this point, the main advantage of our research compared with the standard type of DNS amplification attack is that we demonstrate that even a naive attacker is capable of executing a fruitful attack by simply exploiting the great amount of DNS machines existing out there. This thesis also deals with the exploitation of DNS protocol by bot herders with the purpose of building hidden Communication and Control (C&C) channels for their bot- nets. In this respect, we delve into the so called DNS- and IP-fluxing techniques, and propose and evaluate three novel botnet architectures which solely rely on DNS to de- liver the botnet's C&C infrastructure. Given the mushrooming of smart mobile devices, the proposed architectures utilize not only mixed structures consisting of both mobile and desktop bot agents, but more importantly, structures that are purely mobile. This aspect of our work also includes the evaluation of the robustness of the proposed botnet formations. Finally, besides the contributions devoted to legacy DNS attacks, we investigate the potential of DNS as an attack vector to evade user's privacy by means of harvesting private sensitive information from, say, smartphone owners. To this end, we design and implement a privacy-invasive mobile application (spyware) able to manipulate the DNS service running on devices based on the Apple's iOS platform. The spyware is capable of acting as a man-in-the-middle to the tethering and intelligent personal assistant (such as Siri and Goggle now) services present in virtually every modern mobile platform. In this case, the aim of the spyware coder is that of redirecting all users connected via the device to a malicious website in order to phish user's credentials, harvest sensitive personal information, and so forth. Greek Abstract Adiamfiσβήτητa, ta ζητήματa asfaleÐac gia thn uphresÐa onomatodosÐac q¸rou tou Dia- δικτύου (DNS) apoτελούν èna poλύπλοκο, poλυδιάσtato kai idiaÐterhc βαρύτητac pedÐo èreunac. Ousiasτικά, κάθε prwtόκοllo ή uphresÐa pou parèqetai mèsw tou Διαδικτύου basÐzei thn απρόσκοπτη leitourgÐa tou sthn uphresÐa DNS. Sunep¸c, κάθε τύπος epÐje- shc pou stoχεύει to DNS endèqetai na epifèrei sobarèc epipt¸seic sth δικτυακή υποδομή organism¸n ή ακόμα kai oλόκληρων krat¸n. Dustuq¸c, oi arqikèc εκδόσειc tou sugke- krimènou prwtοκόllou estÐazan sth διαθεσιμόthta thc uphresÐac παρά sthn prostasÐa thc από pijanèc apeilèc. 'Etsi, σχεδόn mèqri to 1997, αλλά πρακτικά όqi nwrÐtera από to 2008, to prwtόκοllo DNS den uposτήριζε κάποιo mhqaniσμό prostasÐac, ούτε kan autόn thc διασφάλιshc thc αυθεντικόthtac proèleushc twn παρεχόμενων dedomènwn. Se autό to plaÐsio, h παρούσα didaktορική διατριβή èqei wc βασικό stόqo na enhmer¸sei kai na jèsei se epifυλακή thn episthmoνική koiνόthta mèsw thc διερεύνησης kai epiσήμανσης nèwn μεθόδων κακόboulhc ekmetάλλευσης tou DNS. 'Etsi, μπορούμε na πούμε όti h en λόgw διατριβή epikentr¸netai sthn epiθετική ασφάλεια, dhl., esτιάζει ston epitijèmeno πάρα ston αμυνόμενο. Me άλλα λόgia, h διατριβή filodoxeÐ na katadeÐxei όti to prwtόκοllo DNS δύνατai na qrhsimopoihjeÐ wc ènac poλύπλευρος forèac epÐjeshc (attack vector) me σκοπό thn parabÐash thc ακεραιόthtac, αυθεντικόthtac, empisτευτικόthtac kai διαθεσιμόthtac twn προσφερόμενων πόρων ston kubernoq¸ro. Σήμερα, oi ανεπάρκειες tou DNS θεραπεύοntai από δύο kruptoγραφικούς mhqaniσμούς· sthn πράξη me thn epèktash asfaleÐac tou DNSSEC kai (mèqri stiγμής se μικρή klÐmaka) to DNSCurve. Αμφόteroi oi mhqanismoÐ autoÐ qrhsimopoiούν kruptografÐa dhmosÐou kleidiού me σκοπό thn prostasÐa twn μηνυμάτwn tou βασικού prwtοκόllou DNS. Wc ek tούτou, mÐa από tic suneisforèc thc παρούσας διατριβής eÐnai h διεξαγωγή miac sugkriτικής kai εποικοδομητικής παράθεσης twn δύο proanaferjèntwn mhqanism¸n asfaleÐac. Mia tètoia antiparaboλή eÐnai bèbaio όti βοηθάει σημαντικά touc amunόμεnouc sto na epilèxoun poioc mhqaniσμός eÐnai katαλληλόteroc gia κάθε perÐptwsh. Epiplèon, υπάρχουν shmantikèc apodeÐxeic όti to prwtόκοllo DNS qrhsimopoieÐtai ka- κόβουλα από touc kuberno-egklhmatÐec prokeimènou na διεξάγουν epijèseic άρνησης u- phresÐac (DoS). Sugkekrimèna, ta peristατικά autά ανήκουν se mia ειδική kathgorÐa e- pijèsewn pou oνομάζοntai epijèseic enÐsqushc mèsw DNS (DNS amplification attack). Κάτι tètoio eÐnai efiktό, διόti ακόμα kai mia τυπική DNS απόκριsh (response) endèqetai na eniσχύσει σημαντικά thn δικτυακή kÐnhsh pou kataftάνει sthn πλευρά tou θύματoc. Ousiasτικά, to