0% found this document useful (0 votes)
24 views55 pages

CNS Unit 4 New

Uploaded by

Chandra B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views55 pages

CNS Unit 4 New

Uploaded by

Chandra B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Review Questions

1 What is the difference between little-endian and big-endian format?

2 What basic arithmetical and logical functions are used in SHA?

3 What basic arithmetical and logical functions are used in Whirlpool?

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?

Chapter3: Digital Signatures and Authentication Protocols

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.

Thus, the digital signature function includes the authentication function.


On the basis of these properties, we can formulate the following requirements for a digital signature:

 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.

Direct Digital Signatures

 involve only sender & receiver

 assumed receiver has sender’s public-key

 digital signature made by sender signing entire message or hash with private-key

 can encrypt using receivers public-key

 important that sign first then encrypt message & signature

 security depends on sender’s private-key

Arbitrated Digital Signatures

Arbitrated Digital Signature Techniques

(1) X A: M||E(Kxa, [IDX||H(M)])

(2) A Y: E(Kay, [IDX||M||E(Kxa, [IDX||H(M)])||T])

(a) Conventional Encryption, Arbiter Sees Message

(1) X A: IDX||E(Kxy, M)||E(Kxa, [IDX||H(E(Kxy, M))])

(2) A Y: E(Kay,[IDX||E(Kxy, M)])||E(Kxa, [IDX||H(E(Kxy, M))||T])

(b) Conventional Encryption, Arbiter Does Not See Message


Arbitrated Digital Signature Techniques

(1) X A: M||E(Kxa, [IDX||H(M)])

(1) X A: IDX||E(PRx, [IDX||E(PUy, E(PRx, M))])

(2) A Y: E(PRa, [IDX||E(PUy, E(PRx, M))||T])

(c) Public-Key Encryption, Arbiter Does Not See Message

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

 may be one-way or mutual

 key issues are

 confidentiality – to protect session keys

 timeliness – to prevent replay attacks

 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.

Symmetric Encryption Approaches


 as discussed previously can use a two-level hierarchy of keys

 usually with a trusted Key Distribution Center (KDC)

 each party shares own master key with KDC

 KDC generates session keys used for connections between parties

 master keys used to distribute these to them

Needham-Schroeder Protocol

 original third-party key distribution protocol

 for session between A B mediated by KDC

 protocol overview is:

1. A->KDC: IDA || IDB || N1

2. KDC -> A: EKa[Ks || IDB || N1 || EKb[Ks||IDA] ]


3. A -> B: EKb[Ks||IDA]

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

 then message 3 can be resent convincing B that is communicating with A

 modifications to address this require:

 timestamps (Denning 81)

 using an extra nonce (Neuman 93)

Let us follow this exchange step by step.

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

 have a range of approaches based on the use of public-key encryption

 need to ensure have correct public keys for other parties

 using a central Authentication Server (AS)

 various protocols exist using timestamps or nonces

Denning AS Protocol

 Denning 81 presented the following:

1. A -> AS: IDA || IDB

2. AS -> A: EPRas[IDA||PUa||T] || EPRas[IDB||PUb||T]

3. A -> B: EPRas[IDA||PUa||T] || EPRas[IDB||PUb||T] || EPUb[EPRas[Ks||T]]

 note session key is chosen by A, hence AS need not be trusted to protect it

 timestamps prevent replay but require synchronized clocks

One-Way Authentication

 required when sender & receiver are not in communications at same time (eg. email)

 have header in clear so can be delivered by email system

 may want contents of body protected & sender authenticated

Using Symmetric Encryption

 can refine use of KDC but can’t have final exchange of nonces, vis:

1. A->KDC: IDA || IDB || N1

2. KDC -> A: EKa[Ks || IDB || N1 || EKb[Ks||IDA] ]

3. A -> B: EKb[Ks||IDA] || EKs[M]

 does not protect against replays

 could rely on timestamp in message, though email delays make this problematic
Public-Key Approaches

 have seen some public-key approaches

 if confidentiality is major concern, can use:

A->B: EPUb[Ks] || EKs[M]

 has encrypted session key, encrypted message

 if authentication needed use a digital signature with a digital certificate:

A->B: M || EPRa[H(M)] || EPRas[T||IDA||PUa]

 with message, signature, certificate

Digital Signature Standard (DSS)

 US Govt approved signature scheme

 designed by NIST & NSA in early 90's

 published as FIPS-186 in 1991

 revised in 1993, 1996 & then 2000

 uses the SHA hash algorithm

 DSS is the standard, DSA is the algorithm

 FIPS 186-2 (2000) includes alternative RSA & elliptic curve signature variants

The DSS Approach


The Digital Signature Algorithm

 creates a 320 bit signature

 with 512-1024 bit security

 smaller and faster than RSA

 a digital signature scheme only

 security depends on difficulty of computing discrete logarithms

 variant of ElGamal & Schnorr schemes

DSA Key Generation

 have shared global public key values (p,q,g):

 choose a large prime p with 2L-1 < p < 2L

• where L= 512 to 1024 bits and is a multiple of 64

 choose q with 2159 < q < 2160

• such that q is a 160 bit prime divisor of (p-1)

 choose g = h(p-1)/q

• where 1<h<p-1 and h(p-1)/q mod p > 1

 users choose private & compute public key:

 choose x<q
 compute y = gx mod p

DSA Signature Creation

 to sign a message M the sender:

 generates a random signature key k, k<q

 nb. k must be random, be destroyed after use, and never be reused

 then computes signature pair:

r = (gk mod p)mod q

s = [k-1(H(M)+ xr)] mod q

 sends signature (r,s) with message M

DSA Signature Verification

 having received M & signature (r,s)

 to verify a signature, recipient computes:

w = s-1 mod q

u1= [H(M)w ]mod q

u2= (rw)mod q

v = [(gu1 yu2)mod p ]mod q

 if v=r then signature is verified

 see book web site for details of proof why

Summary

 have discussed:

 digital signatures

 authentication protocols (mutual & one-way)

 digital signature algorithm and standard


Key Terms
arbiter mutual authentication

arbitrated digital signature nonce

direct digital signature one-way authentication

digital signature replay attack

digital signature algorithm (DSA) suppress-replay attack

digital signature standard (DSS) timestamp

Review Questions

1 List two disputes that can arise in the context of message authentication.

2 What are the properties a digital signature should have?

3 What requirements should a digital signature scheme satisfy?

4 What is the difference between direct and arbitrated digital signature?

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?

7 Give examples of replay attacks.

8 List three general approaches to dealing with replay attacks.

9 What is a suppress-replay attack?


UNIT-4

4.1. Authentication Applications: Kerberos

 Kerberos is an authentication protocol. It provides a way to authenticate clients to


services to each other through a trusted third party.
 Kerberos makes the assumption that the connection between a client and service is
insecure. Passwords are encrypted to prevent others from reading them. Clients only have
to authenticate once during a pre defined lifetime.
 Kerberos was designed and developed at MIT by Project Athena. Currently ,
Kerberos is upto Version 5. Version 4 being the first version to be released outside of
MIT.
 Kerberos has been adopted by several private companies as well as added to several
operating systems.
 Its creation was inspired by client-server model replacing time-sharing model.kerberos is
a network authentication protocol designed to allow users, clients and servers,
authenticate themselves to each other.
 This mutual authentication is done using secret key cryptography with parties proving to
each other their identity across an insecure network connection.
 Communication between the client and the server can be secure sfter the client and server
have used Kerberos to prove their identity.
 From this point on, subsequently communication between the two can be encrypted to
assure privacy and data integrity.

Requirements of Kerberos

 Kerberos client/server authentication requirements are:


 SECURITY: That Kerberos is strong enough to stop potential eavesdroppers from
finding it to be a weak link.
 RELIABILITY: That Kerberos is highly reliable employing a distributed server
