Address unknown, part 2

By Robert Currier, ITworld.com |  Networking Add a new comment

In our last
column
we talked about the problems we faced when a rogue DHCP server came to life
on our residential network. In this installment we'll show you how to use Snort, the
lightweight intrusion detection software, to grab the beast by the throat and put an
end to its bad behavior.

Taking advantage of the flexible rules language of snort, we quickly cranked out a DHCP
server detection rule set. Our generic rule looked like this:

    alert udp !$RES_NET 67 -> any 68 (msg: "Rogue DHCP
server...");

This rule tells snort to generate an alert if it sees a udp packet originating from a
network other than the home network -- in this example our residential network -- with
a source port of 67 (DHCP server) destined for port 68 (DHCP client) on any host.

The rule worked fine. In fact, it worked too well. Snort was detecting our enterprise
DHCP servers and generating tremendous amounts of logging data. We needed a way to
eliminate the valid traffic while still detecting rogue servers. Snort's pass alert
mechanism did the trick:

    pass udp 152.3.250.1 67 -> any 68;

    pass udp 152.3.250.2 67 -> any 68;

    pass udp 152.16.2.250 67 -> any 68;

    alert udp !$RES_NET 67 -> any 68 (msg: "Rogue DHCP
server...");

The new rule set should have done the trick. But it didn't. We were still seeing
traffic from the hosts we had told snort to ignore. What was going on?

Digging through the snort documentation we discovered that snort reads in all the rules
at execution time. The rules aren't evaluated in the order they are written. By
default snort reads rules in the following order: alert, log, pass. Evaluating the
rules in this sequence prevents a bad pass rule from defeating fifty valid alert
rules.

Fortunately for us snort provides a means to reverse the order of evaluation: the --o
command line option. Once we kicked off snort with the --o option our rule set worked
perfectly. Traffic from our enterprise servers was ignored and snort concentrated on
looking for rogue servers. And it didn't take long to find our problem:

    Xxxxx xxxxx xxxxxx 169.x.x.x.-> 10.0.1.35 .xxxx Rogue DHCP
server...

It turned out that student had installed an Apple Airport wireless hub in his dorm
room. He hadn't changed the default settings on the Airport and it was happily acting
as a DHCP server and handing out addresses in the 10.0.1.0 private network space. We
tracked the MAC address of the Airport hub to a dorm room and deactivated the port. A
quick phone call to the student and the mystery was solved.

We've left the DHCP server detection rules in place and have picked up several other
rogue servers. We use snortsnarf, a perl application mentioned in href=http://mithras.itworld.com/articles/columns/net-currier-0317.html>Part 2 of our
IDS series, to parse the snort alert files and generate HTML pages that we check
once or twice a day. Using snortsnarf is much easier than trying to go through snort's
voluminous alert files by hand.

DHCP's biggest asset -- promiscuity -- is also its biggest problem. Using defined
address tables isn't an option when you're serving up 6,000 addresses. Until we're able
to authenticate and encrypt the traffic between our enterprise DHCP servers and their
clients we'll be forced to hunt down and exterminate the rogue servers on a
case-by-case basis. We desperately need authenticated DHCP. DHCP working group, are
you
listening?

    Add a comment

    Post a comment using one of these accounts
    Or join now
    At least 6 characters

    Note: Comment will appear soon after you have activated your account.
    Obscene/spam comments will be removed and accounts suspended.
    The information you submit is subject to our Privacy Policy and Terms of Service.

    ITworld LIVE

    NetworkingWhite Papers & Webcasts

    White Paper

    The 2011 iPass Mobile Enterprise Report

    This industry survey covers trends, recommendations and a policy guide on managing Enterprise Mobility for IT management and CIOs. Get data on employee device liability, as well as smartphone/tablet penetration, budget control and provisioning. Find out how your organization compares, how to ensure mobile worker productivity, and control costs.

    Webcast On Demand

    Managing Enterprise Mobility Costs

    Mobile employees, especially those traveling internationally, were spending time and resources finding and making connections. Roaming costs were out of control. The IT Administrator at The Hay Group tells you how he got more control over these costs, providing management with predictable budgets and insights while ensuring employee productivity.

    Sponsor: iPass

    White Paper

    Digital Transformation: Creating New Business Models Where Digital Meets Physical

    Individuals and businesses alike are embracing the digital revolution. Social networks and digital devices are being used to engage government, businesses and civil society, as well as friends and family.

    White Paper

    The Journey to the Private Cloud

    Both business and IT need the agility enabled by the private cloud. Now you can apply technologies and processes pioneered by public cloud services to your own data center.

    Webcast On Demand

    Navigating the Public Cloud

    InfoWorld contributing editor and consultant David Linthicum offers expert advice about choosing services to outsource to the public cloud providers, cloud data security and identity, integrating public cloud services, and how to avoid provider lock-in.

    Sponsor: Intel

    See more White Papers | Webcasts

    Ask a question

    Ask a Question