Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Re:[3] Corsaire Security Advisory - Multiple vendor MIME RFC2047 encoding issue |
|---|---|
| Date: | Mon, 27 Sep 2004 16:42:07 -0400 (EDT) |
On Mon, 27 Sep 2004, David Wilson wrote:
A core problem in this area is that there is much software "out there" which DOES NOT interpret MIME messages according to the standards.
Such software is *impossible* to protect with a gateway device unless said gateway device discards all MIME messages. At some point, the words "Defense In Depth" should come to mind.
The first example I might quote relates to a buffer overflow vulnerability in Outlook Express, I think it was, a few years ago. An overlong Date: field in the header caused a classic buffer overflow. Now, I don't know the details, but it is possible that this could have worked even if the Date: field were correct according to RFC 2822. For instance, there could be a very long comment in the field. Canonicalization would not help here.
If canonicalization includes dropping comments, it might have.
The second example I would pick is how Microsoft UAs fail to heed the Content-type: text/plain field.
"Defense in Depth". Any security consultant who does not recommend to his clients that they stop using such broken software is cheating them. Now, canonicalization can help if it renames attachments according to the MIME type using certain rules (eg, any text/plain attachment gets renamed *.txt. That probably still won't stop all broken UA's. Defense in Depth.
The third example relates to one of the Corsaire items. RFC 2047 makes it crystal clear that MIME encoded-words MUST NOT be used in MIME parameters, (I quote):
is clearly syntactically wrong (unquoted tspecials in the value), there is nothing "wrong" with this:
Content-disposition: attachment; filename="=?us-ascii?Q?virus.exe?="
So this SHOULD be passed unchanged by a canonicalizer.
No. A canonicalizer doesn't have to preserve dangerous behaviour; it can canonicalize the MIME by "seeing" the .exe and then taking action. Alternatively, the canonicalizer's security policy might dictate that attachments whose filenames match =?.*?= should be dropped. I guess what I'm saying is that canonicalization should always be used in addition to any other detection techniques.
So, making sure the MIME message is in a form with a unique interpretation of the standards does not stop other software from misinterpreting the result.
That's true, but as I wrote earlier, the only surefire way to prevent misinterpretation of valid MIME is to block all MIME. I think that canonicalizing the message, where you canonicalize to a very limited and strictly-controled use of MIME, is safe in the real world. Trying to enumerate every possible "dangerous" MIME-encoding technique is like trying to enumerate all possible virus signatures: Rewarding monetarily for security companies, which providing little actual security to their customers. Regards, David.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Diebold Global Election Management System (GEMS) Backdoor Account Allows Authenticated Users to Modify Votes, Nicholas Knight |
|---|---|
| Next by Date: | iDEFENSE Security Advisory 09.27.04 - IBM AIX ctstrtcasd Local File Corruption Vulnerability, customer service mailbox |
| Previous by Thread: | Re: Re:[3] Corsaire Security Advisory - Multiple vendor MIME RFC2047 encoding issue, David Wilson |
| Next by Thread: | RE: Diebold Global Election Management System (GEMS) Backdoor Account Allows Authenticated Users to Modify Votes, Jeremy Epstein |
| Indexes: | [Date] [Thread] [Top] [All Lists] |