CNS Unit IV PDF
CNS Unit IV PDF
CNS Unit IV PDF
Kerberos Requirements
• Secure: A network eavesdropper should not be able to obtain the necessary
information to impersonate a user.
• Reliable: Kerberos should be highly reliable and should employ a distributed
server architecture, with one system able to back up another.
• Transparent: The user should not be aware that authentication is taking
place, beyond the requirement to enter a password.
• Scalable: The system should be capable of supporting large numbers of
clients and servers. This suggests a modular, distributed architecture.
• Kerberos is a basic third-party authentication scheme.
Authentication Server (AS)
Knows the passwords of all users and stores these in a centralized database.
AS shares a unique secret key with each server.
These keys have been distributed physically or in some other secure manner
Users initially negotiate with AS to identify self
AS provides a non-corruptible authentication credential (ticket granting ticket
TGT)
• AS responds with a message, encrypted with a key derived from the user's
password (Kc) that contains the ticket.
• Encrypted message also contains a copy of the session key, Kc,tgs, where the
subscripts indicate that this is a session key for C and TGS.
• Session key is inside the message encrypted with Kc, only the user's client can
read it.
• Same session key is included in the ticket, which can be read only by the TGS.
• Thus, the session key has been securely delivered to both C and the TGS.
• Message (1) includes a timestamp, so that the AS knows that the message is
timely.
1. The Kerberos server must have the user ID and hashed passwords of all
participating users in its database. All users are registered with the Kerberos
server.
2. The Kerberos server must share a secret key with each application server. All
application servers are registered with the Kerberos server.
3. The Kerberos server in each interoperating realm shares a secret key with the
Kerberos server in the other realm. The two Kerberos servers are registered
with each other.
• Such an environment is referred to as a Kerberos realm. The concept of
realm can be explained as follows. A Kerberos realm is a set of managed
nodes that share the same Kerberos database.
• A user wishing service on a server in another realm needs a ticket for that
server. The user's client follows the usual procedures to gain access to the
local TGS and then requests a ticket-granting ticket for a remote TGS (TGS
in another realm). The client can then apply to the remote TGS for a service-
granting ticket for the desired server in the realm of the remote TGS.
X.509 AUTHENTICATION SERVICE
ITU-T recommendation X.509 is part of the X.500 series of recommendations
that define a directory service. X.509 defines a framework for the provision of
authentication services by the X.500 directory to its users. The directory may
serve as a repository of public-key certificates.
• Each certificate contains the public key of a user and is signed with the
private key of a trusted certification authority. X.509 certificate format is
used in S/MIME, IP Security, and SSL/TLS and SET. X.509 is based on the
use of public-key cryptography and digital signature algorithms. Figure
illustrates the generation of public key.
Certificates
Figure shows the general format of a certificate, which includes the following
elements:
Version: Differentiates among successive versions of the certificate format;
the default is version 1.
Serial number: An integer value, unique within the issuing CA, that is
unambiguously associated with this certificate.
Signature algorithm identifier: The algorithm used to sign the certificate,
together with any associated parameters .
Issuer name: X.500 name of the CA that created and signed this certificate.
Period of validity: Consists of two dates: the first and last on which the
certificate is valid.
Subject name: The name of the user to whom this certificate refers. That is,
this certificate certifies the public key of the subject who holds the
corresponding private key.
Subject's public-key information: The public key of the subject, plus an
identifier of the algorithm for which this key is to be used, together with any
associated parameters.
Issuer unique identifier: An optional bit string field used to identify
uniquely the issuing CA in the event the X.500 name has been reused for
different entities.
Subject unique identifier: An optional bit string field used to identify
uniquely the subject in the event the X.500 name has been reused for
different entities.
Extensions: A set of one or more extension fields.
Signature: It covers all other fields of the certificate. It contains hash code of
other fields encrypted with CA’s private key. This field includes the signature
algorithm identifier.
• The standard uses the following notation to define a certificate:
CA<<A>> = CA {V, SN, AI, CA, TA, A, Ap}
• The CA signs the certificate with its private key. If the corresponding public
key is known to a user, then that user can verify that a certificate signed by
the CA is valid.
Obtaining a Certificate
• User certificates generated by a CA have the following characteristics:
Any user with access to the public key of the CA can verify the user public
key that was certified.
No party other than the certification authority can modify the certificate
without this being detected.
1. One-Way Authentication
• One way authentication involves a single transfer of information from one
user (A) to another (B), and establishes the following:
1. The identity of A and that the message was generated by A
2. That the message was intended for B
3. The integrity and originality (it has not been sent multiple times) of the
message
• Only the identity of the initiating entity is verified in this process, not that of
the responding entity.
2. Two-Way Authentication
• In addition to the three elements just listed, two-way authentication
establishes the following elements:
1. The identity of B and that the reply message was generated by B
2. That the message was intended for A
3. The integrity and originality of the reply
3. Three-Way Authentication
• In three-way authentication, a final message from A to B is included, which
contains a signed copy of the nonce rB.
• The intent of this design is that timestamps need not be checked: Because
both nonces are echoed back by the other side, each side can check the
returned nonce to detect replay attacks. This approach is needed when
synchronized clocks are not available.
FIREWALL
• A firewall is a device or group of devices that controls access between
networks. A firewall generally consists of filters and gateway(s), varying
from firewall to firewall.
• It is a security gateway that controls access between the public Internet and
an intranet and is a secure computer system placed between a trusted network
and an untrusted Internet.
Roles of Firewalls
• The firewall imposes restrictions on packets entering or leaving the private
network.
• All traffic from inside to outside, and vice versa, must pass through the
firewall, out of which only authorized traffic will be allowed to pass.
• Packets are not allowed through unless they conform to a filtering
specification or unless there is negotiation involving some sort of
authentication.
• The firewall itself must be immune to penetration.
• Firewalls create choke points between an internal private network and an
untrusted Internet. Once the choke points are established, the device can
monitor, filter, and verify all inbound and outbound traffic.
• The firewall may filter on the basis of IP source and destination addresses and
TCP port number.
• The firewall also enforces logging and provides alarm capacities as well.
• The firewall provides protection from various kinds of IP spoofing and
routing attacks.
• A firewall can limit network exposure by hiding the internal network systems
and information from the public Internet.
Four general techniques that firewalls use to control access and enforce the
site's security policy
1. Service control: Determines the types of Internet services that can be
accessed, inbound or outbound. The firewall may filter traffic on the basis of
IP address and TCP port number;
4. Behavior control: Controls how particular services are used. For example,
the firewall may filter e-mail to eliminate spam, or it may enable external
access to only a portion of the information on a local Web server.
FIREWALL-RELATED TERMINOLOGY
1. Bastion Host
• A bastion host is a publicly accessible device for the network's security,
which has a direct connection to a public network such as the Internet.
Bastion hosts must check all incoming and outgoing traffic and enforce the
rules specified in the security policy.
Single-homed bastion host: This is a device with only one network
interface, normally used for an application-level gateway. The external router
is configured to send all incoming data to the bastion host, and all internal
clients are configured to send all outgoing data to the host.
Dual-homed bastion host: This is a firewall device with at least two
network interfaces. The advantage of using such hosts is that they create a
complete break between the external network and the internal network.
Multi-homed bastion host: Used to allow the user to enforce strict security
mechanisms. When the security policy requires all inbound and outbound
traffic to be sent through a proxy server, a new proxy server should be
created for the new streaming application.
2. Proxy Server
• Proxy servers are used to communicate with external servers on behalf of
internal clients. Application proxies forward packets only when a connection
has been established using some known protocol.
• When the connection closes, a firewall using application proxies rejects
individual packets. Each proxy maintains detailed audit information by
logging all traffic, each connection, and the duration of each connection.
Each proxy is independent of other proxies on the bastion host.
• If there is a problem with the operation of any proxy, or if future
vulnerability is discovered, it is easy to replace the proxy without affecting
the operation of the proxy's applications.
3. SOCKS
• The SOCKS protocol version 4 provides for unsecured firewall traversal for
TCP-based client/server applications, including HTTP, TELNET, and FTP.
7. VPN
• VPNs are appropriate for any organization requiring secure external access to
internal resources. All data transmitted over a VPN is usually encrypted
because an opponent with access to the Internet could eavesdrop on the data
as it travels over the public network.
• The VPN encapsulates all the encrypted data within an IP packet.
Authentication, message integrity, and encryption are very important
fundamentals for implementing a VPN.
TYPES OF FIREWALLS
Firewalls are classified into three common types:
1. Packet filtering Router
2. Circuit-level gateways
3. Application-level gateways
• TELNET also carries output from the remote machine back to the user's
screen.
• If a packet is passed through the filter and has a source port of 23, it will
immediately be discarded. If a packet with a destination port of 23 is passed
through this filter, it is discarded only after rule 2 has been applied. All other
packets will be discarded.
Attacks
• IP address spoofing – The intruders transmit packets from the outside with a
source IP address field containing an address of an internal host. To
overcome this attack, discard the packet with an inside source address if the
packet arrives on an external interface.
• Source routing attacks – The source station specifies the route that a packet
should take as it crosses the internet; i.e., it will bypass the firewall. The
countermeasure is to discard all packets that uses this option.
• Tiny fragment attacks – The intruder create extremely small fragments and
force the TCP header information into a separate packet fragment. The
attacker hopes that only the first fragment is examined and the remaining
fragments are passed through. The countermeasure is to discard all packets
where the protocol type is TCP and the IP fragment offset is equal to 1.
• Once the two connections are established, the gateway typically relays TCP
segments from one connection to the other without examining the contents.
The security function consists of determining which connections will be
allowed.
FIREWALL DESIGNS
• The primary step in designing a secure firewall is obviously to prevent the
firewall devices from being compromised by threats. To provide a certain
level of security, the three basic firewall designs are considered:
1. Single-homed bastion host
2. Dual-homed bastion host
3. Screened subnet firewall
1. Screened Host Firewall (Single-Homed Bastion Host)
The first type of firewall is a screened host which uses a single-homed bastion
host plus a packet-filtering router. Single-homed bastion hosts can be configured
as either circuit-level or application-level gateways. When using either of these
two gateways, each of which is called a proxy server, the bastion host can hide
the configuration of the internal network.
• In this configuration, the firewall consists of two systems: a packet filtering
router and a bastion host. Typically, the router is configured so that:
For traffic from the internet, only IP packets destined for the bastion host
are allowed in.
For traffic from the internal network, only IP packets from the bastion host
are allowed out.
The bastion host performs authentication and proxy functions. This
configuration has greater security than simply a packet filtering router or an
application level.
• Security techniques - Ensure the use of the best security practices and system
design techniques to protect all legitimate parties in an electronic commerce
transaction.
Creation of brand-new protocol - Create a protocol that neither depends on
transport security mechanisms nor prevents their use)
• Interoperability - Facilitate and encourage interoperability among software.
Set Participants
• Cardholder: A cardholder is an authorized holds of a payment card that has
been issued by an issuer.
• Issuer: The financial institution that provides the card holder with the
payment card. Eg. bank
3. Merchants have their own certificates. A merchant who accepts a certain brand
of card must be in possession of two certificates for two public keys owned by
the merchant: one for signing messages, and one for key exchange. The merchant
also needs a copy of the payment gateway's public-key certificate.
4. The customer places an order. This is a process that may involve the customer
first browsing through the merchant's Web site to select items and determine the
price. The customer then sends a list of the items to be purchased to the
merchant, who returns an order form containing the list of items, their price, a
total price, and an order number.
5. The merchant is verified. In addition to the order form, the merchant sends
a copy of its certificate, so that the customer can verify that he or she is
dealing with a valid store.
6. The order and payment are sent. The customer sends both order and
payment information to the merchant, along with the customer's certificate.
The order confirms the purchase of the items in the order form. The
payment contains credit card details. The payment information is encrypted
in such a way that it cannot be read by the merchant. The customer's
certificate enables the merchant to verify the customer.
9. The merchant provides the goods or service. The merchant ships the
goods or provides the service to the customer.
10. The merchant requests payment. This request is sent to the payment
gateway, which handles all of the payment processing.
Payment Processing
(i) Purchase request – Merchant
Verifies cardholder certificates using CA sigs
Verifies dual signature using customer's public signature key to ensure order
has not been tampered with in transit & that it was signed using cardholder's
private signature key
Processes order and forwards the payment information to the payment
gateway for authorization (described later)
Sends a purchase response to cardholder
Purchase request – Merchant
(ii) Purchase Request – Card holder
Intrusion Techniques
The objective of the intruders is to gain access to a system or to increase the
range of privileges accessible on a system. The password files can be protected in
one of the two ways:
• One way encryption – The system stores only an encrypted form of user’s
password.
• Access control – Access to the password file is limited to one or a very few
accounts.
The following techniques are used for learning passwords.
1. Try default passwords used with standard accounts that are shipped with the
system. Many administrators do not bother to change these defaults.
2. Exhaustively try all short passwords.
3. Try words in the system’s online dictionary or a list of likely passwords.
4. Collect information about users such as their full names, the name of their
spouse and children, pictures in their office and books in their office that are
related to hobbies.
5. Try user’s phone number, social security numbers and room numbers.
6. Try all legitimate license plate numbers.
7. Use a trojan horse to bypass restriction on access.
8. Tap the line between a remote user and the host system.
Two principle countermeasures:
1. Detection – concerned with learning of an attack, either before or after its
success.
2. Prevention – challenging security goal
INTRUSION DETECTION
• Intrusion detection is based on the assumption that the behavior of the
intruder differs from that of a legitimate user in ways that can be quantified.
• Although the typical behavior of an intruder differs from the typical behavior
of an authorized user, there is an overlap in these behaviors. Thus, a loose
interpretation of intruder behavior, which will catch more intruders, will also
lead to a number of "false positives," or authorized users identified as
intruder.
Profiles of Behavior of Intruders and Authorized Users
Approaches to intrusion detection
1. Statistical anomaly detection
2. Rule-based detection:
3. Distributed Intrusion Detection
4. Honeypot
Profile based: A profile of the activity of each user is developed and used to
detect changes in the behavior of individual accounts.
2. Rule-based detection:
• Involves an attempt to define a set of rules that can be used to decide that a
given behavior is that of an intruder.
Anomaly detection: Rules are developed to detect deviation from previous
usage patterns.
• A fundamental tool for intrusion detection is the audit record. Some record of
ongoing activity by users must be maintained as input to an intrusion
detection system. Basically, two plans are used:
2. LAN monitor agent module: Operates in the same fashion as a host agent
module except that it analyses LAN traffic and reports the results to the
central manager.
3. Central manager module: Receives reports from LAN monitor and host
agents and processes and correlates these reports to detect intrusion.
Agent Architecture
The agent captures each audit record produced by the native audit collection
system.
1. Filter is applied that retains only those records that are of security interest.
4. At the lowest level, the agent scans for notable events that are of interest
independent of any past events.
5. At the next higher level, the agent looks for sequences of events, such as
known attack patterns (signatures).
6. Finally, the agent looks for anomalous behaviour of an individual user based
on a historical profile of that user, such as number of programs executed,
number of files accessed, and the like.
8. The central manager includes an expert system that can draw inferences
from received data.
9. The manager may also query individual systems for copies of HARs to
correlate with those from other agents.
10. The LAN monitor agent also supplies information to the central manager.
11. The LAN monitor agent audits host-host connections, services used, and
volume of traffic.
12. It searches for significant events, such as sudden changes in network load,
the use of security-related services, and network activities such as rlogin.
4. Honeypots
• Honeypots are decoy systems that are designed to lure a potential attacker
away from critical systems. Honeypots are designed to:
Divert an attacker from accessing critical systems.
Collect information about the attacker's activity.
Encourage the attacker to stay on the system long enough for administrators
to respond.
• The system is instrumented with sensitive monitors and event loggers that
detect these accesses and collect information about the attacker's activities.
• Worm - a program that replicates itself across the network (usually riding on
email messages or attached documents (e.g., macro viruses).
• Payload - harmful things the malicious program does, after it has had time to
spread.
• Trojan Horse - instructions in an otherwise good program that cause bad things
to happen (sending your data or password to an attacker over the net).
• Trap Door (or Back Door) - undocumented entry point written into code for
debugging that can allow unwanted users.
• Easter Egg - extraneous code that does something “cool.” A way for
programmers to show that they control the product.
Virus Phases
• Dormant phase - the virus is idle, will be activated by some events like date.
• Propagation phase - the virus places an identical copy of itself into other
programs.
• Triggering phase – the virus is activated to perform the function for which it
was intended.
Virus Protection
• Have a well-known virus protection program, configured to scan disks and
downloads automatically for known viruses.
• Avoid the most common operating systems and email programs, if possible.
Virus Structure (Example)
• The above virus program is prepended to the actual program and becomes the
entry point to the program, whenever the actual program is invoked.
• The first line of code is a jump to the main virus program. Second line is a
special marker that is used by the virus to determine whether or not the
current program has been infected already with this virus.
• Upon activation, the virus program seeks out uninfected executable files and
infects them. Then it performs some action usually detrimental to the system.
This action could be performed every time the program is invoked.
Types of Viruses
• Parasitic Virus - attaches itself to executable files as part of their code and
replicates. Runs whenever the host program runs.
Macro Viruses
Macro viruses are threatening for a number of reasons:
Microsoft Office applications allow “macros” to be part of the document.
The macro could run whenever the document is opened, or when a certain
command is selected (Save File).
Platform independent.
Infect documents, delete files, generate email and edit letters.
• Macro viruses are created by auto executing macros. That is a macro that is
automatically invoked, without explicit user input. Common auto execute
events are opening a file, closing a file and starting an application.
• Microsoft word has three types of such auto executing macros namely Auto
execute, Auto macro, Command macro.
Email Viruses
Email viruses sends itself to everyone in the mailing list.
• CPU Emulator - A s/w based virtual computer. Instructions in an exe file are
interpreted rather than executed in the processor.
• Virus Signature Scanner - Module that scans the target code looking for
known signatures.
3. This machine creates a safe environment for the infected program for
analyzing it. It then produces a prescription for identifying and removing the
virus.
7. Subscribers around the world receive regular antivirus updates for protection
from new viruses.
3. Behaviour Blocking Software – It integrates with the operating system of the
host computer and monitors program behaviour in real time for malicious
activities. It then blocks potentially malicious actions before they have a chance
to affect the system.
Trusted Systems
• Implementation of trusted system technology offers defense against intruders
and malicious programs.
• Data Access Control: After successful logon, user is permitted to access host
resources. Such screening is not sufficient for systems with sensitive
information. Through user access control procedure, a user can be identified
to the system. Each user’s profile specifies the permissible operations and file
accesses.
One axis of matrix depicts the users or subjects attempting for data access. The
other axis lists the objects that can be accessed. An access matrix can be
decomposed in 2 ways:
1. Column Decomposition: This yields an access control list. For each subject,
an access control list lists users and their permitted access rights.
No write down: A subject can only write into an object of greater or equal
security level.
• For a data processing system, trusted system concept can be enforced thru
Reference Monitor Concept. The reference monitor is a controlling element
in the hardware and OS of a computer that regulates access of subjects to
objects on the basis of security parameters of the subject and object.
• The Audit File component records important security events like security
violations, authorized changes made to security kernel database.
• Complete mediation imposes performance penalty and hence solution should
be partly provided thru hardware. Isolation offers protection to reference
monitor and kernel database from security attacks. Verification must be
carried out thru mathematical proof. A system that implements such
verification is referred to as trusted system.