architechure where one server is able to back up another. This means that Kerberos
systems are fail safe, meaning gracefull degradation, if it happens.
 TRANSPARENCY: That user is not aware that authentication is taking place beyond
providing passwords.
 SCALABILITY: Kerberos systems accept and support new clients and servers.
 To meet these requirements, Kerberos designers proposed a third-party trusted
authentication service to arbitrate between the client and server in their mutual
authentication.

4.1.1 Kerberos Terminology

 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.

4.1.2 Kerberos Version 4

 Kerberos version 4 uses DEC for providing authentication service. Some aspect of
version 4 are:
 Simple Authentication Dialogue
 More Secure Authentication Dialogue.

4.1.2.1 Simple 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

Sender and receiver Content of message


 CAS :IDc ||Pc||IDv
 ASC : Ticket
 CV : IDc||Ticket
 Ticket =E[Kv,(IDc||ADc||IDv)]

Explanation

1. Client Clogs on to workstation requesting to access to server V: The


workstation requests user‟s password and sends message to AS including user
ID+server ID+user password. The AS checks this message with database and
verifies it.
2. AS issues ticket: On verifying the tests. AS issue ticket containing user
ID+server ID+network address.
3. Client C applies server V: With this ticket,c lient C asks server V for access
Server V decrypts the ticket and verify the authenticity of data then grants the
requested service. In above hypothetical dialogue, symbol || represents
concatenation.

4.1.2.2 Secure Authentication Dialogue

 Kerberos version 4 protocol ensures secure authentication dialogue involving


three sessions.
i. Authentication Service- Exchange to obtain ticket-granting ticket.
ii. Ticket-granting Service- Exchange to obtain service granting ticket.
iii. Client/server authentication- Exchange to obtain service
 Each of the above session has two steps, as shown in table below
Session Step Sender-receiver
i. 1. CAS
2. ASC
ii. 3. cTGS
4. TGSC
iii. 5. Cv
vC

3
4.1.2.3 Kerberos Realm

 The constituents of a full-service Kerberos environment are


a. A Kerberos server
b. Clients
c. Number of application server
 Requirements of Kerberos server:
a. Kerberos server should have user ID
b. Hashed password for all users
c. All users should be registered with Kerberos server
d. Kerberos server should have secret key with each server
e. All server should be registered with Kerberos server.
 A Kerberos realm is reffered as is the environment where
- All noeds share same securd database
- Changing and accessing the Kerberos database require Kerberos master
password.
- A read only copy of Kerberos database resides in computer system.
 Network have different realms under different administrative organizations.
The users of one realm may access the servers in other realm provided the
users are authenticated. The interoperating Kerberos shares a secret key with
the server in other realm.

4
4.1.3 Kerberos Version 5

 Version 4 of Kerberos have some environmental shortcoming and technical


deficiencies.

Environmental shortcomings of version 4

1. Encryption system dependence


2. Internet protocol dependence
3. Message byte ordering
4. Ticket lifetime
5. Authenticate forwarding
6. Inter realm authentication

Technical deficiencies of version 4

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 CAS To obtain ticket-granting
exchange ASC ticket.
Ticket-Grating Service CTGS To obtain service-
Exchange TGSC granting ticket.
Client/Server CV To obtain service.
Authentication Exchange VC

 The Flags field is expanded in ticket in version of kerberos. Various flags


that may be included in a ticket, are
I. INTIAL
II. PRE – AUTHENT
III. HW – AUTHENT
IV. RENEWABLE
V. MAY – POSTDATE

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

4..5 Strengths of Kerbero


1. Passwords are never sent across the network unencrypted. The prevents
those unscrupulous people from being able to read the most important
data sent over the network.
2. Clients and applications services mutually authenticate. Mutual
authentication allows for both ends to know that they truly know whom
they are communicating with.
3. Tickets have a limited lifetime, so if they stolen, anauthorized use is
limited to the time frame that the ticket is valid.
4. Authentication through the AS only has to happen once. This makes the
security of Kerberos more convenient.
5. Shared secret keys between clients and services are more efficient that
public keys.
6. Many implementations of Kerberos have a large support base and have
been put through serious testing.
7. Athenticators, created by clients, can only be used once. This feature
prevents the use if stolen authenticators.

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

 X.509 Authentication Services


 x.509 is part of x.500 recommendations for directory services i.e,. set of
