lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Mar 2005 05:04:26 +0100
From: Han Boetes <hanOUTOFOFFICETRAP@...ncomputer.nl>
To: bugtraq@...urityfocus.com
Subject: Re: 7a69Adv#22 - UNIX unzip keep setuid and setgid files


John Simpson wrote:
> this only works if the user un-zipping the file is already root.
> otherwise it creates an "sh" binary which is setuid to the user
> who unzipped the file. this kind of "exploit" is only useful if
> you can somehow trick root into unzipping the file- it cannot be
> used to gain root on a machine where you don't already have it.

If your homedir is worldreadable, which is pretty common practice
the other user can run the shell and get your useraccount.


> although i will agree that having the unzip program warn the
> user when creating a setuid or setgid file is a good idea in
> general.

Lets take a look at how tar does it: it uses the p flag.

 -p   Preserve user and group ID as well as file mode regardless
      of the current umask(2).  The setuid and setgid bits are
      only preserved if the user is the superuser.  Only meaning-
      ful in conjunction with the -x flag.



# Han


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