Skip to content
Memory corruption Write-up Advanced

Buffer Overflow The Slmail pop3 Vulnerability

The SLMail POP3 service has a buffer overflow in the PASS command, allowing an attacker to overwrite the EIP and execute arbitrary code. The write-up demonstrates achieving a reverse shell by exploiting this vulnerability.

Neetrox Follow

Published on infosecwriteups.com

In the intricate landscape of cybersecurity, vulnerabilities persist as constant threats to the integrity of systems and data. Among these vulnerabilities, the SLMail POP3 buffer overflow stands out as a poignant example of the risks posed by unchecked software vulnerabilities.

Neetrox, on infosecwriteups.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

Likely the POP3 PASS command handler copies user input into a fixed-size buffer without bounds checking, allowing a stack-based buffer overflow.

Impact

An attacker could execute arbitrary code on the server, potentially leading to full system compromise.

What the attacker needed

Network access to POP3 service; SLMail POP3 service running; Windows Defender and Firewall disabled

How it was found

  1. Fuzz the PASS command with increasing lengths of data to find a crash.
  2. Determine the exact offset to EIP using a cyclic pattern.
  3. Identify bad characters that cannot be used in the payload.
  4. Find a JMP ESP instruction in a module without memory protections.
  5. Generate shellcode with msfvenom, excluding bad characters.
  6. Send the final exploit payload to gain a reverse shell.

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.

A buffer overflow happens when a program writes more data into a memory area than it can hold, spilling over and corrupting nearby memory. Here, the POP3 server's login command did not check the length of the password, so a very long password could overwrite the part of memory that controls which code runs next. An attacker could then make the server run their own code, taking control of the machine.

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.