servers which maintains a database of information about users and other
attributes.
 X.509 defines authentication services e.g. certificate structure and
authentication protocols. Also x.509 defines alternative authentication

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.

4.2.1 X.509 Formats of Certificate

 The current version of the standard is version 3, called as x.509v3. the


general format of digital certificate x.509v3
Version
Certificate serial number
Issue name
Period f validity
Subject name
Subject‟s public key info
Issuer unique identifier
Subject unique identifier
Extensions
Signature algorithm identifier
Signature

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.

Standard notations for defining a certificate:

CA<<A>>=CA{V,SN,AI,CA,TaA,Ap}

Where,

CA<<A>> indicates the certificate of user A issued by certification authority CA.

CA[v…..Ap] indicates signing of V…..Ap by CA

4.2.2 Obtaining User’s Certificate

 The characteristics of user certificate are-


1. Any user who can access public key of CA can verify user public key
2. Only certification Authority can modify the certificate.
 All user certificates are placed in a directory for access of other users. The public key
provided by CA is absolutely secure.
 If user A has obtained a certificate from CA X1 and user B has obtained a certificate
from CA X2. If A don‟t know the public key of X2, then B‟s certificate is useless to A.
The user A can read B‟s certificate but A can not verify the signature. This problem can
be resolved by securely exchanging the public keys by two CAs

4.2.3 Revocation of Certificates

 The certificate should be revolved before expiry because of following reasons:

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

4.2.4: Authentication Procedures

 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

4.3 Internet Firewalls for Trusted System


 Information systems in an organization have changed very rapidly over the years from
centralized data processing, LANs, WANs and Internet connectivity
 The Internet connectivity is essential for the organization enabling access to outside
world. Also
It is a threat to the organization if not secured from intrusions (unauthorized access/users)
 A firewall is inserted between the Internet and LAN for security purpose. The firewall
protects the LAN from Internet-based attacks and also provides security and audits
 A firewall may be a hardware or a software program running on a secure host computer.
A firewall is placed at junction or gateway between the two networks.
 A firewall must have at least two network interfaces one for the network it is intended to
protect and one for the network it is exposed to. A firewall placed between a private or
corporate networks and a public network(Internet) as shown in Fig 4.3.1

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

Fig 4.3.1 Firewall

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).

Advantages of packet filters


1.Low impact on network performance.
2.Packet filter are normally transparent user.
3.Relatively inexpensive price.

Disadvantages of packet filtering firewall

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.

4.3.1.2 Application Level Gateways


 Application level gateways, also called proxies, are similar to circuit level gateways
except that they are application specific. They can filter packets at the application layer
of the OSI model. Incoming or outgoing packets cannot access services for which there
is no proxy. In plain terms, an application level gateway that is configured to be a web
proxy will not allow any FTP, gopher, Telnet or other traffic through. Because they
examine packets at application layer, they can filter application specific commands such
as http:post and get, etc. This cannot be accomplished with either packet filtering
firewalls or circuit level neither of which know anything about the application level
security.
 Application level gateways can also be used to log user activity and logins. They offer a
high level of security, but have a significant impact on network performance. This is
because of context switches that slow down network access dramatically. They are not
transparent to end users and require manual configuration of each client computer.

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

Comparison between Packet Filter and Proxies

Packet filter Proxy (Application level)


1.Works at network layer of OSI 1.Works at application layer
and IP layer of TCP. of OSI, TCP layer of TCP.
2.Low impact on network 2.High impact on network
performance performance.
3.Low level of security as 3.High level of security.
compared
to proxi.
4.Packet filtering is not effective 4.FTP and Telnet are allowed
with
the FTP protocol. into the protected subnet.
5.Simple level of security and faster 5.Capability to examine the
than proxy firewall. traffic in detail, so slower
than packet filtering.
6.Normally transparent to the users. 6.Not transparent to the users
7. Difficulty to configure as 7.Easier to configure than
compare

18
to proxy. packet filtering.
8.They cannot hide the private 8.They can hide the private
network topology. network topology.

4.3.2 Firewall Location

1. DMZ network (demilitarized Zone)


2. Virtual Private Network (VPN)
3. Distributed firewall
 A firewall is positioned to provide a protective barrier between an external, potentially
untrusted source of traffic and an internal network.
1.DMZ Network (Demilitarized Zone)
 Connections from the internal and the external network to the DMZ are permitted,while
connections from the DMZ are only permitted to the external network, hosts in the DMZ
may not connect to the internal network.
 This allows the DMZ‟s hosts to provide services to both the internal and external network
while protecting the internal network in case intruders compromise a host in the DMZ.
The DMZ is typically used for connecting servers that need to be accessible from the
outside world, such as e-mail, web and DNS servers.

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.

1.Screened host, single homed bastion host


 In this system, firewall consists of two systems : A packet filtering router and a bastion
host.

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:

- Verify the cardholder certificates by means of its CA signatures.


- Verifies the dual signature using the customer‟s public key signature.

Fig 4.4.3 Verification of purchase request

Processes the order and forwards the payment information to the payment gateway for
authorization.

Sends a purchase response to the cardholder.

4.) Purchase Response Message

. Message that acknowledgement the order and references corresponding transaction number.

. Block is,

- Signed by merchant using its private key.


- Block and signature are sent to customer along with merchant‟s signature certificate.

. Upon reception

27
- Verifies merchant certificate
- Verifies signature on response block
- Takes the appropriate action

4.4.9 Payment Process

. The payment process is broken down into two steps:

1.) Payment authorization


2.) Payment capture

4.4.9.1 Payment Authorization

. The merchant sends an authorization request message to the payment gateway consisting of the
following:

- Purchase – related information

. Purchase Information(PI)

. Dual signature calculated over the PI and OI and signed with customer‟s private key.

. The OI Message Digest(OIMD)

. The digital envelope-authorization-related information

- Certificates
- Authorization-related information

. An authorization block including:

- A transaction ID
- Signed with merchant‟s private key
- Encrypted one-time session key

. Certificates

1.) Cardholder‟s signature key certificate


2.) Merchant‟s signature key certificate
3.) Merchant‟s key exchange certificate

4.4.9.2 Payment Gateway

. Verify all 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 dual signature on payment block.

. Verify received transaction ID received from merchant matches PI received from customer.

. Request and receive issuer authorization.

4.4.9.3 Authorization Response

. Authorization response message

- Authorization-related information
- Capture token information
- Certificate

4.4.10 SET Overhead

. Simple Purchase Transaction: Four messages between merchant and customer

1.) Two messages between merchant and payment gateway


2.) Digital signature
3.) RSA encryption/decryption cycles
4.) DES encryption/decryption cycles
5.) Certificate verifications

. Scaling: Multiple servers need copies of all certificates

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.

. Three classes of intruders are Masquerade, Misfeasor and Clandestine user.

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

. Objective: An intruder wants to gain access to a system.

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.

Techniques for guessing passwords

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.

4.6 Intrusion Detection System

. Intrusion is the act of gaining unauthorized access to a system so as to cause loss.

. Intrusion detection is the act of detecting unwanted traffic on a network or a device.

. Intrusion Detection Systems(IDSs) attempt to identify attacks by comparing collected data to


predefined signatures known to be malicious o to a model of legal behaviour.

. 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.

Functions of intrusion detection systems

1.) Monitoring and analysis of user and system activity.


2.) Auditing of system configurations and vulnerabilities.
3.) Assessing the integrity of critical system and data files.
4.) Recognition of activity patterns reflecting known attacks
5.) Statistical analysis for abnormal activity patterns.

