Chapter 5
Chapter 5
INTRUSION PREVENTION:
Firewalls and Intrusion
Prevention Systems:
By:Gaurav Prasad
firewall • A software or/and Hardware that
monitors and controls incoming and
outgoing network traffic based on
predetermined security rules.
THE NEED FOR FIREWALLS
Notable developments:
• Centralized data processing system, with a central mainframe supporting
a number of directly connected terminals
Local area networks (LANs) interconnecting PCs and terminals to each
other and the mainframe
Premises network, consisting of a number of LANs, interconnecting PCs,
servers, and perhaps a mainframe or two
Enterprise-wide network, consisting of multiple, geographically distributed
premises networks interconnected by a private wide area network (WAN)
• Internet connectivity, in which the various premises networks all hook
into the Internet and may or may not also be connected by a private WAN
Firewall
Note:
A firewall may act as a packet filter. It can operate as a positive filter, allowing to pass only
packets that meet specific criteria, or as a negative filter, rejecting any packet that meets
certain criteria
TYPES OF FIREWALLS
• Packet Filtering Firewall
• Stateful Inspection Firewalls
• Application-Level Gateway /Application proxy
• Circuit-Level Gateway /circuit-level proxy
Circuit-Level Gateway /circuit-level
proxy
• Circuit-Level Gateways are specialized firewalls that operate at the
session layer, offering a unique approach to managing and securing
network traffic.
• A circuit level gateway is a solution designed to provide connection
security to internal and external computers in a network's session
layer.
• Its primary function is to manage and control the initiation and
termination of network sessions, thereby offering a unique form of
network security.
• These gateways establish a secure connection between the internal
network and the external network, typically the Internet.
• Once a session is established, the Circuit-Level Gateway Firewall
effectively masks the details of the internal network from the external
world. This is achieved by relaying packets without exposing the
internal IP addresses, thereby providing anonymity and added security.
Cont..
• They do not inspect the contents of each packet deeply;
instead, they validate the legitimacy of the session
based on pre-determined rules and criteria.
• By focusing on the session rather than the individual
packets, these gateways offer a balance between
security and performance, making them ideal for
environments where high throughput and reliable
connectivity are essential.
Circuit-Level Gateways :Work
Session Initiation Process:
• The session initiation process is the first step in the
operation of a Circuit-Level Gateway. When a request to
establish a network session is received, the gateway
scrutinizes the request to ensure it complies with the
network’s security protocols.
• This involves checking the source and destination
addresses, the protocol being used (TCP or UDP), and
other session initiation parameters.
• A circuit level gateway functions as a semi-transparent
bridge between a trusted internal network and an
untrusted external one.
• During operation, a circuit level gateway scrutinizes the
TCP handshaking process to ensure the session initiation
is genuine between trusted clients or servers to trusted
hosts and vice versa. If the initial handshake matches
established security policies, the gateway permits the
connection. It creates a virtual circuit for the duration of
the session, across which all traffic is allowed to flow .
• This type of gateway maintains a table of all established
sessions and their corresponding security attributes. The
attributes include the source and destination IP
addresses and port numbers, as well as session specific
details such as timeouts. The gateway uses this
information to manage ongoing traffic, allowing or
disallowing data packets based on their session's
validity.
• This type of gateway maintains a table of all established
sessions and their corresponding security attributes.
The attributes include the source and destination IP
addresses and port numbers, as well as session specific
details such as timeouts. The gateway uses this
information to manage ongoing traffic, allowing or
disallowing data packets based on their session's
validity.
• While a circuit level gateway effectively confirms the
validity of a TCP connection, it does not inspect the
payload of the data packets. This means that if the
session was established correctly, subsequent traffic,
including
A typical use ofpotentially malicious
circuit-level gateways content,
is a situation could
in which the system pass
administrator trusts the internal users.
through without deeper inspection
Circuit Level Gateway Features
• Session Layer Operation
• Privacy Preservation
• Standalone System
• Security Policy Enforcement
• Virtual Circuit Connection
• Reporting and Analysis
• 🔠 Mnemonic: "S.P.S.S.V.R" – Super Private Sessions Shield Virtual Reports"
• 🧩 Breakdown of Each Term:
1. S – Session Layer Operation
📶 Operates at the Session Layer (Layer 5) of the OSI model to monitor the beginning and end of communication sessions.
2. P – Privacy Preservation
Masks internal IP addresses from the outside world, maintaining network anonymity.
3. S – Standalone System
🧱 Functions as an independent firewall unit, often between internal LAN and external networks like the Internet.
4. S – Security Policy Enforcement
✅ Ensures only authorized sessions are established based on configured rules and policies.
5. V – Virtual Circuit Connection
🔗 Establishes a trusted virtual circuit before data transfer – like building a temporary tunnel for communication.
6. R – Reporting and Analysis
📊 Can log and analyze session activity to detect abnormal behavior and enhance network monitoring.
• 🧠 Quick Visual to Remember:
• S.P.S.S.V.R.
"Super Private Sessions Shield Virtual Reports"
• A Circuit-Level Gateway is your silent protector, managing sessions like a bouncer, masking identities, enforcing rules, and keeping track of all
activity for your safety.
• Want a flashcard, poster-style visual, or infographic version of this?
Circuit Level Gateway Benefits
• Strategic Placement:
• Robust Security Policies
• Regular Updates and Maintenance:
Configuration Examples
• Session Timeout Settings: Configure session timeout
intervals to close inactive connections, reducing vulnerability
to unauthorized access.
• Allowed Protocols: Define which protocols (TCP/UDP) are
permitted and under what circumstances, aligning with the
organization’s network usage patterns.
Case Studies and Real-World
Applications
• Enterprise Networks: In corporate environments, Circuit-Level
Gateway Firewalls are integrated with other security systems to
provide fast and secure network access control, especially for
remote access scenarios.
• E-commerce Platforms: They are used to manage secure
sessions for transactions, balancing the need for security and
efficient data flow.
Flow Summary
1.User System: Sends a
secure IP packet using IPSec.
2.Over the Network: Secure
IP packet travels encrypted
across the public network.
3.Firewall with IPSec:
1. Receives the secure IP
packet.
2. Authenticates and
decrypts it.
3. Reconstructs the
original IP packet.
4.Destination System:
Receives the plain IP packet
safely.
Distributed Firewalls
INTRUSION PREVENTION SYSTEMS
• 1. An IPS is an inline network-based IDS (NIDS) that has
the capability to block traffic by discarding packets as
well as simply detecting suspicious traffic. Alternatively,
the IPS can monitor ports on a switch that receives all
traffic and then send the appropriate commands to a
router or firewall to block traffic. For host-based
systems, an IPS is a host-based IDS that can discard
incoming traffic.
• .An IPS is a functional addition to a firewall that adds
IDS types of algorithms to the repertoire of the firewall.
Host-Based IPS
• A host-based IPS (HIPS) makes use of both signature and anomaly detection
techniques to identify attacks.ie Signature-based and anomaly-based
detections are the two main methods of identifying.
• A signature-based IDS conducts ongoing monitoring of network traffic and
seeks out sequences or patterns of inbound network traffic that matches an
attack signature.
• An attack signature can be identified based on network packet headers,
destination or source network addresses; sequences of data that correspond
to known malware or other patterns, sequences of data or series of packets
that are known to be associated with a particular attack.
• You'e provided a grea explanation! Here's a cleaned-up and slightly more structured version for clarity, which you can use in a report, slide, or
answer format:
• 🔍 Host-Based Intrusion Prevention System (HIPS)
• A Host-Based Intrusion Prevention System (HIPS) utilizes both signature-based and anomaly-based detection techniques to
effectively identify and prevent cyberattacks on individual host systems.
• 🧩 Detection Techniques Used in HIPS:
• ✅ 1. Signature-Based Detection:
• This method continuously monitors network or host-level traffic for specific patterns or sequences that match known attack signatures.
• Attack signatures can include:
• Specific network packet headers.
• Recognized source or destination IP addresses.
• Payload patterns matching known malware.
• Series of packets or behaviors associated with previously identified attacks.
• 🧠 Example: Detecting a SQL injection attack by identifying a pattern like OR '1'='1' in HTTP requests.
• ⚠️2. Anomaly-Based Detection:
• In this method, HIPS learns what is considered normal behavior for the system or user.
• It then flags deviations from the norm that may indicate malicious activity.
• Useful for detecting zero-day attacks or new threats that don’t match any known signature.
• 🧠 Example: A sudden spike in CPU usage by an unknown process, or an authorized user accessing sensitive files at odd hours.
• ✅ Summary:
• HIPS offers a layered defense mechanism, combining the reliability of signature-based detection with the adaptability of anomaly-
based detection to secure the host system from both known and unknown threats.
• Let me know if you'd like a comparison table between signature vs anomaly-based detection or want to include how HIPS differs from NIPS
(Network-based IPS).
Anomaly-based IDS
It identifies intrusions by monitoring system activities and
categorizing them as either normal or anomalous.
Understanding typical behavior patterns to identify malicious
activity deviations helps in spotting potential threats.
• Anomaly-based IDS operates in two phases: training to
establish a normal behavior profile and testing to compare
ongoing activities against this profile. Establishing normal
behavior baselines allows these systems to detect deviations
that could signal malicious activity.
HIPS include the following
• Modification of system resources: Rootkits, Trojan
horses, and backdoors operate by changing system
resources, such as libraries, directories, registry settings,
and user accounts.
• Privilege-escalation exploits: These attacks attempt to
give ordinary users root access.
• Buffer-overflow exploits:
• Access to e-mail contact list:
• Directory traversal:
lists the following as areas for which
a HIPS typically offers desktop
protection:
• System calls:
• File system access:
• System registry settings:
• Host input/output:
Network-Based IPS
• A network-based IPS (NIPS) is in essence an inline NIDS
with the authority to d iscard packets and tear down
TCP connections. As with a NIDS, a NIPS makes use of
techniques such as signature detection and anomaly
detection.
General methods used by a NIPS
device to identify malicious packets
• Pattern matching:
• Protocol anomaly:
• Traffic anomaly:
• Statistical anomaly:
This diagram illustrates the architecture of a Unified Threat Management (UTM) Appliance,
which is a comprehensive security solution integrating multiple security functions into a single
UNIFIED THREAT device to monitor, analyze, and control network traffic from entry to exit.
🔄 Workflow Overview:
MANAGEMENT UTM appliace 1.Raw Incoming Traffic enters the UTM appliance.
PRODUCTS architecture. Traffic passes through various processing and security layers.
2.The result is Clean Controlled Traffic sent to the internal network.
🧱 Main Components Explained:
🔁 Routing Module
•Manages the direction of incoming and outgoing data packets to ensure correct delivery.
🔐 VPN Module (Top & Bottom)
•Ensures secure communication channels using encrypted tunnels, for both incoming and
outgoing traffic.
🧱 Firewall Module
•Acts as a gatekeeper by applying security rules to block or allow traffic based on IPs, ports,
protocols, etc.
🧠 Data Analysis Engine (Central Core)
The heart of UTM that connects multiple engines and modules to:
•Correlate findings from different security components.
•Make real-time decisions on threats.
•Collaborate with the logging/reporting system.
⚙️Security Engines Connected to the Core:
🦠 Antivirus Engine
•Scans for known malware signatures in files or traffic.
IDS (Intrusion Detection System) Engine
•Monitors for suspicious activities and alerts admins.
🚫 IPS (Intrusion Prevention System) Engine
•Blocks malicious activity detected in real time.
🧪 Heuristic Scan Engine
•Detects unknown or modified threats by behavior analysis and rules.
📉 Anomaly Detection Engine
•Identifies deviations from normal behavior, useful for detecting zero-day attacks.
🔍 Activity Inspection Engine
•Examines actions of users/applications to detect policy violations or insider threats.
🌐 Filtering & Additional Modules:
🌍 Web Filtering Module
•Blocks access to malicious or unwanted websites.
📧 Antispam Module
•Filters out junk or malicious emails.
📶 Bandwidth Shaping Module
•Controls bandwidth usage to prioritize important traffic and avoid congestion.
📊 Logging and Reporting Module
•Records all activities for:
The following functions are
• 1. Inbound traffic is decrypted if necessary before its
initial inspection. If the device functions as a VPN
boundary node, then IPSec decryption would take place
here.
2. An initial firewall module filters traffic, discarding packets that violate rules and/or passing
packets that conform to rules set in the firewall policy.
3. Beyond this point, a number of modules process individual packets and flows of packets at
various protocols levels. In this particular configuration, a data analysis engine is responsible for
keeping track of packet flows and coordinating the work of antivirus, IDS, and IPS engines.
4. The data analysis engine also reassembles multipacket payloads for content analysis by the
antivirus engine and the Web filtering and antispam modules.
5. Some incoming traffic may need to be reencrypted to maintain security of the flow within the
enterprise network.
6. All detected threats are reported to the logging and reporting module, which is used to issue
alerts for specified conditions and for forensic analysis.
7. The bandwidth-shaping module can use various priority and quality-of-service (QoS)
algorithms to optimize performance.
As an example of the scope of a UTM appliance
END