Claimed Security Issues in Vaporware Applications
===============================-21.Nov.2001-=====
Recently, claims have been made that all MUI applications are vulnerable
to remote exploits due to a "MUI security flaw".
This statement is a gross oversimplifications of matters, and it also
puts the blame on the wrong end -- blaming the Messenger for the
Message -- so to speak. However, the impliciations are not completely
unwarranted, so I think I should try to explain why such a security hole
could possibly exist in AmigaOS applications (although not in Vaporware
apps, as I will describe later on).
There are two things playing together here:
a) APIPE: is a device which allows to start a program and read from
or write to its standard input/output stream. Unix literates will
be familiar with this, it's similiar to the popen() call as
defined by POSIX. It basically works like this:
BPTR fh = Open( "APIPE:dir", MODE_OLDFILE )
and then the APIPE: device executes the "dir" command and allows
reading it's output from "fh".
AmiTCP, for example, shipped with such a device handler; the reasoning
being is that several of the AmiTCP tools and services were ports
of existing Unix programs, and thus needed popen()-functionality. Also,
AmiTCP's inetd "simple" mode relies on this handler.
The imminent danger in implementing this as a DOS device handler, however,
is that everything needed to execute a program on the machine is
the ability to cause an application to Open a file with
a specific filename. This becomes dangerous when the filename (or parts of it)
are taken from data received from the network.
Possible examples where this vulnerability COULD exist:
1. an IRC client receives a DCC request. It takes the filename, and
does a Open() on it to tell the user whether the file already
exists, to possible show a "Resume"-kind of dialog
2. a web browser receives a file via a redirected download link, and does
the same to provide a "Resume" dialog
3. a web browser parses
tag with a file:/// URL which has an
APIPE: call included
4. a web browser parses