Who invented sql injection
This, in short, scrubs any data entered by the user to remove any potential malicious parts of it. So, if SQLi is so easy that literally a child could do it, and the solutions are fairly straight forward, why are SQLi-based attacks still happening? On top of this, "they're often put under pressure by their managers to develop functional software rather than secure software. Shema from Yahoo! Hunt was slightly less forgiving, and didn't agree that it was because of pressure from higher management.
Instead, he lamented about the large number of tutorials available to web developers online that, instead of providing decent advice, detail how to make systems that are vulnerable to SQLi. So just as script kiddies continue to share their SQLi tutorials on YouTube, there is parallel information sharing going on with website developers.
Ultimately, the responsibility of the security of these sites, and the data they contain, boils down to web developers themselves. That means SQLi and the breaches it causes will remain, at least for a little while longer. Sign In Create Account. This story is over 5 years old.
Over 15 years after it was first publicly disclosed, SQL injection is still the number one threat to websites. Combine these with overworked developers granted unreasonable deadlines or requirements, and it makes for a wicked trifecta of low-hanging fruit vulnerabilities.
By comparison, a Distributed Denial of Service attack DDoS requires careful coordination and leveraging hundreds to tens of thousands of compromised systems to carry out such an attack. Whereas an SQL injection attack can be accomplished on a single computer with patience, trial and error, some ingenuity, and a little luck.
It really does not take much skill at all to complete an SQL injection attack. In fact, a script kiddie can do so with absolutely no understanding of SQL injections whatsoever; by using any of the free available tools. They truly are that easy. Perhaps some SQL injection attacks result from lazy development or malpractices, but in reality, there are three big commonly repeated mistakes that allow SQL injections to occur. They include the following:. Quite simple, yet frequently ignored, this principle simply states that a user, process, or other entity shall have only the least required privileges necessary to complete its tasks.
For example, a log database table does not need DELETE or UPDATE privileges, and yet database administrators commonly grant all privileges possible to a service rather than tailor-fit the permissions to exactly only what is needed. There is no reason to keep sensitive, personal information such as credit card numbers in the same database as your news articles.
There is also no reason to store passwords in plaintext or with poor hashing techniques. If you segment and distribute your data, then your database and its contents become a far less valuable target. Would you keep all your belongings in your home, or would you keep some in your safe deposit box?
This is why SQL injections happen. When user input is not sanitized for potential SQL commands, an attacker has the ability to complete an SQL injection attack, amplified by the aforementioned two points. Once an attacker gains access by including unsanitized input in an SQL query, availability of sensitive data such as credit card data or personal details and unlimited privileges give them everything they could ever want to wreak havoc.
That is it. Just those three simple problems that have caused over one million web pages in under a month to become compromised, including the United Nations' and several other high profile websites, have consistently kept SQL injections in OWASP's top ten list. It is almost absurd, with how simple these three problems are, that SQL injections keep happening. So what can developers do?
Later in our series of SQL injection articles, we will go over more technical details of an SQL injection attack and how to protect against them.
But for now, the most important point we can stress is that developers and systems administrators do not fall prey to these three problems we have mentioned. Developers need to ensure they implement the least privilege necessary for a web application's needs, segregate or encrypt data such that a database becomes a far less valuable target, and, most importantly, always sanitize user input, especially if it is used in SQL statements!
These are incredibly simple techniques that, if applied as consistently as SQL injections rank in the top ten list, can potentially eliminate SQL injections from that top ten list for the first time since it was created. One easy and quick way to check if your websites and web applications are vulnerable to SQL Injection is by scanning them with an automated web application security scanner such as Netsparker.
Netsparker is a false positive free web application security scanner that can be used to identify web application vulnerabilities such as SQL Injection and Cross-site scripting in your web applications and websites.
Download the trial version of Netsparker to find out if your websites are vulnerable or check out the Netsparker product page for more information. Get a demo Get a demo. A host-based IDS can monitor web server logs and alert when something strange happens. Ultimately, though, SQL injection attacks are well-understood and easily preventable, and the priority for risk mitigation should be preventing SQL injection attacks in the first place.
Listen to Little Bobby Tables and sanitize your database inputs. Any input to your web application database should be considered untrustworthy and treated accordingly. The OWASP SQL injection cheat sheet dives deeper than we ever could here, but preventing SQL injection attacks, the OWASP tell us, requires developers to whitelist input validation not blacklisting , to use prepared statements with parameterized queries, and to escape all user-supplied input. Also limit account privileges.
Assume a breach. What if a developer fails to sanitize a single user input field? Hey, it happens. Developers are only human. Sanitize input but assume something is going to slip past you. Limit the account privileges of the database user. Is your web application read only, for example? Probably not. The principle of least privilege applies here.
Give the web application the minimum privileges it needs to run. Stored procedures can also make SQLi a lot harder — although not impossible. If your web application only needs to run a handful of SQL queries, create stored procedures to execute those queries.
Typically, only the database administrator has privileges to create or modify stored procedures. Be aware, though, that many databases ship with default stored procedures out of the box, and attackers know this.
Consider removing those default stored procedures unless you really need them. SQL injection is the lowest of the low-hanging web application security fruit.
This well-known attack vector is easily exploited by unsophisticated attackers, but it is easily mitigated with a small amount of due diligence.
0コメント