Benefits of intrusion detection

1.) Improving integrity of other parts of the information security infrastructure


2.) Improved system monitoring

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

. Many IDSs can be described in terms of following functional components:

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.

4.6.1 Types of Intrusion Detection System

4.6.1.1 Anomaly Detection

. 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.

Advantages of anomaly detection

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.

DISADVANTAGE OF ANNOMALY DETECTION

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.

4.6.1.2 SIGNATURE –BASED DETECTION

 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.

ADVANTAGES OF SIGNATURE –BASED DETECTION

1. Signature are easy to develop.


2. Understand if you know what network behavior you‟re trying to identify.

DISADVANTAGES OF SIGNATURE-BASED DETECTION

1. High false positive rate.


2. Largely ineffective at detecting previously unknown facts.
3. Signature database must be continually updated and maintained.

32
4.6.1.3 COMPARISION BETWEEN SIGNATURE –BASED AND ANOMALY
DETECTION

PARAMETERS Signature-based detection Anomaly


Detection
Technique Detect patterns of interest Deviations from learned

Generalisation Problematic Yes


Specific Yes No
Sensitivity High Moderate
False alarms Low Moderate
Adaptation NO Yes

4.6.1.4 NETWORK BASED SYSTEM

 A network Intrusion Detection System(IDS) is tries to detect malicious activity such as


denial of service attacks ;port scans or even attempts to crack into computers by network
security monitoring of network traffic.
 Network intrusion detection systems are placed at a strategic point or points within the
network to monitor traffic to and from all devices on the network.
 The majority of commercial intrusion detection system are network based.
 These IDSs detect attacks by capturing and analyzing network packets.
 Listening on a network segment or switch, one network-based IDS can monitor the
network traffic affecting multiple hosts that are connected to the network segment,
thereby protecting those hosts.
 Network-based IDSs often consist of a set of single-purpose sensors or hosts placed at
various points in a network.
 These unit monitor network traffic, performing local analysis of that traffic and reporting
attacks to a central management console.
 As the sensors are limited to running the IDS, they can be more easily secured against
attack.
 Many of the sensors are designed to run in stealth mode, in order to make it more difficult
for an attacker to determine their presence and location.

ADVANTAGES OF NETWORK-BASED IDSs

1. A few well-placed network-based IDSs can monitor a large network.


2. The deployment of network-based IDSs has little impact upon existing network.
3. It can be made very secure against attack.

DISADAVANTAGES OF NETWORK-BASED IDSs

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.

4.6.1.5 Host – Based IDSs (HIDS)

 Host based monitors system logs for evidence of malicious or suspicious


application activity in real time.

 It requires small programs or agents to be installed on individual systems to be


monitored. The agents supervise the OS and write date to log files and activate
alarm.

 Host-based IDSs operate on information collected from within an individual


computer system.

 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.

 It can often operate in an environment in which network traffic is encrypted.


 When host-based IDSs operate on OS audit trails: they can help detect Trojan horse or
other attacks that involve software integrity breaches.

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.

 Host – based IDSs can be disabled by certain denial-of-service attacks.

 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.

4.6.1.6 Difference between HIDS and NIDS

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

 Instrusion detection techniques are as follows:

1. Threshold detection: It records each occurrence of suspicious events and compares


it with a threshold number. Threshold detection involves counting no occurrences of
a specific event type over over an interval of time, if count surpasses a reasonable
number, then intrusion is assumed establishing threshould number is difficult
.
2. Anomaly detection: It requires little knowledge of the actual system beforehand.
Usage patterns are established automatically by means of neural networks.

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.

4.6.3 Tools for Intrusion Detection.

 Audit record is a fundamental tool for intrusion detecting. Two forms of audit records
are used.
1. Native audit records.

 In all multiuser operating system accounting software collects information


about user activity.
2. Detective specific audit records.

 A system that collects information need by intrusion detection system.

Audit record format

 Each audit record contains following field.

