{"id":399,"date":"2011-06-29T22:00:46","date_gmt":"2011-06-30T03:00:46","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=399"},"modified":"2011-06-30T10:12:34","modified_gmt":"2011-06-30T15:12:34","slug":"sql-injection-goes-mainstream","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2011\/06\/sql-injection-goes-mainstream\/","title":{"rendered":"SQL Injection Goes Mainstream"},"content":{"rendered":"<p>Note to the web development world: even a mainstream media source like Time Magazine knows about SQL injection. Don&#8217;t you think it&#8217;s time you protected your web applications against it?<\/p>\n<p>Last week&#8217;s issue of Time featured an article that focused on <a href=\"http:\/\/lulzsecurity.com\/\">LulzSec<\/a>&#8216;s activities. In <a href=\"http:\/\/www.time.com\/time\/business\/article\/0,8599,2079423,00.html\">Hack Attack<\/a>, author Bill Saporito went a step beyond most journalists covering web security by mentioning an actual technique: SQL injection. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/osric.com\/chris\/accidental-developer\/wp-content\/uploads\/2011\/06\/sql-injection.png\" alt=\"\" title=\"SQL Injection\" width=\"188\" height=\"250\" class=\"alignright size-full wp-image-401\" \/><\/p>\n<p><a href=\"https:\/\/www.owasp.org\/index.php\/SQL_Injection\">SQL injection<\/a> is a subclass of injection attacks, wherein a malicious user manipulates input so as to insert (or inject) a tag-along command into the application code. It&#8217;s #1 on OWASP&#8217;s <a href=\"https:\/\/www.owasp.org\/index.php\/Top_10_2010-Main\">Top Ten Vulnerabilities for 2010<\/a>, in part because such vulnerabilities are:<\/p>\n<ul>\n<li>Common<\/li>\n<li>Easy to exploit<\/li>\n<li>Have a huge payoff (i.e. devastating impact)<\/li>\n<\/ul>\n<p>Because it is so common and easy-to-exploit, there are a lot of automated tools that malicious users (often by way of compromised machines) use to scan sites and test them for vulnerabilities. If a vulnerability is found, the application may be targeted for further attacks. Basically, attackers are on the lookout for low-hanging fruit in the same way that thieves look for valuables sitting in plain sight in a parked car. Don&#8217;t take the car analogy too far, though: if someone breaks into your car, there will be broken glass and your iPod will be gone. If someone exploits a SQL injection vulnerability on your site, they may have all your user data (and more), with hardly a trace: entries in your access logs and error logs, which are too-often completely ignored.<\/p>\n<p>As the joke goes, you don&#8217;t have to outrun the bear to avoid being mauled and eaten&#8211;<em>you just have to outrun the other guy<\/em>. One of the best ways to make sure your web application is not targeted for further attacks is to make sure the relatively simple SQL injection scanners don&#8217;t find any vulnerabilities.<\/p>\n<p>SQL injection is fairly simple to defend against using parameterized input, and your development language of choice should have documentation on how to do this. OWASP also offers a <a href=\"https:\/\/www.owasp.org\/index.php\/SQL_Injection_Prevention_Cheat_Sheet\">SQL Injection Prevention Cheat Sheet<\/a>. There are also automated tools to you can use to check your code for SQL injection flaws (such as <a href=\"http:\/\/qpscanner.riaforge.org\/\">QueryParam Scanner<\/a> for ColdFusion), or test your site for vulnerabilities&#8211;also known as penetration testing or pen testing&#8211;such as the (currently out-of-date) <a href=\"https:\/\/addons.mozilla.org\/en-us\/firefox\/addon\/sql-inject-me\/\">SQL Inject Me<\/a> add-on for Firefox.<\/p>\n<p>Checking your web applications for SQL injection vulnerabilities is the first thing you should do, but it is hardly the last. Although fending off automated SQL injection attempts is definitely a good thing, there are many other categories of vulnerabilities, and a determined attacker will find them. Stay informed, and make sure you know what attackers are up to <em>before<\/em> you read about it in Time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note to the web development world: even a mainstream media source like Time Magazine knows about SQL injection. Don&#8217;t you think it&#8217;s time you protected your web applications against it? Last week&#8217;s issue of Time featured an article that focused on LulzSec&#8216;s activities. In Hack Attack, author Bill Saporito went a step beyond most journalists &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2011\/06\/sql-injection-goes-mainstream\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SQL Injection Goes Mainstream<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[193,191,356,190,192],"class_list":["post-399","post","type-post","status-publish","format-standard","hentry","category-security","tag-lulzsec","tag-owasp","tag-security","tag-sql-injection","tag-time-magazine"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=399"}],"version-history":[{"count":7,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/399\/revisions\/409"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}