The National Institute of Standards and Technology (NIST) defines intrusion detection as "the process of monitoring the events occurring in a computer system or network and analyzing them for signs of possible incidents, which are violations or imminent threats of violation of computer security policies, acceptable use policies, or standard security practices." An intrusion detection system (IDS) automates this process, while an intrusion prevention system (IPS) has all the capabilities of an IDS and can also attempt to stop detected incidents.
Fundamental differences
The NIST Guide to Intrusion Detection and Prevention Systems identifies several fundamental differences between IDS and IPS technologies. While both monitor network traffic and system activities for malicious behavior, their responses to detected threats differ.
Action capability
An IDS monitors and detects potential security threats, generating alerts and logs without actively blocking or stopping malicious traffic. It functions as a surveillance system, identifying suspicious activity and notifying security administrators who must then decide how to respond.
An IPS detects suspicious activity like an IDS but actively blocks or mitigates threats in real time. NIST describes three categories of IPS response techniques.
- First, the IPS can stop the attack itself by terminating the network connection being used for the attack or blocking access to the target from the offending user account, IP address, or other attacker attribute.
- Second, the IPS can change the security environment by reconfiguring other security controls to disrupt an attack, for example, reconfiguring a network firewall to block access from the attacker.
- Third, the IPS can change the attack's content by removing or replacing malicious portions to make them benign, such as removing an infected file attachment from an email before permitting the cleaned message to reach its recipient.
Network positioning
The positioning of these systems within network architecture reflects their different purposes. IDS sensors operate in passive mode, monitoring copies of network traffic without sitting directly in the data path. As NIST explains, passive sensors can monitor traffic through various methods, including switch spanning ports, network taps providing direct connection to physical network media, and IDS load balancers that aggregate and direct traffic to monitoring systems. This out-of-band positioning means an IDS observes network packets without interrupting data flow.
IPS sensors are deployed inline, directly in the network's traffic path, so that monitored traffic must pass through them. This positioning allows the IPS to intercept and filter packets in real time, acting as an active checkpoint. Some inline sensors function as hybrid firewall/IPS devices. The primary motivation for inline deployment is enabling the IPS to stop attacks by blocking traffic before it reaches its intended target.
Operating sensors without IP addresses assigned to monitoring interfaces, known as stealth mode, improves security by concealing sensors from attackers and preventing other hosts from initiating connections to them. However, attackers may still identify the existence of a sensor by analyzing the characteristics of its prevention actions.
Response mechanism
IDS operates through a notification-based response mechanism. When suspicious activity is detected, the system generates alerts to security administrators, provides forensic and analytical data, and requires human intervention to address threats. The value lies in visibility and documentation rather than immediate action.
IPS provides automated prevention, implementing immediate protective measures without waiting for human decision-making. This reduces response time to potential security incidents from minutes or hours to milliseconds. According to research comparing these systems, IDS latency between capture and reporting can range from seconds to minutes depending on human response time, while IPS latency operates in microseconds, providing faster application response with higher processing capacity.
Performance impact
An IDS does not process live traffic directly and operates out of band, so it has minimal network performance impact and lower computational overhead. The system can be deployed with processing capability matching the average network load, using large memory buffers to absorb traffic bursts.
An IPS must process and potentially block traffic in real time, which may introduce network latency and require stronger computational resources. NIST notes that network-based IPS sensors may be unable to perform full analysis under high loads, which could cause some attacks to go undetected or, for inline sensors, cause disruptions in network availability. To address this, some inline sensors can recognize high load conditions and either pass certain types of traffic without full analysis or drop low-priority traffic to reduce load.
Detection methodologies
Both IDS and IPS technologies use similar detection methodologies, though their application differs based on whether the system will alert or actively prevent. NIST identifies three primary classes of detection methodologies that most systems use in combination.
1. Signature-based detection
Signature-based detection compares observed events against patterns corresponding to known attacks. Examples include a telnet attempt with a username of "root" violating security policy, an email with characteristics of known malware, or an operating system log entry indicating auditing has been disabled. This method is very effective at detecting known attacks but ineffective at detecting previously unknown attacks, attacks disguised through evasion techniques, and variants of known attacks. As NIST explains, signature-based detection "has little understanding of many network or application protocols and cannot track and understand the state of communications."
2. Anomaly-based detection
Anomaly-based detection compares definitions of normal activity against observed events to identify significant deviations. The system develops profiles representing normal behavior of users, hosts, network connections, or applications by monitoring typical activity over a training period. For example, a network profile might show that web activity comprises an average of 13% of bandwidth during normal workday hours; the IDPS then alerts when web activity significantly exceeds this threshold.
The major benefit is effectiveness at detecting previously unknown attacks. If a computer becomes infected with new malware that consumes processing resources, sends many emails, and initiates unusual network connections, this behavior would deviate significantly from established profiles. However, anomaly-based methods often produce many false positives in diverse or dynamic environments, and it can be difficult for analysts to determine what triggered a particular alert.
3. Stateful protocol analysis
Stateful protocol analysis compares predetermined profiles of generally accepted protocol behavior against observed events to identify deviations. Unlike anomaly-based detection using organization-specific profiles, stateful protocol analysis relies on vendor-developed universal profiles specifying how protocols should and should not be used.
The "stateful" aspect means the system can understand and track protocol state. For example, when a user starts an FTP session, it begins in an unauthenticated state where only certain commands are appropriate. Once authenticated, different commands become acceptable. Performing authenticated-state commands while unauthenticated would be suspicious. This method can identify unexpected command sequences and track authenticators used for suspicious activity.
The primary drawback is resource intensity due to analysis complexity and overhead in tracking many simultaneous sessions. The method also cannot detect attacks that do not violate generally acceptable protocol behavior, such as denial of service attacks using many benign actions in rapid succession.
Similarities
Despite their differences, IDS and IPS share characteristics that make them complementary components of comprehensive security strategies.
Both technologies aim to enhance network security by identifying and responding to potential cyber threats and protecting networks from unauthorized access and malicious activities. They use similar threat detection methodologies, including signature-based detection matching known threat patterns, anomaly-based detection identifying unusual behavior, and protocol analysis examining network communication protocols. Both rely on comprehensive threat databases and rule sets, continuously updating threat intelligence to improve detection accuracy.
The underlying technical components are similar:
- packet inspection engines
- traffic analysis algorithms
- threat signature databases
- logging and reporting mechanisms
Both employ machine learning and artificial intelligence to improve threat detection. Both collect and generate detailed network traffic logs, threat event reports, forensic data for security analysis, and performance and incident metrics.
Deployment considerations are also similar. Both are typically integrated into network security architecture, require regular updates and maintenance, need skilled cybersecurity professionals for configuration and management, and are most effective as part of a multi-layered security strategy.
FAQs
What is the difference between inline and passive sensor deployment?
Inline sensors are deployed so that monitored traffic must pass through them, allowing them to block malicious traffic in real time. Passive sensors monitor copies of traffic without sitting in the data path, allowing them to detect and alert on threats without impacting network performance or availability. Inline deployment is required for prevention capabilities, while passive deployment is suitable for detection and monitoring only.
What is tuning?
Tuning is altering the configuration of an IDPS to improve its detection accuracy because no IDPS can provide completely accurate detection. All systems generate false positives (incorrectly identifying benign activity as malicious) and false negatives (failing to identify malicious activity). Reducing one increases the other. Tuning involves adjusting thresholds, configuring blacklists and whitelists, customizing alert settings, and potentially editing detection code.
Can IDS and IPS detect zero-day exploits?
Traditional signature-based detection cannot identify zero-day exploits because no signature exists for previously unknown attacks. However, anomaly-based detection and stateful protocol analysis methods can sometimes identify zero-day exploits by recognizing unusual patterns or behaviors that deviate from established baselines or protocol specifications.