This module exploits a command injection vulnerability against Dovecot with Exim using the "use_shell" option. It uses the sender's address to inject arbitrary commands, since this is one of the user-controlled variables. It has been successfully tested on Debian Squeeze using the default Exim4 with the dovecot-common packages.
Linux
x86
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/smtp/exim4_dovecot_exec
msf exploit(exim4_dovecot_exec) > show targets
...targets...
msf exploit(exim4_dovecot_exec) > set TARGET < target-id >
msf exploit(exim4_dovecot_exec) > show options
...show and set options...
msf exploit(exim4_dovecot_exec) > exploit
Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.
– Jim O’Gorman | President, Offensive Security