Buffer overflow attacks have been exploited for vulnerabilities by hackers for over 30 years. They have allowed hackers to take control of users’ devices and even disrupt internet connections all over the world. Here's what a buffer overflow attack is and how to protect yourself from it.
To understand what a buffer overflow attack is, you must first understand what a buffer does. A buffer is a temporary and limited data storage location that is used to move data from one place to another. Buffers are used for input and output control, like for your keyboard and speakers, as well as for software like Photoshop. Programs usually have thousands of buffers that help them run smoothly.
You can imagine a buffer as a rollercoaster. It can only accept a certain number of people (or data), and once the ride is over, or the data is transferred, it can take on more people. It works in FIFO (first in, first out) order, meaning that it inputs and outputs the data in the order it arrived.
Buffer overflow is the most common of DDoS attacks. It happens when the input data goes over the memory allocated for the buffer and overwrites data into the other areas of the program not designed to store it. If there is too much data headed into the buffer, your program might slow down or crash, or you might see incorrect results or memory access errors. It also allows hackers to exploit vulnerabilities and perform buffer overflow attacks.
It’s an attack where a hacker uses the chaos caused by a buffer overflow to insert malicious code into sensitive areas.In turn, this allows the attacker to gain access to the user's device and execute program functions.
A typical buffer-overflow attack example would be a hacker overloading a system on your device with a massive amount of data. This causes the system to crash, which can lead to hackers exploiting the vulnerabilities left from the aftermath of the attack. The WhatsApp attack of 2019 that injected malware into users’ devices has also proven that this type of attack is still relevant to this day.
Buffer overflow attacks are still as relevant now as they were back in the ‘80s. Here are some of the most notorious examples:
Probably the most infamous buffer overflow example, the Morris Worm attack was one of the first complex cyber attacks that used malware (a worm). The worm first attacked the buffer and the resulting chaos unintentionally crashed ARPANET (the network that became the basis for the Internet) via a Denial of Service (DoS). The attack didn’t require human interaction or execution as it self-replicated itself while sitting on a host system.
SQL Slammer Attack was a computer worm that infected 75,000 users in only 10 minutes. It also affected a number of DNS servers, many ISPs lost their connections, and it slowed down internet traffic around the world. This attack exploited a buffer overflow vulnerability in Microsoft's SQL server and Desktop Engine database products.
The most prolific buffer overflow attack in recent history. The attack that exploited a buffer overflow bug happened to the ostensibly secure WhatsApp messaging app. The app’s users were disturbed by the news since WhatsApp offers end-to-end encryption and promises secure conversations.
The attackers used voice-over-internet protocols and their vulnerabilities. They managed to overflow its buffer and then use it as a gateway to inject users’ devices with malware. The hackers simply needed to call the user, who didn’t even need to pick up the phone for the malware to be installed. These calls also weren’t visible in the call-log, so some users were completely unaware that their devices were infected. The malware gave hackers access to users’ messages, microphones and cameras.
Buffer overflows usually happen due to software development mistakes. For example:
Hopefully, this guide has helped you answer what is a buffer overflow attack, alongside helping you understand the ways you can protect yourself from them. It’s INCREDIBLY difficult, if not impossible, for users to protect themselves from buffer overflow attacks. Most of the responsibility lies on programmers and developers. Therefore, it’s always a good idea to stay private online and reduce your digital footprint.