My sites were attacked for the first time, need some tips

Status
Not open for further replies.

RockDiesel

New member
Nov 29, 2007
1,419
16
0
So my sites were attacked, I guess ddos, and as a result my hosting account with HostMonster was suspended. I went through my logs, banned the offending IP, and got everything reactivated. However, I know jack shit about security and how I should protect myself from this in the future.

Anyone, like subigo, who has experience in hosting have any info for me to prevent myself from getting bombed like this again? Never experienced this before so I have no idea where to start.
 


I would think HG would have firewalls in place for this, but... There's really not much you can do in this situation. The attackers can just hit you from different servers over and over again until HG decides to permanently ban you.

It might be worth it to find a cheap dedicated server somewhere if it's a big problem. At least then you won't have to worry about being shut down and you can install a firewall like CSF that has good built in ddos detection.
 
May be there is a standard plugin which you can use in any hosting package that prevents ddos attacks, just like an antivirus and antispyware software, this would be something like akismet, but it would protect and alter your htaccess dynamically, based on threats reported from around the world, howzzat.
 
May be there is a standard plugin which you can use in any hosting package that prevents ddos attacks, just like an antivirus and antispyware software, this would be something like akismet, but it would protect and alter your htaccess dynamically, based on threats reported from around the world, howzzat.
*facepalm* Just shut the fuck up (and GTFO) if you have no idea what you talking about.
 
May be there is a standard plugin which you can use in any hosting package that prevents ddos attacks, just like an antivirus and antispyware software, this would be something like akismet, but it would protect and alter your htaccess dynamically, based on threats reported from around the world, howzzat.
No. There's not. There's a few things that can kill a DDOSed server

  • Too much bandwidth
  • Not enough processor/RAM (large pages, lots of PHP, etc)
  • Too many concurrent connections.
A plugin might be able to slow down the bandwidth problem(though it still has to pass the headers).
It could also possibly help with processor/ram, but that would require the DDOS plugin to be more efficient than the page that would load after it. In addition, if you have legitimate traffic that's still coming in DURING the DDOS, you actually would have an even larger processor load because those users would be executing the intensive page AND the DDOS checking plugin.

Now those were actually the small problems.
The first big one is that most DDOSes aren't necesarilly going to be HTTP requests, so few things you could have on the server end are even going to execute. Unless you're running something like PeerGuardian, which is going to use a fuckin bungload of processor anyways.

The second big problem is the number of connections a server can handle at any given time. They're ALL limited. First by the shared hosting company. But if the guy has a bigger botnet, you're still screwed because they can max out the number of connections on the box.

There ARE software DDOS solutions, but they're pretty much shiite if the person knows what they're doing. I haven't had to do it thank god, but I've heard good results from filtering it at the router.

All that said, it sounds like op was getting DOSed by ONE ip, which is totally different and easy as piss to block.
 
DDoSing can't be stopped for good regardless of what you do, but it can be slowed down and hard to succesfully penetrate. Just tell your host not be nazi's about the hosting. They should be covering a decent firewall just in case. Looks like your host is careless. Even if they cap your bandwidth, the server shouldn't of let you down like that. You should've gotten like a 'excessive bandwidth reached' type of message, not the site completey being unreachable.
 
If you're OK with being followed around by guys in black SUVs, you could always go this route:

http://www.wickedfire.com/shooting-shit/25354-eli-working-white-house.html
That thread really was excellent stuff when it happened. In that thread you can read very, very clearly who are the real players here and where everybody is positioned. What's funny is that majority of posters in that thread think they know exactly where they stand. But it's way way off and they don't even realize it :D
 
I have a lil' bit of experience with this so I'll chime in :)

first identify what kind of attack and what your intentions are (to either stop it or catch them). I suggest catching them because if they did it once they might do again.

If its coming from a single ip just block the ip in your firewall or at least in the apache config or htaccess. You can only do the apache and htaccess if its an http attack. Some attacks come from tcp and other methods.
If it's coming from scripts (on freehosts or proxies) contact all of them and try to get the attack stopped and get a copy of their log files and work your way back to the source.

To catch them first contact your local fbi. You'll probably end up needing them to get the information you need from isps and such. They can be extremely helpful.
If the attack is coming from lots of ips and they appear to be regular dsl or internet PCs than you probably have a botnet on your hands. Determine the size of the botnet and try to adjust your apache,firewall and server to handle it. Some of the botnets are made by viruses and there are literally millions of infected computers so this may all be in veign.
If so than parse through all your logs and grab the geo location of the ips. Try to identify a few local computers. If you can get a few local ones you can head down to their isps (smaller ones will be more accomidating) and tell them your situation. Talk them into getting a few of the customers contact information.

Then contact the customers and tell them how they have a virus on their computer and its been attacking your website which is why their computer has been so slow online lately. Offer to pay to have a professional repair shop in town fix up their computer in exchange for you getting to look at the virus and where it came from. Then bring their computers to the repair shops and direct them to take a 48hr log of all their netstats in both incoming and outgoing connections with all the extra startup software disabled. Meanwhile temporarily adjust your server to come as close as possible to handling the attack and if you can taunt the attacker to adjust his attack. This will cause him to resend commands to the botnet. It'll also cost him a lot of money if he hired someone to do the attack. Which will give you a good idea if he can afford to do it again. Return the computers and go through the logs.

See if you can identify some sort of website or email address that the botnet pulls its attack commands from. Once you've identified that quickly contact the fbi guys again and get a court order to get the information of the owner. From there work your way backwards till you find the culprit.

Often times, as with what happened to me, they hire so called "companies" in foreign countries who specialize in performing ddos attacks and will attack sites and servers for a price. If that's the case you're in kind of a long setback, especially if it comes from a country that is leinant on cybercrimes. All else fails though since 911 and the patriot act the fbi is in most countries and you can call the fbi in the suspects area and file a case with them. They can usually at least go kick in a door or two, comphenscate a computer or do a little interogation. Usually the person who was hired will fess up to who hired him to do the attack and you can begin the long process of getting files charged, an arrest made and the subsequent lawsuits for damages.

No matter what, if you get in contact with the attacker keep them talking. Lie through your teeth, play smart play dumb say whatever you need to say to squeeze any sort of information out of them. Either way you're fucked for the moment so don't be afraid of doing worse by taunting them. Remember the longer the attack goes on the higher the risk they're taking of getting caught.

Good luck man keep us posted.
 
Gotta agree with ChrisS. DDoS is nasty. We have had some clients hooked up for days to try and stop the DDoS. Ain't fun for anyone involved, as we know our clients are affected and there is only so much we can do until it subsides.
 
Status
Not open for further replies.