How To Hack Database
How To Hack Database
Overview
Introduction Why database security? How databases are hacked? Oracle Database Server attacks MS SQL Server attacks How to protect against attacks? Conclusions References
Introduction
By one estimate, 53 million people have had data about themselves exposed over the past 13 months. (InformationWeek, 03/20/2006)
This is old news, right now the number is > 100 million !!!
Data theft is becoming a major threat. Criminals have identified where the gold is. In the last year many databases from fortune 500 companies were compromised. As we will see compromising databases is not big deal if they haven't been properly secured.
Introduction
Introduction
Want to be more scared? Chronology of Data Breaches
http://www.privacyrights.org/ar/ChronDataBreaches.ht m
Introduction
How much personal data worth?
If your databases are hacked then your company can run out of business or you can lose millions.
On 2007 there are still > 50 unpatched vulnerabilities on Oracle Database Server
No matter if your server is up to date with patches, it still can be easily hacked.
If the OSs and the networks are properly secured, databases still could be:
Misconfigured. Have weak passwords. Vulnerable to known/unknown vulnerabilities. etc.
Exploiting misconfigurations
Some database servers are open by default
Lots of functionality enabled and sometimes insecurely configured.
Installing a rootkit/backdoor
Actions and database objects can be hidden. Designed to steal data and send it to attacker and/or to give the attacker stealth and unrestricted access at any given time.
A rootkit can be used to hide the backdoor from the DBA. The backdoor is built in PL/SQL or Java
Uses built-in network functionality to open a connection to the attackers machine. Reads the connection and execute the commands the attacker sends. Write to the opened connection the output of the commands.
Rootkit addition
Using a backdoo r or expl oit Export_a nd_zip.s Create a parameter file ql for exp utility: full=y userid="/ as sysdba" file=export.dmp Run the exp utility Compress exported file with a Zip utility
Using a backdoo r or expl oit send_zip .sql Send exported file to the attacker machine using Java P/TP C T g n i s U p export.zi
Demo.
Demo
We can use SQL Server credentials to connect back to SQL Server as sysadmin. No need of elevated privileges.
b) Client sends challenge (c) Server 1) Client forces to connect 2) Client connects
3) Client sends challenge (c) Server 4) Client sends response (r) Server c) Client sends response (r) Server d) Client authenticates Server
Demo.
Demo.
At file level
File and File System encryption Backups, Data files, etc.
At database level
Column level encryption. Databases encryption API. Third party solutions.
Conclusions
As we just saw Data Theft threat is real and database security is very important. One simple mistake can lead to database compromise. Perimeter defense is not enough. You must protect your databases and you have to invest on database protection. If you don't protect your databases sooner or later you will get hacked
This means lot of money loses. In worst case running out of business.
References
A Chronology of Data Breaches Reported Since the ChoicePoint Incident
http://www.privacyrights.org/ar/ChronDataBreaches.htm
References
Security & Privacy - Made Simpler
http://bbb.org/securityandprivacy/SecurityPrivacyMadeSimpl er.pdf
NTLM unsafe
http://www.isecpartners.com/documents/NTLM_Unsafe.pdf
Fin