1. Subject
2. Action
3. Object
4. Exception – condition
5. Resource – usage
6. Time stamp

36
Fig: 4.6.1 shows audit record format.

Subject Action Object Exception Resource- Time-stamp


condition usage

Fig: 4.6.1 Audit record format

4.6.4 Distributed IDS

 A distributed collection of hosts supported by a LAN or internet work is called


distributed intrusion detection system.

Components of distributed IDS

 The distributed IDS consists of three major components

1. Host agent module


2. LAN monitor agent module
3. Central manager module.

Fig:4.6.2 Distributed Id architecture

4.6.5 Strength of IDS

Instruction detection systems perform the following functions well:

1. Monitoring and analysis of system events and user behaviors.


2. Testing the security states of system configurations.
3. Base lining, the security state of a system, then tracking any changes to that baseline.
4. Recognizing patterns of system events that correspond to known attacks
5. Recognizing patterns of activity that statistically vary from normal activity

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.

4.6.6 Limitations of IDS

Intrusion detection systems cannot perform the following fundtions:

1. Compensating for weak or missing security mechanisms in the protection infrastructure.


Such mechanisms include firewalls, identification and authentication, link encryption,
access control mechanisms, and virus detection and eradication.

2. Instantaneously detecting, reporting, and responding to an attack, when there is a heavy


network or processing load.

3. Detecting newly published attacks or variants of existing attacks.

4. Effectively responding to attacks lauched by sophisticated attackers.

5. Automatically investigating attacks without human intervention.

6. Resisting attacks that are intenced to defeat or circumvent them.

7. Compensating for problems with the fidelity of information sources.

8. Dealing effectively with witched networks.

4.6.7 Differences between IDS and IPS

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

1. Network –based Intrusion Prevention Systems (NIPSs)

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.

 The bundle works as follows.

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.

2. Host –Based Intrusion Prevention Systems 9HIPSs)


a. Most HIPSs work by sand-boxing, a process of restricting the definition of
acceptable behavior rules used on HIPSs, HIPS prevention occurs at the agent
residing at the host. The agent intercepts system calls or system messages by
utilizing dynamic linked libraries (dll) substitution.
b. The substitution is accomplished by injecting existing system dlls with vendor stub
dlls that perform the interception.

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.

4.7 Trusted Systems

 Another widely applicable requirement is to protect data or resources on the basis of


levels of security as is commonly found in the military where information is categorized
as Unclassified (U), Confidential ©. Secret (S), Top Secret (TS) or Higher.
 Here subjects have varying rights of access to objects based on their classifications. This
is known as multilevel security. A system that can be proved to enforce this is referred to
as a trusted system.
 The general statement of the requirement for multilevel security is that a subject at a high
level may not convey information to a subject at a lower or incompatible level unless that
flow accurately reflects the will of an authorized user. This can be implemented using
the Bell LaPadula Mode., in which a multilevel secure system must enforce.

1. No read up : A subject can only read an object of less or equal security level –

Simple Security Property.

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

Bell LaPadula Model

 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.

 The model defined four access modes

1. READ : The subject is allowed only read access to the object


2. APPEND : The subject is allowed only write access to the object.
3. WRITE : The subject is allowed both read and write access to the
object.
4. EXECUTE : The subject is allowed neither read nor write access
to the object but may invoke the object for execution.

4.8 Malicious Software

 The generic term for threats is malicious software or malware. Malware is


Software designed to cause damage to or use up the resources of a target computer.

41
Malicious programs

 Fig.4.8.1 provides an overall taxonomy of malicious software. These threats can be


divided into two categories thouse that need a host program, and those that are
independent. This requires host programs are essentially fragments of programs that
cannot exist independently of some actual application program, utility or system
program.
 Second category i.e. independent programs are self contained programs that can be
scheduled and run by the operating system.

4.8.1 Trap Door

 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.

4.8.2 Logic Bomb

 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.3 Trojan Horse

 Trojan horse is a virus that‟s disguised as a legitimate or harmless program that


