Hackers Can Intercept HTTPS URLs via Proxy Attacks
Proxy Configuration Flaws Expose HTTPS URLs, Allow Hackers to Launch Various Attacks
Researchers have demonstrated how a design flaw affecting most operating systems and web browsers can be exploited to exfiltrate HTTPS URLs and conduct various types of malicious activities.
The location of this PAC file can be automatically detected by a system via DHCP or DNS using a technology called Web Proxy Auto-Discovery Protocol (WPAD). The feature is enabled by default in Microsoft Windows and Internet Explorer, and it is supported on OS X and Linux operating systems, and the Chrome, Safari and Firefox browsers. WPAD is often used by organizations to ensure that all their systems have the same web proxy configuration.
Researchers at Israel-based security firm SafeBreach discovered that by implementing malicious logic inside the FindProxyForURL function, an attacker can read the URLs accessed by a user, including HTTPS URLs, and exfiltrate them. The attack works on Windows, Mac and Linux systems, and all popular web browsers.
Next week at the Black Hat conference in Las Vegas, Itzik Kotler, CTO and co-founder of SafeBreach, and Amit Klein, the company’s VP of security research, will share details on the vulnerability and release proof-of-concept (PoC) malware that leverages this attack method. It’s worth noting that PAC files have also been leveraged by malware in the wild, such as the BlackMoon Trojan, which has affected more than 100,000 users in South Korea.
Kotler and Klein told SecurityWeek in an interview that there are two ways to mount an attack. A piece of malware that has access to the targeted system can drop a static “proxy.pac” file and configure the infected computer to use it.
The second method involves WPAD. If the victim’s device is configured to use the protocol, a man-in-the-middle (MitM) attacker can hijack WPAD-related communications and ensure that a malicious PAC resource is used by the browser. This attack method is ideal for scenarios where the attacker has access to the LAN or an open Wi-Fi connection, such as the ones available in public locations (e.g. coffee shops, hotels, airports, etc).
According to researchers, once an attacker configures the system to use their malicious proxy, they can intercept all URLs accessed by the victim and exfiltrate them to an attacker-controlled machine.
An attacker’s ability to intercept HTTPS URLs poses serious security and privacy risks. In addition to obtaining sensitive information that may be found directly in the URL, such as search terms, researchers pointed out that a malicious actor could obtain the URL accessed by a user when resetting an account password. If the attacker manages to reset the password before the legitimate user, they can lock the victim out of the account.
Another concern is related to document sharing. Corporate users often share sensitive information via links generated by file or document sharing services. Hackers can easily gain access to the information if they obtain the URLs.
Kotler and Klein also pointed out that the attack opens a two-way communications channel – an attacker can not only exfiltrate data, but also send data to the victim. This can be leveraged to launch, for example, distributed denial-of-service (DDoS) attacks.
Attackers can launch DDoS attacks if they create a botnet of computers infected with PAC malware. They can specify the IP address and port number of the targeted website and force all infected devices to go to that site when users want to access an online resource. Hackers can ensure that victims are taken to the website they are trying to access in an effort to avoid raising suspicion, but not before a request is sent to the targeted website in order to overload its resources.
Threat actors can also cause a local DoS condition. An attacker can configure the PAC to use an invalid proxy when the user wants to access certain online services – for instance, visit websites or update their antivirus. By specifying a proxy address that does not exist, the attacker prevents the user from accessing that service.
The researchers pointed out that the issue can be exploited not only against browsers – any application that relies on the proxy configuration can be targeted. This applies to the aforementioned scenario involving antiviruses, which don’t necessarily use the web browser for updates.
While the root cause of the problem is a WPAD/PAC security design flaw, each browser and operating system vendor can take steps to reduce exposure to potential attacks.
Context Information Security has independently conducted similar research and notified the affected vendors. The security firm said Apple addressed the issue in OS X and iOS in May, while Google patched Chrome and Android in July.