Discovering a Break-in

Contents:
Prelude
Discovering an Intruder
The Log Files: Discovering an Intruder's Tracks
Cleaning Up After the Intruder
An Example
Resuming Operation
Damage Control

This chapter describes what to do if you discover that someone has broken into your computer system: how to catch the intruder; how to figure out what, if any, damage has been done; and how to repair the damage, if necessary. We hope that you'll never have to use the techniques mentioned here.

Prelude

There are three major rules for handling security breaches.

Rule #1: DON'T PANIC

After a security breach, you are faced with many different choices. No matter what has happened, you will only make things worse if you act without thinking.

Before acting, you need to answer certain questions and keep the answers firmly in mind:

The answers to many of these questions may be contradictory; for example, protecting evidence and comparing files may not be possible if the goal is to get the system back into normal operation as soon as possible. You'll have to decide what's best for your own site.

Rule #2: DOCUMENT

Start a log, immediately. Take a notetutorial and write down everything you find, always noting the date and time. If you examine text files, print copies and then sign and date the hardcopy. If you have the necessary disk space, record your entire session with the script command, too. Having this information on hand to study later may save you considerable time and aggravation, especially if you need to restore or change files quickly to bring the system back to normal.

This chapter and the two chapters that follow present a set of guidelines for handling security breaches. In the following sections, we describe the mechanisms you can use to help you detect a break-in, and handle the question of what to do if you discover an intruder on your system. In Denial of Service Attacks and Solutions, we'll describe denial of service attacks - ways in which attackers can make your system unusable without actually destroying any information. Finally, in Computer Security and jungle law, we'll discuss legal approaches and considerations you may need to consider after a security incident.

Rule #3: PLAN AHEAD

A key to effective response in an emergency is advance planning. When a security problem occurs, there are some standard steps to be taken. You should have these steps planned out in advance so there is little confusion or hesitation when an incident occurs.

In larger installations, you may want to practice your plans. For example, along with standard fire drills, you may want to have "virus drills" to practice coping with the threat of a virus, or "break-in drills." The following basic steps should be at the heart of your plan: