M-unition -

Attackers Exploit the Heartbleed OpenSSL Vulnerability to Circumvent Multi-factor Authentication on VPNs

By on April 18, 2014

Written by Christopher Glyer and Chris DiGiamo

Less than a week since the public disclosure of the “Heartbleed” vulnerability, Mandiant incident responders have already identified successful attacks in the wild by targeted threat actors. The Heartbleed vulnerability (CVE-2014-0160), publicly disclosed on April 7th by security researchers Neel Mehta and Codenomicon is a buffer over-read bug in the Transport Layer Security (TLS) extension. The bug was present in a section of code responsible for providing “Heartbeat” notifications between a client and server. A working proof of concept of the exploit appeared on the Internet last week that allowed an attacker to obtain up to 64KB of random memory space per malformed heartbeat request.

To date, much of the discussion on the Internet has focused on an attacker using the vulnerability to steal private keys from a web server, and less on the potential for session hijacking (with Matthew Sullivan’s blog a notable exception).

This post focuses on a Mandiant investigation where a targeted threat actor leveraged the Heartbleed vulnerability in a SSL VPN concentrator to remotely access our client’s environment and steps to identify retroactively if this occurred to your organization.

Beginning on April 8, an attacker leveraged the Heartbleed vulnerability against a VPN appliance and hijacked multiple active user sessions. Specifically, the attacker repeatedly sent malformed heartbeat requests to the HTTPS web server running on the VPN device, which was compiled with a vulnerable version of OpenSSL, to obtain active session tokens for currently authenticated users. With an active session token, the attacker successfully hijacked multiple active user sessions and convinced the VPN concentrator that he/she was legitimately authenticated. The attack bypassed both the organization’s multifactor authentication and the VPN client software used to validate that systems connecting to the VPN were owned by the organization and running specific security software.

The exploit method was identified and confirmed by analyzing two sources of information, IDS signatures and VPN logs. The victim organization implemented a set of signatures to identify Heartbleed network activity. The IDS signature “SERVER-OTHER TLSv1.1 large heartbeat response – possible ssl heartbleed attempt”, depicted in figure 1, alerted over 17,000 times during the intrusion.  The source of the heartbeat response was the organization’s internal SSL VPN device.

Figure 1: IDS signature for large Heartbleed responses

Figure 1: IDS signature for large Heartbleed responses

The following evidence proved the attacker had stolen legitimate user session tokens:

  1. A malicious IP address triggered thousands of IDS alerts for the Heartbleed vulnerability destined for the victim organization’s SSL VPN.
  2. The VPN logs showed active VPN connections of multiple users rapidly changing back and forth, “flip flopping”, between the malicious IP address and the user’s original IP address.  In several cases the “flip flopping” activity lasted for multiple hours.
  3. The timestamps associated with the IP address changes were often within one to two seconds of each other.
  4. The legitimate IP addresses accessing the VPN were geographically distant from malicious IP address and belonged to different service providers.
  5. The timestamps for the VPN log anomalies could be correlated with the IDS alerts associated with the Heartbleed bug.

Once connected to the VPN, the attacker attempted to move laterally and escalate his/her privileges within the victim organization.

Mandiant recommends organizations that are running (or had been running) vulnerable versions of remote access software or appliances take the following actions:

  1. Identify infrastructure affected by the vulnerability and upgrade it as soon as possible.
  2. Implement network intrusion detection signatures to identify repeated attempts to leverage the vulnerability. In our experience, an attacker will likely send hundreds of attempts because the vulnerability only exposes up to 64KB of data from a random section of memory.
  3. Perform historical review of VPN logs to identify instances where the IP address of a session changed repeatedly between two IP addresses. It is common for an IP address to legitimately change during a session, but from our analysis it is fairly uncommon for the IP address to repeatedly change back and forth between IP addresses that are in different network blocks, geographic locations, from different service providers, or rapidly within a short time period.

 

Category: The Lab

Comments

    Leave a Comment

Get M-Unition in Your Inbox:

Follow @mandiant

  • Congrats to @droecher for winning the #MIRcon 2014 Twitter Contest! Please direct message us to retrieve your $500 Apple gift card

Follow @mandiant on twitter.

MIRcon 2014


Oct. 7-8, 2014
Washington, DC

The Mandiant Incident Response Conference (MIRcon) offers participants the opportunity to hear from some of the most influential voices in cybersecurity while networking with peers.

Sessions at MIRcon will cover best practices, case studies and instruction on important aspects of the information security terrain, including incident response, malware analysis, reverse engineering and computer forensics.

Register Today!

Career Opps @ Mandiant

We’re growing fast, but we’re as demanding as ever. Our clients come to us in their hours of need, so we need the best. That means more than just the right education and the right experience in information security.

As Mandiant continues to grow, we are able to offer certain positions in multiple locations. For details on the location(s) of each opening, please refer to the position descriptions.

Click here to view available positions.