can easily be used to gain privileged status if it is wrongly
or carelessly administered.
In addition to proper permissions and ownership you should be aware
of potentially harmful entries that you may have inherited from the vendor
or previous administrators. For example,
many vendors used to ship systems with a
# you may wish to comment this out for security decode: |/usr/bin/guudecode
The intention is to provide an easy way for users to transfer binary
files using mail. At the sending site the user converts the binary to ASCII
(1), then mails the result to the
program takes the name of the file to create from the file it
is decoding. That information is in the
begin 777 /var/spool/mqueue/qfAA12345
Some versions of
(such as the one with SunOS) will create
files. That is, a
begin 4777 /tmp/sh
The aliases (5) file is often stored in dbm (3) or db (3) database format for faster lookups. The database files live in the same directory as the aliases file. For all versions of sendmail they are called aliases.dir and aliases.pag (but for V8 sendmail , only a single database file might exist and be called aliases.db ).
It is useless to protect the aliases (5) file if you do not protect its corresponding database files. If the database files are not protected, the attacker can create a private aliases file and then run
This causes sendmail to build ./aliases database files in the current directory. The attacker then copies those bogus database files over the unprotected system originals. The sendmail program never detects the change, because the database files appear to be newer than the aliases file.
Note also that the aliases file and its database files must be owned by root , and writable only by root . They must live in a directory, every path component of which is owned by and writable only by root .