Making Networks More Secure, Part 1

A protocol analyzer is a software tool that tunes into packets of data as they move across networks. Properly used, it can help demonstrate why secure software is a good idea and can help secure networks in a wide variety of ways. For system builders and networks, a protocol analyzer can be an invaluable diagnostic and troubleshooting tool.

Nearly all network-security software -- including screening routers, firewalls, intrusion detection or prevention systems, and security scanners -- first examines incoming or outgoing network traffic, then determines whether that traffic should be allowed to travel further or be blocked. That same functionality forms the core of any good protocol analyzer. It examines packets passing through a network interface to see what's inside. But unlike most security software, which stops scanning before it reads entire packets, protocol analyzers can decode and interpret everything they see -- as long as they can recognize what kind of information a packet contains, and apply the right template to make its contents readable.

Although protocol analyzers have many uses above and beyond network security -- for example, debugging code that transmits traffic onto a network -- they have many potential security applications, too. Information-security professionals use protocol analyzers to capture specific types and sequences of packets, called "attack signatures," to permit intrusion-detection or -prevention systems to recognize and report on (or block) intrusions and attacks. Similarly, spam filters dig deeply enough into SMTP packets to block mail from unwanted senders, or messages that contain certain keywords in the Subject line (such as "Viagra" or "Cialis"). At a simpler level, firewalls and screening routers identify and block spoofed network addresses, then take action based on domain names associated with source or destination IP addresses. Protocol analyzers can do all of these things, and quite a bit more.

System builders will find a protocol analyzer to be a useful, even essential, tool. In just minutes, a properly-equipped laptop can hook up to a network segment, switch, or wireless hub to provide a compelling "show and tell" about what's traveling over that network, who's using the network, and much more. Showing customers potential security problems on their networks is more convincing than just talking about them.

id
unit-1659132512259
type
Sponsored post

System builders and consultants can choose from numerous protocol analyzers available in today's marketplace (see Sidebar below). For this Recipe, I chose an Open Source protocol analyzer called Ethereal. I like Ethereal because it is free; runs on the Unix, Linux, and Windows operating systems; has an active and interested user community; and is relatively easy to install, learn, and use. Only low-level interface and menu details in my recipe will differ if you use another tool.

There are numerous ways you can use Ethereal to alert clients to potential security problems or to set up and configure security software like VPN clients or IP Security links. In this Recipe, part 1 of 2, you'll learn how to use Ethereal for the following two uses:

Regardless of how you choose to use Ethereal -- or train your clients to use it themselves -- you must first perform some or all of these tasks to get started:

To get ready to use Ethereal, you must first install the software on a machine you'll use to monitor or capture packet traffic on some particular network cable segment. You must also make sure Ethereal can monitor or capture traffic from that segment, as described earlier.

Here's what you'll need to get started:

Ethereal Ingredients

Create Active Station List, Step-By-Step

Now that we have our components assembled, let's take a look at the five steps involved in creating an active station list:

Fig. 1: View this screen-shot in a separate window.

If you capture a long trace and filter on IP addresses (using something like ip.src == 172.16.1.0/24 in the case of the Class B private IP address used for the example in the screen shot above, you can also achieve the same thing. But you may have to search around in the trace file to get matching MAC addresses.

The arp output matches MAC and IP addresses more or less automatically. Later, you can use this information to spot "rogue addresses" -- devices or computers attached to your network that aren't on your known list of MAC or IP addresses. In fact, I have my firewall configured to recognize all local hosts whose IP and MAC addresses are identified explicitly in the firewall configuration files, and to allow only very limited network access to other local addresses should they ever pop up.

I recommend that you explain the benefits of this approach to your customers. Namely, that should rogue users ever show up on a network segment, they will be immediately recognized, and their access will be severely curtailed. Those with legitimate needs for more access will ask for more, and probably have it granted. Those with no legitimate needs for more access can try their tricks elsewhere.

Password Sniffing, Step-By-Step

Packet-capture continues only until your packet-capture buffer fills up. Then it stops. That's why I recommend that you ask your client to log into an FTP or Telnet server, or access SMTP/POP3 e-mail, while you're capturing a trace. That way, you can show them the results fairly quickly. This is so easy, it's frightening. I use SMTP/POP3 for my example, but you could easily do the same thing by typing ftp or telnet into the Filter: textbox instead of pop, as described in the following steps:

Fig. 2: View this screen-shot in a separate window.

The screen-shot above shows just how obvious the account name (bobcraw) password (Castorbean12) are to find and read. The same technique also works for the file transfer protocol (FTP), telnet, many versions of SMTP, and other insecure IP services. I find this to be the best argument around for switching clients to secure implementations, running within secure shells, or using VPN software and encryption. Although most clients "know" this is true, it's so much more convincing to show them what any fool with a protocol analyzer can do -- this means you and me!

That's absolutely all there is to it!

Sidebar: Other Protocol Analyzers

The following table identifies other, well-known protocol analyzers currently available. Ethereal can read all of these formats, and a number of others as well (documented at the Ethereal site).

Product/Format
Description
AIX iptrace
AIX packet captures; uses tcpdump format
EtherPeek/TokenPeek/AiroPeek
Well-known packet-capture tools
libpcap/tcpdump
Common Linux protocol-capture, -analysis tools
Microsoft Network Monitor
Microsoft Server monitor/trace utility
Network Instruments' Observer
Uses Sniffer formats
NetXray and Windows-based Sniffer
Well-known packet-capture tool format from McAfee
Sun snoop/atmsnoop
Sun-originated, standard packet-capture file format
Visual Networks' Visual UpTime
Protocol analyzer; can convert to Sniffer formats

Also, Webclasses offers a nice protocol analyzer operations lesson that interested readers may want to check out.

Finally, using a protocol analyzer for security purposes overlooks the software's many other capabilities. If you're interested in learning more about Ethereal, you'll find ample documentation at the Ethereal Web site. I also recommend a new book, Ethereal Packet Sniffing by Angela Orebaugh with Greg Morris, Ed Warnicke, and Gilbert Ramirez (Syngress Publishing, 2004). Because the authors are Ethereal developers, technical writers, and information-security professionals, their coverage is accurate, interesting, and relevant.

This is Part 1 of a two-part Recipe. Part 2 will deal with third-party IP tools-- shareware and relatively inexpensive commercial software. It also will provide pointers to some great "online toolbox resources" whose operators collect and catalog listings of and pointers to such things, for those in need of more options and capabilities.

ED TITTEL is a technology writer who has contributed to more than 100 computer books; a trainer; and a consultant who specializes in IT certification and information security. He has no commercial affiliation with any of the vendors or products described in this article.

Did you try this Recipe? If so, how did it work out? To discuss this or other TechBuilder Recipe, start or join a discussion thread on the Recipe Forum. Membership is required. Not yet a member? Becoming a member is free, secure, and fast. Join TechBuilder today.