Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security //

Database Security

6/25/2013
06:16 PM
Connect Directly
Twitter
RSS
E-Mail
50%
50%

New Tool Gives Developers A Free Anti-SQL Injection Shortcut

The open-source AntiSQLi library for .NET and SQL Server automates parameterization during development of database-connected Web apps

As one of the longest-lingering burrs in the saddles of database security and application security professionals, SQL injection continues to plague the Web application world for a myriad of reasons. But none is so oft-lamented as the fact that developers continue to write unparameterized database queries into their code.

That is why Security Innovation and LockBox teamed up to release a new open-source project going live this week on GitHub. The hope is that the new AntiSQLi Library for .NET and SQL Server will help make it easier for developers to parameterize queries with as little fuss as possible, say Joe Basirico, vice president of professional services for Security Innovation, and Kevin Lam, president of LockBox, who helped initiate the project. Initially started as an in-house project to help Lam's developers, the library eventually blossomed into an open-source effort that its first contributors hope will help mitigate SQLi across the industry.

Dark Reading caught up with the duo to discuss the project and how it can help the database security and app sec community:

Dark Reading: What moved you to look for a better way to address SQL injection in the developer community?
Basirico: Around my office we often have this chat about if you could fix just one thing, wave a magic wand and make it disappear, what would it be? When you get a real answer out of them, it's always SQL injection. Being able to just mitigate SQL injection across the board would be huge.

Lam: From my side, as the product developers, we do secure file transfer, and we're in the business of protecting our customers' data. So the last thing we want is to get hacked, especially because of SQL injection, because the impact it creates when someone is able to exploit a SQL injection vulnerability really gets them the keys to the kingdom.

So from a developer's standpoint, we just wanted a way where we could have high assurance that we've mitigated as many SQL injection vulnerabilities across our products as much as possible. So we needed something that was repeatable, that was less prone to human error, and that was implementing industry best practices. [How have attackers managed to 'break' AV with a glut of malware? See 10 Ways Attackers Automate Malware Production.]

Dark Reading: What's the principle behind AntiSQLi?
Lam: This library doesn't create anything new. It's not inventing a new way of mitigating SQL injection. It's just a way of implementing best practices really easily and to make it super easy for developers to deploy best practices in their code.

Dark Reading: OK, so best practice No. 1 is paramaterizing code. But why not just have developers parameterize queries themselves?
Lam: We always teach our developers to use parameterized queries or stored procedures, and we're noticing that developers just aren't doing that.

To me, the evidence is on the news: You see companies getting hit with SQL injection all the time, and data breaches and intrusions just based on that vulnerability alone.

Basirico: When I first heard about AntiSQLi, my first reaction was why not use parameterized queries? That's what people normally use. But then I kind of realized that parameterized queries, stored procedures, and ORMs have been around for a long time, and we continue to see SQL injection happening.

I think the biggest reason for that is simply that those solutions are a little bit hard to use, they require a developer to learn a little bit extra or change their development style, and so adoption is slow. So if we could find a solution that lets people program the way that they normally program, using paradigms that they're already comfortable with and mitigate SQL injection, that seems like a huge win.

Dark Reading: How does AntiSQLi work?
Basirico: The paradigm that Kevin has used is the string format or paradigm. Essentially you have one string. Within that first string you have a number of small parameters, and then after that you have an array of values that you're going to put into that string. So from there, you might have this value turn into the user name, that value will turn into the password, and another value will turn into the role of the user, for example.

That's a really normal kind of paradigm of concatenating strings together. Really, it might be the way that developers are insecurely writing their vulnerable code right now. So they can essentially switch from using a string-form runner to the AntiSQLi library just by calling a different function, and they'll get all these benefits.

Lam: What the library does is it'll inspect each item inside that array and say, 'What type are you' and then it automatically converts into a parameter. We've basically taken out all of that work required for the developer to parameterize each variable that's going into that string and essentially do it for the developer so they can focus more on the business logic rather than having to worry about specifics.

Dark Reading: Why did you decide to go open-source with this project?
Basirico: From our perspective, we're always very open-source-centric. We really see that model work, especially on things like GitHub, where you have the community built in. And from a security perspective, it's an easy win, as well, because people can inherently trust the system.

Lam: If we give someone a black-box solution, they're going to have to take our word for it that this works, but by open-sourcing we give the developer that option for them to understand how the library works and see if there are any benefits to add features or maybe even extend it to other database platforms. They're more free to do that.

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message. Ericka Chickowski specializes in coverage of information technology and business innovation. She has focused on information security for the better part of a decade and regularly writes about the security industry as a contributor to Dark Reading.  View Full Bio

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Cybersecurity Industry: It's Time to Stop the Victim Blame Game
Jessica Smith, Senior Vice President, The Crypsis Group,  2/25/2020
5 Ways to Up Your Threat Management Game
Wayne Reynolds, Advisory CISO, Kudelski Security,  2/26/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
6 Emerging Cyber Threats That Enterprises Face in 2020
This Tech Digest gives an in-depth look at six emerging cyber threats that enterprises could face in 2020. Download your copy today!
Flash Poll
How Enterprises Are Developing and Maintaining Secure Applications
How Enterprises Are Developing and Maintaining Secure Applications
The concept of application security is well known, but application security testing and remediation processes remain unbalanced. Most organizations are confident in their approach to AppSec, although others seem to have no approach at all. Read this report to find out more.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2019-8741
PUBLISHED: 2020-02-28
A denial of service issue was addressed with improved input validation.
CVE-2020-9399
PUBLISHED: 2020-02-28
The Avast AV parsing engine allows virus-detection bypass via a crafted ZIP archive. This affects versions before 12 definitions 200114-0 of Antivirus Pro, Antivirus Pro Plus, and Antivirus for Linux.
CVE-2020-9442
PUBLISHED: 2020-02-28
OpenVPN Connect 3.1.0.361 on Windows has Insecure Permissions for %PROGRAMDATA%\OpenVPN Connect\drivers\tap\amd64\win10, which allows local users to gain privileges by copying a malicious drvstore.dll there.
CVE-2019-3698
PUBLISHED: 2020-02-28
UNIX Symbolic Link (Symlink) Following vulnerability in the cronjob shipped with nagios of SUSE Linux Enterprise Server 12, SUSE Linux Enterprise Server 11; openSUSE Factory allows local attackers to cause cause DoS or potentially escalate privileges by winning a race. This issue affects: SUSE Linux...
CVE-2020-9431
PUBLISHED: 2020-02-27
In Wireshark 3.2.0 to 3.2.1, 3.0.0 to 3.0.8, and 2.6.0 to 2.6.14, the LTE RRC dissector could leak memory. This was addressed in epan/dissectors/packet-lte-rrc.c by adjusting certain append operations.