Welcome Guest. | Log In | Register | Membership Benefits

App And Database Security: Two Halves Of A Whole

Limit application privileges to the database and sanitize input to improve data security

Dec 28, 2011 | 02:54 PM | 

By Ericka Chickowski, Contributing Editor
Dark Reading


Data security, application security, and database security are like pieces of a puzzle -- different yet still dependent on one another to reach true completion. When they fail together, attack methods such as SQL injection have a far greater impact on an organization. In order to limit the scope of attacks, developers and DBAs need to acknowledge their roles in the process and work together to ensure that Web applications aren't exposing sensitive databases.

This starts by understanding how much the current Web app phenomenon has opened up once-closed databases.

"The days of static content Web sites are a distant memory, and every Web site or Web-based application today is back-ended by some kind of database, whether it’s your bank, your cloud CRM service, your mobile device's app-store, your favorite online shopping site, or your photo collection and blog," says Joe Levy, CTO of Solera Networks. "The front-end application and the back-end database are inextricably bound in our current model, and one simply would not exist without the other."

According to Levy, one of the biggest weaknesses in this model is when the pathways to data aren't properly controlled.

"We expect that the Web application is the sole interface for human interaction with the data, and that an API is the sole interface for machine interaction with the data," he says. "If this is not the case, then there might be insufficient controls of the pathways to the data, and that would be one very basic potential vulnerability. Even if access methods are well-defined, there is still a virtually unlimited number of ways that applications can fail to properly defend their databases." The fact is that the rule of least privilege shouldn't be instituted for only end users. It should also be applied to the applications themselves, says Chris Eng, vice president of research for Veracode.

"All too often, applications are granted excessive privilege to databases that they don't need to operate," he says, explaining that the risks are amplified when multiple applications are granted access to databases used by other applications they don't necessarily need to be tied to. Those types of scenarios give patiently methodical hackers the opportunity to worm their way through a wider range of systems and data.

[What's the best way to provision database users and control access to sensitive data? See Analyzing Data To Pinpoint Rogue Insiders.]

Eng says that developers and DBAs have to come up with a better system for tying the applications into databases.

"It makes sense to chunk it out into better granularity where this application may have only read-only rights or may only have access to this certain table," he says. "People don't do that now because they figure it is just easier to grant as much access as possible so you don't impede the development cycle or application functionality."

If they are given pushback, DBAs have the power to take the driver's seat in this interaction by not giving carte blanche to the developers.

"The DBAs can just simply not allow so much access to be granted," Eng says.

In order to prevent the long arm of hackers from taking advantage out of inevitable Web application vulnerabilities, DBAs also have the power to institute other mitigating controls.

"Until we achieve the lofty goal of fully homomorphic encryption -- where operations can be performed on encrypted data without having to actually decrypt, and thus expose, the data -- our next best bet is to move toward much broader adoption of database encryption, masking, or tokenization. Although this still often requires the data to be decrypted, it provides some defense against the wholesale theft of database contents," says Levy, who adds that, "continuous monitoring of all application-layer and database-layer communications will help to quickly identify and resolve problems, and to accurately determine the scope of any security event."

But as Eng puts it, the onus is not just on the DBAs.

"Developers definitely need to shoulder their share of the responsibility, too," he says.

One important way they can do that is to do a better job of scrubbing user input so they can prevent hackers from having their way with the database information through attacks like SQL injection.

"It is simply unforgivable at this point for any application to not be providing adequate input sanitization," Levy says. "That this is still one of the main causes of breaches a decade after the problem was well-understood is insanity."

Levy recommends organizations start using widely available pen-testing applications. And though Web application firewalls are a good way to mitigate risks, he warns developers to stop using them as a crutch to excuse them from not embedding proper validations in their applications.

"Since waterboarding is neither torture nor unconstitutional, it should be considered as treatment for developers who do not properly sanitize inputs," he says.

Have a comment on this story? Please click "Discuss" below. If you'd like to contact Dark Reading's editors directly, send us a message.



Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dark Reading encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dark Reading moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing/SPAM. Dark Reading further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
Subscribe to RSS



Database Security Reports

report Securing The Data Warehouse
Many enterprises are building data warehouses to centralize the ever-increasing information flowing through their organizations into useful repositories. This makes good business sense, but it opens up a slew of concerns from a security standpoint. IT professionals can apply many of the same security best practices used with databases, but there are new lessons to be learned as well.

report Defend Your Data From Malicious Insiders
The biggest threat to your company?s most sensitive data may be the employee who has legitimate access to corporate databases but less-than-legitimate intentions. And while the incidence of insider data breaches has decreased, external attacks often imitate them--and do serious damage. Follow our advice to mitigate the risk.

report Ensuring Secure Database Access
Role-based access control based on least user privilege is one of the most effective ways to prevent the compromise of corporate data. But proper provisioning is a growing challenging, due to the proliferation of "big data," NoSQLdatabases, and cloud-based data storage.

Other reports from the Database Security Tech Center:

Related Content

Establishing a Strategy for Database Security is No Longer Optional
As databases continue to grow in size, complexity and importance, enterprises struggle to identify the most appropriate controls regarding their use and misuse. The report identifies best practices, including: Implementing database activity monitoring to mitigate the high levels of risk from database vulnerabilities, and address audit findings in areas such as database segregation of duties and change management; using data security measures, such as data masking and data encryption; and monitoring privileged-user access and access to critical data.

Database Activity Monitoring Is Evolving Into Database Audit and Protection
In this report, Gartner writes that "Database audit and protection (DAP) represents an evolutionary advance in database activity monitoring tools." DAP suites provide comprehensive, cross-platform support in heterogeneous database environments to protect sensitive data from inappropriate use. Organizations are increasingly concerned with optimizing database security and mitigating risks associated with database vulnerabilities.

Protecting Against Database Attacks and Insider Threats: Top 5 Scenarios
Data security presents a multi-dimensional challenge in today's complex IT environment. Multiple access paths and permission levels have resulted in a broad array of security threats and vulnerabilities. We invite you to read this new eBook: "Protecting against database attacks and insider threats" to learn the top five scenarios and essential best practices for preventing database attacks and insider threats.

Demo: Distributed Database Security with Real-time Monitoring and Audit Protection
Organizations across the globe continue to experience compromised data caused by malicious attacks, web application vulnerabilities or unauthorized changes. View this demo and learn how IBM InfoSphere Guardium? database activity monitoring can help protect your sensitive data in distributed DBMS environments with a holistic approach to data security and compliance.

Look Beyond Native Database Auditing To Improve Security, Audit Visibility, And Real-Time Protection
Today's attacks on enterprise databases are more sophisticated than ever, and they occur so fast that it's often difficult to stop them in real time. Despite significant efforts to protect enterprise databases, the number of records breached has grown each year - due to all types of internal and external attacks and violations of corporate policy.




Featured Webcasts
Featured Whitepapers
Featured Reports