Home > Ask the Oracle Database / Applications Experts > Oracle database security Questions & Answers > How to prevent a SQL injection attack in Oracle
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

How to prevent a SQL injection attack in Oracle

Brian Fedorko EXPERT RESPONSE FROM: Brian Fedorko

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 11 March 2009
How can we prevent a SQL injection attack on our Oracle databases?

>
The answer is straightforward, but the implementation will take a great deal of teamwork between your application designers and your DBAs.

Your front-end application must be ruthless in filtering input. Special characters should be rejected unless there this is some specific reason they are necessary. Characters such as the dash, solidus and semicolon are commonly used to modify the SQL statements your application may be building. Numbers should be filtered out of text input to avoid the passing of hexadecimal values and MD5 hashes. Lastly, text input should be filtered for SQL set operators such as UNION or INTERSECT.

On the database side, you can reduce your exposure to a SQL injection attack through the use of bind variables. If we pass values into a bind variable, rather than concatenate the user input to other strings, malicious SQL will not be executed. In addition to being resistant to SQL injection, bind variables are key to performance and scalability in most situations -- a double bonus!

Finally, restrict the functions, procedures and packages your application user has permission and privileges to execute. The principle of least privilege is the key concept to implement. Restricting access to packages unnecessary to your application user's processing (UTL_FILE, UTL_SMPT, UTL_TCP, etc.) can further reduce the likelihood and/or severity of an attack.


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



RELATED CONTENT
Oracle database security
How to use DBMS_CRYPTO package for Oracle password encryption/hashing
How to decrypt an Oracle password using John the Ripper and checkpwd
How to use the CREATE SESSION command to track Oracle database logins
How to troubleshoot Oracle critical patch updates using OPatch
Can I automate Oracle patching when installing Oracle Standard Edition?
Is it possible to automate Oracle CPUs for a DoD project?
Three steps to help improve Oracle database security
Tips for auditing and securing database backups in Oracle

Oracle database security
Oracle delivers database fixes in Critical Patch Update
How to use DBMS_CRYPTO package for Oracle password encryption/hashing
How to decrypt an Oracle password using John the Ripper and checkpwd
How to use the CREATE SESSION command to track Oracle database logins
How to troubleshoot Oracle critical patch updates using OPatch
Can I automate Oracle patching when installing Oracle Standard Edition?
Is it possible to automate Oracle CPUs for a DoD project?
Three steps to help improve Oracle database security
Tips for auditing and securing database backups in Oracle
Forrester outlines database security trends in 2009

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



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
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 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts