Skip to Main Content
PCMag editors select and review products independently. If you buy through affiliate links, we may earn commissions, which help support our testing.

Heartbleed: How It Works

Criminals can exploit a bug dubbed Heartbleed to capture chunks of server memory, including encryption keys and passwords. The bug itself is extremely simple; most affected websites have already patched it.

By Neil J. Rubenking
Heartbleed Infographic

Fancy acronyms like TLS (Transport Layer Security) and SSL (Secure Sockets Layer) sound complicated to those not trained in network communications. You'd expect that the Heartbleed attack, which takes advantage of a bug in secure communications, would be something incredibly complex and arcane. Well, it's not. In fact, it's ridiculously simple.

When It's Working Correctly
First, a little background. When you connect with a secure (HTTPS) website, there's a kind of handshake to set up the secure session. Your browser requests and verifies the site's certificate, generates an encryption key for the secure session, and encrypts it using the site's public key. The site decrypts it using the corresponding private key, and the session begins.

A simple HTTP connection is a series of as-if unrelated events. Your browser requests data from the site, the site returns that data, and that's it, until the next request. However, it's helpful for both sides of a secure connection to be sure the other is still active. The heartbeat extension for TLS simply lets one device confirm the other's continued presence by sending a specific payload that the other device sends back.

A Big Scoop
The heartbeat payload is a data packet that includes, among other things, a field that defines the payload length. A Heartbleed attack involves lying about the payload length. The malformed heartbeat packet says its length is 64KB, the maximum possible. When the buggy server receives that packet, it responds by copying that quantity of data from memory into the response packet.

Just what's in that memory? Well, there's no way to tell. The attacker will have to comb through it looking for patterns. But potentially anything at all could be captured, including encryption keys, login credentials, and more. The fix is simple—check to make sure the sender isn't lying about packet length. Too bad they didn't think to do that in the first place.

Rapid Response
Since exploitation of this bug leaves no traces, we can't really tell how much supposedly-secure data has been stolen. Dr. David Bailey, BAE Systems Applied Intelligence's CTO for Cyber Security, said "Only time will tell whether digital criminals are able to exploit this to acquire sensitive personal data, take over user accounts and identities and steal money. This specific issue will pass but it does highlight an important feature of the connected world and illustrates the need for businesses and security providers to both be agile in how they address issues such as these and adopt intelligence-led techniques that improve defences before weak spots are attacked."

It looks like most websites are demonstrating the required agility in this case. BAE reports that on April 8 it found 628 of the top 10,000 websites vulnerable. On April 9, yesterday, that number was down to 301. And this morning it had dwindled to 180. That's a pretty fast response; let's hope the holdouts get busy with fixing the bug soon.

The infographic below illustrates just how Heartbleed work. Click it for a larger view.

Heartbleed Infographiic

Like What You're Reading?

Sign up for SecurityWatch newsletter for our top privacy and security stories delivered right to your inbox.

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy. You may unsubscribe from the newsletters at any time.


Thanks for signing up!

Your subscription has been confirmed. Keep an eye on your inbox!

Sign up for other newsletters

TRENDING

About Neil J. Rubenking

Lead Analyst for Security

When the IBM PC was new, I served as the president of the San Francisco PC User Group for three years. That’s how I met PCMag’s editorial team, who brought me on board in 1986. In the years since that fateful meeting, I’ve become PCMag’s expert on security, privacy, and identity protection, putting antivirus tools, security suites, and all kinds of security software through their paces.

Before my current security gig, I supplied PCMag readers with tips and solutions on using popular applications, operating systems, and programming languages in my "User to User" and "Ask Neil" columns, which began in 1990 and ran for almost 20 years. Along the way I wrote more than 40 utility articles, as well as Delphi Programming for Dummies and six other books covering DOS, Windows, and programming. I also reviewed thousands of products of all kinds, ranging from early Sierra Online adventure games to AOL’s precursor Q-Link.

In the early 2000s I turned my focus to security and the growing antivirus industry. After years working with antivirus, I’m known throughout the security industry as an expert on evaluating antivirus tools. I serve as an advisory board member for the Anti-Malware Testing Standards Organization (AMTSO), an international nonprofit group dedicated to coordinating and improving testing of anti-malware solutions.

Read Neil J.'s full bio

Read the latest from Neil J. Rubenking