The Hijackers Guide to the Galaxy: Off-Path Taking Over Internet
Total Page:16
File Type:pdf, Size:1020Kb
The Hijackers Guide To The Galaxy: Off-Path Taking Over Internet Resources Tianxiang Dai, Fraunhofer Institute for Secure Information Technology SIT; Philipp Jeitner, Fraunhofer Institute for Secure Information Technology SIT, Technical University of Darmstadt; Haya Shulman, Fraunhofer Institute for Secure Information Technology SIT; Michael Waidner, Fraunhofer Institute for Secure Information Technology SIT, Technical University of Darmstadt https://www.usenix.org/conference/usenixsecurity21/presentation/dai This paper is included in the Proceedings of the 30th USENIX Security Symposium. August 11–13, 2021 978-1-939133-24-3 Open access to the Proceedings of the 30th USENIX Security Symposium is sponsored by USENIX. The Hijackers Guide To The Galaxy: Off-Path Taking Over Internet Resources Tianxiang Dai*, Philipp Jeitner*†, Haya Shulman* and Michael Waidner*† *Fraunhofer Institute for Secure Information Technology SIT †Technical University of Darmstadt Abstract digital assets: IP addresses management with Regional In- Internet resources form the basic fabric of the digital so- ternet Registries (RIRs) [RFC7020], domains with domain ciety. They provide the fundamental platform for digital ser- registrars, virtual machine resources with infrastructure as vices and assets, e.g., for critical infrastructures, financial ser- a service (IaaS) providers and certification with Certificate vices, government. Whoever controls that fabric effectively Authorities (CAs), see the list in Table1. These providers controls the digital society. manage the allocation, registration and operation of the In- In this work we demonstrate that the current practices of ternet resources for their customers. We study how easy it Internet resources management, of IP addresses, domains, is for network adversaries to take over the accounts of these certificates and virtual platforms are insecure. Over long pe- resource providers and then exploit the resources associated riods of time adversaries can maintain control over Internet with the compromised accounts. resources which they do not own and perform stealthy manip- We show that the current practices of Internet resources ulations, leading to devastating attacks. We show that network management are insecure. Adversaries can take control over adversaries can take over and manipulate at least 68% of digital assets of customers and maintain control over them for the assigned IPv4 address space as well as 31% of the top long periods of time without being detected. Although such Alexa domains. We demonstrate such attacks by hijacking the attacks are appealing for strong nation state adversaries and accounts associated with the digital resources. security agencies, we demonstrate that even weak off-path For hijacking the accounts we launch off-path DNS cache network adversaries can, through a series of protocol manip- poisoning attacks, to redirect the password recovery link to the ulations, take over the accounts of customers and thereby adversarial hosts. We then demonstrate that the adversaries control the Internet resources associated with them. can manipulate the resources associated with these accounts. Adversaries can hijack accounts. The idea behind our We find all the tested providers vulnerable to our attacks. attacks is the following: the adversary poisons the cache of We recommend mitigations for blocking the attacks that the DNS resolver of a resource provider, injecting a malicious we present in this work. Nevertheless, the countermeasures record mapping the Email server of the victim customer to cannot solve the fundamental problem - the management an adversarial host. The adversary invokes password recov- of the Internet resources should be revised to ensure that ery procedure. The Email server of the provider sends the applying transactions cannot be done so easily and stealthily password reset link to the IP address of the adversary. Adver- as is currently possible. sary resets the password and hijacks the victim account. We demonstrate how the adversary can perform manipulations 1 Introduction over the resources associated with the hijacked accounts. Manipulation of the digital resources. The SSO (Single Internet resources form the cornerstone of modern societies. Sign On) accounts of the RIRs pose the highest risk: hijacking The daily activities and services are increasingly digitalised, an SSO account allows a weak adversary to take over ASes from critical infrastructures to medical services and child care. and IP blocks allocated to the victim. Furthermore, through The society relies on the control over its Internet resources for the hijacked account the adversary can make manipulations availability and stability of digital services and assets. Due to not only in the control plane of the Internet infrastructure but their importance, Internet resources pose a lucrative target for also in the Internet Routing Registries (IRR) and in Internet adversaries. Addressing Resource Registries. Such modifications in the Internet resources are at risk. In this work we explore IRR can among others also facilitate extremely effective BGP the security of the Internet management systems of basic prefix hijacks. Specifically, IRR records are prerequisite for USENIX Association 30th USENIX Security Symposium 3147 BGP hijack attacks - without proper records in the IRR the Section7 we explain the fraction of the digital resources (IP attacker cannot convince benign upstream providers to accept address’ blocks and domains) that are at immediate risk due and propagate the fraudulent BGP announcements in the input to being associated with vulnerable accounts. We recommend filters on the BGP sessions. Adversaries without the ability countermeasures in Section8 and conclude in Section9. to modify the IRR, have to use less vigilant and generally poorly managed networks as upstream providers or have to 2 DNS Cache Poisoning Overview utilise path manipulation attacks [35] - both restricting the success rate and the stealthiness of the attack. Our adversary DNS. Domain Name System (DNS), [RFC1035], performs can, by modifying the records in the IRR, cause well managed lookup of services in the Internet. Recursive caching DNS re- and reputed upstream providers to unwittingly propagate the solvers receive DNS requests for services in different domains malicious BGP announcements. Hence making BGP prefix and send queries to the nameservers authoritative for those hijacks more effective than the typical control plane BGP domains. The nameservers respond with the corresponding prefix hijacks while at the same time more difficult to identify. DNS records. The DNS records in responses are cached by To maintain control over the victim Local Internet Registries the DNS resolvers and are provided to clients and servers (LIRs) resources over long periods of time the adversary im- which use that resolver. Subsequent requests for that domain plants itself in the system with elevated privileges. are responded from the cache. For instance, to send an Email We also show that hijacking an account under a CA allows to [email protected] the Email server of Bob will ask an adversary to revoke certificates, renew a certificate or issue the DNS resolver for the IP address of the Email exchanger in new certificates for domains registered under the hijacked domain example.info. The resolver asks the nameservers account. Renewal of certificates allows to associate a new in domain example.info for an IP address and a hostname key-pair with the certificate. Nevertheless some CAs do not (A and MX records) of the Email exchanger and receives: perform validation of certificate renewal requests issued from registered accounts. example.info IN MX mail.example.info By hijacking the accounts of domain registrars, the ad- mail.example.info A 1.2.3.4 versary can manipulate records in victim domains, e.g., to launch phishing attacks. Finally, hijacking accounts of IaaS The resolver will send to the Email server of Bob the IP providers enables the attackers to take over virtual machines address of the Email exchanger of Alice and will also cache and the resources that run on those virtual machines, including the records from the response for answering future queries databases, applications and computations. for MX and A in example.info domain. Disclosure and ethics. Our attacks were tested against DNS Cache Poisoning. In a DNS cache poisoning attack providers and customers reliably, yet were ethically compliant. the goal of the adversary is to redirect clients of some resolver To avoid harming Internet users, we set up victim domains to an IP address of the adversary for queries in a target victim and registered victim accounts which were used by us for domain. To do that, the adversary sends a DNS response from carrying out the attacks and for evaluating the vulnerabilities. a spoofed source IP address, which belongs to the nameserver This ensured that the providers would not use the spoofed of the victim domain, with malicious DNS records mapping records for any “real” purpose. In addition to evaluating the the victim domain to an IP address of the adversary. For attacks with the “victim” accounts that we set up, we also instance, to intercept the Emails sent to Alice the adversary evaluated our exploits of hijacked accounts against one large injects a DNS record mapping the Email exchanger of Alice ISP under RIPE NCC and attacked the real domain of that ISP to an adversarial host. If the resolver accepts and caches the in coordination with that ISP. We are disclosing