+ All Categories
Home > Documents > How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Date post: 14-Jan-2016
Category:
Upload: jovany-dobkin
View: 219 times
Download: 2 times
Share this document with a friend
32
How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon
Transcript
Page 1: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How Safe are

Oracle Passwords?

Quick TipSession UGF9198

Troy Ligon

Page 2: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Who is Troy?

•Over 35 years experience in the IT field

•Focused on Oracle systems since 1983 (version 3)

•IBM – Developer Robot Communications and Complier Design

•Ligon Solutions – President and CEO

•CitiBank – VP Global Database Systems

•PriceWaterhouseCoopers – Senior Principal DBA

•Nielsen – Principal Architect

•President of the SOUG in Tampa, Florida

•IOUG Collaborate Track Manager for High Availability track

Page 3: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How do I gain access to an

Oracle database?

Page 4: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Authentication Methods

Password:• Stored in the database

Externally:• O/S Authentication (OPS$)• as ‘PKI_Cert_Distinguished_Name’ (from ssl wallet)• as ‘Kerberos_Principal_Name’ (from Kerberos server)

Globally (LDAP):• Shared Global Schema in Enterprise Directory• Schema in Enterprise Directory Distinguished Name

Page 5: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Classic Password Attacks

•Guess

•Social Engineering

•Watching the keyboard (shoulder surfing, camera)

•Keylogger (software, USB, built into the keyboard)

•Network sniffer (wireshark)

•Dictionary attack (checkpwd – Red Database Security)

•Brute force attack (woraauthbf – László Tóth)

•Rainbow Table attack (ophcrack – Objectif Sécurité)

•Dictionary / Rainbow Table Hybrid attack

Page 6: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

What’s the Big Deal?

With a simple PROFILE setting,wouldn’t the account get locked due to

too many failed login attempts?

Page 7: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

What if I have access to USER$?

ORA10g:sys.dba_users.password = pre-11g version, case-insensitive hash

ORA11g:sys.user$.password = pre-11g version, case-insensitive hashsys.user$.spare4 = SHA1(pwd concat with salt) concat with salt

select password hash10g, substr(spare4, 3, 40) hash11g, substr(spare4,43,10) saltfrom sys.user$where name=&USERNAME;

Page 8: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

SHA1 – Secure Hash Algorithm

Page 9: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Of Course it’s Easy if I’m SYS!

What if I don’t have access to the database?

Page 10: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Stealth Password Cracking Vulnerability

Esteban Martinez Fayo – AppSecInc.com

Page 11: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

http://arstechnica.com/security/2012/09/oracle-database-stealth-password-cracking-vulnerability/

Page 12: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

https://threatpost.com/en_us/blogs/flaw-oracle-logon-protocol-leads-easy-password-cracking-092012

Page 13: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

https://threatpost.com/en_us/blogs/flaw-oracle-logon-protocol-leads-easy-password-cracking-092012

Page 14: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

What does this Look Like?

After the client sends its username, the server responds with the AUTH_SESSKEY and AUTH_VFR_DATA:

Page 15: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So How Would This Work?

1. Get the SALT (available through AUTH_VRF_DATA field)

2. Get the encrypted server session key (available through AUTH_SESSKEY field)

3. Brute force the AES 192-bit encrypted AUTH_SESSKEY to determine the SHA-1 password hash

4. Once you have the SALT and the SHA-1 hash value, brute force the password.

Page 16: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So How Would This Work?

1. Get the SALT (available through AUTH_VRF_DATA field)

2. Get the encrypted server session key (available through AUTH_SESSKEY field)

3. Brute force the AES 192-bit encrypted AUTH_SESSKEY to determine the SHA-1 password hash

4. Once you have the SALT and the SHA-1 hash value, brute force the password.

Flaw Leaks Unencrypted version of

this Key

Page 17: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So How Would This Work?

1. Get the SALT (available through AUTH_VRF_DATA field)

2. Get the encrypted server session key (available through AUTH_SESSKEY field)

3. Brute force the AES 192-bit encrypted AUTH_SESSKEY to determine the SHA-1 password hash

4. Once you have the SALT and the SHA-1 hash value, brute force the password.

With the SALT, you can loop thru possible passwords, generating SHA-1 hashes and comparing them to captured hash. A brute force crack of this type can discover an 8-character password

in about 5 hours.

Page 18: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So How Would This Work?

1. Get the SALT (available through AUTH_VRF_DATA field)

2. Get the encrypted server session key (available through AUTH_SESSKEY field)

3. Brute force the AES 192-bit encrypted AUTH_SESSKEY to determine the SHA-1 password hash

4. Once you have the SALT and the SHA-1 hash value, brute force the password.

Now 4. is moot, as it is the password from the brute force loop that generated a matching hash.

Page 19: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

5 Hours? Really?

A 3-GHz Pentium 4 brute forces the 26-character ASCII namespace in:

LENGTH TIME

5-character-combinations 10 seconds

6-character-combinations 5 minutes

7-character-combinations 2 hours

8-character-combinations 2.1 days

9-character-combinations 57 days

10-character-combinations 4 years

Page 20: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

5 Hours? Really?

One AMD Radeon HD7970 GPU can average 8.2 billion password trys/sec

oclHashcat-plus can utilize multiple GPUs for exponential performance improvement

Rainbow tables can utilize pre-calculated values to cut even more time

Page 21: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

5 Hours? Really?

Here’s an 8-Radeon card computer for about $12k that can brute force the entire 8-character namespace

(upper/lower/digit/symbol) in 12 hours!!!

Page 22: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Why is this so Insidious?

Wouldn’t the account get locked due to too many failed login attempts?

Page 23: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Why is this so Insideous?

Wouldn’t the account get locked due to too many failed login attempts?

No!You don’t get locked because once you

grab the AUTH_VRY_DATA and AUTH_SESSKEY, the rest is offline

activity.

Page 24: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How to Protect Against This?

Page 25: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How to Protect Against This?

Note that this is a flaw in O5LOGON protocol

O5LOGON came out with Oracle 11.1 (client and server)

Page 26: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How to Protect Against This?

Upgrade to Oracle 12c

- or –

Go back to O3LOGON protocol

Page 27: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

How to Go Back to O3LOGON?

alter system set sec_case_sensitive_logon=FALSE scope=BOTH;

orapwd file=pwdSID.ora ignorecase=y

grant sysdba to USER1;

grant sysoper to USER2;

Page 28: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So Now I’m Safe…Right?

Page 29: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

So Now I’m Safe…Right?

WRONG!!!

Page 30: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.
Page 31: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

Standing on the Shoulders of Giants

Alex KornbustPete Finnigen

David Litchfield Paul Wright

Zsombor KovácsEttienne Vorster

László TóthFerenc Spala

Page 32: How Safe are Oracle Passwords? Quick Tip Session UGF9198 Troy Ligon.

If you don't know neither the enemy nor yourself, you will succumb in every battle.

If you know yourself but not the enemy, for every victory gained you will also suffer a defeat.

But if you know the enemy and know yourself,you need not fear the result of a hundred battles.

- Sun Tzu, The Art of War

Troy Ligon [email protected]


Recommended