Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Data Protection

Hackers Can Intercept HTTPS URLs via Proxy Attacks

PAC attack exposes HTTPS URLs

Proxy Configuration Flaws Expose HTTPS URLs, Allow Hackers to Launch Various Attacks

PAC attack exposes HTTPS URLs

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 attack relies on proxy auto-config (PAC) files, which specify how web browsers and other user agents handle HTTP, HTTPS and FTP traffic. PAC files use a JavaScript function named FindProxyForURL to determine whether URLs are fetched directly or through a proxy server.

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).

Advertisement. Scroll to continue reading.

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.

“The fact that a (low trust) piece of code (i.e. Javascript) can be downloaded and executed in such context (HTTPS traffic – high trust), without any certification, digital signature, or protection of any kind – is the root cause of this problem,” Klein explained.

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.

In some cases, the weakness can also be leveraged for phishing attacks. Some web browsers, such as Internet Explorer, support the use of the JavaScript alert() function to return the value of PAC variables and functions. Alert() opens a basic dialog window on top of the accessed website, allowing threat actors to display a message designed to trick users into visiting a phishing URL or calling a scammy support line when trying to access certain websites (e.g. banks, payment services, etc).

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.

Context Information Security will detail its findings at DEF CON in a presentation titled “Toxic Proxies – Bypassing HTTPS and VPNs to Pwn Your Online Identity.”

Related: WPAD Name Collision Flaw Allows MitM Attacks

Related: Researchers Devise “Perfect” Data Exfiltration Technique

Written By

Eduard Kovacs (@EduardKovacs) is a managing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Understand how to go beyond effectively communicating new security strategies and recommendations.

Register

Join us for an in depth exploration of the critical nature of software and vendor supply chain security issues with a focus on understanding how attacks against identity infrastructure come with major cascading effects.

Register

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

Data Protection

The cryptopocalypse is the point at which quantum computing becomes powerful enough to use Shor’s algorithm to crack PKI encryption.

Artificial Intelligence

The CRYSTALS-Kyber public-key encryption and key encapsulation mechanism recommended by NIST for post-quantum cryptography has been broken using AI combined with side channel attacks.

Compliance

The three primary drivers for cyber regulations are voter privacy, the economy, and national security – with the complication that the first is often...

Application Security

Virtualization technology giant VMware on Tuesday shipped urgent updates to fix a trio of security problems in multiple software products, including a virtual machine...

Data Protection

While quantum-based attacks are still in the future, organizations must think about how to defend data in transit when encryption no longer works.

Application Security

Fortinet on Monday issued an emergency patch to cover a severe vulnerability in its FortiOS SSL-VPN product, warning that hackers have already exploited the...

Cybersecurity Funding

Los Gatos, Calif-based data protection and privacy firm Titaniam has raised $6 million seed funding from Refinery Ventures, with participation from Fusion Fund, Shasta...