exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

truecrypt-dos.txt

truecrypt-dos.txt
Posted Mar 29, 2007
Authored by Tim Rees

It seems to be possible to perform various denial of service attacks on a Linux computer running TrueCrypt version 4.3 in setuid root mode, or possibly introduce evil binaries into normally trusted locations.

tags | advisory, denial of service, root
systems | linux
SHA-256 | e4f26c79524c8995fb8c937ec1f23cd1a80777c9b001146d187675f11456ae89

truecrypt-dos.txt

Change Mirror Download
TrueCrypt 4.3 for Linux from http://www.truecrypt.org/

It seems to be possible to perform various denial of service attacks on a Linux
computer running TrueCrypt in set-uid root mode, or possible introduce evil
binaries into normally trusted locations. I tested this on the latest
version, 4.3, which corrected another vulnerability, but it still seems
insecure.

The following command mounts a file-based container over /usr/bin. This can be
done by a non-root user provided TrueCrypt is in set-uid mode, and the file
container does not have to contain any files:

tim# truecrypt -u myvolume.tc /usr/bin

This could result in system binaries becoming inaccessible, or if the user
has copied his own binaries into the file container, they could potentially
replace legitimate system binaries with malicious ones, e.g. a /usr/bin/sudo
that does something nasty.

To do this I did the following (as non-root).

# truecrypt -c # create a FAT32 volume called test.tc
# truecrypt -u test.tc tmpdir # mount in a tmp dir in my home dir
# cd tmpdir
# cp ../badbinary ./sudo # copy in an evil binary from somewhere
# chmod +x sudo
# truecrypt -d # unmount the volume
# truecrypt -u test.tc /usr/bin # mount same volume over /usr/bin

All other system binaries (e.g. screen etc.) are now inaccessible, but if a
user (or root) runs sudo (or whatever the user names it) in the meantime before
someone realises something is wrong, the malicious binary will be executed.

Because the umount and truecrypt binaries reside in /usr/bin, if they have
been "masked" by an empty container mounted on /usr/bin, it may not be possible
to recover the system without a reboot.

It also seems possible to arbitrarily deny users local (and possibly remote)
access to the system, for example through the following command:

tim# truecrypt -u myvolume.tc /home/sally

Even if the user does not have write access to /home/sally, the unrestricted
set-uid operation means that "tim" has now "mounted over" sally's home
directory. If sally is currently logged in, her files will appear to
"disappear" because they have been mounted over. If user sally tries to log
in, in my tests she cannot then log in graphically because some of her
configuration files have become inaccessible. User sally has been denied
access to the system by a non-root user.

I believe there also may be another vulnerability here. If user sally could
log in (e.g. through a terminal), any files she writes to "/home/sally" will
actually be re-directed to the volume mounted by user tim. If the file-hosted
volume is FAT32, user tim could potentially "steal" files as they are written
not to sally's regular home directory but to the FAT32 volume. I have been
unable to test this successfully though since it seems user sally cannot log in
after this denial of service is performed.

There seems to be other ways to perform a DoS too. Mounting a volume (even if
empty) over /tmp affects operation of the system (users cannot log in through
X), and mounting over /var/log could be done to subvert system log messages to
a FAT32 volume that can be read by any user.

A "workaround" is to remove the set-uid bit from /usr/bin/truecrypt, but then
only root can mount TrueCrypt volumes. It seems there needs to be much
tigher control on where non-root users can mount their volumes to.

-- Tim Rees
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close