Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Perimeter

12/13/2010
08:48 PM
Adrian Lane
Adrian Lane
Commentary
50%
50%

Gawker Goof

Sometimes it helps knowing what not to do with database security to clarify why you need database security -- and sometimes somebody else goofs up real bad and sheds light on the little security details you need to get right

Oracle came out with Database Security Worst Practices this week, a list of seven things you should not do. It's a fairly good list if you are an Oracle customer, covering the basic preventative security settings you should check before any database server is deployed into production. But I have a couple that trumps them all, especially if your databases support Web applications:

Don't store passwords in clear text!

Don't encrypt passwords if you leave the encryption keys unsecured!

Apparently that is just what the developers at Gawker did. If you have a user account on Gawker, Gizmodo, Jalopnik, Jezebel, Kotaku, Lifehacker, Deadspin, io9, or Fleshbot, Gawker is telling you that your user credentials have been compromised. For the user credentials to have been compromised means they were stored in clear text, or the sites were using encryption and left the encryption keys somewhere easy to get. As their websites claim, they were encrypted; I'll give them the benefit of the doubt. But it means the hackers have access to everything the users did, and possibly some of the administrative accounts as well.

Most public-facing Web applications do not encrypt passwords. They use what is called a hash function. Both completely alter the original value so it's pretty much impossible to guess the password. The difference between the two is that encryption can be reversed back into the original value by using a secret encryption key. The security of the password is only as strong as the security of the key. A hash function permanently obfuscates the password. This is done so if someone should manage to break into your database, he does not automatically obtain all user passwords; rather he gets the hashed value that cannot be used as a password. When a user logs into the system, the password he sends to the database is also hashed; if the new hashed value matches the hashed value stored for that user account, that person is logged into the database.

I am going to bet a lot of you already knew that. And you know that every major relational database platform stores passwords for users of that database as a hashed value in a secured table. And most RDBMSs offer a hash function as a stored procedure call as well, just in case you maintain your own user and password tables.

But this bears explaining; clearly some developers out there apparently did not get the memo that hackers hack databases. And that secret encryption keys need to be kept secret. If they had or used hashing, then hackers getting the user name -- and even the email credentials -- the accounts would not have been compromised.

This is a colossal failure that would place No. 3 on my list of things not to do with database security. No. 2 would be clear text passwords. No. 1 would be leaving the administrator password at the default setting. Let's hope Gawker at least got that right.

Adrian Lane is an analyst/CTO with Securosis LLC, an independent security consulting practice. Special to Dark Reading.. Adrian Lane is a Security Strategist and brings over 25 years of industry experience to the Securosis team, much of it at the executive level. Adrian specializes in database security, data security, and secure software development. With experience at Ingres, Oracle, and ... View Full Bio

 

Recommended Reading:

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 7/1/2020
Ripple20 Threatens Increasingly Connected Medical Devices
Kelly Sheridan, Staff Editor, Dark Reading,  6/30/2020
DDoS Attacks Jump 542% from Q4 2019 to Q1 2020
Dark Reading Staff 6/30/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
The Threat from the Internet--and What Your Organization Can Do About It
This report describes some of the latest attacks and threats emanating from the Internet, as well as advice and tips on how your organization can mitigate those threats before they affect your business. Download it today!
Flash Poll
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-15478
PUBLISHED: 2020-07-01
The Journal theme before 3.1.0 for OpenCart allows exposure of sensitive data via SQL errors.
CVE-2020-6261
PUBLISHED: 2020-07-01
SAP Solution Manager (Trace Analysis), version 7.20, allows an attacker to perform a log injection into the trace file, due to Incomplete XML Validation. The readability of the trace file is impaired.
CVE-2020-15471
PUBLISHED: 2020-07-01
In nDPI through 3.2, the packet parsing code is vulnerable to a heap-based buffer over-read in ndpi_parse_packet_line_info in lib/ndpi_main.c.
CVE-2020-15472
PUBLISHED: 2020-07-01
In nDPI through 3.2, the H.323 dissector is vulnerable to a heap-based buffer over-read in ndpi_search_h323 in lib/protocols/h323.c, as demonstrated by a payload packet length that is too short.
CVE-2020-15473
PUBLISHED: 2020-07-01
In nDPI through 3.2, the OpenVPN dissector is vulnerable to a heap-based buffer over-read in ndpi_search_openvpn in lib/protocols/openvpn.c.