Skip to content

STK-Security/sendmail-clamav-exploit-CVE-2007-4560

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sendmail + ClamAV-Milter Exploit (CVE-2007-4560)

Python RCE exploit for Sendmail with ClamAV-Milter <0.91.2 (CVE-2007-4560). Remote root command injection via SMTP RCPT TO headers.

Exploit Demo

About

Python port of the classic Sendmail/ClamAV-Milter remote root exploit originally written in Perl by Eliteboy.

Original exploit: exploit-db.com/exploits/4761

Vulnerability

The exploit leverages improper input sanitization in clamav-milter <0.91.2, allowing command injection through specially crafted SMTP RCPT TO headers. Commands execute with root privileges, enabling:

  1. Modification of /etc/inetd.conf to add a bind shell
  2. Restart of the inetd service to activate the backdoor

Why Python?

The original Perl exploit works, but this Python port offers significant improvements for modern pentesting workflows:

This Python Port:

  • Zero dependencies - Python3 standard library only, no CPAN modules
  • Better error handling - Clear, actionable error messages
  • Progress indicators - Step-by-step feedback during exploitation

Usage

python sendmail_clamav_exploit.py <target_ip>

After successful exploitation:

nc <target_ip> 1001
bash -i

Tested On

  • Sendmail 8.13.4/8.13.4/Debian-3sarge3
  • ClamAV-Milter < 0.91.2

References

About

Python RCE exploit for Sendmail with ClamAV-Milter <0.91.2 (CVE-2007-4560). Remote root command injection via SMTP RCPT TO headers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages