Being Communications

SQL injection attacks

Posted by Chris McCluskey Friday 17 April 2009

Tags:

An SQL injection attack, also known as an SQL insertion attack, is a coding injection technique which exploits security vulnerabilities in the database layer of an application.

They can be performed whenever data captured from an end user is not properly parsed or validated before being used in conjunction with a dynamic SQL statement to interact with the database and can cause unexpected – and often undesired – results. For instance, instead of simply returning information from a table, tables could be populated with malicious code, such as malware JavaScript, or dropped altogether. Sensitive personal information could also be pulled from the database, which would of course be a major breach of security and privacy.

To guard against SQL injection attacks it is advisable to avoid directly using user input with dynamic SQL statements. User input should be validated to ensure it only contains data that it should contain, for example if numeric data is expected then the application should check that the input is indeed numeric. White-listing data to ensure that user input correlates to an expected range of values is another option.

Parameterised statements can also be used, which use parameters, sometimes called placeholders or bind variables, instead of embedding the user input into the statement. The SQL statement is fixed and the user input is bound to parameters. If the input does not conform to what is expected of it, the application will break. Thus, it is also advisable to ensure that this is accounted for – it looks unprofessional if your web page or application gives a default client-side error because the coding is broken.

SQL injection attack examples:

WHID 2006-3: Russian hackers broke into a RI GOV website

Mass SQL Injection Attack Targets Chinese Web Sites

Huge Web hack attack infects 500,000 pages

Comments

Add comment


 

biuquote
Loading



Track Record

Being has a strong track record in delivering strategic, accessible, SEO and content managed solutions.

Our Services

We specialise in online branding, web development, e-mail marketing, e-commerce, online advertising, online reporting and learning management systems.

Further Information

Being Communications Ltd. Reg in Northern Ireland 39093 Reg Office: Channel Wharf Unit 3 21 Old Channel Rd Belfast BT3 9DE. VAT No. GB 769 8800 67.