Skip to content
Memory corruption Write-up Advanced

Remote Exploit Against the Aircrack-NG Tools

The aircrack-ng tools trust the length field in EAPOL packets, allowing a crafted packet to cause out-of-bounds reads or heap overflow. An attacker could crash the tools or potentially execute arbitrary code, especially since they often run as root.

exploit-db.com

Published on exploit-db.com

The tools' code responsible for parsing IEEE802.11-packets assumes the self-proclaimed length of a EAPOL-packet to be correct and never to exceed a (arbitrary) maximum size of 256 bytes for packets that are part of the EAPOL-authentication. We can exploit this by letting the code parse packets which: a) proclaim to be…

Lukas Lueg, on exploit-db.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The EAPOL packet parser does not validate the declared length against the actual packet size or a maximum limit, leading to out-of-bounds reads and heap overflow.

Impact

The vulnerability could cause a denial of service (crash) and may allow remote code execution with root privileges, though the text only claims it 'should be able' to achieve this.

What the attacker needed

Attacker can send crafted 802.11 packets; victim runs aircrack-ng tools (e.g., airodump-ng); tools often run with root privileges

How it was found

  1. Craft an IEEE802.11 packet with LLC and SNAP headers that looks like the second phase of an EAPOL handshake.
  2. Set the EAPOL length field to a large value (e.g., 65000) to exceed the expected maximum.
  3. Include an EAPOL_Key and EAPOL_WPAKey structure with controlled content, such as the Nonce field.
  4. Add padding to control heap layout.
  5. Write the packet to a pcap file using the provided script.
  6. Feed the pcap file to aircrack-ng tools (e.g., airodump-ng) to trigger the overflow.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Aircrack-ng is a set of tools for testing Wi-Fi security. The tools read network packets and believe the size written inside the packet without checking it. A malicious packet can make the program read or write memory it should not, which can crash it or let an attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.