Re: [Full-disclosure] Mutt: failure to check server certificate in SMTP TLS connection



On 8 March 2011 19:00, Joachim Schipper <joachim@xxxxxxxxxxxxxxxxxx> wrote:
On Tue, Mar 08, 2011 at 12:36:01PM +1100, dave b wrote:
Hi all. It seems that mutt fails to check the validity of a SMTP
servers certificate during a TLS connection. In my mutt configuration
I have

set ssl_starttls = yes
set ssl_force_tls = yes

However, after performing the steps below I found that mutt did not
properly validate the remote servers SMTP tls certificate. This means
that an attacker could potentially MITM a mutt user connecting to
their SMTP server even when the user has forced a TLS connection.

Steps to test this:
1. I set in my hosts file the ip for smtp.gmail.com to be bound to
mail.lolok.com

in /etc/hosts
74.125.127.109 mail.LOLOK.com

2.Then I changed my

set smtp_url = "smtp://MYUSERNAME@xxxxxxxxxxxxxx:587/"
to be
set smtp_url = "smtp://MYUSERNAME@xxxxxxxxxxxxxx:587/"

3. I opened up mutt and emailed my self. I note that I saw mutt say
"connecting to mail.lolok.com".

I feel that this is an issue because mutt _does_ actually perform IMAP
server certificate validation (at least it did when I last tested it
:P).

I'm on the train and not able to test, but the muttrc(5) man page has

      smtp_url
             Type: string
             Default: ""

             Defines  the  SMTP  smarthost where sent messages should relayed
             for delivery. This should take the form of an SMTP URL, e.g.:



             smtp[s]://[user[:pass]@]host[:port]



             where "[...]" denotes an optional part.  Setting  this  variable
             overrides the value of the $sendmail variable.

Note the "[s]". But yes, you should arguably file a documentation-bug
with the Mutt maintainers, since ssl_starttls does suggest that it works
for SMTP too.

Oh really?
I'll test it out now!

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Relevant Pages

  • Re: [Full-disclosure] Mutt: failure to check server certificate in SMTP TLS connection
    ... servers certificate during a TLS connection. ... after performing the steps below I found that mutt did not ... their SMTP server even when the user has forced a TLS connection. ...
    (Full-Disclosure)
  • [Full-disclosure] Mutt: failure to check server certificate in SMTP TLS connection
    ... It seems that mutt fails to check the validity of a SMTP ... servers certificate during a TLS connection. ... their SMTP server even when the user has forced a TLS connection. ...
    (Full-Disclosure)
  • Re: pine
    ... What you are saying, quoting from mutt docs: ... SMTP Support ... | will use the program specified by $sendmail. ... I got alpine to work with IMAP and gmail as you expected. ...
    (Ubuntu)
  • Re: pine
    ... I uninstalled exim4 and rkhunter. ... What you are saying, quoting from mutt docs: ... SMTP Support ... This is on my mail server running Debian/squezze not Ubuntu. ...
    (Ubuntu)
  • Re: Email programs that work.
    ... It lacks the ability to use the SMTP interface to send mail, ... I am using SMTP; my MUA supports SMTP. ... And that is exactly the beauty of mutt. ...
    (Debian-User)