Skip to main content
  1. Home
  2. Computing
  3. Web
  4. Legacy Archives

How the Heartbleed bug works, as explained by a Web comic

Add as a preferred source on Google

Sometimes, the easiest way to explain a concept to someone is with the use of illustrations, or cartoons. Xkcd.com attempts to do just that with this simple comic, where it tells a short story of a hacker talking to a server, who uses the Heartbleed exploit to trick the server into leaking more information it’s supposed to, until it begins to divulges sensitive data.

First, check the comic out below.

heartbleed_explanation
Image used with permission by copyright holder

First the girl asks the server to indicate whether it’s still online by telling it to say “Potato,” and indicates the length of the word. The server responds with “Potato,” while withholding all of the information surrounding “Potato,” written out in a lighter hue in the server’s speech bubbles. The hacker then asks the server to repeat the same task, but instead replaces “Potato” with “Bird,” and indicates the length of the word. The server complies.

Recommended Videos

Then, the hacker asks the server to say “Hat,” but instead of noting that it’s a three-character word, she states that it’s 500 letters long. The server responds not only by saying “Hat,” but also by leaking out the information around the word. By doing so, it reveals sensitive server information, including a “master key,” which the hacker begins to jot down.

This is a basic explanation of how the Heartbleed bug works. The Heartbleed bug is a flaw in the OpenSSL method of data encryption used by many of the world’s websites, which was actually put into the code accidentally by a programmer roughly two years ago.

OpenSSL contains a function known as a heartbeat option. With it, while a person is visiting a website that encrypts data using OpenSSL, his computer periodically sends and receives messages to check whether both his PC and the server on the other end are both still connected. The Heartbleed bug allows hackers to send trick heartbeat messages, like the one pictured in the comic above, which can fool a site’s server into relaying data that’s stored in its RAM — including sensitive information such as usernames, passwords, credit card numbers, emails, and more. This is the part of the flaw that the Xkcd comic illustrates.

What do you think? Sound off in the comments below.

Konrad Krawczyk
Former Computing Editor
Konrad covers desktops, laptops, tablets, sports tech and subjects in between for Digital Trends. Prior to joining DT, he…
Look, the MacBook Neo is a fine machine for building apps. And yes, I am utterly surprised
I am talking about apps with a generous dose of AI wizardry happening in the background.
MacBook Neo in yellow.

In a span of just one week, I have built a full-fledged Android app for my Galaxy Z Fold 8 foldable phone, three Mac apps, and an iPhone app. And here's the fun part. The entire journey of creating these apps actually started on a phone, jumped to my MacBook Neo, compiled just fine, and ran flawlessly, without making me want to tear my hair off. The latest example? 

It built my calendar-clipboard hybrid app in Terminal within 20 seconds, and an on-device transcription app with a retro look in roughly 15 seconds. I used to think building desktop software would have me burning the midnight oil. The MacBook Neo did it in less time than I can pour myself a can of soda and take the first sip. 

Read more
AI could be doing to our tolerance for hard work what social media did to our patience
Even brief AI use may make unaided work feel more frustrating once the help disappears.
ChatGPT on iPhone

It is no secret that social media, and especially the rise of short-form content, has played a major role in the declining patience many of us have for anything that takes too long to get to the point. A few seconds without something interesting happening is enough to make us swipe away and look for the next thing. AI appears to be doing something similar to the way we approach work.

A new peer-reviewed study found that people who used AI for around 10 to 15 minutes were more likely to struggle and give up once the AI was taken away. The researchers ran three randomized experiments with 1,222 participants who were given math and reading-comprehension tasks. AI helped them perform better at first, but their performance tanked once they had to solve the problems on their own.

Read more
Microsoft wants Copilot Notebooks to handle the work that comes after an AI answer
Built-in Office editing gives users somewhere to revise what Copilot produces
Copilot graphics

Microsoft is bringing Office editing into Copilot Notebooks through its Frontier preview. Users can work on Word, Excel and PowerPoint files alongside their project references, making changes themselves or asking Copilot to handle them.

Generating a report or presentation with AI still leaves someone responsible for getting it ready to share. The October update puts editing tools where that work begins, though having a document neatly formatted doesn’t make its contents correct.

Read more