what you don't know can hurt you
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:

April 2024

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