Home > Ask the Information Security Experts > Questions & Answers > What are the best bot detection mechanisms?
Ask The Security UK Expert: Questions & Answers
EMAIL THIS

What are the best bot detection mechanisms?

Ed Skoudis EXPERT RESPONSE FROM: Ed Skoudis

Pose a Question
Other Security UK Categories
Meet all Security UK Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 13 August 2007
How does a bot show itself in a computer? Does it have a process, service or startup command that can easily be identified, or is it totally invisible? Is the best detection method similar to signature-based protection?

>
EXPERT RESPONSE
Bots have various artifacts that they leave on a computer. Nearly all of them have one or more processes that can be seen in Task Manager or in the output of the tasklist command. Some, but not all, use services that can be viewed in the services control panel. Some bots alter the startup settings so that they can launch themselves automatically when the system boots up or when a user logs on.

On a Windows XP, 2003 or Vista machine, you can check those autostart settings by going to Start => Run and typing 'msconfig.exe.' Since all of the bot families manifest themselves in different ways, though, there is no single bot attribute for which you can search. Also, if the bad guy installs a rootkit to conceal the bot, detection can be even more difficult.

I've written several articles on how to analyze a machine to see if malware has been installed, and those malware detection techniques certainly apply to bots as well. I don't want to reiterate those articles, but I'd like to point out an additional vector for bot detection and identification: a sniffer.

Several very good sniffers are available for free, including WinDUMP and Wireshark. These tools capture packets and display them to their users. Most bots have very distinctive network communication patterns, which a sniffer can observe. Ideally, you should install a sniffer on a separate machine, a computer that is different from the one that may be infected. You can then use a hub or a tap to monitor its communications to the Internet.

Even if you don't have a separate machine, you may be able to install the sniffer on the same box that you are analyzing. Most bots will let the sniffer run unimpeded, although some do hide traffic from a sniffer or even attack it as it is runs.

Once the sniffer is running, look for anomalies in the network traffic. The more primitive bots use Internet Relay Chat on TCP port 6667 for their command and control channel. Others use a barrage of UDP packets for control. Most legit UDP traffic on a machine will either be DNS queries and responses or streaming audio or video. Other DNS results could be a concern.

In addition to showing the ports and protocols that a machine uses to communicate, a sniffer will also show the IP addresses that a machine is contacting. Look up those addresses to see what systems are on the other side. You can use a whois identification client, which is built into most Linux/Unix/Mac OS X machines; it is also freely available for Windows in many forms. You can also rely on a public page that does whois lookups. Type in the IP address, and that site will look up the associated organization. If your machine has taken up a sudden interest in a computer in some faraway country, one that you don't think it should be talking to, you may have a bot.

As for the best detection mechanism, you are correct. Today, antivirus and antispyware tools can detect hundreds of different bot variants using signature and heuristic techniques, but they aren't perfect, especially since new bot software is developed and released every week. That's why I offer the sniffer approach above, in the event that the bot dodges an antivirus and antispyware tool.

More information:

  • Malware creators have upped the ante with peer-to-peer (P2P) botnets. Learn how to detect them.
  • Thinking about logging into a botnet control channel? Not so fast, says Ed Skoudis.


  • Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Threat Management
    Cybercrime reports: Security not broken, but breaking at the seams
    Data losses set to soar, KPMG predicts
    Screencast: How to gather host-level data with Network Miner
    Appliance provides network access protection on school campus
    Market Harborough Building Society finds way to monitor users' network traffic
    'Phlashing' attacks
    How to identify network attacks proactively
    Stopping spam brings additional security benefits for cable company
    Finjan offers free audits for crimeware sufferers
    UTMs creep into the enterprise market, despite some resistance

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    Centre for the Protection of National Infrastructure  (SearchSecurityUK.com)
    Serious Organized Crime Agency  (SearchSecurityUK.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice

    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2008 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts