Slashdot Mirror


Relentless Web Attack Hard To Kill

ancientribe writes "The thousands of Web sites infected by a new widespread SQL injection attack during the past few days aren't necessarily in the clear after they remove the malicious code from their sites. Researchers from Kaspersky Lab have witnessed the attackers quickly reinfecting those same sites all over again. Meanwhile, researchers at SecureWorks have infiltrated the Chinese underground in an attempt to procure a copy of the stealthy new automated tool being used in the attacks."

29 of 218 comments (clear)

  1. Whatever happened by RaceProUK · · Score: 5, Insightful

    to fixing the hole? It's like fixing a car coolant leak by pouring more water in the radiator.

    --
    No colour or religion ever stopped the bullet from a gun
  2. noscript by Manfre · · Score: 5, Informative

    NoScript is one of the best ways to avoid viruses that are distributed from the web.

    1. Re:noscript by Manfre · · Score: 3, Informative

      I've been developing with ASP.NET (c#) since its initial beta and am very familiar with how it functions. This discussion would go a bit smoother if you would read a comment before replying to it. Noscript prevents javascript from loading on any site, until the site is explicitly given permission by the user. Approve your CRM domain(s), which will allow it to work properly. Then if it is compromised, noscript will block the javascript on the destination domain. If your server is compromised to the point where it is hosting exploits, then the IT staff needs to spend a bit more effort patching and locking things down. Noscript is not the only protection that should be used, but it greatly helps. It's like driving a car a little bit slower. You've still got a seatbelt to help keep you alive, but you should be less likely to hit something.

  3. Re:Kaspersky by mfh · · Score: 4, Informative

    Kaspersky is so brilliant, it locks up every time I try to do anything with it.

    Then again, my AVG hasn't updated properly all week...

    You're not supposed to run them at the same time. They fight for control and eventually stalemate. Uninstall AVG and reinstall Kaspersky, but by now you may have damaged your system configuration. Kaspersky is pretty brutal if it gets unhinged, but it's unstoppable if you get it configured correctly.

    --
    The dangers of knowledge trigger emotional distress in human beings.
  4. Infected Websites by sexconker · · Score: 3, Interesting

    Can someone explain to me how websites get infected?

    Oh, that's right, running ads and other shit from shady people (directly or indirectly).

    I really wish websites would simply stop hosting foreign (not theirs, not trusted, not checked) code and content.

  5. This disgusts me by 77Punker · · Score: 3, Insightful

    I develop web applications for a living right now and as someone who's only been in this game for a few months, this disgusts me. I already know how to prevent SQL injection with prepared statements. It's easy to do and requires no extra knowledge, so why doesn't everyone do this?

    1. Re:This disgusts me by Rycross · · Score: 3, Insightful

      The problem is a frightening amount of training material on the web uses concatenated SQL strings to teach SQL. Pull up your average PHP/.Net/Java SQL tutorial and odds are that it will be concatenating strings. Throw that in with the fact that roughly half of the programmers reading that are going to be below average, and there you go.

    2. Re:This disgusts me by Pope · · Score: 4, Funny

      I'd say fully half of all the programmers are going to be below average...

      --
      It doesn't mean much now, it's built for the future.
    3. Re:This disgusts me by 77Punker · · Score: 4, Funny

      I'd say fully half of them will be below median.

    4. Re:This disgusts me by corsec67 · · Score: 3, Insightful

      Throw that in with the fact that roughly half of the programmers reading that are going to be below average

      Um for anything that is approximately normally distributed,... half of the X are going to be below average. (Especially if it is a continuous variable and you use the median)

      --
      If I have nothing to hide, don't search me
    5. Re:This disgusts me by NNKK · · Score: 4, Informative

      You're right, you're no programmer. Go read up:

      http://en.wikipedia.org/wiki/SQL_injection

      Prepared (or parametrized) statements are an easy and absolute defense against SQL injection attacks. The OP is right, the fact that such attacks still succeed is disgusting and inexcusable.

    6. Re:This disgusts me by Emb3rz · · Score: 4, Insightful

      The idea of a SQL Injection attack is to pass a parameter in such a way that it changes the structure of the query itself. Typical beginner's SQL query:

      sql = "SELECT * FROM Users WHERE Username = '" & Request.Form("Username") & "' AND Password = '" & Request.Form("Password") & "';"

      This uses 'String Concatenation' to build a line of text from several smaller parts. The completed string is then, in this example executed by a database. A new query is dynamically created and executed based on the text passed to it. Thus, we are able to at this point change what query will be run. Form data:

      Username = "Admin"
      Password = "x' OR 'e' = 'e"

      So when the string is being put together, we get:

      SELECT * FROM Users WHERE Username = 'Admin' AND Password = 'x' OR 'e' = 'e';

      Certainly, even with no programming experience, one can see that the letter E will always be equivalent to the letter E. Thus, any validation of the password will return a false positive.

      Prepared statements avoid this whole deal by only allowing you to pass parameters. The query is already set in stone. You cannot change how it basically works, only its criteria / filtering / etc. A prepared statement would execute basically:

      SELECT * FROM Users WHERE Username = "Admin" AND Password = "x' OR 'e' = 'e";

      Since the query does not change dynamically when it's executed as a prepared statement, you can't add your logical 'OR' operator after having broken out of your parameter. You just get no rows returned, as should be the case.

    7. Re:This disgusts me by 77Punker · · Score: 3, Insightful

      Kaspersky can't figure it out because a virus scanner can't fix a web application. Fixing SQL injections is beyond their realm.

      Travelocity can't figure it out because their developers must suck. Travelocity is well-known because they have a decent service, not because the software that runs the service is really great software.

    8. Re:This disgusts me by Emb3rz · · Score: 4, Insightful

      You're working off of the false assumption that security is about knowledge.

      We know abundantly well exactly how SQL injection attacks occur, and we also have many tools at our disposal to -absolutely- prevent them. What we don't have is the cooperation or effort from programmers on a widespread basis. Many are simply too lazy to research and implement reasonable security measures. It's easier to pretend that there are no ways whatsoever that anything can go wrong with your code because when you tested it it worked right. This willfull turning a blind eye to well-established security caveats is what has given us this terrible and prevalent security problem. It's easier to write code that checks nothing, it's quicker to do so, and it requires less think-juice on the part of the lazy programmer.

  6. Comment removed by account_deleted · · Score: 3, Informative

    Comment removed based on user account deletion

  7. Re:Kaspersky by martinw89 · · Score: 3, Insightful

    ...AVG...

    <mechanic>Well there's your problem.</mechanic>

  8. Re:Kaspersky by Anonymous Coward · · Score: 4, Funny

    "Securing an environment of Windows platforms from abuse - external or internal - is akin to trying to install sprinklers in a fireworks factory where smoking on the job is permitted." -Gene Spafford

  9. Install a proxy by gfilion · · Score: 4, Interesting

    We had this problem a few months back at work. Old but necessary asp web sites kept getting infected. It only took a few hours to install a reverse proxy with mod_security on EC2 and we were in the clear.

    Full story on my blog:
    http://guillaume.filion.org/blog/archives/2008/05/i_love_ec2_and_rightscale.php

    1. Re:Install a proxy by merreborn · · Score: 3, Informative

      mod_security is a reactive security measure. It's blacklist based, which makes the classic error of attempting to "enumerate badness".

      While it's great if you've identified an existing threat to an application you cannot properly secure, it does nothing to protect you against future attacks using less obvious techniques.

      mod_security alone is not an adequate solution. It's still necessary to proactively write secure applications in the first place, which means making sure you're never allowing raw, unfiltered/unescaped user data into places where it shouldn't go.

  10. yet another ugly side of DRM by Aoet_325 · · Score: 3, Insightful

    "The toolkit is protected with a layer of digital rights management and appears to be sold mainly in China. "

    this is why I don't believe in "Tusted" computing.
    When software or hardware are used to take control of a computer away from that computer's owner bad things will happen.

  11. Chinese underground by AragornSonOfArathorn · · Score: 4, Funny

    Is it like Big Trouble in Little China, with the lightning ninjas and floating eye thing? Did they get Kurt Russel to help?

    If so, that would be AWESOME.

    --
    sudo eat my shorts
  12. Re:Kaspersky by Arancaytar · · Score: 4, Insightful

    It's a bloody SQL injection attack. I'd like to see your virus checker automatically rewrite your web application to use input filtering.

    What these people need is a real web application instead of some self-built PHP script - not a virus scanner, whether free or expensive.

  13. No DRM trolls? by genner · · Score: 4, Funny

    Did everyone miss the fact that the toolkit resposible includes some hefty DRM.

    Where's the outrage?
    Why aren't we demmanding an open source solution?

  14. Big Picture by mfh · · Score: 4, Interesting

    It's a bloody SQL injection attack. I'd like to see your virus checker automatically rewrite your web application to use input filtering.

    This is going to sound like a little bit of double speak but I'll remind you that Kaspersky found these attacks were happening. Also, they are studying the behavior. Furthermore, Kaspersky protects systems from nefarious things that attackers will do, regardless of how they get on the system. Nothing is perfect with Windows, but if you look at the options, Kaspersky is the best out there.

    Now of course, if you want to insist that the attacks happen whether Kaspersky is running or not, you will be correct. But what you're not saying is how LIMITED the attackers are when trying to get past Kaspersky after they get on a system.

    Noscript also helps, but isn't perfect either.

    --
    The dangers of knowledge trigger emotional distress in human beings.
  15. Re:RTFA by Bassman59 · · Score: 3, Funny

    Didn't you RTFA?

    You must be new here, in spite of that two-digit user ID!

  16. No kaspersky for me by jonaskoelker · · Score: 3, Funny

    zsh% apt-cache search kaspersky
    zsh%

    :(

  17. No, it's not. by Bearhouse · · Score: 3, Informative

    Your're right to publicise a good product that I also use and reccommend. However:

    Most people that get caught by malware don't understand all these arcane details.

    Most people use IE, (no noscript here..) and blindly click 'OK' when they cannot see the porn.

    Bad web sites / pages don't just install viruses.*

  18. Re:RTFA by Anonymous Coward · · Score: 3, Funny

    You must be new here, in spite of that two-digit user ID

    He probably is new. I saw Slashdot UID 56 for sale on E-Bay about a month ago for 17 cents or 4 sticks of Trident.

  19. Re:Kaspersky by Fulcrum+of+Evil · · Score: 3, Informative

    Are you insane? Write parameterized SQL for all your queries and this just won't happen - setting your name to ';-- drop table users;' will just result in funky display logic.

    --
    "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"