CNS Unit 4 New
CNS Unit 4 New
Why has there been an interest in developing a message authentication code derived from a
4 cryptographic hash function as opposed to one derived from a symmetric cipher?
5 What changes in HMAC are required in order to replace one underlying hash function with
another?
Overview:
A digital signature is an authentication mechanism that enables the creator of a message to attach a
code that acts as a signature. The signature is formed by taking the hash of the message and
encrypting the message with the creator's private key. The signature guarantees the source and
integrity of the message.
Mutual authentication protocols enable communicating parties to satisfy themselves mutually about
each other's identity and to exchange session keys.
In one-way authentication, the recipient wants some assurance that a message is from the alleged
sender.
The digital signature standard (DSS) is an NIST standard that uses the secure hash algorithm (SHA).
Digital Signatures
The digital signature is analogous to the handwritten signature. It must have the following properties:
It must verify the author and the date and time of the signature.
It must to authenticate the contents at the time of the signature.
It must be verifiable by third parties, to resolve disputes.
The signature must be a bit pattern that depends on the message being signed.
The signature must use some information unique to the sender, to prevent both forgery and denial.
It must be relatively easy to produce the digital signature.
It must be relatively easy to recognize and verify the digital signature.
It must be computationally infeasible to forge a digital signature, either by constructing a new
message for an existing digital signature or by constructing a fraudulent digital signature for a given
message.
It must be practical to retain a copy of the digital signature in storage.
digital signature made by sender signing entire message or hash with private-key
Notation:
X = sender
Y = recipient
A = Arbiter
M = message
T = timestamp
Authentication Protocols
used to convince parties of each others identity and to exchange session keys
published protocols are often found to have flaws and need to be modified
Mutual Authentication
Simple replay: The opponent simply copies a message and replays it later.
Repetition that can be logged: An opponent can replay a timestamped message within the valid time
window.
Repetition that cannot be detected: This situation could arise because the original message could have
been suppressed and thus did not arrive at its destination; only the replay message arrives.
Backward replay without modification: This is a replay back to the message sender. This attack is
possible if symmetric encryption is used and the sender cannot easily recognize the difference
between messages sent and messages received on the basis of content.
One approach to coping with replay attacks is to attach a sequence number to each message used in an
authentication exchange. A new message is accepted only if its sequence number is in the proper order. The
difficulty with this approach is that it requires each party to keep track of the last sequence number for each
claimant it has dealt with. Because of this overhead, sequence numbers are generally not used for
authentication and key exchange. Instead, one of the following two general approaches is used:
Timestamps: Party A accepts a message as fresh only if the message contains a timestamp that, in A's
judgment, is close enough to A's knowledge of current time. This approach requires that clocks
among the various participants be synchronized.
Challenge/response: Party A, expecting a fresh message from B, first sends B a nonce (challenge) and
requires that the subsequent message (response) received from B contain the correct nonce value.
Needham-Schroeder Protocol
4. B -> A: EKs[N2]
5. A -> B: EKs[f(N2)]
used to securely distribute a new session key for communications between A & B
but is vulnerable to a replay attack if an old session key has been compromised
1. A initiates the authentication exchange by generating a nonce, Na, and sending that plus its identifier to
B in plaintext. This nonce will be returned to A in an encrypted message that includes the session key,
assuring A of its timeliness.
2. B alerts the KDC that a session key is needed. Its message to the KDC includes its identifier and a
nonce, Nb This nonce will be returned to B in an encrypted message that includes the session key,
assuring B of its timeliness. B's message to the KDC also includes a block encrypted with the secret key
shared by B and the KDC. This block is used to instruct the KDC to issue credentials to A; the block
specifies the intended recipient of the credentials, a suggested expiration time for the credentials, and the
nonce received from A.
3. The KDC passes on to A B's nonce and a block encrypted with the secret key that B shares with the
KDC. The block serves as a "ticket" that can be used by A for subsequent authentications, as will be
seen. The KDC also sends to A a block encrypted with the secret key shared by A and the KDC. This
block verifies that B has received A's initial message (IDB) and that this is a timely message and not a
replay (Na) and it provides A with a session key (Ks) and the time limit on its use (Tb).
4. A transmits the ticket to B, together with the B's nonce, the latter encrypted with the session key. The
ticket provides B with the secret key that is used to decrypt E(Ks, Nb) to recover the nonce. The fact that
B's nonce is encrypted with the session key authenticates that the message came from A and is not a
replay.
Using Public-Key Encryption
Denning AS Protocol
One-Way Authentication
required when sender & receiver are not in communications at same time (eg. email)
can refine use of KDC but can’t have final exchange of nonces, vis:
could rely on timestamp in message, though email delays make this problematic
Public-Key Approaches
FIPS 186-2 (2000) includes alternative RSA & elliptic curve signature variants
choose g = h(p-1)/q
choose x<q
compute y = gx mod p
w = s-1 mod q
u2= (rw)mod q
Summary
have discussed:
digital signatures
Review Questions
1 List two disputes that can arise in the context of message authentication.
5 In what order should the signature function and the confidentiality function be applied
to a message, and why?
6 What are some threats associated with a direct digital signature scheme?
Requirements of Kerberos
Kerberos has its own terminology to define to define various aspects of the services
1
Authentication Server(SA): A server that issues tickets for a desired service which
are in turn given to users for acess to the services.
Client : an entity on the network that can receive a ticket from Kerberos.
Credentials : A temporary set of electronic credentials that verify the identity of a
client for a particular services. It is also called a ticket.
Credentials cache or ticket file : A file which contains the keys for encrypting
communications between a user and various network services.
Crypt hash: A one way hash used to authenticate users.
Key: Data user when encrypting or decrypting other data.
Ket Distribution Center(KDC): A service that issue Kerberos tickets and which
usually run on the same host as the Ticket-Granting Server(TGS).
Realm: A network that uses Kerberos composed of one or more servers called KDCs
and potentially large number of clients.
Ticket Granting Server(TGS): A server that issues tickets for desired service which
are in turn given to users for access to the service. The TGS usually runs on the same
host as the KDC.
Ticket Granting Ticket(TGT): A special ticket that allows the client to obtain
additional tickets without applying for them from the KDC.
Kerberos version 4 uses DEC for providing authentication service. Some aspect of
version 4 are:
Simple Authentication Dialogue
More Secure Authentication Dialogue.
For a secure transaction, server should confirm the client and its request. In
unprotected network it creates burden on server, therefore an authenticarion
server (AS) is used. The authentication server (AS) maintains password of all
users in centralized database. Also the authentication server shapes unique secret
key with each server.
Let
Client is represented as C
Authentication server is represented as AS
Server is represented as V
Identifier of user on C is represented as IDc
Identifier of V is represented as IDv
Password of user on C is Pc
Network address of C is represented as ADc
2
Secret encryption key shared by AS and V is Kv
Then consider a hypothetical dialogue
Explanation
3
4.1.2.3 Kerberos Realm
4
4.1.3 Kerberos Version 5
1. Double encryption
2. PCBC (Propagating Cipher Block Chaining) encryption
3. Session keys
4. Password attacks
4..3.1 Version 5 Authentication Dialogue
The Kerberos version 5 message exchange involves three sessions, these are
1. Authenticaation Service Exchange
2. Ticket –Granting Exchange
3. Client /Server Authentication Exchange
Each session has 2 steps.
Session Step Sender-receiver
Application service CAS To obtain ticket-granting
exchange ASC ticket.
Ticket-Grating Service CTGS To obtain service-
Exchange TGSC granting ticket.
Client/Server CV To obtain service.
Authentication Exchange VC
5
VI. POSDATED
VII. INVALID
VIII. PROXIABLE
IX. PROXY
X. FORWARDABLE
XI. FORWADED
4..4 Comparison between Kerberos Versions 4 and 5
Parameter Kerberos Versions 4 Kerberos Versions 5
Encryption DES only DES and other
algorithms used encryption
Ticket lifetime 5 min units, Start and end time is
Maximum=1280minutes arbitrary
Message byte Tagged message with Abstract syntax
ordering ordering notation on basis
encoding rules.
Password attack Initial request in clear Need to send pre-
and use it for offline authentication data
attack
Two times supported Not supported
encryption
Session keys Replay risk using Sub session key once
repeated ticket only
Hierarchy of Limits to pairs Transition allowed
Relams
6
4..6 Weakness of Kerberos
1. Kerberos only provides authentication for clients and services.
2. Kerberos 4 uses DES, which has been shown to be vulnerable to brute-
force-attacks with little computing power.
3. The principal – key database on the KDC has to be hardened or else bad
things can happen
4. Like any security tool, it is also vulnerable to users making poor password
choices.
5. Kerberos doesn‟t work well in a time-sharing environment.
6. Kerberos requires a continuously available Kerberos Server. If the
Kerberos Server goes down, the Kerberos network is unusable.
7. Kerberos does not protect against modifications to system software like
Trojan horses.
4..7 Difference between Kerberos and SSL
No Kerberos SSL
1. Uses private key Uses public key
encryption encryption
2. Based on the trusted Based on certificate
third party
3. Ideal for network Ideal for WWW
environment
4. Key revocation can be Key revocation
accomplished by requires rvocation
disabling a user at the server to keep track of
authentication server bad certificate
5. Password resides in Certificates sit on a
user‟s minds where they user hard drive where
are usually not subject they are subject to
to secret attack being cracked
6 Kerberos open source Uses patented material,
and free available so the service is not
free
7
protocols base on use of public key certificates. The x.509 certificate format is
emplied in S/MIME, IP security, SET and SSL/TLS.
X.509 standard uses RSA algorithm and hash function for digital signature.
Fig shows generation of public key certificate.
8
1. Version: Identifiers successive versions of certificate format the default is version.
2. Certificate Serial Number: It contains an unique integer number, which is generated by
Certificate Authority(CA).
3. Signature Algorithm Identifier: Identifies the algorithm used by the CA to sign the
certificate
4. Issuer Name: Identifies the distinguished name of the CA that crated and signed this
certificate.
5. Period of Validity: Consists of two data-time values (not before and not after) within
which the certificate is valid
6. Subject Name: It specifies the name of the user to whom this certificate is issued.
7. Subject’s Public Key Information: It contains public key of the subject and algorithms
related to that key.
8. Issuer Unique Identifier: It is an optional field which helps to identify a CA uniquely if
two or more subjects have used the same subject name.
9. Extensions: One or more fields used in version 3. These extensions convey additional
information about the subject and issue keys.
10. Signature: It contains hash code of the fields, encrypted with the CA‟s private key. It
includes the signature algorithm identifier.
CA<<A>>=CA{V,SN,AI,CA,TaA,Ap}
Where,
9
1. User‟s private key is compromised.
2. User is not certified by CA
3. CA „s certificate is compromised
Each CA has a list of all revoked but not expired certificates. The certificates revocation
List(CRL) is posted in directory signed by issuer and includes issuer name, date of
creation date of next CRL. Certificate revocation list. Each certificate has unique serial
number of identify the certificate
X.509 supports three types of authenticating using public key signatures. The types of
authentication are:
1. One-way authentication
2. 2-way authentication
3. Three-way authentication.
4.
1. One-way authentication
It involves single transfer of information from one user to other as shown in Fig 4.2.4
10
2. Two-way authentication
Two-way authentication allows both parties to communicate and verify the identity of the
user.
3. Three-way authentication
Three-way authentication is used where synchronized clocks are not available Fig.4.2.6 shows
three-way authentication
11
The term firewall comes from the fact that by segmenting a network into different
physical sub network , they limit the damage that could spread from one subnet to other
just like firedoors or firewalls
Capabilities of firewall
A firewall examines all traffic routed between the two networks to see if it meets the
certain criteria. If it does, it is routed between the networks, otherwise it is stopped.
A firewall filters both inbound and outbound traffic. It can also manage public access to
private networked resources such as host applications. It can be used to log all attempts to
enter the private network and trigger alarms when hostile or authorized entry is
attempted.
Firewalls can filter packets based on their sources and destination addresses and port
number. This is known as address filtering.
Firewalls can also filter specific types of network called protocol filtering because the
decision to forward or reject traffic is dependent upon the protocol used. For example
,HTTP,FTP, Telnet.
Firewalls can also filter traffic by packet attribute or state.
Limitations of firewall
A firewall cannot prevent individual users with modems from dialing into or out of the
network, by passing the firewall altogether.
12
Employee misconduct or carelessness cannot be controlled by firewalls.
Policies involving the use and misuse of passwords and user accounts must be strictly
enforced. These are management issues that should be raised during the planning of any
security policy but cannot be solved with firewalls alone.
Firewall technology
Firewall technology generally falls into one of the two categories. Network level and
application level.
1. Network level
This guards the entire network from unauthorized intrusion. An example of the
technology is packet filtering, which simply reviews all information coming into
a network, and rejects the data that does not meet a predefined set of criteria.
2. Application level
This technology controls access on an application by application basis. For
example, proxy servers can be set up to permit access to some application, such
as HTTP, while blocking access to others, such as FTP.
Design goals
Firewalls are very effective means for network based security threats. The design goals
for firewall are as under.
1. All the traffic must pass through firewall both from inside to outside and outside to
inside
2. Only authorized traffic defined by local security is allowed to pass.
3. Firewall itself is immune to penetration
Generally four techniques are used to control access and enforce the security policy,
these techniques are
1. Service control.
2. Direction control
3. User control.
4. Behavior control.
1. Service control
Service control determines the type of Internet services that are allowed to access both
inbound and outbound traffic.
The firewall may filter the traffic on the basis of IP address and TCP protocol. The
firewall provides proxy software to receive and interpret each service before passing it
on.
2. Direction control
Direction control determines the direction in which particular service requests may be
initiated and is allowed to flow through the firewall.
3. User control
13
User control give access to a service according to which user is attempting to access it.
This feature is usually applied for local user inside the firewall perimeter.
4. Behavior control
Behavior control allows to control the use of any particular service. For example, the
firewall may filter e-mails to eliminate spam.
4.3.1 Types of Firewall
1. Packet filtering router.
2. Application level gateways.
3. Circuit level gateways.
4.3.1.1 Packet Filtering Router
Packet filtering firewalls work at the network level of the OSI model, or the IP layer of
TCP/IP. They are usually part of a router. A router is a device that receives packets from
one network and forwards them to another network.
In a packet filtering firewall each packet is compared to a set of criteria before it is
forwarded. Depending on the packet and the criteria, the firewall can drop the packet,
forward it or send a message to the originator. Rules can include source and destination
IP address, source and destination port number and protocol used.
The advantage of packet filtering firewalls is their lower cost and low impact on network
performance. Most routers support packet filtering. Even if the firewalls are used,
implementing packet filtering at the router level affords an initial degree of security at a
low network layer. This type of firewall only works at the network layer however and
does not support sophisticated rule based models. Network Address Translation (NAT)
routers offer the advantage of packet filtering firewalls but can also hide the IP addresses
of computers behind the firewall and offer a level of circuit based filtering.
Packet filtering router applies rule to each incoming and outgoing IP packet, according
forward or discards it.
Fig 4.3.2
Filtering rules are based on information contained in the network packet such as
1.Source IP address
2.Destination IP address
3.Source and destination transport level address
4.IP field
5.Interface
14
Attackers can try and break the security of the packet filter by using following
techniques.
1.IP address spoofing
2.Source routing attacks
3.Tiny fragment attacks
Packet filtering provides a useful level of security at low cost. The type of router used in
packet filtering is a screening router.
Creening router
Each packet has two parts: The data that is part of the document and a header. If the
packet is an envelope, then the data is the letter inside the envelope and the header is the
address information on the outside.
Here packet filter to refer to the technology or the process that is taking place and the
screening router to refer to the thing that‟s doing it
Screening router can be a commercial router or a host-based router with some kind of
packet filtering capability. Typical screening routers have the ability to block traffic
between networks or specific hosts, on an IP port level. Some firewalls consist of nothing
more than a screening router between a private network and the Internet.
Screening routers operate by comparing the header information with a table of rules set
by the network administrator to determine whether or not to send the packet on to its
destination. If there is a rule that does not allow the packet to be sent on, the router
simply discards it.
Working of packet filter
Packet filters work by dropping packets based on their source and destination addresses
or ports. Configuring a packet filter is a three step process. First of course, one must
know what should and what should not be permitted. Next, the allowable type of packets
must be specified, in terms of lofical expression on packet fields. Finally the expression
should be rewritten in whatever syntax your vendor supports.
In general, for each packet, the router applies the rules sequentially, starting with the first
one, until the packet fits or until it runs out of rules.
For examples, a router has 3 rules in its table.
Rule1: Don,t allow packets from a particular host, called TROUBLEHOST.
Rule2: Let in connections into out mail gateway (using SMTP), locate at port 25 on out
of host.
Rule3: Block everything else.
When a packet arrives at the screening router, the process works like this
1. The packet filter extracts the information it needs from the packet header. In this
example, it uses the local and external host identification and the local and external
port numbers.
2. The packet filter compares that information with the rules in the table.
15
3. If the packet is from TROUBLEHOST, no matter what its destination, discard it.
4. If the packet makes it past the first rule i.e. its not from TROUBLEHOST, check to
see if its intended for port 25 on out SMTP-Mail host. If it is, send it on ; otherwise,
discard it,
5. If neither of the first two rules apply, the packet is rejected by rule three.
Every packet has a set of headers containing certain information. The information is
*IP source address.
*IP destination address.
*Protocol (whether the packet is a TCP, UDP or ICMP packet).
*TCP or UDP source port.
*TCP or UDP destination port.
* TCP ack flag.
Inspection module
If the header information listed above doesn't give you enough elements filter that has an
inspection module. An inspection module looks at more of the header information; some
can ever look at the application data itself. For example, by inspecting the application
data, the module can delay packets the certain application commands, such as the FTP
put command or the SNMP set command.
State evaluation
The header of a TCP packet contains an indicator called the ACK flag. When the ACK
flag is set, it means that the incoming packet of a response to an earlier outgoing packet.
If the flag is not set, the packet is not a response to an earlier outgoing packet, and
therefore is suspect. It's common to set a screen rule to allow incoming packets that have
the ACK flag set and reject those that don't. UDP doesn't use an ACK flag or any other
similar indicator, so there's no way for the screening router to know whether an incoming
packet was sent in response to an outgoing packet. The only safe thing to do in that
situation is to reject the packet.
That's where state evaluation comes in a screening router that has the state evaluation
capability, “remembers” the original outgoing packet for a certain length of time (set by
system administrator).
16
1.They are vulnerable to attacks aimed at protocol higher than the network layer protocol.
2.They cannot hide the network topology.
3.Packet filtering firewall can not support all internet applications.
4.These firewall have very limited auditing capabilities.
5.Sometime user level authentication do not supported by packet filtering firewall.
Fig.4.3.3
Advantages
1.Application gateway provides high level of security than packet filters.
2.Easy to configure.
3.They can hide the private network topology.
4.It support user level authentication.
5.Capability to examine the all traffic in detail.
Disadvantages
1.High impact on network performance.
2.Slower in operation because of processing overheads
3.Not transparent to users.
17
4.3.1.3 Circuit Level Gateways
Circuit level gateways work at the session laywer of the OSI model, or the TCP layer of
TCP/IP. They monitor TCP handshaking between packets to determine whether a
requested session is legitimate. Information passed to remote computer through a circuit
level gateway appears to have originated from the gateway. This is useful for hiding
information about protected networks.
Circuit level gateways are relatively inexpensive and have the advantage of hiding
information about the private network they protect .On the their hand, they do not filter
individual packets.
The circuit level gateway doesnot permit end to end tcp connections are set up.A
typical use of circuit level gateway is in situations when system administrator trusts the
internal uses.
Fig.4.3.4
18
to proxy. packet filtering.
8.They cannot hide the private 8.They can hide the private
network topology. network topology.
Fig.4.3.5
Traffic from the Internet is filtered, but some of it is allowed to reach systems in the
DMZ i.e. like web servers and mail servers. If an attacker succeeds in breaking into a
system in your DMZ, they won‟t gain access to your internal network as traffic coming
from the DMZ is filtered before being allowed into the internal network.
To create a DMZ, you can use two firewalls. Our illustration shows an outer firewall that
separates the DMZ from the Internet and an inner firewall that separates the DMZ from
the Internal network. The outer firewall controls the traffic from the Internet to the DMZ.
The inner firewall controls traffic from the DMZ to the internal network.
19
The external firewall provides a measure of access control and protection for the DMZ
systems consistent with their need for external connectivity. The external firewall also
provides a basic level of protection for the remainder of the enterprise network.
Internal firewalls serve three purposes :
1. The internal firewall adds more stringent filtering capability, compared to the external
firewall, in order to protect enterprise servers and workstations from external attack.
2. The internal firewall provides two-way protection with respect to the DMZ.
3. Multiple internal firewalls can be used to protect portions of the internal network from
each other.
2.Virtual Private Networks (VPN)
Virtual Private Networks (VPN) provide an encrypted connection between a user‟s
distributed sites over a public network (e.g., the Internet). By contrast, a private network
uses dedicated circuits and possible encryption.
Use of a public network exposes corporate traffic to eavesdropping and provides an entry
point for unauthorized users. To counter this problem, a VPN is needed.
VPN uses encryption and authentication in the lower protocol layers to provide a secure
connection through an otherwise insecure network, typically the Internet. VPNs are
generally cheaper than real private networks using private lines but rely on having the
same encryption and authentication system at both ends. The encryption may be
performed by firewall software or possibly by routers. The most common protocol
mechanism used for this purpose is at the IP level and is IPsec.
3.Distributed Firewall:
A distributed firewall configuration involves stand-alone firewall devices plus host
based firewalls working together under a central administrative control. Security policy
is defined centrally and enforcement of policy is done by network endpoint(s).
Administrators can configure host resident firewalls on hundreds of servers and
workstations as well as configure personal firewalls on local and remote user systems.
Tools let the network administrator set policies and monitor security across the entire
network. These firewalls protect against internal attacks and provide protection tailored
to specific machines and applications. Stand-alone firewalls provide global protection,
including internal firewalls and an external firewall.
4.3.3 Firewall Configuration:
Firewall configuration are of three types:
1. Screened host, single homed bastion host.
2. Screened host, dual homed bastion host.
3. Screened subnet.
20
The router is configured so that,
1. For traffic from the Internet, only IP packets destined for the bastion host are
allowed in.
2. For traffic from the internal network, only IP packets from the bastion host
allowed out.
Fig. 4.3.6
The bastion host performs authentication and proxy functions.
This configuration affords flexibility in providing direct internet access.
2. Screened host, dual homed bastion
This configuration prevents a security breach. This advantages of dual layers of security
that were present in the previous configuration are present as well.
An information server or other hosts can be allowed direct communication with the router
if this is in accord with the security policy.
3. Screened subnet
21
Message includes:
- Purchase-related information
- Order-related information
- Cardholder certificate
The cardholder generates a one-time request message, it performs the following actions:
Processes the order and forwards the payment information to the payment gateway for
authorization.
. Message that acknowledgement the order and references corresponding transaction number.
. Block is,
. Upon reception
27
- Verifies merchant certificate
- Verifies signature on response block
- Takes the appropriate action
. The merchant sends an authorization request message to the payment gateway consisting of the
following:
. Purchase Information(PI)
. Dual signature calculated over the PI and OI and signed with customer‟s private key.
- Certificates
- Authorization-related information
- A transaction ID
- Signed with merchant‟s private key
- Encrypted one-time session key
. Certificates
. Decrypt authorization block digital envelope to obtain symmetric key and decrypt block.
28
. Verify merchant signature on authorization block.
. Decrypt payment block digital envelope to obtain symmetric key and decrypt block.
. Verify received transaction ID received from merchant matches PI received from customer.
- Authorization-related information
- Capture token information
- Certificate
4.5 Intruder
. An intruder is a person who attempts to gain unauthorized access to a system, to damage that
system, or to disturb data on that system.
1.) Masquerade: An unauthorized user who penetrates a computer system‟s access control
and gains access to user accounts.
2.) Misfeasor: A legitimate user who accesses resources he is not authorized to access. who
is authorized such access but misuses his privileges.
3.) Clandestine user: A user who seizes the supervisory control of the system and uses it to
evade auditing and access control.
Intrusion techniques
29
. Access is generally protected by passwords. System maintains a file that associates a password
with each authorized user.
. Password file can be protected with: One-way encryption and access control
1.) One way function: A system passwords only in encrypted form. When user presents a
password, the system transforms that password and compares it with the stored value.
2.) Access control: Access to the passwords file is limited to very few people.
1.) Try default passwords.(used with standard accounts that is shipped with systems.)
2.) Try all short words, 1to 3 characters long.
3.) Try all word in an electronic dictionary.
4.) Collect information about the user‟s hobbies, families, names, birthday, etc..
5.) Try user‟s phone number, social security number, street address, etc…
6.) Try all license plate numbers( AP 12 AA 4453).
7.) Use a Trojan horse
8.) Tap the line between a remote user and the host system.
. Intrusion detection systems are software or hardware systems that automate the process of
monitoring the events occurring in a computer system or network, analysing them for signs of
security problems.
30
3.) Tracing user activity from the point of entry to point of exit or impact
4.) Recognizing and reporting alternations to data files
5.) Spotting errors of system configuration and sometimes correcting them
6.) Recognizing specific types of attack and alerting appropriate staff for defensive responses
7.) Keeping system management personnel up to date on recent corrections to programs
8.) Allowing non-expert staff to contribute to system security
9.) Providing guidelines in establishing information security policies
Process Model
1.) Information sources: The different source of event information used to determine
whether an intrusion has taken place. These sources can be drawn from different levels of
the system, with network, host, and application monitoring most common.
2.) Analysis: The part of intrusion detection systems that actually organizes and makes sense
of the events derived from the information sources, deciding when those events indicate
that intrusions are occurring or have already taken place. The most common analysis
approaches are misuse detection and anomaly detection.
3.) Response : The set of actions that the system takes once it detects intrusions. These are
typically grouped into active and passive measures, with active measures involving some
automated intervention on the part of the system, and passive measures involving
reporting IDS finding to humans, who are then expected to take action based on those
reports.
. An anomaly based intrusion detection system is a system for detecting computer intrusions and
misuse by monitoring system activity and classifying it as either normal or anomalies.
. It examines on going traffic, activity, transactions, and behaviour in order to identify intrusions
by detecting anomalies.
. For instance, anomaly-based IDS will detect that an IP packet is malformed. It does not detect
that it is malformed in a specific way, but indicates that is anomalous.
. The classification Is based on heuristics or rules, rather than patterns or signatures, and will
detect any type of misuse that falls out of normal system operation.
. Anomaly detectors construct profiles representing normal behaviour of users, hosts, or network
connections. These profiles are constructed from historical data collected over a period of normal
operation.
31
. The detectors then collect event data and use a variety of measures to determine when
monitored activity deviates from the norm.
. Another method is to define what normal usage of the system comprises using a strict
mathematical model, and flag any deviation from this as an attack. This is known as strict
anomaly detection.
. The measures and techniques used in anomaly detection include: Threshold detection, statistical
measures, and rule-based measures.
1.) IDSs based on anomaly detection detect behaviour and thus have the ability to detect
symptoms of attacks without specific knowledge of details.
2.) Anomaly detectors can produce information that can in turn be used to define signatures
for misuse detectors.
1. Anomaly detection approaches usually produce a large number of false alarms due to the
unpredictable behaviours of users and networks.
2. Anomaly detection approaches often require extensive “training sets” of systen event
records in order to characterize normal behavior patterns.
Asignature based IDS will monitor packets on the network and compare them against a
database of signatures or attributes from known malicious threats.
This is similar to the way most antivirus software detects malware.
A common stratergy for IDS in detecting intrusions is to memorize signatures of known
attacks.The inherent weakness in relying on signatures is that the signature pattern must
be known first.
Also called as misuse detection.
32
4.6.1.3 COMPARISION BETWEEN SIGNATURE –BASED AND ANOMALY
DETECTION
33
1. Network-based IDSs may have difficulty processing all packets in a large or busy
network.
2. Network-based IDSs cannot analyze encrypted information.
3. Most network-based IDSs cannot tell whether or not an attack was successful.
4. Some network-based IDSs have problems dealing with network-based attacks that
involve fragmenting packets.
This allows host-based IDSs to analyze activities with great reliability and
precision, determining exactly which processes and users are involved in a
particular attack on the operating system.
Host-Based IDSs normally utilize information sources of two types, operating system
audit trails, and system logs.
Operating system audit trails are usually generated at the innermost (kernel) level of the
operating system,and are therefore more detailed and better protected than system logs.
System logs are much less obtuse and much smaller than audit trails, and ae
furthermore far easier to comprehend.
Advantages
With their ability to monitor events local to a host, can detect attacks that cannot
be seen by network-based IDS.
34
Advantages
Host –based IDSs are harder to manage, as information must be configured and
managed for every host monitored.
Since at least the information soruces for host-based IDSs reside on the host
targeted by attacks, the IDS may be attacked and disabled as part of the attack.
Host –based IDSs are not well suited for detecting network scans or other such
Surveillance that targets an entire network.
When host – based IDSs use OS audit trails as on information source, the amount of
information can be immense, requiring additional local storage on the system.
S. No NIDS HIDS
1 Broad in scope, (watching all network activities Narrow in scope (watching
only specific host activities)
2 Easier setup More complex setup
3 Better for detecting attacks from the outside Better for detecting attacks
from the inside
4 Less expensive to implement More expensive to implement
5 Detection is based on what can be recorded on the Detention is based on what
entire network any single host can record
6 Examines packet leaders Does nto see packet headers
7 Near real-time response Usually only responds after a
suspicious log entry has been
made
8 OS- independent OS – specific
9 Detects network attacks as payload is analyzed Detects local attacks before
they hit the network
10 Detects unsuccessful attack attempts Befifies success or failue of
attacks
35
4.6.2 Intrusion Detection Techniques
3. Rule based detection: Observe events on system and apply rules to decide if activity
is suspicious or not. Analyze historical audit records to identify usage patterns and
auto-generate rules for them. Then obseve current behaviour and match against rules
to see if conforms. Like statistical anomaly detection does not require prior
knowledge of security flaws.
Audit record is a fundamental tool for intrusion detecting. Two forms of audit records
are used.
1. Native audit records.
1. Subject
2. Action
3. Object
4. Exception – condition
5. Resource – usage
6. Time stamp
36
Fig: 4.6.1 shows audit record format.
37
6. Managing operating system audit and logging, mechanisms and the data they generated.
7. Alerting appropriate staff by appropriate means when attacks are detected.
8. Measuring enforecement of security policies encoded in the analysis engine.
9. Providing detault information security policies.
10. Allowing non-security experts to perform important security monitoring function.
IDS IPS
Installed on network segments (NIDS) and on Installed on network segments (NIPS) AND
host (HIDS) ON HOST (hips)
Sits on network passively Sits inline (not passive)
Cannot parse encrypted traffic Better at protecting applications
Central management control Central management control
Better at detecting hacking attacks Ideal for blocking web defacement
Alerting product (reactive) Blocking product (proactive)
38
4.6.8 Intrusion Prevention System (IPS)
Although IDS have been one of the cornerstones of network security, they have covered only one
component of the total network security picture since they have been and they a passive
component which only detects and reports without preventing.
A promising new model of intrusion is developing and picking up momentum. It is the Intrusion
Prevention System (IPS) which, is to prevent attacks. Like their counterparts the IDS, IPS fall
into two categories : Network based and Host – Based
Because NIDSs are passively detecting intrusion into the network without preventing them from
entering the networks, may organization in recent times have been bundling up IDS and firewalls
to create a model that can detect and then prevent.
a. The IDS fronts the network with a firewall behind it, on the detection of an attack, the
IDS then goes into the prevention mode by altering the firewall access control rules
on the firewall. The action may result in the attack being blocked based on all the
access control regimes administered by the firewall.
b. The IDS can also affect prevention through the TCP resets; TCP utilizes the RST
(reset) bit in the TCP header for resetting a TCP connection, usually sent as a
response request to a non-existent connection. But this kind of bundling is both
expensive and complex, especially to an untrained security team. It suffers from
latency - the time it takes for the IDS to either modify the firewall rules or issue a
TCP reset command. This period of time is critical in the success of on attack.
39
IDSs are slow and cannot be in-line with the packet stream. IPSs use ASICs for speed;
can be in-line with the packet stream. Therefore can stop attacks.
1. No read up : A subject can only read an object of less or equal security level –
2 No write down A subject can only write into an object of greater or equal security
level - * (star) Property.
40
These two rules, if properly enforced, provide multilevel security
The BLP model was developed in the 1970s as a formal model for access control. The
model relied on the access control concept. In the model, each subject and c\each object
is assigned a security class. In the simplest formulation. Security classes for a strict
hierarchy and are referred to as security levels. One example is the U.S. Military
classification scheme”: top secret> Secret> confidential > restricted> unclassified.
It is possible to also add a set of categories or compartments to each security level, so that
a subject must be assigned both the appropriate level and category to access an object.
This concept is equally applicable in other areas, where information can be organized into
gross levels and categories and users can be granted clearances to access certain
categories of date. For Example, the highest level of security might be for strategic
corporate planning documents and date, accessible by only corporate officers and their
staff; next might come sensitive financial and personnel data, accessible only by
administration personnel, corporate officers and so on. This suggests a classification
scheme such as strategic>sensitive> confidential > public.
A subject is said to have a security clearance of a given level; an object is said to have a
security classification of a given level. The security classes control the manner by which
a subject may access an object.
41
Malicious programs
Secret undocumented entry point into a program used to grant access without normal
methods of access authentication
Trap doors have been used legitimately for many years by programmers to debut and test
programs.
Trap door can be caused by a flow in the system design or they can be installed there by a
system programmer for future use. Trap doors including backdoor passwords are
unspecified and non documented entry points to the system. A clever trap door could be
included in a compiler.
The compiler could generate standard object code as well as a trap door regardless of the
source code being compiled. Trap door may also be a incorporated into the system by a
destructive virus or by a Trojan horse program.
Trap door is one type of program threat.
Trap door is code that recognizes some special sequence of input or is triggered by being
run from a certain user ID or by an unlikely sequence of events.
42
It is difficult to implement operating system controls for trap doors. Security measures
must focus on the program development and software update activities.
Logic embedded in a computer program that checks for a certain set of conditions to be
present on the system. When these conditions are met, it executes some functioning that
result in unauthorized actions.
Examples of conditions that can be used as triggers for a logic bomb are the presence or
absence of certain files, a particular day of the week or date or a particular user running
the application.
Once triggered a bomb may alter or delete date or entire files, cause a machine halt, or do
some other damage.
4.8.4 Virus
A Virus is a block of code that inserts copies of itself into other programs. A virus
generally carries a payload, which may have nuisance value, or serious consequences. To
avoid early detection, viruses may delay the performance of functions other than
replication.
Virus is one type of system threats
43
A virus is any unauthorized program that is designed to gain access to a computer system.
Viruses need other programs to spread, Due to its spreading nature, a virus can cause
severe damage to a system.
Virus attacks are active type Trojan horse attacks. A macro virus is embedded in a work
processing. When the recipient of an email or data file with embedded virus opens the
document, the macro defined as an auto exec file, execute and immediately infects the
system viruses have even been found in legitimate application software.
Most virus include a string of characters that acts as a marker showing that the program
has been infected .when an uninfected program is found ,the virus infects it by attaching a
copy of itself to the end of the program and replacing the first instruction of the program
with the jump to the viral code.
Virus does not infect an already infected file in order to prevent an object file growing
ever longer. This allows the virus to infect many programs without noticeably increasing
disk space usage
3.Avoid borrowing programs for someone whose security standards are less.
NATURE OF VIRUS
* Once a virus is executing ,it can perform any function ,such as earsing files and programs , that
*During its lifecycle,a typical virus goes through the following four stages.
VIRUSES
* A computer virus is a program that inserts itself into one or more files and then perform some
actions
PHASES OF VIRUSES
1.Dormant phase
2.Propgation phase
44
3.Triggering phase
4.Execution phase
of another programs or file,or the capacity of the disk exceeding some limit.
Propagation phase:The places an identical copy of itself into other programs or into certain
systems areas on the disk .Each infected programs will now contain a clone of virus,which will
Execution phase:The function is performed .The function may be harmless which may be
message
on the screen ,or damaging ,such as the destruction of programs and data files.
TYPES OF VIRUSES
1.Parastic virus:A parsitic virus attaches itself to executable files and replicates.When the
infected
2.Memory -Resident virus:Lodes inb main memory as part of resident system programs.From
that
3.Boot service virus: Infects a master boot record or boot record and spreads when the system is
booted from the disk containing the virus
4.Stealth virus: A form of virus explicitly designed to hide itself from detection by antivirus
software
5.Polymorpic virus: A virus that mutates with every infection ,making detection by the
signature of type virus impossible
6.Metmorpic virus: A metamorphic virus rewrites itself completely at each iteration ,increasing
the difficulty of detection.
MACRO VIRUSES
45
Macro viruses are particularly threatening for number of reasons
1.A Micro virus is platform independent virtually all of the macro viruses infect the MS Word
documents
E-mail Viruses
If the recipient opens the email attachment,the Word Macro is activated.The e-mail virus send
itself to everyone
on the mailing list to the user 's e-mail package .The virus does local demage
The first rapidly spreading e-mail viruses,such as Melissa ,made use of the Microsoft Word
Macro embedded in attachment.
4.8.5 WORMS
Worms is a program that replicicates itself by installing copies on other machines across a
network.
An e-mail virus has some of the characteristcs of a worm because it propagates itself
from system to system.
Network worm programs use network connections to spread from system to system.To
replicate itself, a network worm uses some sort of network vehicle
A network worm exhibits the same characteristics as a computer virus a dormant phase a
propagation phase ,a triggering phase and an execution phase.
46
3. Copy itself to the system and cause the copy to be run.
Worm technologies
1. Multiplatform: Newer worms are not limited to window machines but can attack
variety of platform
3. Ultrafast spreading
4. Polymorphic
5. Metamorphic
6. Transport vehicles
7. Zero-day exploit
A virus is a piece of code that adds itself to other programs, including operating systems.
Until the user(inadvertently) activates the virus or the altered file is called, the virus is
unable to do any activity.
A worm is a program that can run by itself and can propagate a fully working version of
itself to other machines.
When a worm gains access to a computer(usually by breaking into it over the Internet) it
launches a program which searches for other Internet locations, infecting them if it can.
At no time does the worm need user assistance in order to operate its programming.
47
1. Detection (determines and locate) virus
2. Identification of virus.
GD technology can detect most complex polymorphic viruses with fast scanning speed.
The detection is done by executing files through GD scanner. The elements of executable
files are:
i. CPU emulator
Digital immune system is aimed to provide rapid response so that virus can be stamped
out as soon as they are introduced. Fig. 4.9.1 shows components of Digital Immune
System .
48
Fig .4.9.1 Digital Immune system
The behavior blocking software blocks potential malicious actions before they get
chance to affect the system. The behaviour monitoring may include
If the behaviour blocker, detects program initiation is malicious, it can block the
behaviour and terminate the response.
Distributed Denial of Service (DDoS) attacks present a major security threat. It make
computer system inaccessible by flooding severs and users with useless traffic.
A denial of service is an attempt to prevent a genuine user of service from using it. In
DDoS, multiple hosts attack in coordinated manner to attack on target.
DDoS attack consumes system resources thereby reducing the speed of the computer.
49
The resources attack can be classified as.
50