# Patent

## Title
Inline intrusion detection

## Abstract

A method for inline intrusion detection includes receiving a packet at a network gateway, storing the packet, and assigning an identifier to the packet. The method also includes transmitting a copy of the packet and the identifier from the network gateway to an intrusion detection system and analyzing the copy of the packet by the intrusion detection system to determine whether the packet includes an attack signature and communicating a reply message from the intrusion detection system to the network gateway. The reply message includes the identifier and is indicative of the results of the analysis. The size of the reply message is less than the size of the packet.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This application is a continuation of U.S. application Ser. No. 11/039,219 filed Jan. 20, 2005 and entitled “Inline Intrusion Detection” now issued as U.S. Pat. No. 7,725,938 on May 25, 2010.


TECHNICAL FIELD OF THE INVENTION
The present invention relates generally to the field of network security, and more particularly to inline intrusion detection.
BACKGROUND OF THE INVENTION
Intrusion detection systems (IDSs) generally operate in one of two modes. In “promiscuous” mode, the IDS monitors incoming network traffic to determine whether a particular pattern characteristic of an intrusion can be observed. In “in-line” mode, network traffic is scanned by the IDS to determine whether it contains a hostile signature. If a hostile signature is detected, the IDS prevents the network from receiving the traffic.
In at least some implementations of the in-line mode, packets travel from a network interface card (NIC) to a processing CPU over a relatively slow bus. A packet then travels back to the NIC after it has been determined whether the packet poses a security risk. This introduces significant overhead and performance limitations and provides for multiple points of failure.
SUMMARY OF THE INVENTION
A method for inline intrusion detection includes receiving a packet at a network gateway, storing the packet, and assigning an identifier to the packet. The method also includes transmitting a copy of the packet and the identifier from the network gateway to an intrusion detection system and analyzing the copy of the packet by the intrusion detection system to determine whether the packet includes an attack signature and communicating a reply message from the intrusion detection system to the network gateway. The reply message includes the identifier and is indicative of the results of the analysis. The size of the reply message is less than the size of the packet.
One technical advantage of certain embodiments of the present invention is the opportunity to conserve memory and bus resources in an IDS. By allowing an IDS to simply reply to a network gateway with an identifier and the desired action (or indication of whether or to what extent the packet contains an attack signature), rather than with the analyzed packet itself, communications between the network gateway and the IDS are expedited, allowing greater throughput for the IDS. Further, groups of packets may be disposed of by analysis of only a single packet, which further speeds the throughput of the IDS. This advantage may inhere, in some embodiments, in the location of functionality in the network gateway that can recognize groups of packets and control their disposition.
Additional technical advantages of the present invention will be readily apparent to one skilled in the art from the following figures, descriptions, and claims. Moreover, while specific advantages have been enumerated above, various embodiments may include all, some, or none of the enumerated advantages.



BRIEF DESCRIPTION OF THE DRAWINGS
For a more complete understanding of the present invention and its advantages, reference is now made to the following description, taken in conjunction with the accompanying drawings, in which:
FIG. 1 illustrates an inline intrusion detection system according to the teachings of the invention; and
FIG. 2 illustrates a flow chart showing an example method of operation for the inline intrusion detection system of FIG. 1.



DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS OF THE INVENTION
FIG. 1 illustrates a computer system 100 that includes an inline intrusion detection system (IDS) 102 between an external network 104 and a protected network 106. Generally, IDS 102 receives a copy of information communicated, in packet form in one example, from external network 104 and analyzes the information to determine whether the information includes a signature that is characteristic of a network attack or other hostile action. Based on whether an attack is detected, several possible actions may be taken, including: (i) dropping the packet, (ii) allowing the packet to pass to protected network 106, (iii) allowing the packet to pass to protected network 106 after modification, (iv) dropping the packet as well as all related packets, and (v) allowing the packet as well as all related packets to pass to protected network 106.
According to the teachings of the invention, network gateway 105 stores the analyzed packet and provides a copy to IDS 102 for analysis, along with an identifier for the packet. In one example, the identifier is inserted into the header of the copy of the packet that is provided to IDS 102. After analysis, an indication of the results of the analysis of the packet is sent from IDS 102 to the network gateway 105 in combination with the identifier previously received by IDS 102. Then network gateway 105 can process the stored packet corresponding to the identifier according to the received indication of the results of the analysis. The received indication of the results of the analysis of the packet may be merely an indication of whether the packet contains an attack signature, one of the five example actions enumerated above, or other indication. By providing the indication of the results of the analysis of the packet, along with the identifier, the throughput of IDS 102 may be increased, in some embodiments, because of the ability to avoid a round trip transport of the packet between IDS 102 and network gateway 105. By simply transmitting the identifier and the indication of the results of the analysis of the packet, rather than the entire packet, from IDS 102 to network gateway 105, such a round trip is avoided, in some embodiments. Additional details of one embodiment of computer system 100 are described below.
External network 104 may include any collection of networked communication devices exchanging information. Networked communication devices may include hubs, routers, switches, gateways, personal computers, telephones, or any other device that can exchange information. Devices in external network 104 may exchange information in the form of packets, cells, frames, segments, or other portions of data (collectively referred to as “packets”). External network 104 may use any suitable medium or media of transmission, including wireline, wireless, or optical connections. Devices in external network 104 may communicate with one another using any number of suitable protocols, such as asynchronous transfer mode (ATM), transport control protocol/Internet protocol (TCP/IP), synchronous optical network (SONET), or Ethernet. External network 104 may also include the Internet.
Protected network 106 represents any collection of communication devices communicating in any suitable manner. In particular, protected network 106 may include any of the devices and communication media discussed in conjunction with external network 104. Protected network 106 may also use one or more suitable communication protocols, such as the ones described above.
Network gateway 105 represents any suitable hardware and/or software that communicates traffic received from external network 104 to protected network 106 and IDS 102. In one example, network gateway 105 is a “smart” network interface card (NIC) that is operable to generate an identifier for each received packet and forward a copy of that packet to IDS 102. Further, network gateway 105 may include functionality for addressing the above-described dispositions of the packet, in one embodiment. For example, network gateway 105 may modify both the header and body of any given packet in response to instructions from IDS 102 to do so. Also, network gateway 105 may determine an appropriate disposition of the packet, and take that action, based on an indication received from the IDS of the content of the received copy of the packet, e.g. whether the packet includes an identified attack signature. In another embodiment, network gateway 105 may keep a watchdog timer for each packet for which a copy was sent to IDS 102 and perform a default action based on expiration of the timer. The default action could be to pass the packet or to drop the packet. Having such a timer removes IDS 102 as a point of failure.
IDS 102 is an inline security system that receives traffic from external network 104, analyzes the traffic to determine if it contains an attack signature or other indication of hostile action, and prevents hostile information from reaching protected network 106 by communicating the identifier identifying the packet and an indication of the results of the intrusion detection analysis. In the depicted embodiment, IDS 102 includes an interface 108, a processor 112, and a memory 114. Processor 112 may be any hardware and/or software components suitable for processing information, such as microprocessors, microcontrollers, or digital signal processors (DSPs).
Memory 114 is any suitable form of information storage, which may include magnetic media, optical media, removable media, local storage, remote storage, or other suitable component. In the depicted embodiment, memory 114 stores code 116, and attack signatures 120. Code 116 is executed by processor 112 to perform any suitable task associated with IDS 102. Attack signatures 120 are recognized patterns of information that indicate that an incoming packet represents a hostile action directed at protected network 106. Processor 112 compares information to attack signatures 120 to detect attacks.
Interface 108 represents a physical connection allowing communication between IDS 102 and devices on protected network 106 and external network 104.
Interface 108 also includes, or is associated with, a buffer 122. Buffer 122 represents local information storage at interface 108. Buffer 122 may include any suitable form of information storage, such as magnetic media, flash memory, optical media, or other type of information storage medium. Buffer 122 stores incoming information from external network 104 while the information is processed by components of IDS 102. In a particular embodiment, buffer 122 retains a copy of incoming traffic while the traffic is being analyzed by processor 112 to determine whether the incoming information is hostile.
In one example of a mode of operation, network gateway 105 receives traffic from network 104, assigns an identifier to that traffic, and transmits a copy to IDS 102. IDS 102 receives the copy at interface 108, along with the identifier, and buffers them in buffer 122. IDS 102 communicates a copy of the packet to processor 112, which analyzes the traffic to determine whether it includes an attack signature. Processor 112 then returns a message to IDS 102 indicating whether the packet includes an attack signature. Depending on whether the packet includes an attack signature, IDS 102 takes appropriate action.
IDS 102 may transmit to network gateway an indication of the results of the analysis. In one embodiment, such indication is a code representative of the appropriate disposition of the packet, along with the identifier. Example dispositions are (i) dropping the packet, (ii) allowing the packet to pass to protected network 106, (iii) allowing the packet to pass to protected network 106 after modification, (iv) dropping the packet as well as all related packets (including packets note yet received), and (v) allowing the packet as well as all related packets (including packets not yet received) to pass to protected network 106. Then, network gateway 105 may effect the reported disposition. With respect to packets being related to other packets and disposing of related packets in the same way, network gateway 105 may determine that certain packets are related by source, destination, protocol, or other characteristics. Alternatively, IDS 102 may merely report an indication of whether, and/or to what extent, the analyzed packet contains an attack signature or other indication of hostile action, along with the identifier, and network gateway 105 determines the appropriate action to take.
Upon transmitting the copy of the packets to IDS 102, a timer may be set. If the timer expires before a response is received from IDS 102 by network gateway 105, then a default action may be taken, such as dropping the packet or allowing the packet to pass. Modification of a packet may involve modification of its header or body, or both. In particular, it may be desired to modify a packet to remove material determined to be potentially indicative of an attack signature or other potentially hazardous condition.
One technical advantage of certain embodiments of the present invention is the opportunity to conserve memory and bus resources in IDS 102. By allowing IDS 102 to simply reply to network gateway 105 with an identifier and the desired action (or indication of whether or to what extent the packet contains an attack signature), rather than with the analyzed packet itself, communications between network gateway 105 and IDS 102 are expedited, allowing greater throughput for IDS 102. Further, groups of packets may be disposed of by analysis of only a single packet, which further speeds the throughput of IDS 102. This advantage may inhere in some embodiments, in the location of functionality in network gateway 105 that can recognize groups of packets and control their disposition.
FIG. 2 is a flow chart 200 illustrating an example method of operation for IDS 102 in connection with network gateway 105. Network gateway 105 receives a packet destined for protected network 106 at step 202 At step 204 an identifier is assigned to the packet and a copy of the packet is forwarded to IDS 102 along with the identifier. In one example, the identifier forms a part of the packet forwarded to IDS 102. At step 205 a timer may be set. IDS 102 buffers the packet at buffer 122 at step 206. Interface 108 communicates a copy of the packet to processor 112 at step 208.
Processor 112 analyzes the packet by comparing the packet to attack signatures 120 at step 210. Based on whether an attack signature is detected at decision step 212, then processor 112 sends an applicable indication of the results of the analysis to interface 108 at step 212. As described above, the indication of the results of the analysis may take the form of one of the five actions enumerated above or other action, the form of a code, or alternatively, may be simply an indication of whether an attack signature or hazardous condition was detected at step 210. At step 214, the indication and the identifier are sent to network gateway 105, where appropriate action may be effected, as described above. If the timer set at step 205 expires before step 214 occurs, network gateway 105 may take a default action, such as dropping the packet or allowing it to pass. The method may be repeated as long as there are incoming packets, as shown by decision step 220.
Although the present invention has been described with several embodiments, a myriad of changes, variations, alterations, transformations, and modifications may be suggested to one skilled in the art, and it is intended that the present invention encompass such changes, variations, alterations, transformations, and modifications as fall within the scope of the appended claims.

