New Tool Gives Developers A Free Anti-SQL Injection Shortcut

  /     /     /  
Publicated : 22/11/2024   Category : security


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 Lams 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, its 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 were 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 developers standpoint, we just wanted a way where we could have high assurance that weve 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: Whats the principle behind AntiSQLi?
Lam:
This library doesnt create anything new. Its not inventing a new way of mitigating SQL injection. Its 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 were noticing that developers just arent 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? Thats 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 theyre 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 youre 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.
Thats 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 theyll get all these benefits.
Lam:
What the library does is itll inspect each item inside that array and say, What type are you and then it automatically converts into a parameter. Weve basically taken out all of that work required for the developer to parameterize each variable thats 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, were 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, its an easy win, as well, because people can inherently trust the system.
Lam:
If we give someone a black-box solution, theyre 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. Theyre more free to do that.
Have a comment on this story? Please click Add Your Comment below. If youd like to contact
Dark Readings
editors directly,
send us a message
.

Last News

▸ Scan suggests Heartbleed patches may not have been successful. ◂
Discovered: 23/12/2024
Category: security

▸ IoT Devices on Average Have 25 Vulnerabilities ◂
Discovered: 23/12/2024
Category: security

▸ DHS-funded SWAMP scans code for bugs. ◂
Discovered: 23/12/2024
Category: security


Cyber Security Categories
Google Dorks Database
Exploits Vulnerability
Exploit Shellcodes

CVE List
Tools/Apps
News/Aarticles

Phishing Database
Deepfake Detection
Trends/Statistics & Live Infos



Tags:
New Tool Gives Developers A Free Anti-SQL Injection Shortcut