Protecting Free and Open Communications on the Internet Against Man-In-The-Middle Attacks on Third-Party Software: We’Re FOCI’D
Total Page:16
File Type:pdf, Size:1020Kb
Protecting Free and Open Communications on the Internet Against Man-in-the-middle Attacks on Third-party Software: We’re FOCI’d Jeffrey Knockel Jedidiah R. Crandall Dept. of Computer Science Dept. of Computer Science University of New Mexico University of New Mexico [email protected] [email protected] Abstract In the context of free and open communications on the Internet (FOCI), it is important for users to be able to pro- In this position paper, we argue that the potential for tect their systems from state actors that control most of man-in-the-middle attacks on third-party software is a the networking infrastructure. It is well known that this significant threat to free and open communications on the control enables man-in-the-middle attacks, and it is also Internet (FOCI). The FOCI community has many chal- known that man-in-the-middle attacks can include at- lenges ahead, from the failure of the SSL system to pro- tacks on the integrity of executable downloads and third- tect Internet users from states that control the Internet party software updates. Our argument in this paper is that to the challenges inherent in measuring and cataloging this kind of attack has the potential to become a persistent Internet censorship. It is already well-known in the com- and widespread threat to free and open communications munity that man-in-the-middle attacks are a threat, and on the Internet, because the vulnerabilities are relatively such attacks are already being used by nation states. easy to find and exploit compared to other types of vul- In this paper we discuss our experiences discovering nerabilities. Because many small, third-party software two vulnerabilities in software update mechanisms (in vendors may be affected, automated tools are needed to Impulse SafeConnect and Sun Java). What surprised us help users protect themselves without relying on the ven- was the relative ease of finding such vulnerabilities and dors. exploiting them. Our argument is that automated tools We will not argue in this paper that the capability to are needed to help users manage this threat more effec- carry out man-in-the-middle attacks is something that tively because the threat involves many third-party appli- state actors will increasingly utilize. We will point out, cations from many small vendors. however, that among the SSL certificates that Iran is suspected to have forged were several software update servers [24]. In this paper we will focus on arguing that typical Internet users are vulnerable to attacks on soft- 1 Introduction ware updates by third-party software. Vulnerabilities in systems will always exist, and there We also will not explore in depth the incentives of ven- will always be so-called “arms races” between attackers dors who do not properly secure their software against and defenders in environments where information secu- man-in-the-middle attacks. It is worth pointing out that rity matters. When large software and communications even the largest vendors can take years to fix known vul- infrastructures are developed over many years and then nerabilities of this type. Apple took more than three suddenly exposed to threats from a new angle that was years to fix the vulnerability in iTunes updates that Fin- never part of the design, however, this moves beyond Fisher exploited [17], and this exploit is believed to have “arms race” and can become a significant source of at- been used against Egyptian dissidents [25]. Microsoft tacks that persists for many years. For example, when was prompted by the Flame worm to fix a vulnerability Windows systems were suddenly thrust onto the Inter- in its Windows update mechanism [18] that was based net with routable IP addresses, it took almost a decade on weaknesses of certificates that use the MD5 hashing before a user could (arguably) put a Windows machine algorithm that had been known for almost four years at on the Internet with a reasonable level of confidence that the time of Microsoft’s fix [21]. These examples were the machine would not be quickly compromised through simply a matter of major vendors not taking the man-in- open ports using memory corruption attacks. the-middle threat seriously enough. Even if the major vendors take this threat seriously, XML-provided hash, and the files are verified to have however, there are many small third party software an “Impulse Point LLC” Authenticode digital signature. vendors whose software performs automatic updates If these verifications pass, then SafeConnect silently re- with administrator privileges. Depending on what the places its files with the downloaded files and restarts it- profile of programs installed on the average user’s com- self. puter is, this problem may run much deeper than Mi- We can exploit this update process via a man-in-the- crosoft and Apple. One of the vulnerabilities we dis- middle attack. We first leverage that SafeConnect only covered and describe in this paper, for example, was uses symmetric encryption to protect its network com- for a software program that is marketed specifically to munication. Thus, by reverse engineering the encryption U.S. universities. Many dissidents, journalists, and oth- key used by a SafeConnect client to decrypt update infor- ers who may be targeted by governments have ties to mation, we also knew the key used to encrypt the update U.S. universities, so even if a software program is used information. We also leverage that we also had analyzed only by a small segment of the population it may still be an older version of SafeConnect, version 4250.121, that a fruitful endeavor for a government to develop a man-in- had a similar update process, that was also signed by the-middle exploit for that software, especially given the Impulse Point, but that performed no digital signature relative ease of finding and exploiting man-in-the-middle verification on updated files. Thus, when SafeConnect vulnerabilities in software updates. attempts to connect to 198.31.193.211, we then exploit To support the statement above that finding and ex- SafeConnect 5036.223 by spoofing an “update” to ver- ploiting this type of vulnerability is relatively easy com- sion 4250.121. After this version is installed, we can then pared to, e.g., 0-day memory corruption vulnerabilities spoof an update containing any arbitrary executable. for web browsers, we first describe two vulnerable third- This vulnerability has been fixed by version 5059.242, party applications. In Section 2, we describe a man-in- which now uses HTTPS to perform all network commu- the-middle vulnerability in Impulse SafeConnect. Safe- nication. However, one must be on-campus to receive Connect is software that many universities require all this update, so, e.g., students who have graduated and users of certain campus networks to install. Then in Sec- moved away will remain vulnerable indefinitely. tion 3 we describe a man-in-the-middle vulnerability in 3 Sun Java a more pervasive program: Sun Java. Section 4 summa- rizes our findings from a few other programs, followed In September 2011, we discovered that the automatic up- by discussion in Section 5, after which we conclude. dater built into Sun Java 6 and 7 for Windows is vulner- able to man-in-the-middle attacks that enable arbitrary 2 Impulse SafeConnect code execution as an Administrator. We will describe the Impulse SafeConnect is software that many universities vulnerability for Java 6 (Java 7’s vulnerability is analo- require users of their networks to download and install as gous). a prerequisite for using the network. It performs network The automatic updater in Java 6 periodically down- access control and can scan a user’s machine for patches, loads update information from the following URL via peer-to-peer activity, and other information. insecure HTTP: In July 2011, we discovered that the automatic up- javadl-esd.sun.com/update/1.6.0/map-m-1.6.0.xml dating built into SafeConnect 5036.223 is vulnerable to man-in-the-middle attacks. When it detects that it has This XML file maps older versions of Java 6 to the URL an Internet connection, SafeConnect attempts to connect of another XML file with update information. For in- to 198.31.193.211, a hard-coded IP address that, when stance, the update information for Java 6 Update 30 to connected to the University’s wireless network, routes to Update 31 is retrieved from the following URL via inse- an on-campus server. If connected, it begins commu- cure HTTP: nicating with the server via XML over insecure HTTP encrypted using the 12-byte Blowfish key in ECB mode: javadl-esd.sun.com/update/1.6.0/au-descriptor-1.6.0_ 31-b79.xml \x4f\xbd\x06\x00\x00\xca \x9c\x18\x03\xfc\x91\x3f This XML file includes a textual description of the up- date presented to the user, a URL used to download the Among other things, information regarding software updater executable and the command-line options with updates is sent by the server to the SafeConnect client, which to execute it, and a hex-encoded SHA1 hash of including the version of the update and both URL’s and the updater executable. hex-encoded MD5 hashes for each updated file. If the If an update is available, then the user is prompted with version is newer than that currently installed, each file the description of the update. If the user accepts the up- is then downloaded, its MD5 hash verified against the date, then the executable is downloaded. Its SHA1 hash is then verified against the XML-provided hash.