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

iDEFENSE Security Advisory 2005-02-28.2

iDEFENSE Security Advisory 2005-02-28.2
Posted Feb 28, 2005
Authored by iDefense Labs | Site idefense.com

iDEFENSE Security Advisory 02.28.05 - Local exploitation of a privileged file descriptor leak in KPPP can allow attackers to hijack a system's domain name resolution function. The vulnerability specifically exists due to kppp's failure to properly close privileged file descriptors.

tags | advisory, local
advisories | CVE-2005-0205
SHA-256 | 1e98ce8b6f3a457b18bb7affeffb9feeb347d0f671f15de5837566681204732d

iDEFENSE Security Advisory 2005-02-28.2

Change Mirror Download
KPPP Privileged File Descriptor Leak Vulnerability

iDEFENSE Security Advisory 02.28.05
www.idefense.com/application/poi/display?id=208&type=vulnerabilities
February 28, 2005

I. BACKGROUND

KPPP is a dialer and front end for pppd. It allows for interactive
script generation and network setup. More information is available at:

http://docs.kde.org/en/3.3/kdenetwork/kppp/

II. DESCRIPTION

Local exploitation of a privileged file descriptor leak in KPPP can
allow attackers to hijack a system's domain name resolution function.

The vulnerability specifically exists due to kppp's failure to properly
close privileged file descriptors. Typically, KPPP is installed setuid
root and uses privilege separation to allow only certain functions of
the PPP dialer to execute with elevated privileges. Communication
between the privileged portion and non-privileged portion of kppp is
done over a domain socket which does not properly get closed.

A fix for a similar vulnerability was introduced to the kppp code base
in 1998 as can be seen below:

// close file descriptors
for (int fd = 3; fd < 20; fd++)
close(fd);

This fix may be easily bypassed if an attacker opens 17 file descriptors
before executing kppp. The loop will execute, closing the previously
opened file descriptors and leave the remaining privileged file
descriptor used to talk to the privileged component of kppp open for
attackers. KPPP may be abused to gain read and write access to
/etc/hosts and /etc/resolv.conf, thus giving attackers complete control
over a system's domain resolution capabilities.

III. ANALYSIS

Exploitation allows local attackers to gain control over a system's
domain name resolution function. Exploitation is trivial and allows an
attacker to write to the two files typically providing the configuration
for domain name resolution. Modifications of /etc/resolv.conf will allow
the attacker to specify a malicious domain server which may return
arbitrary responses to domain name lookups. Modifications to /etc/hosts
will cause hostname resolution redirection without the need for an
external domain server. This class of attack can be used to aid in
phishing and social engineering attempts.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in KPPP
2.1.2. The vendor has confirmed that KPPP as included in KDE 3.1.5 and
prior are affected. KDE 3.2.x and newer are not affected.

Note that some Linux distributions which come with KPPP, such as Red
Hat Linux, use a wrapper for executing X11 applications that require
root privileges. This wrapper safely closes all file descriptors in the

executed application.

V. WORKAROUND

As a workaround, temporarily remove the setuid bit from KPPP and
manually gain root privileges before executing KPPP:

chmod -s /usr/sbin/kppp

VI. VENDOR RESPONSE

A vendor advisory for this issue is available at:

http://www.kde.org/info/security/advisory-20050228-1.txt

A patch for KDE 3.1 is available from

ftp://ftp.kde.org/pub/kde/security_patches :

0e999df54963edd5f565b6d541f408d9 post-3.1.5-kdenetwork.diff

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
names CAN-2005-0205 to these issues. This is a candidate for inclusion
in the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

02/09/2005 Initial vendor notification
02/09/2005 Initial vendor response
02/28/2005 Coordinated public disclosure

IX. CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.idefense.com

X. LEGAL NOTICES

Copyright (c) 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    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