UNIT V - Intrusion Detection and Firewall
UNIT V - Intrusion Detection and Firewall
Intrusion Detection
Intruders
● Intruders are the attackers, who try to intrude into the privacy of a network.
● Intruders are often referred to as hackers and are the most harmful factors contributing
to the vulnerability of security.
● Intruders breach the privacy of users and aim to steal the confidential information of the
users
● Intruders are said to be of three types, as explained below:
(a) Masquerader:
● A user who does not have the authority to use a computer, but penetrates into a
system to access a legitimate user’s account is called a masquerader.
● It is generally an external user.
(b) Misfeasor
● There are two possible cases for an internal user to be called a misfeasor:
a) A legitimate user, who does not have access to some applications, data or
resources accesses them.
b) A legitimate user, who has access to some applications, data or resources
misuses these privileges.
Audit Records
● One of the most important tools in intrusion detection is the usage of audit records, also
called audit logs.
● Audit records are used to record information about the actions of users.
● Traces of illegitimate user actions can be found in these records, so as to detect
intrusions so as to take appropriate actions.
● Audit records can be classified into two categories: Native audit records and
Detection-specific audit records.
(a) Native Audit Records
● All multi-user operating systems have accounting software built-in. This software
records information about all user actions.
(b) Detection-specific Audit Records
● This type of audit records facility collects information specific only to intrusion detection.
This is more focused, but may duplicate information.
Regardless of the type of audit records, each such record contains information as shown
below
For example, if user Ram attempts to execute a program payroll.exe, the following audit
records may get generated. Here we assume that Ram does not have the access rights to
execute this program.
Intrusion Detection
Intrusion prevention is almost impossible to achieve at all times. Hence, more focus is on
intrusion detection.
Following factors motivate efforts on intrusion detection:
(a) The sooner we are able to detect an intrusion, the quicker we can act. The hope of
recovering from attacks and losses is directly proportional to how quickly we are able to detect
an intrusion.
(b) Intrusion detection can help collect more information about intrusions, strengthening the
intrusion prevention methods.
(c) Intrusion detection systems can act as good deterrents to intruders.
Intrusion detection mechanisms, also known as Intrusion Detection Systems (IDS) are
classified into two categories: Statistical anomaly detection and Rule-based detection.
(a) Statistical Anomaly Detection
● In this type, behavior of users over time is captured as statistical data and processed.
● Rules are applied to test whether the user behavior was legitimate or not.
● This can be done in two ways:
(ii) Profile-based Detection
In this type, profiles for individual users are created and they are matched against the collected
statistics to see if any irregular patterns emerge.
● Modern intrusion detection systems make use of a novel idea, called as honeypots.
● A honeypot is a trap that attracts potential attackers.
● A honeypot is designed so as to do the following:
● Divert the attention of a potential intruder from critical systems
● Collect information about the intruder’s actions
● Provide encouragement to the intruder so as to stay on for some time, allowing the
administrators to detect this and swiftly act on it.
● A firewall is a security mechanism that guards a corporate network by standing between the
network and the outside world.
● All traffic between the network and the Internet in either direction must pass through the
firewall.
● The firewall decides if the traffic can be allowed to flow or whether it must be stopped from
proceeding further.
● Technically, a firewall is a specialized version of a router. Apart from the basic routing
functions and rules, a router can be configured to perform the firewall functionality, with the
help of additional software resources
● The characteristics of a good firewall implementation can be described as follows.
1. All traffic from inside to outside and vice versa, must pass through the firewall. To achieve
this, all the access to the local network must first be physically blocked and access only
via the firewall should be permitted.
2. Only the traffic authorized as per the local security policy should be allowed to pass
through.
3. The firewall itself must be strong enough, so as to render attacks on it useless.
Types of Firewalls
Based on the criteria that they use for filtering traffic, firewalls are generally classified into two
types as follows:
1. Packet Filters
● A packet filter applies a set of rules to each packet and based on the outcome, decides to
either forward or discard the packet.
● It is also called a screening router or screening filter.
● Packet Filter firewall involves a router, which is configured to filter packets going in either
direction (from the local network to the outside world and vice versa).
● The filtering rules are based on a number of fields in the IP and TCP/UDP headers, such as
source and destination IP addresses, IP protocol field (which identifies if the protocol in the
upper transport layer is TCP or UDP), TCP/UDP port numbers (which identify the application
which is using this packet, such as email, file transfer or World Wide Web)
a) IP Address Spoofing
● An intruder outside the corporate network can attempt to send a packet towards the
internal corporate network, with the source IP address set equal to one of the IP
addresses of the internal users.
● This attack can be defeated by discarding all the packets that arrive at the incoming
side of the firewall, with the source address equal to one of the internal addresses.
(b) Source Routing Attacks
● An attacker can specify the route that a packet should take as it moves along the
Internet.
● The attacker hopes that by specifying this option, the packet filter can be fooled to
bypass its normal checks.
● Discarding all packets that use this option can prevent such an attack.
● An attacker might attempt to use this characteristic of the TCP/IP protocol suite by
intentionally creating fragments of the original IP packet and sending them. The
attacker feels that the packet filter can be fooled, so that after fragmentation, it
checks only the first fragment and does not check the remaining fragments.
● This attack can be foiled by discarding all the packets where the upper layer protocol
type is TCP and the packet is fragmented.
2. Application Gateways
● An application gateway is also called a proxy server. This is because it acts like a proxy
(i.e. deputy or substitute) and decides about the flow of application level traffic.
● An application gateway is also called bastion host.
Working of Application Gateway
Circuit Gateways
● A variation of the application gateway is called a circuit gateway, which performs some
additional functions as compared to those performed by an application gateway.
● A circuit gateway, in fact, creates a new connection between itself and the remote host.
● The user is not aware of this and thinks that there is a direct connection between itself and
the remote host.
● Also, the circuit gateway changes the source IP address in the packets from the end
user’s IP address to its own.
● This way, the IP addresses of the computers of the internal users are hidden from the
outside world.
● The SOCKS server is an example of the real-life implementation of a circuit gateway. It is a
client-server application. The SOCKS client runs on the internal hosts and the SOCKS
server runs on the firewall.
Demilitarized Zone (DMZ) Networks