Oracle Intelligent Agent Vulnerability
BID:585
Info
Oracle Intelligent Agent Vulnerability
| Bugtraq ID: | 585 |
| Class: | Input Validation Error |
| CVE: | |
| Remote: | No |
| Local: | Yes |
| Published: | Aug 16 1999 12:00AM |
| Updated: | Aug 16 1999 12:00AM |
| Credit: | This vulnerability was posted to the Bugtraq mailing list by Gilles PARC <[email protected]> on Mon, 16 Aug 1999. This vulnerability was rediscovered by Dan Ingevaldson <[email protected]> of the ISS X-Team on Aug 23 1999 and by Brock Tellier <btellier@us |
| Vulnerable: |
Oracle Oracle8 8.1.5 Oracle Oracle8 8.0.5 .1 Oracle Oracle8 8.0.5 Oracle Oracle8 8.0.4 Oracle Oracle8 8.0.3 Oracle Oracle7 7.3.4 Oracle Oracle7 7.3.3 |
| Not Vulnerable: |
Oracle Oracle8 8.1.6 Oracle Oracle8 8.0.6 |
Discussion
Oracle Intelligent Agent Vulnerability
A vulnerability in the Oracle Intelligent Agent allows local malicious users to execute arbitrary commands and to create world writable files as the root user.
The problem lies in the dbsnmp program located in $ORACLE_HOME/bin . This setuid root and setgid dba program trusts the environment variable ORACLE_HOME without verifying its contents. This vulnerability can be exploited in a number of ways.
The dbsnmp program calls a tcl script ( nmiconf.tcl ) located by default in $ORACLE_HOME/network/agent/config. A malicious user can craft his own nmiconf.tcl script and fool the dbsnmp program to execute as root.
When run without ORACLE_HOME being set, dbsnmp will dump two log files out into the current working directory: dbsnmpc and dbsnmpt . If these files do not exist, dbsnmp will attempt to create them mode 666 and dump around 400 bytes of uncontrollable output into them. If the files do exist, dbsnmp will append these 400 bytes but not change the permissions. Thus a malicious user can create world writable files in the system that do not exist (e.g. /.rhosts).
A vulnerability in the Oracle Intelligent Agent allows local malicious users to execute arbitrary commands and to create world writable files as the root user.
The problem lies in the dbsnmp program located in $ORACLE_HOME/bin . This setuid root and setgid dba program trusts the environment variable ORACLE_HOME without verifying its contents. This vulnerability can be exploited in a number of ways.
The dbsnmp program calls a tcl script ( nmiconf.tcl ) located by default in $ORACLE_HOME/network/agent/config. A malicious user can craft his own nmiconf.tcl script and fool the dbsnmp program to execute as root.
When run without ORACLE_HOME being set, dbsnmp will dump two log files out into the current working directory: dbsnmpc and dbsnmpt . If these files do not exist, dbsnmp will attempt to create them mode 666 and dump around 400 bytes of uncontrollable output into them. If the files do exist, dbsnmp will append these 400 bytes but not change the permissions. Thus a malicious user can create world writable files in the system that do not exist (e.g. /.rhosts).
Exploit / POC
Oracle Intelligent Agent Vulnerability
For oracle.sh:
oracle8% uname -a; id
SunOS oracle8 5.6 Generic_105181-05 sun4u sparc
SUNW,Ultra-5_10
uid=102(btellier) gid=10(staff)
oracle8% /tmp/oracle.sh
couldn't read file "/config/nmiconf.tcl": no such file or directory
Failed to initialize nl component,error=462
Failed to initialize nl component,error=462
#
For oracle.sh:
oracle8% uname -a; id
SunOS oracle8 5.6 Generic_105181-05 sun4u sparc
SUNW,Ultra-5_10
uid=102(btellier) gid=10(staff)
oracle8% /tmp/oracle.sh
couldn't read file "/config/nmiconf.tcl": no such file or directory
Failed to initialize nl component,error=462
Failed to initialize nl component,error=462
#
Solution / Fix
Oracle Intelligent Agent Vulnerability
Solution:
Oracle provided fixed at:
http://technet.oracle.com/misc/agent/section.htm
Oracle has also provided the following information to answer any questions concerning these vulnerabilities. The FAQ is available in HTML format at:
http://technet.oracle.com/misc/agent/faq.htm
Solution:
Oracle provided fixed at:
http://technet.oracle.com/misc/agent/section.htm
Oracle has also provided the following information to answer any questions concerning these vulnerabilities. The FAQ is available in HTML format at:
http://technet.oracle.com/misc/agent/faq.htm