procmail
[Top] [All Lists]

Re: More quoting issues affecting MIME header exploits

1998-08-01 13:35:27
On 1 August 1998, John D. Hardin <jhardin(_at_)wolfenet(_dot_)com> wrote:
On Fri, 31 Jul 1998, John D. Hardin wrote:

  Content-Type: ... name="AAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAA
    ...
    AAAAAAAAAAAAAAAAAAAA
    AAexploit-code-starts-here"

would be syntactically valid but would bypass my filters. I have
modified html-trap.procmail to append a close quote on the first
line, but it does NOT clean up the remaining lines.

Okay, html-trap.procmail will now clean up the extra lines in the
above example.

I couldn't find any explicit list of acceptable MIME headers in
reading through RFC2045, just mention that headers beginning with
"Content-" have meaning to MIME. Therefore I decided to prepend
"X-Comment:" to the continuation lines to clean them up. If anyone
knows that this won't work, drop me a line right away.
[...]

    For quoted strings you have to close the quotes first, otherwise
some mailers might still shot themselves in the foot looking for the
matching end quotes.  For the same reason, you should also take care of
terminating quoted-printable stuff (although this one will probably be a
PITA).

    Regards,

    Liviu

-- 
Dr. Liviu Daia                   e-mail:   daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics         web page: http://www.imar.ro/~daia
of the Romanian Academy          PGP key:  finger 
daia(_at_)stoilow(_dot_)imar(_dot_)ro