Original URL: http://www.theregister.co.uk/2008/04/28/lateral_sql_injection/
Database security expert David Litchfield has published details of a new type of database attack technique. Lateral SQL injection creates a means for hackers to access database data or inject hostile code onto vulnerable systems.
Exploitation is difficult and only possible in limited circumstances, Litchfield notes. Nonetheless, the discovery of the approach - a variant on earlier attack methods - means that database admins can no longer consider DATE or NUMBER data types safe from attack. Lateral SQL injection is a variant of SQL injection attacks, one of the most common methods for attacking database systems.
Litchfield first outlined the new approach during a presentation at the Black Hat security conference in Washington in late February. He published details of the approach in a paper (pdf) (http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf) last week.
SQL injection attacks involve attempts by hackers to trick database servers into running SQL commands, typically after crackers use vulnerabilities to inject character strings onto databases. Lateral SQL injections are a variant of the theme that use other forms of data - DATE and NUMBER data types - to much the same effect. The new attack relates to the Procedural Language/SQL programming language used by Oracle developers, and involves the possible development of exploits that involve hostile DATE or even NUMBER data types instead of user input, the fodder for conventional SQL injection attacks.
"In the past this has not been possible but as this paper will demonstrate, with a little bit of trickery, you can in the Oracle RDBMS [Relational database management system]," Litchfield explains, adding that the attack approach would probably only work in limited cases. "Whether this becomes 'exploitable' in the 'normal' sense, I doubt. But in very specific and limited scenarios there may be scope for abuse, for example in cursor snarfing attacks [pdf] (http://www.databasesecurity.com/dbsec/cursor-snarfing.pdf)," he adds.
A noted database security expert, Litchfield is perhaps best known for uncovering a bug in Microsoft SQL Server database server that was subsequently used by the SQL Slammer worm. Litchfield has long criticised Oracle for the time it takes to fix vulnerabilities in its database software.
The latest attack vector ought to spur developers into a more careful review of code, particularly where external developers have been used. "Even those functions and procedures that don’t take user input can be exploited if SYSDATE is used," Litchfield concludes. "The lesson here is always, always validate and don’t let this type of vulnerability get 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." ®
Microsoft and HP tackle SQL-injection scourge (26 June 2008)
http://www.theregister.co.uk/2008/06/26/microsoft_hp_sql_injection_tools/
Cybercrooks plant phishing scam on crime reduction website (3 June 2008)
http://www.theregister.co.uk/2008/06/03/home_office_crime_reduction_hack/
Phoenix Mars website invaded by hackers (2 June 2008)
http://www.theregister.co.uk/2008/06/02/hackers_invade_phoenix_mars_website/
Botnet sics zombie soldiers on gimpy websites (14 May 2008)
http://www.theregister.co.uk/2008/05/14/asprox_attacks_websites/
Microsoft updates squash four critical bugs (13 May 2008)
http://www.channelregister.co.uk/2008/05/13/microsoft_may_patch_tuesday/
Frustration and joy - Microsoft's CTP in action (2 May 2008)
http://www.theregister.co.uk/2008/05/02/project_watch_six/
Microsoft snags Google-thrashing data pioneer (28 April 2008)
http://www.theregister.co.uk/2008/04/28/microsoft_hires_dewitt/
Oracle patches 'sitting duck' database vulns (16 April 2008)
http://www.theregister.co.uk/2008/04/16/oracle_cpu/
MySQL to fortify defenses with Citadel (16 April 2008)
http://www.theregister.co.uk/2008/04/16/mysql_development_roadmap/
Databases still open to basic attack (15 November 2007)
http://www.theregister.co.uk/2007/11/15/unprotected_databases_survey/
Zero-day bug hangs over Oracle database (9 November 2007)
http://www.theregister.co.uk/2007/11/09/oracle_0day/
Oracle in war of words with security researcher (26 January 2006)
http://www.theregister.co.uk/2006/01/26/security_researcher_versus_oracle/
Oracle's first monthly patch batch fails to placate critics (2 September 2004)
http://www.theregister.co.uk/2004/09/02/oracle_patch_tsunami/
Oracle 'sitting on security fixes' (5 August 2004)
http://www.theregister.co.uk/2004/08/05/oracle_security_flap/
Exploit Code on Trial (24 November 2003)
http://www.theregister.co.uk/2003/11/24/exploit_code_on_trial/
Cracking MS SQL Server passwords (8 July 2002)
http://www.theregister.co.uk/2002/07/08/cracking_ms_sql_server_passwords/
© Copyright 2008