## Claims

1. A method comprising:
in response to receiving a packet at a network gateway, assigning an identifier to the packet;
generating, by the network gateway, a copy of the packet;
inserting, by the network gateway, the identifier into a header of the copy of the packet;
storing the packet and the identifier identifying the copy of the packet at the network gateway;
transmitting the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
maintaining the packet at the network gateway while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature;
receiving a reply message from the intrusion detection system at the network gateway, the reply message comprising the identifier extracted from the header of the copy of the packet and indicating one or more results of the analysis, the reply message further comprising a code representative of an action to take in response to the reply message, the size of the reply message less than the size of the packet; and
taking, by the network gateway, the action associated with the code in response to the reply message.

2. The method of claim 1, the taking the action in response to the reply message further comprising performing an action selected from the following:
dropping the packet;
dropping the packet and dropping one or more related packets;
allowing the packet to pass from the network gateway to a protected network;
allowing the packet and one or more related packets to pass from the network gateway to a protected network; or
modifying the packet and then allowing the packet to pass from the network gateway to a protected network.

3. The method of claim 1, wherein the reply message comprises an indication of whether the packet comprises an attack signature.

4. The method of claim 1, wherein the action represented by the code is selected from the following:
dropping the packet;
dropping the packet and dropping one or more related packets;
allowing the packet to pass from the network gateway to a protected network;
allowing the packet and one or more related packets to pass from the network gateway to a protected network; or
modifying the packet and then allowing the packet to pass from the network gateway to a protected network.

5. The method of claim 1, further comprising:
removing material indicative of an attack signature prior to allowing the packet to pass from the network gateway to a protected network.

6. The method of claim 1, wherein taking the action in response to the reply message comprises:
determining that one or more additional packets received at the network gateway are related to the packet; and
disposing of the one or more additional packets, by the network gateway, in a same manner as the packet, wherein the one or more additional packets are not analyzed by the intrusion detection system.

7. A method comprising:
in response to receiving a packet at a network gateway, assigning an identifier to the packet;
generating, by the network gateway, a copy of the packet;
inserting, by the network gateway, the identifier into a header of the copy of the packet;
storing the packet and the identifier identifying the copy of the packet at the network gateway;
transmitting the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
setting a timer upon transmission of the packet from the network gateway to the intrusion detection system;
maintaining the packet at the network gateway while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature; and
taking, by the network gateway, a default action in response to determining that the timer expired before a reply message is received from the intrusion detection system, the default action selected from the group consisting of:
allowing, by the network gateway, the packet to pass from the network gateway to a protected network; and
dropping, by the network gateway, the packet.

8. An apparatus comprising:
a memory configured to store a packet and an identifier identifying the packet at a network gateway; and
one or more processors configured to:
in response to receiving the packet at the network gateway, assigning an identifier to the packet;
generate a copy of the packet;
insert the identifier into a header of the copy of the packet;
transmit the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
maintain the packet at the network gateway while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature;
receive a reply message from the intrusion detection system at the network gateway, the reply message comprising the identifier extracted from the header of the copy of the packet and indicating one or more results of the analysis, the reply message further comprising a code representative of an action to take in response to the reply message, the size of the reply message less than the size of the packet; and
take the action associated with the code in response to the reply message.

9. The apparatus of claim 8, the taking the action in response to the reply message further comprising performing an action selected from the following:
dropping the packet;
dropping the packet and dropping one or more related packets;
allowing the packet to pass from the network gateway to a protected network;
allowing the packet and one or more related packets to pass from the network gateway to a protected network; or
modifying the packet and then allowing the packet to pass from the network gateway to a protected network.

10. The apparatus of claim 8, wherein the reply message comprises an indication of whether the packet comprises an attack signature.

11. The apparatus of claim 8, the action represented by the code is selected from the following:
dropping the packet;
dropping the packet and dropping one or more related packets;
allowing the packet to pass from the network gateway to a protected network;
allowing the packet and one or more related packets to pass from the network gateway to a protected network; or
modifying the packet and then allowing the packet to pass from the network gateway to a protected network.

12. The apparatus of claim 8, the one or more processors further operable to:
remove material indicative of an attack signature prior to allowing the packet to pass from the network gateway to a protected network.

13. The apparatus of claim 8, wherein, when taking the action in response to the reply message, the processor is configured to:
determine that one or more additional packets received at the network gateway are related to the packet; and
dispose of the one or more additional packets, by the network gateway, in a same manner as the packet, wherein the one or more additional packets are not analyzed by the intrusion detection system.

14. An apparatus comprising:
a memory configured to store a packet and an identifier identifying the packet at a network gateway; and
one or more processors configured to:
in response to receiving a packet at the network gateway, assign an identifier to the packet;
generate a copy of the packet;
insert the identifier into a header of the copy of the packet;
transmit the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
set a timer upon transmission of the packet from the network gateway to the intrusion detection system;
maintain the packet in the memory while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature; and
take a default action in response to determining that the timer expired before a reply message is received from the intrusion detection system, the default action selected from the group consisting of:
allowing, by the network gateway, the packet to pass from the network gateway to a protected network; and
dropping the packet.

15. Logic embodied on one or more non-transitory computer-readable media and when executed operable to:
in response to receiving a packet at a network gateway, assign an identifier to the packet;
generate, by the network gateway, a copy of the packet;
insert, by the network gateway, the identifier into a header of the copy of the packet;
store the packet and the identifier identifying the copy of the packet at the network gateway;
transmit the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
maintain the packet at the network gateway while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature;
receive a reply message from the intrusion detection system at the network gateway, the reply message comprising the identifier extracted from the header of the copy of the packet and indicating one or more results of the analysis, the reply message further comprising a code representative of an action to take in response to the reply message, the size of the reply message less than the size of the packet; and
take the action associated with the code in response to the reply message.

16. The logic of claim 15, the taking the action in response to the reply message further comprising performing an action selected from the following:
dropping the packet;
dropping the packet and dropping one or more related packets;
allowing the packet to pass from the network gateway to a protected network;
allowing the packet and one or more related packets to pass from the network gateway to a protected network; or
modifying the packet and then allowing the packet to pass from the network gateway to a protected network.

17. The logic of claim 15, further operable to:
remove material indicative of an attack signature prior to allowing the packet to pass from the network gateway to a protected network.

18. The logic of claim 15, wherein taking the action in response to the reply message comprises:
determining that one or more additional packets received at the network gateway are related to the packet; and
disposing of the one or more additional packets, by the network gateway, in a same manner as the packet, wherein the one or more additional packets are not analyzed by the intrusion detection system.

19. Logic embodied on one or more non-transitory computer-readable media and when executed operable to:
in response to receiving a packet at a network gateway, assign an identifier to the packet;
generate, by the network gateway, a copy of the packet;
insert, by the network gateway, the identifier into a header of the copy of the packet;
store the packet and the identifier identifying the copy of the packet at the network gateway;
transmit the copy of the packet having the identifier in the header from the network gateway to an intrusion detection system;
set a timer upon transmission of the packet from the network gateway to the intrusion detection system;
maintain the packet at the network gateway while the copy is analyzed by the intrusion detection system to determine whether the packet includes an attack signature; and
take, by the network gateway, a default action in response to determining that the timer expired before a reply message is received from the intrusion detection system, the default action selected from the group consisting of:
allowing, by the network gateway, the packet to pass from the network gateway to a protected network; and
dropping the packet.