DDoS attacks, what to do?

Discussion in 'Site & Server Administration' started by fryman, Nov 8, 2005.

  1. #1
    It seems that my site has been under heavy DDoS attacks for the last couple of days. Is there any way to prevent this? My server admin has been very busy banning potential attacker's IPs, but what else can be done?
     
    fryman, Nov 8, 2005 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depends on the nature of the attack, but in many cases not much, really:

    http://grc.com/dos/grcdos.htm

    It's a long, but a very good and interesting read about DDoS.

    J.D.
     
    J.D., Nov 8, 2005 IP
  3. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #3
    This is ridiculous, it has been going on for hours and won't stop.

    How do the big sites like Ebay or Amazon avoid this?
     
    fryman, Nov 8, 2005 IP
  4. lorien1973

    lorien1973 Notable Member

    Messages:
    12,206
    Likes Received:
    601
    Best Answers:
    0
    Trophy Points:
    260
    #4
    what is the attack doing? is it sending a billion pings to your site of varying sizes? If so, you should be able to make your site not respond to ICMP echos - this is what ebay does.
     
    lorien1973, Nov 8, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    They are using $20K Cisco firewalls and other expensive gadgets.

    See what protocols they are using and if it's UDP or ICMP, ask your service provider to drop packets with these protocols, regardless of the source address. Keep in mind that if you are runing your own DNS server, it uses UDP and will not work, unless there's an exception made for it.

    If the attack is a SYN flood attack or equivalent, you can ask your service provider to enable protection against this form of attack in their firewall for your address range (most good hardware firewalls offer this form of protection).

    If you provide more details on the attack, I may be able to advise you something else.

    J.D.
     
    J.D., Nov 8, 2005 IP
  6. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #6
    You should tcpdump and see what's hitting the server then start banning IP's. Works for me.

    Also make sure you have a firewall setup with good ruleset.
     
    RectangleMan, Nov 8, 2005 IP
  7. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #7
    Yeah, I had my system admin and had a tech support guy helping me, but even with that things got out of control and they had to take down my server for a couple of hours and wait for the attack to slow down.

    Just horrible, it lasted several hours... and my admin says that it was a targeted attack and that it is very likely to happen again.

    Damn, someone out there must be very pissed because I took his spots at Google :D
     
    fryman, Nov 8, 2005 IP
  8. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Most DDoS attacks these days use HTTP GET requests, the days of ICMP DDoS attacks are long gone.

    The problem is that if the attackers have enough bandwidth to saturate your upstream's bandwidth, you're screwed. There's really nothing you can do. Simply firewalling the attackers is useless, because they will still saturate the pipe before they hit your firewall.

    If your upstream bandwidth is getting saturated with the HTTP replies (ie the actual pages themselves), you could put a 301 redirect in place on the page they are requesting, eg http://example.com -> http://example.com/mainsite
    Returning the 301 is going to use far less bandwidth. It's probably not going to help your Google rankings, but then neither is your site being down. Often you'll find the attackers will just be constantly requesting an image file over and over, which makes things easier for you.

    The big sites like Amazon and Ebay use Akamai. Akamai have servers in data centres all over the world, so it's massively more difficult to flood them off the net. Unfortunately, I suspect you don't have the sort of cash that Akamai would want for hosting.

    Hope this helps, let us know how you get on.
     
    forkqueue, Nov 8, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #9
    In a DDoS that attackers have at their disposal thousands of zombie machines they control - they have, literally, all the bandwidth in the world.

    Let me put it plain and simple - you can't fight a DDoS attack at the HTTP level.

    Amazon and the likes suffer less from DDoS (they still do, though) because they use very expensive equipment and because they have different relationships with service providers. Firewalls in their price range will automatically detect many forms of attacks and will block originating networks as soon as the attack begins and immediately notify they staff. These guys, in turn, immediately contact operators of the upstream routers and notify them as well. All these mechanisms combined make it easier for the big guys to cope with DDoS.

    J.D.
     
    J.D., Nov 9, 2005 IP
  10. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #10
    Who did you piss off to warrant a DDOS, Fryman?
     
    mcfox, Nov 9, 2005 IP
  11. debunked

    debunked Prominent Member

    Messages:
    7,298
    Likes Received:
    416
    Best Answers:
    0
    Trophy Points:
    310
    #11
    Everyone, but that is besides the point.:eek:



    Hopefully you can get it to stop, I am sure I am not the only one who would want to know what to do in case it happens. It wouldn't suprise me if the DDOS attack was actually random from some virus maker who has no life.
     
    debunked, Nov 9, 2005 IP
  12. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #12
    That rather depends on who is attacking you - not all botnets are equal in size.

    Actually I've had success with exactly the approach I outlined above. A customer was getting hit with thousands of requests to a particular image, which is turn was gobbling up all their bandwidth. By moving the image and responding with a 500 access denied for the old file name (by making it not readable by the apache user) the effect of the DDoS was lowered enough for normal usage of the server. I agree it's not a suitable long-term solution, but for dealing with the immediate problem it can work. As I made clear in my original post, if your bandwidth is getting saturated by the requests, the approach does nothing for you.
     
    forkqueue, Nov 9, 2005 IP
  13. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Like I said, this type of attacks is better to be dealt with at the network level. If you can't get to the network level - anything will do, even something as simple as what you described. This will still eat up your bandwidth pretty quickly, though - attackers control request size and can send your web server tons of data in the request and simply ignore your redirect responses. The very first thing to do in cases like this is to contact your hosting/colocation company.

    J.D.
     
    J.D., Nov 9, 2005 IP
  14. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #14
    True enough. In the case I was referring to, my customer *was* the co-location company :)
     
    forkqueue, Nov 9, 2005 IP
  15. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #15
    Well, we tightened up the firewall today and it seems the loser tried another attack, but it didn't affect the server any more :D
     
    fryman, Nov 9, 2005 IP
  16. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I can only agree with J.D with DDos you need to contact your upstream provider, if the packets reach your link you're already screwed.
     
    blinxdk, Nov 9, 2005 IP
  17. jim

    jim Well-Known Member

    Messages:
    816
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    153
    #17
    I hope no one minds that I'm digging up an old thread. I'm hoping Fryman or someone else can share which web hosting company worked with them to end the DOS attacks.

    I have a site that has been attacked a few times in the past few days (I guess I've arrived) and I need to host it with people who can protect it.
     
    jim, Sep 14, 2006 IP
  18. america2

    america2 Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I host with The Planet. They have really expensive Cisco Guard servers that will stop a DDOS. If their techs detect a DDOS, they'll put you behind the Cisco Guard until the attackers stop. Other hosts use Preventia servers. I forget which. I know The Planet can help you with a DDOS though.
     
    america2, Sep 16, 2006 IP
  19. Namesniper

    Namesniper Well-Known Member

    Messages:
    365
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    118
    #19
    Cisco will not save you from a real DDoS
    There are a number of services which offering DDoS protection like ddosprotection.com +there are a few expensive hosts which will save you from DDoS attacks up to 1 Gbps
     
    Namesniper, Sep 16, 2006 IP
  20. america2

    america2 Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    God only knows what will save you from a real DDOS by an expert but what is it that ddosprotection will do that a Cisco Guard and a firewall won't do?
     
    america2, Sep 16, 2006 IP