Certain embodiments of the invention may be found in a method and system for intrusion detection and prevention based on packet type recognition in a network. Certain aspects of the invention may provide a method and system for determining a packet type for each of a plurality of received network packets based on at least one of: a header and content of each of the plurality of received network packets. The rate at which the plurality of received network packets are handled at a port in the network switching device may be regulated based on a number of occurrences of the determined packet type of the plurality of received network packets. At least a portion of a plurality of additional network packets of the determined packet type received at the port in the network switching device may be dropped, if the determined number of occurrences of the determined packet type of the plurality of incoming packets exceeds a threshold within a time period.
A packet type may be referred to as a class of frames. For example, Internet control message protocol (ICMP) frames, Ethernet multicast or Broadcast frames, an Ethernet frame with a specific frame type value or with a particular virtual local area network (VLAN) ID. The frames that may be rate limited may comprise TCP synchronous (SYN) frames, other transport connection requests, ICMP frames, address resolution protocol (ARP) and reverse address resolution protocol (RARP), one or more of which may be utilized by attacks to change the state of a server. The TCP SYN may be a single bit in a field of six control bits in a TCP header. The SYN bit may be utilized to synchronize sequence numbers in order to ensure that every octet in a given TCP packet may be received and acknowledged. A packet type may be a characteristic that may be present in a frame or a multitude of frames that are, for example, a login request for a protocol. For example, iSCSI or a frame or a group of frames carrying some credential or connection request information. The packet type may comprise a complete field or portions of any of the above fields or any combination of fields or sub fields or wild cards.
The loop 110 illustrates data being communicated from the output port 1106 of the packet network switch 102 through the network 108 and being received at an input port 2104 of the packet network switch 102. The same data that is received at the input port 2104 may be then communicated back to the output port 1106, thereby creating a loop. A loop 110 may occur when data is transmitted from the first output switch port 106, received at a first input port 104 of the same switch 102 and is communicated back to the first output switch port 106.
In accordance with various embodiments of the invention, a passive methodology may be utilized to detect and handle loops that may occur in a network 108. This may be utilized in instances where the spanning tree or rapid spanning tree algorithm is not running. Each frame handled by the switch 102 may be tracked by a classifier that examines each frame to determine its identity. For example, a hashing operation may be performed across each received frame and the corresponding hash information related to each frame may be stored, for example, in a table in memory. The hash information may be examined to determine whether there are multiple occurrences of the same received frame. The accuracy of the hashing algorithm may adequately detect multiple frame occurrences. If examination of the hashed information indicates that a frame is to be communicated through the switch 102 at a rate that may exceed a threshold or other determined rate, then this may indicate the presence of a loop in the network 108. In most networks, this may be a fair assumption since there would be no value in sending the same information through the switch constantly, except for testing purposes.
The networking system 150 may enable operation or support of various networking protocols. For example, the networking system 150 may enable supporting of transport control protocol/Internet protocol (TCP/IP) connections. In this regard, the networking system 150 may enable supporting of Internet control message protocol (ICMP), address resolution protocol (ARP), stream control transmission protocol (SCTP), and/or path maximum transmission unit (PMTU) discovery protocol, for example. The ICMP protocol may refer to an ISO/OSI layer 3 protocol that may allow routers, for example, to send error and/or control messages about packet processing on IP networks. The ARP protocol may refer to a low-level protocol within the TCP/IP suite that may map IP addresses to corresponding Ethernet addresses. The SCTP may support the transport of public switched telephone networks (PSTN) signaling messages over connectionless packet networks such as IP networks, for example. The PMTU may refer to a maximum unit of data that may be sent given a physical network medium. In other embodiments, SCTP may be used as the transport protocol rather than TCP.
The host 152 may enable setup parameters for network connections. For example, the host 152 may setup transport layer parameters comprising information that support time stamping, window scaling, delayed acknowledgment policy, flow control scheme to be used, congestion handling, selective acknowledgement (SACK), buffers to be used, and/or other transport related parameters. The host 152 may also setup network layer parameters comprising information that supports IPv4 or IPv6, for example, and options such as no fragments and/or hop limit. The host 152 may also setup data link layer parameters comprising information that supports virtual local area networks (VLAN) and source address to be used, for example.
The CPU 156 may comprise suitable logic, circuitry, and/or code that may enable supporting of the management and/or performance of networking operations associated with remote peers or clients on a network. The CPU 156 may also enable supporting of the management and/or performance of service applications that may be provided to the remote clients on the network.
The memory 158 may comprise suitable logic, circuitry, and/or code that may enable storage of information regarding the networking operations and/or service applications supported by the CPU 156. The chipset 160 may comprise suitable logic, circuitry, and/or code that may enable supporting of memory management, PCI master and arbitrator, graphics interface, I/O master for USB, audio, and/or peripheral devices, for example. In this regard, the chipset 160 may comprise at least one integrated circuit (IC) that provides services in support of the CPU 156 operations. In some instances, the services provided by the chipset 160 may be implemented in separate ICs. The choice of one or more ICs for implementing the chipset 160 may be based on the number and/or type of services provided.
The NIHW device 154 may comprise suitable logic, circuitry, and/or code that may enable communication with the host 152. In this regard, the NIHW device 104 may enable communication with the CPU 156, the memory 158, and/or the chipset 160. In some instances, the number of network connections that may be supported by the NIHW device 154 may be different than the number of network connections that may be supported by the host 152. For example, when the host 152 supports 10,000 connections and the NIHW device 154 supports 1,000 connections, then a connection ratio of 10:1 is supported by the networking system 150. In another example, if the host 152 supports 2,000 connections and the NIHW device 104 supports 1,000 connections, then a connection ratio of 2:1 is supported by the networking system 150. The connection ratio of a networking system that comprises a host and an NIHW device may be utilized when determining a connection setup model for a particular application.
The plurality of clients 183, 185, 187 and 189 may comprise suitable logic, circuitry and/or code that may be located on the premises of a customer, for example, data termination equipment such as routers. The packet switch 191 may comprise suitable logic, circuitry and/or code that may be enabled to provide clocking and switching services in a network. The plurality of clients 183, 185, 187 and 189 may be coupled to the packet switch 191 by a physical layer component and a link layer component. The physical layer component may define the mechanical, electrical, functional, and procedural specifications for the connection between the devices, for example, the RS-232 specification. The link layer component may define the protocol that establishes the connection between the plurality of clients 183, 185, 187 and 189 and the packet switch 191.
The host 181 may comprise suitable logic, circuitry and/or code that may be enabled to limit its new connection acceptance rate or the number of suspected frames of a known profile, for example, Internet control message protocol (ICMP) in order to make sure that attacks may not disrupt its service level to legitimate clients.
The PHY/MAC layer block 204 may comprise suitable logic, circuitry and/or code that may enable managing and maintaining of communications between base stations by coordinating access to a shared channel, for example, a wired channel or a wireless channel and utilizing protocols that enhance communications over a network medium. The PHY/MAC layer block 204 may receive the incoming network packets and may output the received packets to the classifier 206.
The packet classifier 206 may comprise suitable logic, circuitry and/or code that may enable classification of received network packets. There is an increased likelihood of having collisions between the received network packets if, for example, a 4 byte cyclic redundancy check (CRC) is utilized, due to the limited number of bits being used. A 64 byte CRC may be utilized to reduce the likelihood of collisions between the network packets. To further decrease the likelihood of collisions, the CRC may be combined with other packet information to generate CRC-like hash information. A CRC is a type of hash function used to produce a checksum, which is a small, fixed number of bits against a block of data, such as a packet of network traffic. The checksum may be used to detect and correct errors after transmission or storage. A CRC may be computed and appended before transmission or storage, and verified afterwards by a recipient in order to confirm that no changes have occurred to the block of data during transmission.
The hash table 216 may be utilized to track a finite number of connection flows. For example, hashed entries for 5000 connection flows may be tracked and once the hash table is filled, a FIFO mechanism may be utilized to purge or eliminate older entries from the hash table in order to make space for newly hashed entries. The hash table 216 may be a data structure that associates keys with values. The hash table 216 may support lookup operations by transforming the key using a hash function into a hash, a number that the hash table 216 uses to locate the desired value.
The processor 208 may comprise suitable logic, circuitry, and/or code that may enable supporting of the management function to keep track of connections or traffic flows at the macro-level state. The macro-level state may indicate that only partial context information is maintained for each connection.
The signature engine 210 may comprise suitable logic, circuitry and/or code that may enable examining of the packets for each connection flow and generate various keys based on the hashed values of the CRC, for example. The signature engine 210 may be enabled to detect the type of packet by examining the header and the content of the incoming packet. Only a portion of the incoming network packet frame may be necessary to detect the type of packet. The signature engine 210 may enable determining whether the determined packet type of the plurality of received network packets matches with a packet type stored in a hash table 216 or may utilize exact matching techniques such as a ternary content addressable memory (TCAM) for fast pattern matching of packet types.
The rate limit engine 214 may comprise suitable logic, circuitry and/or code that may provide an enforcement function to limit a rate of various connections to a specified rate based on results from the packet classifier 206. It may be more efficient to throttle back a data rate that is associated with a connection than terminating a connection associated with a loop. For example, if a loop is detected for a particular connection, the rate limiter 214 may enable reduce a transmission rate of the connection from a million frames per second to 500 frames per second, for example.
The memory 212 may comprise suitable logic, circuitry and/or code that may enable storage of hash information used for generating the CRC or CRC-type hash information. There may be a tradeoff between accuracy and the amount of memory that is required to store hash information used for generating the CRC or CRC-type hash information.
The first time a particular CRC hash is generated; it may be entered in the hash table with a count of 1. The second time that same CRC hash is generated; the count for that CRC hash entry may be incremented. Subsequent occurrences may result in the count for that CRC hash entry being incremented. In one embodiment of the invention, a threshold may be established for the CRC hash entries. If the rate of the packets exceeds an established threshold, then this may trigger an action such as a reduction in the data rate or terminating the connection.
A visual indication may comprise blinking a LED and an aural indication may comprise generating a beep. The blinking associated with a particular connection of the LED may follow a predefined sequence, for example. Rate limiting may involve blocking or dropping packets. With processor redirect, a copy of information in the hash table along with other connection context information may be copied or otherwise provided to the processor 208 for further analysis. Based on this analysis, the processor 208 may then determine how best to handle the condition and take appropriate actions. The processor 208 may provide an indication to the rate limiter 214, which may instruct the rate limiter 214 to adjust a rate of the corresponding connection accordingly. Context information such as a source port and a destination port, which may be associated with the hash entry for a particular packet, may be utilized to control a port. For example, the rate limiter 214 may use the source port or destination port to limit the data rate of the port or to disable the port.
In this regard, the threshold may be dependent on the type of traffic handled by the connection. For example, if the traffic is largely multimedia traffic, and it is known that this type of environment is prone to loops, then the threshold may be increased to a higher level to more efficiently handle this type of traffic. For example, the threshold may be increased from 3000 to 4500, for example. At least one of a plurality of actions may be taken when a threshold has been reached. A default action may comprise executing a rate limiting action once a threshold has been exceeded. In certain instances, it may be appropriate to drop packets.
In another embodiment of the invention, the type of application running or the type of frame that is being detected may affect the action that may be taken by the processor 208 and/or the rate limiter 214. For example, if a frame is a unicast frame, the threshold may be changed and/or the count modified to favor acceptance of these types of frames. For example, in the case of a unicast frame, the count may be incremented by, for example, every 5 unicast frames for a particular CRC hash value. However, if the frame is a broadcast frame, then the threshold and/or count may be modified to disfavor the acceptance of these types of frames.
In step 418, the rate of at least a portion of the plurality of received network packets at a port in a switching device may be adjusted, for example, by the rate limiter 214 (
The network interface controller (NIC) 502 may comprise suitable logic, circuitry and/or code that may be utilized to connect a workstation to a local area network (LAN), for example. The NIC 502 may be enabled to transfer data from a host 501 or host resident application 504 or host resident communications stack 506, format it into a specific packet format required by the LAN protocol, for example, Ethernet or a higher layer protocol and transfer it to a shared medium via a cable, for example. The DMA block 508 may comprise suitable logic, circuitry and/or code that may be enabled to transfer data from a storage device or a LAN interface controller directly to random access memory (RAM), which speeds up processing of data. The FIFO buffer 509 may comprise suitable logic, circuitry and/or code that may be enabled to employ a buffering scheme to store network packets until they are placed in the host RAM by the DMA 508. The FIFO buffer 509 may be coupled to the DMA block 508, and the classifier block 510.
The classifier block 510 may comprise suitable logic, circuitry and/or code that may be enabled to determine the connection identifier and/or a packet type for each packet. The classifier block 510 may screen out requests from known or suspected illegitimate clients by dropping certain packets based on type and/or a connection identifier. The classifier block 510 may also limit the rate of certain requests based on packet type and/or connection identifier. In an embodiment of the invention, the classifier block 510 may also rate limit packets based solely on the packet type.
The MAC layer block 514 may comprise suitable logic, circuitry and/or code that may be enabled to control access to a medium that may be shared between two or more entities. The MAC layer block 514 may comprise a MAC address that is unique to each NIC. The MAC layer block 514 may be enabled to encode and decode data packets into bits. The MAC layer block 514 may be enabled to furnish transmission protocol knowledge and management and may handle errors in the physical layer, flow control and frame synchronization. The MAC layer block 514 may control how a computer on the network gains access to the data and permission to transmit it. The physical layer (PHY) block 516 may provide for transmission of information over a physical medium connecting two devices. The PHY layer block 516 may transmit a bit stream, for example, an electrical impulse, light or radio signal through the network at the electrical and mechanical level. The PHY layer block 516 provides the hardware for sending and receiving data on a carrier, for example, cables.
In accordance with an embodiment of the invention, a server may opt to limit its new connection acceptance rate or the number of suspected frames of a known profile, for example, internet control message protocol (ICMP) in order to make sure that attacks may not disrupt its service level to legitimate clients. The communication stack 506 may also run one or more heuristic algorithms, which may be adapted to screen the connection requests and deny known attacks or suspicious requests. This code may be adapted to reflect any known attack.
In an embodiment of the invention, the incoming network packets may be identified to be associated with a connection such as a connection request, a connection tear down request, or a connection reset, for example. In the case of a connection request, the host 501 may allow 400 connection requests per second, for example. On the other hand, the host 501 may allow 1000 connection teardown requests per second, for example. In the case of a connection reset, the host 501 may allow 1500 connections per second, for example. The Internet control message protocol (ICMP) messages and PING messages may be limited to 500 messages per second, for example, as a flood of incoming messages may disrupt service to legitimate clients. A policy may be created that disallows web traffic, or 0 packets per second for web-based traffic, for example.
In an embodiment of the invention, a plurality of policies may be implemented to more accurately detect specific types of packets for intrusion detection systems (IDS) and intrusion prevention systems (IPS) by examining the header of the incoming network packets rather than by a CRC hash. It may be determined at the protocol level, whether an incoming network packet is a file transfer protocol (FTP) connection request or an FTP reset connection request. In this regard, the FTP connection request may be limited to a first rate and the FTP reset connection request may be limited to a second rate in which the second rate may be much higher than the first rate, for example. This may be performed to minimize the effect of unwanted FTP connection requests that may disrupt service.
In another embodiment of the invention, a plurality of policies may be implemented to control the flow of network packets on a port by port basis. For example, input port 2104 may be allowed to handle 100 ICMP packets per second, for example. If that is exceeded, the additional packets may automatically be dropped. In an exemplary embodiment of the invention, a policy may be implemented, which specifies that for particular ports, if a given threshold is exceeded, then control may be passed to the processor 208 to consider additional factors in order to determine whether the threshold may be temporarily increased. If, for example, a remote client performs a million pings per second, then a policy may be implemented that temporarily disables the associated incoming port.
In accordance with an embodiment of the invention, a method and system for intrusion detection and prevention based on packet type recognition in a network may comprise a signature engine 210 that enables determining a packet type for each of a plurality of received network packets based on at least one of: a header and content of each of the plurality of received network packets. The rate limiter 214 and the processor 208 may enable regulating a rate at which the plurality of received network packets are handled at a port in the network switching device 102 based on a number of occurrences of the determined packet type of the plurality of received network packets. The system may enable determining whether a number of occurrences of the determined packet type of the plurality of received network packets exceed a threshold value within a time period. The processor 208 may enable dropping at least a portion of a plurality of additional network packets of the determined packet type received at the port in the network switching device 102, if the determined number of occurrences of the determined packet type of the plurality of incoming packets exceeds a threshold within a time period. The processor 208 may disable at least one of a plurality of ports in the network switching device 102 handling at least one of the plurality of received network packets, if the determined number of occurrences of the determined packet type of the plurality of incoming packets exceeds a threshold within a time period. The signature engine 210 may enable determining whether the determined packet type of the plurality of received network packets matches with a packet type stored in memory. For example, signature engine 210 may enable determining whether the determined packet type of the plurality of received network packets matches with a packet type stored in a hash table 216 or may utilize exact matching techniques such as a ternary content addressable memory (TCAM) for fast pattern matching of packet types. The rate limiter 214 may enable regulating the rate at which the plurality of received network packets are handled at a port in the network switching device 102, if the determined packet type of the plurality of received network packets matches with a packet type stored in a hash table 216. The port in the switching device 102 may be an input port, for example, port 2104 or an output port, for example, port 1106.
Another embodiment of the invention may provide a machine-readable storage, having stored thereon, a computer program having at least one code section executable by a machine, thereby causing the machine to perform the steps as described above for intrusion detection and prevention based on packet type recognition in a network.
Accordingly, the present invention may be realized in hardware, software, or a combination of hardware and software. The present invention may be realized in a centralized fashion in at least one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system or other apparatus adapted for carrying out the methods described herein is suited. A typical combination of hardware and software may be a general-purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein.
The present invention may also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which when loaded in a computer system is able to carry out these methods. Computer program in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: a) conversion to another language, code or notation; b) reproduction in a different material form.
While the present invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the present invention without departing from its scope. Therefore, it is intended that the present invention not be limited to the particular embodiment disclosed, but that the present invention will include all embodiments falling within the scope of the appended claims.
This application makes reference to: U.S. application Ser. No. ______ (Attorney Docket No. 17078US01) filed on even date herewith; U.S. application Ser. No. ______ (Attorney Docket No. 17080US01) filed on even date herewith; U.S. application Ser. No. ______ (Attorney Docket No. 17081 US01) filed on even date herewith; and U.S. application Ser. No. ______ (Attorney Docket No. 17082US01) filed on even date herewith. Each of the above stated applications is hereby incorporated herein by reference in its entirety.