Home > Security News > New SQL injection technique threatens Oracle databases
Security News:
EMAIL THIS

New SQL injection technique threatens Oracle databases

By Dennis Fisher, Executive Editor
24 Apr 2008 | SearchSecurity.com

Security Wire Daily News
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

Database security expert David Litchfield has devised a new method of exploiting various PL/SQL procedures that do not take any input. The technique, which he describes as lateral SQL injection, can be used to compromise Oracle databases remotely.

We exploit the inject point to execute a facilitator function, which allows us to run arbitrary SQL, where we can then use this technique.
David Litchfield,
managing director, NGS Software Inc.

The attack exploits some common data types, including DATE and NUMBER, which do not take any input from the user and so are not normally considered to be exploitable. But, as Litchfield writes in his new paper on the lateral injection attack , using a bit of creative coding and some knowledge of the way the Oracle database management system works, an attacker can manipulate some common functions.

Litchfield, one of the founders of NGS Software Inc., of Surrey, England, says that the problem may not turn out to be easily exploitable in the wild, but that in specific cases it can be used to pass arbitrary SQL commands to the database.

PL/SQL is Oracle Corp.'s proprietary extension to SQL (structured query language).

" In conclusion, even those functions and procedures that don't take user input can be exploited if SYSDATE is used. The lesson here is always, always validate and prevent this type of vulnerability getting into your code. The second lesson is that no longer should DATE or NUMBER data types be considered as safe and not useful as injection vectors: as this paper has proved, they are," he writes.

The attack works like this: Using the SYSDATE function, an attacker can use the ALTER SESSION privilege to fool the SQL compiler into accepting arbitrary SQL data as the input for the DATE data type. Typically, the DATE_PROC procedure uses the variable V_DATE to set the date after it calls the SYSDATE function. However, by altering the session and inserting a SQL command, the attacker can force the database to execute his command.

And an attacker need not have local access to the database to execute this attack.

Database security:
Survey finds thousands of database servers open to attack: Security expert David Litchfield found hundreds of thousands of Microsoft SQL Server and Oracle database servers available on the Internet and not protected by a firewall.

New database forensics tool could aid data breach cases: Database security researcher, David Litchfield of UK-based NGS Software will release a free Forensic Examiners Database Scalpel, he says could aid data breach investigations.

" This can be done remotely, for example through a SQL injection flaw via a Web application, but not directly," Litchfield said in an email interview. "First off we exploit the inject point to execute a facilitator function, which allows us to run arbitrary SQL, where we can then use this technique."

One of the interesting points in Litchfield's paper is the fact that data types such as DATE and NUMBER are typically considered to be "safe," meaning that they are not thought to be exploitable. More and more attacks of this kind have popped up in recent months, as researchers have begun looking more deeply into popular applications, in some cases finding serious new attack vectors.

Last summer, researchers at Watchfire Inc., now part of IBM, discovered a way of exploiting dangling pointers , a common programming error that had been though to be useless for attacks. And just this month, Mark Dowd, a researcher in IBM's ISS unit, published a paper that details a method for exploiting NULL pointer dereferences .

For his part, Litchfield produced his new method not through countless hours of mind-numbing work, but after watching TV.

"Whilst watching an episode of 'Bones,' something happened in it that made me think of not accepting something believed to be true, i.e., in this case that it's not possible to SQL inject via DATE or NUMBER data types. So after sitting down for a bit and giving it some thought I came up with the techniques presented in the paper," he said.



Tags: Database Security ManagementEmerging Information Security ThreatsVIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Database Security Management
Basic Database Security: Step by Step
Database activity monitoring lacks security lift
Information security book excerpts and reviews
IBM to acquire database security firm Guardium
What is the best database patch management process?
Is credit card tokenization a better option than encryption?
Will a database anonymization implementation succeed?
Unpatched vulnerability discovered in Microsoft SQL Server
SQL injection continues to trouble firms, lead to breaches
Oracle issues quarterly patches, fixes database flaws
Database Security Management Research

Emerging Information Security Threats
Leverage Google Attacks to Improve Cybersecurity
SCADA system, critical infrastructure security lacking, survey finds
Preparing for future security threats, evolving malware
Facebook attacks prompt investments in social networking security
Information security podcasts: 2009 archive
Hathaway calls for international cybercrime task force
Active PDF attacks target Reader, Acrobat zero-day vulnerability
Sites hit with massive automated SQL injection attack
Cybercriminals invest in social networking attacks
Best practices for (small) botnets

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
data encryption/decryption IC  (SearchSecurity.com)
International Data Encryption Algorithm  (SearchSecurity.com)
link encryption  (SearchSecurity.com)
MD2  (SearchSecurity.com)
MD4  (SearchSecurity.com)
MD5  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



More Tips to Secure Your Network
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts