CNS Unit-1.1 Notes
CNS Unit-1.1 Notes
This definition introduces three key objectives that are at the heart of computer security:
Confidentiality: This term covers two related concepts.
Data confidentiality: Assures that private / confidential information is not made
disclosed to unauthorized individuals.
Privacy: Assures that individuals control or influence what information related to
them may be collected.
Availability: Availability of information refers to ensuring that authorized parties are able
to access the information when needed.
1
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
3)Modern Nature of Attacks: -
We can highlight a few salient features of the modern nature of attacks, as follows:
a) Automating Attacks
b) Privacy Concerns
c) Distance Does not Matter
a) Automating Attacks:
Attacker can Develop Automated Program to steal a very low amount (say half a dollar or 20
rupees) from a million bank accounts in a matter of a few minutes. This would give the attacker
a half million dollars possibly without any major complaints. This is shown below:
Automated Attacks can cause financial destruction or a security nuisance quite rapidly.
b) Privacy Concerns:
Collecting information about people and later (mis)using it is turning out to be a huge
problem these days.
The so-called data mining applications gather, process, and tabulate all sorts of details about
individuals. People can then illegally sell this information.
For example, companies like Experian, TransUnion, and Equifax maintain credit history of
individuals in the USA. Similar trends are seen in the rest of the world.
These companies have volumes of information about a majority of citizens of that country. These
companies can collect, collate, polish, and format all sorts of information to whosoever is ready to
pay for that data!
Examples of information that can come out of this are:
which store the person buys more from, which restaurant he/she eats in, where he/she goes for
vacations frequently, and so on! Every company (e.g. shopkeepers, banks, airlines, insurers) are
collecting and processing a mind-boggling amount of information about us.
2
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
Principles of Security
Introduction:-
NIST defined the Security as shown below:
The protection afforded to an automated information system in order to attain the applicable
objectives of preserving the Integrity, Availability, and Confidentiality of information system
resources (includes hardware, software, firmware, information/ data, and telecommunications).
1)Confidentiality: -
The principle of confidentiality specifies that only the sender and the intended recipient(s) should
be able to access the contents of a message.
2)Authentication: -
Authentication mechanisms help establish proof of identities. The authentication process ensures
that the origin of an electronic message or document is correctly identified.
For instance, suppose that user C sends an electronic document over the Internet to user B.
However, the trouble is that user C had posed as user A when he/she sent this document to user B.
How would user B know that the message has come from user C, who is posing as user A?
3
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
3) Integrity: -
When the contents of a message are changed after the sender sends it, but before it reaches the
intended recipient, we say that the integrity of the message is lost
4) Non-repudiation: -
There are situations where a user sends a message, and later on refuses that she had sent that
message.
Non-repudiation does not allow the sender of a message to refute the claim of not sending that
message.
5) Access Control:-
The principle of access control determines who should be able to access what.
For instance, we should be able to specify that user A can view the records in a database, but
cannot update them. However, user B might be allowed to make updates as well. An access-control
mechanism can be set up to ensure this.
Role management concentrates on the user side (which user can do what),
Rule management focuses on the resources side (which resource is accessible, and under what
circumstances). Based on the decisions taken here, an access-control matrix is prepared, which lists
the users against a list of items they can access (e.g. it can say that user A can write to file X, but
can only update files Y and Z).
An Access Control List (ACL) is a subset of an access-control matrix.
6)Availability:-
The principle of availability states that resources (i.e. information) should be available to
authorized parties at all times.
For example, due to the intentional actions of another unauthorized user C, an authorized user A
may not be able to contact a server computer B, as shown below:
4
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
This would defeat the principle of availability. Such an attack is called interruption.
Security Approaches
Introduction:-
NIST defined the Security as shown below:
The protection afforded to an automated information system in order to attain the applicable
objectives of preserving the Integrity, Availability, and Confidentiality of information system
resources (includes hardware, software, firmware, information/ data, and telecommunications).
The Security Approaches include the following:
- Trusted Systems
- Security Models
- Security-Management Practices
1)Trusted Systems:-
A Trusted System is a computer system that can be trusted to a specified extent to enforce a
specified security policy.
Trusted systems were used in many areas like military, banking and financial community,
Industries, Software Companies, etc.
Trusted systems often use the term Reference Monitor.
This is an entity that is at the logical heart of the computer system.
It is mainly responsible for all the decisions related to access controls.
It should be designed such that it will be tamper-proof
Trusted system is a combination of hardware, software, and firmware responsible for enforcing the
system’s security policy.
In this model, a highly trustworthy computer system is designed as a collection of objects and
subjects.
Objects are passive repositories or destinations for data, such as files, disks, printers, etc.
Subjects are active entities, such as users, processes, or threads operating on behalf of those users.
Subjects cause information to flow among objects.
5
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
2)Security Models:-
An organization can take several approaches to implement its security model. Let us summarize
these approaches.
a)No Security
In this simplest case, the approach could be a decision to implement no security at all.
c)Host Security
In this scheme, the security for each host is enforced individually.
This is a very safe approach, but the trouble is that it cannot scale well. The complexity and
diversity of modern sites/organizations makes the task even harder.
d)Network Security
Host security is tough to achieve as organizations grow and become more diverse.
In this technique, the focus is to control network access to various hosts and their services,
rather than individual host security.
This is a very efficient and scalable model.
3) Security-Management Practices:-
Good security-management practices always talk of a security policy being in place.
A good security policy and its proper implementation go a long way in ensuring adequate security-
management practices.
A good security policy generally takes care of four key aspects, as follows.
● Affordability How much money and effort does this security implementation cost?
● Cultural Issues Does the policy complement the people’s expectations, working style and
beliefs?
6
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
Types of Security Attacks
Introduction:-
Any action that compromises the security of information owned by an organization is called as
Security Attack. We can classify attacks with respect to following views:
-General View
-Technologist’s View.
- Practical Side of Attacks
- Programs that Attack
- Specific Attacks
1)Attacks: A General View:-
From a common person’s point of view, we can classify attacks into three categories:
a)Criminal Attacks
Here, the aim of the attackers is to maximize financial gain by attacking computer systems.
Below Table lists some forms of criminal attacks.
b)Publicity Attacks
Publicity attacks occur because the attackers want to see their names appear on television
news channels and newspapers. History suggests that these types of attackers are usually not
hardcore criminals.
They are people such as students in universities or employees in large organizations, who seek
publicity by adopting a novel approach of attacking computer systems.
One form of publicity attacks is to damage (or deface) the Web pages of a site by attacking it.
One of the most famous of such attacks occurred on the US Department of Justice’s Web site in
1996.
c)Legal Attacks
This form of attack is quite novel and unique. Here, the attacker tries to make the judge or the
jury doubtful about the security of a computer system.
This works as follows. The attacker attacks the computer system, and the attacked party (say a
bank or an organization) manages to take the attacker to the court. While the case is being fought,
the attacker tries to convince the judge and the jury that there is inherent weakness in the computer
system and that she has done nothing wrongful. The aim of the attacker is to exploit the weakness
of the judge and the jury in technological matters.
a) Theoretical Concepts
These attacks are generally classified into four categories, as shown below:
i)Interception: It means that an unauthorized party has gained access to a resource. The party
can be a person, program, or computer-based system.
Examples of interception are copying of data or programs, and listening to network traffic.
ii)Fabrication: This involves the creation of illegal objects or messages on a computer system.
For example, the attacker may add fake records to a database.
iii)Modification: Here, the attacker may modify the message or values in a database.
iv)Interruption: Here, the resource becomes unavailable, lost, or unusable.
Examples of interruption are causing problems to a hardware device, erasing program, data, or
operating-system components.
8
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
b)Practical approaches used by the attackers
Attacks can be further grouped into two types:
-Passive Attacks and
-Active Attacks
Passive attacks do not attempt any modifications to the contents of an original message.
In fact, this is also why passive attacks are harder to detect. Thus, the general approach to deal with
passive attacks is to think about prevention, rather than detection or corrective actions.
Below Diagram shows further classification of passive attacks into two sub-categories.
Release of message contents: When you send a confidential email message to your friend,
the contents of the message are released against our wishes to someone else.
Using certain security mechanisms, we can prevent the release of message contents. For example,
we can encode messages using a code language, so that only the desired parties understand the
contents of a message, because only they know the code language.
Traffic Analysis: When messages are being transmitted, a passive attacker could try to figure
out similarities between them to come up with some sort of pattern that provides her some clues
regarding the communication that is taking place. Such attempts of analyzing (encoded) messages
to come up with likely patterns are the work of the traffic-analysis attack.
9
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
(ii) Active Attacks:
The Active Attacks will modify the original message in some manner, or in the creation of a
false message. These attacks cannot be prevented easily. However, they can be detected with some
effort, and attempts can be made to recover from them.
In a replay attack, a user captures a sequence of events, or some data units, and re-sends them.
For instance, suppose user A wants to transfer some amount to user C’s bank account. Both users A
and C have accounts with bank B. User A might send an electronic message to bank B, requesting
for the funds transfer. User C could capture this message, and send a second copy of the same to
bank B. Bank B would have no idea that this is an unauthorized message, and would treat this as a
second, and different, funds transfer request from user A. Therefore, user C would get the benefit of
the funds transfer twice: once authorized, once through a replay attack.
Alteration of messages involves some change to the original message. For instance, suppose
user A sends an electronic message Transfer $1000 to D’s account to bank B. User C might capture
this, and change it to
Transfer $10000 to C’s account. Note that both the beneficiary and the amount have been
changed— instead, only one of these could have also caused alteration of the message.
Denial Of Service (DOS) attacks make an attempt to prevent legitimate users from
accessing some services, which they are eligible for. For instance, an unauthorized user might send
too many login requests to a server using random user ids in quick succession, so as to flood the
network and deny other legitimate users to use the network facilities.
10
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
3)The Practical Side of Attacks:-
Security attacks can happen at the application level or the network level as shown below:
a) Application-level Attacks:
These attacks happen at an application level in the sense that the attacker attempts to access,
modify, or prevent access to information of a particular application, or the application itself.
Examples of this are trying to obtain someone’s credit-card information on the Internet, or
changing the contents of a message to change the amount in a transaction, etc.
b) Network-level Attacks
These attacks generally aim at reducing the capabilities of a network by a number of possible
means.
These attacks generally make an attempt to either slow down, or completely bring to halt, a
computer network.
Note that this automatically can lead to application-level attacks, because once someone is
able to gain access to a network, usually he/she is able to access/modify at least some sensitive
information, causing havoc.
a)Virus:
A computer virus is a type of computer program, when executed, replicates itself by modifying
other computer programs and inserting its own code.
A virus is a computer program that attaches itself to another legitimate program, and causes
damage to the computer system or to the network.
When this program is executed, it can infect other programs in that computer, or programs that are
in other computers but on the same network. Example is shown below:
11
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
After deleting all the files from the current user’s computer, the virus self-propagates by sending its
code to all users whose email addresses are stored in the current user’s address book.
Viruses can also be triggered by specific events (ex: a virus could automatically execute at 12 pm
every day).
(a) Dormant Phase: Here, the virus is idle. It gets activated based on a certain action or event (e.g.
the user typing a certain key or a certain date or time is reached, etc). This is an optional phase.
(b) Propagation Phase: In this phase, a virus copies itself, and each copy starts creating more
copies of itself, thus propagating the virus.
(c) Triggering Phase: A dormant virus moves into this phase when the action/event for which it
was waiting is initiated.
(d) Execution Phase: This is the actual work of the virus, which could be harmless (display some
message on the screen) or destructive (delete a file on the disk).
(a) Parasitic Virus: This is the most common form of virus. Such a virus attaches itself to
executable files and keeps replicating. Whenever the infected file is executed, the virus looks for
other executable files to attach itself and spread.
(b) Memory-resident Virus: This type of virus first attaches itself to an area of the main memory
and then infects every executable program that is executed.
(c) Boot sector Virus: This type of virus infects the master boot record of the disk and spreads on
the disk when the operating system starts booting the computer.
(d) Stealth Virus: This virus has intelligence built in, which prevents anti-virus software programs
from detecting it.
12
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
(e) Polymorphic Virus: A virus that keeps changing its signature (i.e. identity) on every execution,
making it very difficult to detect.
(f) Metamorphic Virus: In addition to changing its signature like a polymorphic virus, this type of
virus keeps rewriting itself every time, making its detection even harder.
g)Macro virus: This virus affects specific application software, such as Microsoft Word or
Microsoft Excel.
They affect the documents created by users, and spread quite easily since such documents are very
commonly exchanged over email.
There is a feature called macro in these application-software programs, which allows users to write
small, useful, utility programs within the documents. Viruses attack these macros, and hence the
name macro virus.
b)Worm:
Similar in concept to a virus, a worm is actually different in implementation. A virus modifies a
program (i.e. it attaches itself to the program under attack). A worm, however, does not modify a
program. Instead, it replicates itself again and again. This is shown in Fig. 1.15.
The replication grows so much that ultimately the computer or the network on which the worm
resides, becomes very slow, ultimately coming to a halt. Thus, the basic purpose of a worm attack
is different from that of a virus. A worm attack attempts to make the computer or the network under
attack unusable by eating all its resources.
A worm does not perform any destructive actions, and instead, only consumes system resources
to bring it down.
c)Trojan Horse
A Trojan horse is a hidden piece of code, like a virus. However, the purpose of a Trojan horse is
different. A Trojan horse attempts to reveal confidential information to an attacker.
13
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
A Trojan horse could silently sit in the code for a Login screen by attaching itself to it. When the
user enters the user id and password, the Trojan horse could capture these details, and send this
information to the attacker.
The attacker can then misuse the user id and password to gain access to the system.
This is shown below:
A Trojan horse allows an attacker to obtain some confidential information about a computer or
a network.
5) Specific Attacks:-
Let us now discuss a few specific attacks on computer systems and Computer Networks.
(i) IP Packet Sniffing: Packet sniffing is a passive attack on an ongoing conversation. An attacker
can simply observe (i.e. sniff) packets as they pass by.
To prevent an attacker from sniffing packets, the information that is passing needs to be
protected in some ways.
14
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
(b) Packet Spoofing: In this technique, an attacker sends packets with an incorrect source address.
When this happens, the receiver (i.e. the party who receives these packets containing false
addresses) would inadvertently send replies back to this forged address (called spoofed address),
and not to the attacker.
b) Phishing:
Phishing has become a big problem in recent times. Attackers set up fake Web sites, which
look like real Web sites.
As we know, using the Domain Name System (DNS), people can identify Web sites with human-
readable names (such as www.yahoo.com), and computers can continue to treat them as IP
addresses (such as 120.10.81.67).
For this, a special server computer called a DNS server maintains the mappings between domain
names and the corresponding IP addresses. The DNS server could be located anywhere. Usually, it
is with the Internet Service Provider (ISP) of the users.
-The attacker manages to hack and replace the IP address of Bob with her own (say
100.20.20.20) in the DSN server maintained by the ISP of a user, say Alice. Therefore, the DNS
server maintained by the ISP of Alice now has the following entry:
www.bob.com 100.20.20.20
15
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
Security Servives
Introduction:-
X.800 standard defines a security service as a service that is provided by a protocol layer of
communicating open systems to ensure adequate security of the system or of data transfers.
1)Authentication:-
The authentication service is concerned with assuring that a communication is authentic.
In the case of a single message, its function of the authentication service is to assure the recipient
that the message is from the source that it claims to be from.
In the case of an ongoing interaction, such as the connection of a terminal to a host, two aspects
are involved.
First, at the time of connection initiation, the service assures that the two entities are authentic, that
is, that each is the entity that it claims to be.
Second, the service must assure that the connection is not interfered with in such a way that a third
party can masquerade as one of the two legitimate parties for the purposes of unauthorized
transmission or reception.
Peer entity authentication: Provides for the corroboration of the identity of a peer entities
involved in communication. It is used for providing authentication at the time of connection
establishment and during the process of data transmission.
Data origin authentication: Provides for the corroboration of the source of a data unit. It does not
provide protection against the duplication or modification of data units. This type of service
supports applications like electronic mail, where there are no prior interactions between the
communicating entities.
16
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
2)Access Control
In the context of network security, access control is the ability to limit and control the
access to host systems and applications via communications links.
To achieve this, each entity trying to gain access must first be identified, or authenticated, so
that access rights can be tailored to the individual.
3)Data Confidentiality
Confidentiality is the protection of transmitted data from passive attacks.
It provides the protection of data from unauthorized disclosure.
o Connectionless Confidentiality: The protection of all user data in a single data block
4)Data Integrity
The assurance that data received are exactly as sent by an authorized entity (i.e., contain no
modification, insertion, deletion, or replay).
Connection Integrity with Recovery: Provides for the integrity of all user data on a connection
and detects any modification, insertion, deletion, or replay of any data within an entire data
sequence, with recovery attempted.
Connection Integrity without Recovery: As above, but provides only detection without recovery.
Selective-Field Connection Integrity: Provides for the integrity of selected fields within the
user data of a data block transferred over a connection and takes the form of determination of
whether the selected fields have been modified, inserted, deleted, or replayed.
Connectionless Integrity: Provides for the integrity of a single connectionless data block and may
take the form of detection of data modification. Additionally, a limited form of replay detection
may be provided.
Selective-Field Connectionless Integrity: Provides for the integrity of selected fields within a
single connectionless data block; takes the form of determination of whether the selected fields
have been modified.
17
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
5)Nonrepudiation
Provides protection against denial by one of the entities involved in a communication of
having participated in all or part of the communication.
Nonrepudiation, Origin: Proof that the message was sent by the specified party.
Nonrepudiation, Destination: Proof that the message was received by the specified party.
6)Availability Service
Availability is the property of a system or a system resource being accessible and
usable upon demand by an authorized system entity, according to performance specifications
for the system.
An availability service is one that protects a system to ensure its availability. This service
addresses the security concerns raised by denial-of-service attacks. It depends on proper
management and control of system resources and thus depends on access control service and other
security services.
18
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
Security Mechanisms
Introduction:-
The Security mechanisms defined in X.800 standard are divided into two Categories:
1)Specific Security Mechanisms: those that are implemented in a specific protocol layer,
such as TCP or an application-layer protocol,
2)Pervasive Security Mechanisms: those that are not specific to any particular protocol layer or
security service.
a)Encipherment
The use of mathematical algorithms to transform data into a form that is not readily
intelligible. The transformation and subsequent recovery of the data depend on an algorithm and
zero or more encryption keys.
b)Digital Signature
Data appended to, or a cryptographic transformation of, a data unit that allows a recipient of
the data unit to prove the source and integrity of the data unit and protect against forgery (e.g., by
the recipient).
c)Access Control
A variety of mechanisms that enforce access rights to resources.
d)Data Integrity
A variety of mechanisms used to assure the integrity of a data unit or stream of data units.
e)Authentication Exchange
A mechanism intended to ensure the identity of an entity by means of information
exchange.
f)Traffic Padding
The insertion of bits into gaps in a data stream to frustrate traffic analysis attempts.
g)Routing Control
Enables selection of particular physically secure routes for certain data and allows routing
changes, especially when a breach of security is suspected.
h)Notarization
The use of a trusted third party to assure certain properties of a data exchange.
19
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
a)Trusted Functionality
That which is perceived to be correct with respect to some criteria (e.g., as established by a security
policy).
b)Security Label
The marking bound to a resource (which may be a data unit) that names or designates the security
attributes of that resource.
c)Event Detection
Detection of security-relevant events.
e)Security Recovery
Deals with requests from mechanisms, such as event handling and management functions, and
takes recovery actions.
20
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
A model for Network Security
Introduction:-
A general model for Network Security is shown below:
A message is to be transferred from one party to another across some sort of Internet
service. The two parties, who are the principals in this transaction, must cooperate for the exchange
to take place.
A logical information channel is established by defining a route through the Internet from
source to destination and by the cooperative use of communication protocols (e.g., TCP/IP) by the
two principals.
Security aspects come into play when it is necessary or desirable to protect the information
transmission from an opponent who may present a threat to confidentiality, authenticity, and so on.
ii)Some secret information shared by two principals and hoped, unknown to the opponent.
An example is an encryption key used in conjunction with the transformation to scramble the
message before transmission and unscramble it on reception.
21
P.Srinivasulu, Assoc. Professor, Cryptography and Network Security
Dept. of CSE, PBRVITS, Kavali.
Model of Communication:-
The general model shows that there are four basic tasks in designing a particular
security service:
1. Design an algorithm for performing the security-related transformation.
The algorithm should be such that an opponent cannot defeat its purpose.
2. Generate the secret information to be used with the algorithm.
3. Develop methods for the distribution and sharing of the secret information.
4. Specify a protocol to be used by the two principals that makes use of the security
algorithm and the secret information to achieve a particular security service.