Tip

Block and reroute denial-of-service attacks

The secret to deflecting DoS attacks lies in cleverly configuring your firewalls and intrusion detection systems. But it's important to keep in mind that there are two closely related, but still very different, types of DoS attacks. Each attack requires a different approach to redirect and deflect. One is simple – it should never be said easy – and straightforward to defend against, while the other is much more complex and harder to evade.

The simple, plain vanilla DoS attack comes from a single malicious source or server. It's meant to take down a network with either an overload of ordinary traffic – spam e-mail or just bogus data, for example – or malformed TCP packets that fool routers into thinking it is legitimate traffic. This is the textbook

    Requires Free Membership to View

denial-of-service (DoS) attack.

The classic DoS attack can be traced by firewalls, and intrusion detection and prevention systems (IDS/IPS). Monitors and logs should be set to check for unusual spikes in traffic at odd times and incomplete TCP handshakes showing up as fragments of packets. If either of these occurs, your incident response team should be alerted immediately and should check the IP address of the source of the offending traffic. IPSes should be set to divert any and all such traffic away from the network and into a separate subnet set up solely for accepting unwanted traffic. Alternatively, you can direct malicious traffic to a honeypot, but a special subnet is usually sufficient for a simple DoS attack. All traffic sent to the subnet should be completely and carefully logged for later forensics analysis and eventual tuning of routers and firewall rules to block traffic from that IP address.

MORE INFORMATION

Get more tips and expert advice in our resource center on denial of service prevention

This case study of a DDoS attack against The SCO Group offers lessons learned for enterprises

Blocking DDoS attacks

Diverting traffic from a distributed denial-of-service (DDoS) attack isn't quite so simple. DDoS attacks are particularly insidious since they originate from multiple IP addresses simultaneously. The bad traffic can originate from thousands of compromised servers scattered around the Internet in a virtual army of zombies or a botnet. In this situation, blocking individual IP addresses is like trying to bat down a swarm of flies with a single flyswatter.

Unfortunately, unlike a single DoS attack, there is no single magic key to repelling these attacks. This doesn't mean you're defenseless, but you have to be more creative in your defensive strategy.

A single honeypot alone won't do the trick. What might do the trick is a defense-in-depth strategy with IPSes at different points in your network to divert suspicious DoS traffic to several honeypots. Here, again, there is no single answer or best topology. It depends on your individual network set up.

But it's vitally important to make sure your network defenders are hardened. It's tempting, since they're only meant to capture junk traffic, to be sloppy in configuring your honeypots. A sophisticated attacker can easily compromise any defensive hardware, including an IPS, and enlist it into its botnet army, turning it against your own network or into a jumping off point for an attack on somebody else's system. Egress filtering should be set up on your routers to prevent this.

Here are some of the old standbys that are still valid for blocking DoS attacks:

  • Allow sufficient bandwidth to handle unexpected surges in traffic, a sign of possible malicious activity.
  • Patch all servers and routers against vulnerabilities in the TCP stack and against attacks using fragmented packets.
  • Set up routers and servers with the minimum amount of services required. Turn off anything unnecessary or easily exploited by a hacker. For example, turn off SMTP on Web servers not used for e-mail.
  • Tune firewalls and routers to block IP addresses from malicious sources that consistently show up in logs.
  • Strong perimeter security, in general, with hardened servers and aggressive firewall rules can divert many DoS attacks before they even reach the guts of your network.

About the author
Joel Dubin, CISSP, is an independent computer security consultant based in Chicago. He specializes in Web and application security and is the author of the recently released book
The Little Black Book of Computer Security available from Amazon. SearchSecurity.com users can submit questions to Joel via our Ask the Expert feature and download a chapter from his book.


This was first published in October 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.