the last unbiased stronghold

SECOBJADV-2008-02.txt

SECOBJADV-2008-02.txt
Posted Jul 26, 2008
Authored by Derek Callaway | Site security-objectives.com

Security Objectives Advisory - The Cygwin installation and update process can be subverted to a lack of checksum verification. Cygwin setup.exe version 2.573.2.2 is affected.

tags | advisory
MD5 | 0d95149f3d415d7bc0ba049956304dd5

SECOBJADV-2008-02.txt

Change Mirror Download
======================================================================
= Security Objectives Advisory (SECOBJADV-2008-02) =
======================================================================

Cygwin Installation and Update Process can be Subverted Vulnerability

http://www.security-objectives.com/advisories/SECOBJADV-2008-02.txt

AFFECTED: Cygwin setup.exe 2.573.2.2

PLATFORM: Intel / Windows

CLASSIFICATION: Insufficient Verification of Data Authenticity (CWE-345)

RESEARCHER: Derek Callaway

IMPACT: Client-side code execution

SEVERITY: Medium

DIFFICULTY: Moderate

REFERENCES: CVE-2008-3323, RedHat Bugzilla Bug 449929


BACKGROUND

Cygwin is a Linux-like environment for Windows. It consists of two parts:

1. A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
substantial Linux API functionality.

2. A collection of tools which provide Linux look and feel.

SUMMARY

Cygwin is a Linux-like environment for Microsoft Windows copyrighted by
Red Hat, Inc. Tarball software packages are installed and updated via
setup.exe. This program downloads a package list and packages from
mirrors over plaintext HTTP or FTP. The package list contains MD5
checksums for verifying package integrity. If a rogue server answers the
HTTP request responsible for package updates and responds with a
modified MD5 string setup.exe will download and install a malicious package.

ANALYSIS

To successfully exploit this vulnerability an attacker must be able to
somehow position themself such that they can impersonate a Cygwin mirror.
As a proof-of-concept the local hosts file was modified but an attack
that occurs in the wild can be accomplished through DNS cache
poisoning, ARP redirection, TCP hijacking, impersonation of a Wi-Fi
Access Point, etc. The attacker also would have configured a rogue web
server to push out package code of their choosing. The success of
attacks that utilize the DNS cache poisoning approach has recently been
compounded by Kaminsky's birthday paradox technique (CVE-2008-1447.)

For testing purposes, gzip was used as the malicious package although
any and all packages can be trojanned (including base-files.) gzip was
chosen for testing purposes because it is so common. A real attacker
would probably target more of a lynchpin package like bash. The version,
time, size, and MD5 sum of the gzip entry in the setup.ini file was
modified for the rogue Cygwin server. The location of the altered gzip
package was /sourceware/cygwin/release/gzip/gzip-3.1.33-7.tar.bz2.

When setup.exe is executed it will automatically download the modified
package from the rogue server. /usr/bin/gzip was replaced by /usr/bin/ls
during Security Objectives' testing. In a real attack scenario bash
could be trojanned or a complete rootkit could be installed. The user is
likely to not even notice the malicious package being setup as it is
auto-selected for installation.

WORKAROUND

Refrain from using Cygwin setup.exe versions prior to 2.573.2.3.

VENDOR RESPONSE

Cygwin Setup.exe version 2.573.2.3 addresses this vulnerability.

http://cygwin.com/setup/snapshots/setup-2.573.2.3.exe

DISCLOSURE TIMELINE

20-May-2008 Discovery of Vulnerability
22-May-2008 Developed Proof-of-Concept
25-May-2008 Reported to Vendor
04-Jun-2008 RedHat Bugzilla ID Opened
19-Jun-2008 Vendor Supplied Patched Program for Testing
21-Jun-2008 Fix Applied to Bug in Original Patch
22-Jul-2008 New Setup Program Tested and Verified
25-Jul-2008 Published Advisory

ABOUT SECURITY OBJECTIVES

Security Objectives is a security centric consultancy and software development
corporation which operates in the area of application assurance software.
Security Objectives employs methods that are centered on software
comprehension, therefore a more in-depth contextual understanding of the
application is developed.

http://security-objectives.com/

LEGAL

Permission is granted for electronic distribution of this advisory.
It may not be edited without the written consent of Security Objectives.

The information contained in this advisory is believed to be accurate based on
currently available information and is provided "as is" without warranty of
any kind, either expressed or implied, including, but not limited to, the
implied warranties of merchantability and fitness for a particular purpose.
The entire risk as to the quality and performance of the information is with
you.

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close