Close
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Applications
    • Applications
    • Cybersecurity
    • Database
    • Development
    • Networking

    Microsoft Responds to the SQL Injection Problem

    Written by

    Larry Seltzer
    Published June 25, 2008
    Share
    Facebook
    Twitter
    Linkedin

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      Last September, Errata Security CEO Robert Graham told us in an interview that SQL Injection was a great risk for Web sites based on many open-source tools and on older, pre-.Net Microsoft technologies. Boy, was that ever a prescient interview.

      Several months later, as Wired put it, a massive attack hit half a million Windows data-driven Web sites. In fact, it was the data in these sites that got compromised, and they were set by the attack to serve malware and links to malware on top of their actual data. As the Wired blog puts it, the attack was not exactly Microsoft’s fault and didn’t reflect an actual vulnerability. And subsequent waves of the SQL injection attacks targeted non-Windows servers.

      The best way to put it comes from the Graham interview, months before:

      “The pre-.Net Microsoft tools in particular were very vulnerable to attack and at the same time very easy to use. You had a lot of people building Web sites with them who really had no clue how to defend themselves from attackers. Since then Microsoft has rearchitected its products and the current generation of .Net tools makes it much more difficult to expose yourself to SQL injection unless you do something really strange.“

      In other words, the old Microsoft tools made it easy to program insecure code. Back in 1998 and 1999 I wrote a bunch of ASP sites which, if any were still alive (thank goodness they’re not) would be easily vulnerable. I wrote them the obvious way, by reading input from users of Web forms and constructing SQL commands in VBScript. It’s just not a good idea anymore to do it this way, at least not without checking the input.

      On June 24, Microsoft released an obviously coordinated group of tools and documents to address the wave of servers compromised through SQL injection that occurred many weeks ago. Better late than never.

      A security advisory entitled “Rise in SQL Injection Attacks Exploiting Unverified User Data Input” starts out by defining the problem (SQL injection attacks are being made against ASP sites that don’t sanitize inputs) and has lots of good links in it, including to tools about which I will go into some detail below. And then there are links to developer articles about SQL injection and how to avoid it:

      • SQL Server Injection Protection
      • Preventing SQL Injections in ASP
      • How To: Protect from SQL Injection in ASP.NET
      • Coding Techniques for protecting against SQL Injection in ASP.NET
      • Filtering SQL Injection from Classic ASP
      • Security Vulnerability Research & Defense Blog on SQL Injection Attack

      Tools to Fight SQL Injection

      The Microsoft Source Code Analyzer for SQL Injection tool is a static code analysis tool, built on the .NET Framework version 3.0, which analyzes your ASP code for SQL injection vulnerabilities, both first order and second order vulnerabilities.

      First order is the type my own sites would be vulnerable to: using user input directly to construct SQL statements. Second order is where those statements are constructed based on data from the database. See Preventing SQL Injections in ASP for more on this distinction. As a programming matter, by the way, the general solution to SQL injection is called parameterized queries, a topic also covered in this article.

      A second tool is UrlScan version 3.0 Beta, the latest in a long line of UrlScan versions that have prevented many a common attack. UrlScan is a runtime filtering tool that looks at HTTP requests sent through IIS. It scans for malicious ones and can be set to block whatever you want to block. This can be handy when you read about specific attack patterns being committed.

      SQL injections are often performed through HTTP GET commands, in which case UrlScan should be able to detect them (for instance by setting a rule to drop any request that contains the string “INSERT INTO “). Microsoft has a page with UrlScan rules for common security scenarios, including SQL injection, which can help.

      Finally, there is a third-party tool, Scrawlr from HP. This tool crawls Web sites, analyzing parameters of pages for SQL injection vulnerabilities. Unlike the Microsoft Source Code Analyzer for SQL Injection tool, it doesn’t require source code. Even if you have source code, this provides a different perspective and a useful comparison.

      Preventing successful SQL injection attacks has to begin with proper programming techniques, and there’s only so much Microsoft can do about that. They have provided the programming systems you need to do the job right. Scrawlr and UrlScan are good tools to have and are worth running, at least for a while, but if they are your main defense you can’t feel good about it.

      SQL injection is a great example of how security is everyone’s job. Ten years ago very few people appreciated that this level of programming could be the target of a massive attack, but systems are so complex these days that every level is suspect. Don’t take anything for granted.

      Security Center Editor Larry Seltzer has worked in and written about the computer industry since 1983.

      For insights on security coverage around the Web, take a look at eWEEK.com Security Center Editor Larry Seltzer’s blog Cheap Hack

      Larry Seltzer
      Larry Seltzer
      Larry Seltzer has been writing software for and English about computers ever since—,much to his own amazement— He was one of the authors of NPL and NPL-R, fourth-generation languages for microcomputers by the now-defunct DeskTop Software Corporation. (Larry is sad to find absolutely no hits on any of these +products on Google.) His work at Desktop Software included programming the UCSD p-System, a virtual machine-based operating system with portable binaries that pre-dated Java by more than 10 years.For several years, he wrote corporate software for Mathematica Policy Research (they're still in business!) and Chase Econometrics (not so lucky) before being forcibly thrown into the consulting market. He bummed around the Philadelphia consulting and contract-programming scenes for a year or two before taking a job at NSTL (National Software Testing Labs) developing product tests and managing contract testing for the computer industry, governments and publication.In 1991 Larry moved to Massachusetts to become Technical Director of PC Week Labs (now eWeek Labs). He moved within Ziff Davis to New York in 1994 to run testing at Windows Sources. In 1995, he became Technical Director for Internet product testing at PC Magazine and stayed there till 1998.Since then, he has been writing for numerous other publications, including Fortune Small Business, Windows 2000 Magazine (now Windows and .NET Magazine), ZDNet and Sam Whitmore's Media Survey.

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2024 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×