sometimes carries within itself the mean to allow the programs creator to secretly access
the user system.
 Trojan horse attack may either be passive or active depending on the activities performed
by the clandestine code.
 For example, if the clandestine code simply steals information then it is of the passive
type. But if it does something more harmful like destroying or corrupting files, then it is
of the active type. A variation of the Trojan horse is a program that emulates a login
program.
 Many systems have mechanisms for allowing programs written by users to be used by
other users. These programs can improperly use the access rights of an executing user
and leak information.
 For example an intruder may write an editor program that works perfectly as an editor but
also creates a copy of the edited file to a special area accessible to the intruder. The user
is ignorant of the theft being made because the editor program performs all jobs in a
perfectly normal fashion.

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

RECATION TO PREVENT VIRUS PROBLEMS

1.Buying software only from respectable store.

2.Avoid uploading of free software from public domain

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

is allowed by the privileges of the current user.

*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

During its lifecycle, virus goes through these phases

1.Dormant phase

2.Propgation phase
44
3.Triggering phase

4.Execution phase

Dormant phase:The virus will be eventually activated by some event,such as a date,the


presence

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

itself enter a propagation phase.

Tiggering phase:The virus is activated to nperform a functionfor which it was intended.

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

programs is executed,by findingf other executable files to infect.

2.Memory -Resident virus:Lodes inb main memory as part of resident system programs.From
that

point on the virus infects every program that executes .

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

2.It infects documents,not executable portions of code.

3.They are easily spreaded.A very common method is by electronic mail

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

Examples include the following.

1.Electronic mail facility

2.Remote execution capability

3.Remote login capability

 A network worm exhibits the same characteristics as a computer virus a dormant phase a
propagation phase ,a triggering phase and an execution phase.

 The propagation phase generally performs the following functions.

1.Search for other systems to infect by examining host tables or similar


repositories of remote systems addresses.

2. Establish a connection with a remote system.

46
3. Copy itself to the system and cause the copy to be run.

Worm technologies

Worm technology includes

1. Multiplatform: Newer worms are not limited to window machines but can attack
variety of platform

2.Multiexploit: New worms penetrate systems in a variety of ways, using exploits


against web servers, browsers, e-mail, file sharing.

3. Ultrafast spreading

4. Polymorphic

5. Metamorphic

6. Transport vehicles

7. Zero-day exploit

4.8.6 Difference between Worm and Virus

 A virus is a piece of code that adds itself to other programs, including operating systems.

 Virus cannot run independently, host program is required to run it.

 Alters system file or any other file that is to be used in future.

 Until the user(inadvertently) activates the virus or the altered file is called, the virus is
unable to do any activity.

 It needs to be carried from one computer to another.

 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.

4.9 Virus countermeasures

4.9.1 Antivirus Approaches

 Virus prevention is done by the following steps.

47
1. Detection (determines and locate) virus

2. Identification of virus.

3. Removal of traces of virus

 Four generations of antivirus software

1. First generation - simple scanners

2. Second generation- Heuristic scanners

3. Third generation- Activity traps

4. Fourth generation- Full featured protection

4.9.2Advanced antivirus techniques

 Two important advanced antivirus techniques are

1. Generic Decryption (GD) Technology

2. Digital Immune System

4.9.2.1Generic Decryption (GD) Technology

 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

ii. Virus signature scanner

iii. Emulation control module

4.9.2.2 Digital Immune System

 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

4.9.3 Behavior-Blocking Software

The behavior blocking software blocks potential malicious actions before they get
chance to affect the system. The behaviour monitoring may include

a. Attempt to open, view or delete/modify system files

b. Attempt to format disk drives.

c. Modifying logic of executable file.

d. Scripting of e-mail and instant messaging clients to send executable content.

e. Initiating network communications.

 If the behaviour blocker, detects program initiation is malicious, it can block the
behaviour and terminate the response.

4.9.4 Distributed Denial of Service Attacks

 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.

1. Internal resource attack

2. Attacking data transmission resources

50

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy