CNS Unit 1
CNS Unit 1
UNIT-1
Syllabus:
Introduction: Security attacks, services & mechanisms, Symmetric Cipher Model, Substitution
Techniques, Transportation Techniques, Cyber threats and their defense (Phishing Defensive measures,
web based attacks, SQL injection & Defense techniques), Buffer overflow & format string vulnerabilities,
TCP session hijacking (ARP attacks, route table modification) UDP hijacking (man-in-the-middle
attacks).
Objectives: The Objectives of this unit is to present an overview of the main concepts of cryptography,
understand the threats & attacks, understand ethical hacking.
COMPUTER SECURITY CONCEPTS:
The National Institute of Standards and Technology (NIST) defines the term computer securityas follows:
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).
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 or confidential information is not made
available or disclosed to unauthorized individuals.
Privacy: Assures that individuals control or influence what information related to them
may be collected and stored and by whom and to whom that information may be
disclosed.
Integrity:
This term covers two related concepts:
Data integrity: Assures that information and programs are changed only in a specified
and authorized manner.
System integrity: Assures that a system performs its intended function in an unaffected
manner, free from deliberate or inadvertent unauthorized manipulation of the system.
Availability: Availability of information refers to ensuring that authorized parties are able to access
the information when needed.
TRAFFIC ANALYSIS:
Suppose that we had a way of masking the contents of messages or other information traffic
so that opponents, evenif they captured the message, couldnot extract the information from
the message.
The common technique for masking contents is encryption.
If we had encryption protection in place, an opponent might still be able to observe the
pattern of these messages. The opponent could determine the location and identity of
communicating hosts and could observe the frequency and length of messages being
exchanged.
This information might be useful in guessing the nature of the communication that was taking
place.
Passive attacks are very difficult to detect, because they do not involve any alteration of the
data.
Typically, the message traffic is sent and receivedin an apparentlynormal fashion, and neither
the sender nor receiver is aware that a third party has read the messages or observed the
traffic pattern.
However, it is feasible to prevent the success of these attacks, usuallyby means of encryption.
Thus, the emphasis in dealing with passive attacks is on prevention rather than detection.
Active Attacks:
Active attacks involve some modification of the data stream or the creation of a false stream and can be
subdivided into four categories: masquerade, replay, modification of messages, and denial of service.
A masquerade attack is an attack that uses a fake identity, to gain unauthorized access to personal
computer information through legitimate access identification. For example, authentication sequences
can be captured and replayed after a valid authentication sequence has taken place, thus enabling an
authorized entity with few privileges to obtain extra privileges by impersonating an entity that has those
privileges.
Replay involves the passive capture of a data unit and its subsequent retransmission to produce an
unauthorized effect.
Modification of messages simply means that some portion of a valid message is altered, or that messages
are delayed or reordered, to produce an unauthorized effect.
For example, a message meaning “Allow John Smith to read confidential file accounts” is modified to mean
“Allow Fred Brown to read confidential file accounts.”
The denial of service prevents the normal use or management of communications facilities. This attack
may have a specific target; for example, an entity may suppress all messages directed to a particular
destination. Another form of service denial is the disruption of an entire network, either by disabling the
network or by overloading it with messages so as to degrade performance.
SECURITY SERVICES:
▶ Security service means a processing or communication service that is provided by a system to give
a specific kind of protection to system resources.
▶ X.800 divides these services into
AUTHENTICATION
ACCESS CONTROL
DATA CONFIDENTIALITY
DATA INTEGRITY
NONREPUDIATION
AVAILABILITY
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 interferedwith 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.
Two specific authentication services are defined
Peer entity authentication
Data origin authentication
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 .
ACCESS CONTROL:
The prevention of unauthorized use of a resources. 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.
DATA CONFIDENTIALITY:
Confidentiality is the protection of transmitted data from passive attacks. The protection of data from
unauthorized disclosure.
Types of confidentiality:
o Connection Confidentiality: The protection of all user data on a connection.
o Connectionless Confidentiality: The protection of all user data in a single data block
o Selective-Field Confidentiality: The confidentiality of selected fields within the user data on a
connection or in a single data block.
o Traffic-Flow Confidentiality: The protection of the information that might be derived from
observation of traffic flows.
DATA INTEGRITY: The assurance that data received are exactly as sent by an authorized entity (i.e.,
contain no modification, insertion, deletion, or replay).
Types of integrity
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 transferredover a connectionand takes the formof 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 integrityof selected fields within a single
connectionless data block; takes the form of determination of whether the selected fields have
been modified.
NONREPUDIATION:
It is assurance that someone cannotdenysomething. It is a method of guaranteeingmessage transmission
between parties. Provides protection againstdenial 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.
AVAILABILITY:
Availability is the method with assure the information and communications will be ready for use when
excepted. Information is kept available to authorized persons when they need it. The availability can be
significantly affected by a variety of attacks which are susceptible to authentication, encryption etc.,
whereas some attacks require physical action for preventing and recovering from the loss of availability
SECURITY MECHANISMS:
Security mechanism are categorized into two types. They are,
▶ SPECIFIC SECURITY MECHANISMS
▶ PERVASIVE SECURITY MECHANISMS
SPECIFIC SECURITY MECHANISMS:
These mechanisms are incorporated into the appropriate protocol layer in order to provide some of the
OSI security services.
Encipherment: It refers to the processof applying 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 encryption keys.
Digital Signature: Data appended to, or a cryptographic transformation of, a data unit must
preserve the integrity of the data and prevents it from any unauthorized access.
Access Control: A variety of mechanisms that enforce access rights to resources.
Data Integrity: A variety of mechanisms used to assure the integrity of a data unit or stream of
data units.
Authentication Exchange: A mechanism intended to ensure the identity of an entity by means of
information exchange.
Traffic Padding: The insertion of bits into gaps in a data stream to frustrate traffic analysis
attempts.
Routing Control: Enables selection of particular physically secure routes for certain data and
allows routing changes, especially when a breach of security is suspected.
Notarization: The use of a trusted third party to assure certain properties of a data exchange.
PERVASIVE SECURITY MECHANISMS:
Mechanisms that are not specific to any particular OSI security service or protocol layer.
Trusted Functionality: That which is perceived to be correct with respect to some criteria.
Security Label: the bounding value of a resource which specifies the securityattributes associated
with that resource.
Event Detection: Detection of security-relevant events.
Security Audit Trail: Data collected and potentially used to facilitate a security audit, which is an
independent review and examination of system records and activities.
Security Recovery: Deals with requests from mechanisms, such as event handling and
management functions, and takes recovery actions.
SOME BASIC TERMINOLOGY:
The essential elements of a symmetric encryption scheme, in the Figure. A source produces a
message in plaintext, X = [X1,X2..............XM]. The elements of are letters in some finite alphabet. Traditionally,
the alphabet usually consisted of the 26 capital letters. Nowadays, the binary alphabet {0, 1} is typically
used. For encryption, a key of the form K = [K1,K2….KJ]is generated. If the key is generated at the message
source, then it must also be provided to the destination by means of some secure channel. Alternatively,
a third party could generate the key and securely deliver it to both source and destination. With the
message and the encryption key as input, the encryption algorithm forms the ciphertext Y=[Y1,Y2….YN].
We can write this as Y=E(K,X). This notation indicates that is produced by using encryption algorithm E as
a function of the plaintext X, with the specific functiondeterminedby the value of the key K. The intended
receiver, in possession of the key, is able to invert the transformation: X=D(K,Y). An opponent, observing
Y but not having access to K or X , may attempt to recover X or K or both X and K. It is assumed that the
opponent knows the encryption (E) and decryption (D) algorithms. If the opponent is interested in only
this particular message, then the focus of the effort is to recover X by generating a plaintext estimate X∧.
Often, however, the opponent is interested in being able to read future messages as well, in which case
an attempt is made to recover by generating an estimate ǩ .
Cryptography:
Cryptographic systems are characterized along three independent dimensions:
1. The type of operations used for transforming plaintext to ciphertext. All encryption algorithms
are based on two general principles: substitution, in which each element in the plaintext (bit,
letter, group of bits or letters) is mapped into another element, and transposition, in which
elements in the plaintext are rearranged. The fundamental requirement is that no information be
lost (that is, that all operations are reversible). Most systems, referred to as product systems,
involve multiple stages of substitutions and transpositions.
2. The number of keys used. If both sender and receiver use the same key, the system is referred to
as symmetric, single-key, secret-key, or conventional encryption. If the sender and receiver use
different keys, the system is referred to as asymmetric, two-key, or public-key encryption.
3. The way in which the plaintext is processed. A block cipher processes the input one block of
elements at a time, producing an output block for each input block. A stream cipher processes the
input elements continuously, producing output one element at a time, as it goes along.
Cryptanalysis:
An encryption scheme is unconditionally Secure if the ciphertext generated by the scheme does
not contain enough information to determine uniquely the corresponding plaintext, no matter
how much ciphertext is available. That is, no matter how much time an opponent has, it is
impossible for him or her to decrypt the ciphertext simply because the required information is
not there.
An encryption scheme: computationally secure if The cost of breaking the cipher exceeds the
value of information and the time required to break the cipher exceeds the lifetime of information
SUBSTITUTION TECHNIQUES:
The two basic building blocks of all encryption techniques are substitution and transposition.
A substitution technique is one in which the letters of plaintext are replaced by other letters
or by numbers or symbols. If the plaintext is viewed as a sequence of bits, then substitution
involves replacing plaintext bit patterns with ciphertext bit patterns.
Caesar Cipher:
The earliest known, and the simplest, use of a substituti on cipher was by Julius Caesar. The Caesar
cipher involves replacing each letter of the alphabet with the letter standing three places further down
the alphabet. For example,
MONOALPHABETIC CIPHERS:
Monoalphabetic cipher is a substitution cipher in which for a given key, the cipher alphabet for
each plain alphabet is fixed throughout the encryption process. With only 25 possible keys, the
Caesar cipher is far from secure. A dramatic increase in the key space can be achieved by allowing
an arbitrary substitution. Before proceeding, we define the term permutation. A
permutation of a finite set of elements S is an ordered sequence of all the elements of S, with
each element appearing exactly once.
For example, if S = {a, b, c}, there are six permutations of S:
abc, acb, bac, bca, cab, cba
If the cryptanalyst knows the nature of the plaintext, then the analyst can exploit the regularities
of the language.
As a first step, the relative frequency of the letters can be determined and compared to a standard
frequency distribution for English, such as is shown in Figure. If the message were long enough,
this technique alone mightbe sufficient, but because this is a relatively short message, we cannot
expect an exact match. A powerful tool is to look at the frequency of two-letter combinations,
known as digrams.
The following table shows the frequency of letters in the above sentences
Monoalphabetic ciphers are easy to break because they reflect the frequency data of the original
alphabet.
Playfair Cipher:
The best-known multiple-letter encryption cipher is the Playfair, which treats digrams in the plaintext as
single units and translates these units into ciphertext digrams. The Playfair algorithm is based on the use
of a 5 * 5 matrix of letters constructed using a keyword.
In this case, the keyword is monarchy. The matrix is constructed by filling in the letters of the keyword
(minus duplicates) fromleft to right and from top to bottom, and then filling in the remainder of the matrix
with the remaining lettersin alphabetic order. The letters I and J count as one letter. Plaintext is encrypted
two letters at a time, according to the following rules:
1. Repeating plaintext letters that are in the same pair are separated with a filler letter, such as x,
so that balloon would be treated as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each replace by the letter to
the right, with the first element of the row circularly following the last. For example, ar is
encrypted as RM.
3. Two plaintext letters that fall in the same column are each replaced by the letter beneath, with
the top element of the column circularly following the last. For example, mu is encrypted as CM.
4. Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its own row and the
column occupied by the other plaintext letter. Thus, hs becomes BP and ea becomes IM (or JM,
as the encipherer wishes).
The Playfair cipher is a great advance over simple monoalphabetic ciphers. For one thing, whereas
there are only 26 letters, there are 26 * 26 = 676 digrams, so that identification of individual digrams is
more difficult. Despite this level of confidence in its security, the Playfair cipher is relativelyeasy to break,
because it still leaves much of the structure of the plaintext language intact. A few hundred letters of
ciphertext are generally sufficient.
Hill Cipher:
Another interesting multiletter cipher is the Hill cipher, developed by the mathematician Lester
Hill in 1929. This encryption algorithm takes m successive plaintext letters and substitutes for them m
ciphertext letters. The substitution is determined by m linear equationsin which each character is assigned
a numericalvalue (a = 0, b = 1, c, z = 25).
For m = 3, the system can be described as
Polyalphabetic Ciphers:
key: deceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
The periodic nature of the keyword can be eliminated by using a nonrepeating keyword that is as long as
the message itself. Vigenère proposed what is referred to as an autokey system, in which a keyword is
concatenated with the plaintext itself to provide a running key.
Vernam Cipher:
The ultimate defense against such a cryptanalysis is to choose a keyword that is as long as the plaintext
and has no statistical relationship to it. Such a system was introducedby an AT&T engineer named Gilbert
Vernam in 1918.
One-Time Pad:
Joseph Mauborgne, proposed an improvement to the Vernam cipher that yields the
ultimate in security. Mauborgne suggested using a random key that is as long as the message,
so that the key need not be repeated. In addition, the key is to be used to encrypt and decrypt a
single message, and then is discarded. Each new message requires a new key of the same length
as the new message. Such a scheme, known as a one-time pad, is unbreakable. It produces
random output that bears no statistical relationship to the plaintext. Because the ciphertext
contains no information whatsoever about the plaintext, there is simply no way to break the
code.
An example should illustrate our point. Suppose that we are using a Vigenère scheme with
27 characters in which the twenty-seventh character is the space character, but with a one-time
key that is as long as the message. Consider the ciphertext
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
Suppose that a cryptanalyst had managed to find these two keys. Two plausible plaintexts
are produced. How is the cryptanalyst to decide which is the correct decryption (i.e., which is the
correct key)? If the actual key were produced in a truly random fashion, then the cryptanalyst
cannot say that one of these two keys is more likely than the other. Thus, there is no way to
decide which key is correct and therefore which plaintext is correct.
In fact, given any plaintext of equal length to the ciphertext, there is a key that produces
that plaintext. Therefore, if you did an exhaustive search of all possible keys, you would end up
with many legible plaintexts, with no way of knowing which was the intended plaintext.
Therefore, the code is unbreakable.
The one-time pad offers complete security but, in practice, has two fundamental difficulties:
1. There is the practical problem of making large quantities of random keys. Any heavily
used system might require millions of random characters on a regular basis. Supplying
truly random characters in this volume is a significant task.
2. Even more daunting is the problem of key distribution and protection. For every
message to be sent, a key of equal length is needed by both sender and receiver. Thus, a
mammoth key distribution problem exists.
Because of these difficulties, the one-time pad is of limited utility and is useful primarily for
low-bandwidth channels requiring very high security.
Transposition Techniques:
A very different kind of mapping is achieved by performing some sort of permutation on the plaintext
letters. This technique is referred to as a transposition cipher.
RAIL FENCE TECHNIQUE:
The simplest such cipher is the rail fence technique, in which the plaintext is written down as a sequence
of diagonals and then read off as a sequence of rows.
For example, to encipher the message “meet me after the toga party” with a rail fence of depth 2
we write the following:
FIGURE: Attacker uses a.com web server, which has a vulnerability enabling HTTP response
splitting, and a proxy/cache server in a HTTP response splitting attack. A victim will retrieve the
cached second response when accessing the a.com.
Steps
1. An attacker sends two HTTP requests to the proxy server.
2. The proxy server forwards two HTTP requests to the a.com web server.
3. The a.com web server sends back one HTTP response to each request and the proxy only
accepts the first response message.
4. The proxy server interprets the accepted response as two HTTP response messages
1. The first request is matched to the first response. A first HTTP response, which is a 302
(redirection) response.
2. The second request (http://a.com/index.html) is matched to the second response. A
second HTTP response, which is a 200 response, has a content comprised of 26 bytes of
HTML.
5. A victim sends a request to http://a.com/index.html.
6. The victim receives the second response message. The problem is that the content in the second
response can be any script that will be executed by the browser.
CROSS-SITE REQUEST FORGERY (CSRF OR XSRF):
Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute
unwanted actions on a web application in which they're currently authenticated. CSRF attacks
specifically target state-changing requests, not theft of data, since the attacker has no way to see
the response to the forged request. With a little help of social engineering (such as sending a link
via email or chat), an attacker may trick the users of a web application into executing actions of
the attacker's choosing. If the victim is a normal user, a successful CSRF attack can force the user
to perform state changing requests like transferring funds, changing their email address, and so
forth. If the victim is an administrative account, CSRF can compromise the entire webapplication.
Cookies are small files which are stored on a user's computer. They are designed to hold
a modest amount of data specific to a particular client and website, and can be accessed either
by the web server or the client computer.
CROSS-SITE SCRIPTING (XSS) ATTACKS:
Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into trusted
web sites. XSS attacks occur when an attacker uses a web application to send malicious code, generally
in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are
quite widespread and occur anywhere a web application uses input from a user within the output it
generates without validating or encoding it. An attacker can use XSS to send a malicious script to an
unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and
will execute the script. Because it thinks the script came from a trusted source, the malicious script can
access any cookies, session tokens, or other sensitive information retained by the browser and used with
that site. These scripts can even rewrite the content of the HTML page.
NON-PERSISTENT XSS ATTACKS:
The non-persistent (or reflected) cross-site scripting vulnerability is by far the most common type. These
holes show up when the data provided by a web client, most commonly in HTTP query parameters (e.g.
HTML form submission), is used immediately by server-side scripts to parse and display a page of results
for and to that user, without properly sanitizing the request.
Buffer Overflow:
A buffer overflow occurs when a program or process tries to store more data in a buffer (temporary
data Storage area) than it was intended to hold. Since buffers are created to contain a finite amount of
data, the extra information - which has to go somewhere - can overflowinto adjacent buffers, corrupting
or overwriting the valid data held in them. It may occur accidentally through programming error; buffer
overflow is an increasingly common type of security attack on data integrity.
In buffer Overflow attacks, the extra data may contain codes designed to trigger specific actions, in
effect sending newinstructions to the attacked computer that could, for example, damage the user's files,
change data, or disclose confidential information. Buffer overflow attacks are said to have arisenbecause
the C programming language supplied the framework, and poor programming practice supplied the
vulnerability. Vulnerability to buffer overflow attack was discovered in Microsoft Outlook and Outlook
Express. A programming flow made it possible for an attacker to compromise the integrity of the target
computer by simply it sending an e-mail message.
Unlike the typical e-mail virus, users could not protect themselves by not Opening. attached files;
in fact, the user did not even have to open the message to enable the attack. The programs message
header mechanisms had a defect that made it possible for senders to overflow the area with extraneous
data, which allowed them to execute whatever type of code they desired on the recipient's computers.
Because the process was activated as soon as the recipient downloaded the message from the server, this
type of buffer overflow attack was very difficult to defend. Microsoft has since created a patch to eliminate
the vulnerability. Buffer overflow vulnerabilitiesare one of the most common vulnerabilities. These kinds
of vulnerabilities are perfect for remote access attacks because they give the attacker a great opportunity
to launch and execute their attack code on the target computer. A buffer overflow attack occurs when
the attacker intentionally enters more data than a program was written to handle. The data runs over and
overflows the section of memory that was set aside to accept it. The extra data overwrites on top on
another portion of memory that was meant to hold something else, like part of the program's instructions.
This allows an attacker to overwrite data that controls the program and can takeover control of the
program to execute the attacker's code instead of the program. In exploiting the buffer overflow
vulnerability, the main objective is to overwrite some control information in order to change the flow of
control in the program. The usual way of taking advantages of this is to modify the control information to
give authority to code provided by the attacker to take control.
The stack is a section of memory used for temporary storage of information. In a stack -based buffer
overflow attack, the attacker adds more data than expected to the stack, overwriting data. For example,
"Let's say that a program is executing and reaches the stage where it expects to use a postal coder or zip
code, which it gets from a Web-based form that customers filled Out. " The longest postal code is fewer
than twelve characters, but on the web form, the attacker typed in the letter "A" 256 times, followedby
Some other commands. The data overflows the buffer allotted for the zip code and the attacker's
commands fall into the stack. After a function is called, the address of the instruction following the
function call is pushed onto the stack to be saved so that the function knows where to return control
when it is finished.
A buffer overflowallows the attacker to change the return address of a function to a point in memory
where they have already inserted executable code. Then control can be transferred to the malicious attack
code contained With the buffer, called the payload. The payload is normally a command to allow remote
access or some other command that would get the attacker closer to having control of the system. The
best defense against any of these attacks is to have perfect programs. In ideal circumstances. every input
in every program would do bounds checks to allow onlya given number of characters. The refore, the best
way to deal with buffer overflow problems is to not allow them to occur in the first place.
Format String:
Buffer overflows aren't the only type of bug that can control a process. Another fairly common
programming error is the situation in which a user can control the format parameter to a function, such
as printf () or syslog (). These functions take a format string as a parameter that describes how the other
parameters should be interpreted. For example, the string specifies that a parameter should be displayed
as a signed decimal integer, while %s specifies that a parameter should be displayed as an ASCII string.
Format strings give you a lot of control over how data is to be interpreted, and this control can sometimes
be abused to read and write memory in arbitrary locations.
To take advantage of format string vulnerability, an attacker gets a computer to display a string
of text characters with formatting commands. By carefully manipulating the formatting commands, the
attacker can trick the computer into running a program. "Format string bugs are the new trend in
computer security vulnerabilities." In the C programming language there are a number of functions which
accept a format string as an argument. These functions include fprintf, printf, sprintf, snprintf, vfprintf,
vprintf, vsprintf, vsnprintf, setproctitle, syslog and others.
UDP Hijacking:
UDP which stands for User Datagram Protocol is defined as a connectionless protocol. It offers a direct
way to send and receive datagram’s over an IP network. UDP doesn’t use sequence numbers like TCP. It
is mainly used for broadcasting messages across the network or for doing DNS queries. Hijacking a session
over a User Datagram Protocol (UDP) is exactly the same as over TCP, except that UDP attackers do not
have to worry about the overhead of managingsequence numbers and other TCP mechanisms. Since UDP
is connectionless, injecting data into a session without being detected i s extremely easy.
Man in the Middle Attacks:
In cryptography, a man-in-the-middle attack (MITM) is an attack in which an attacker is able to read, insert
and modify at will, messages between two parties without either party knowing that the link between
them has been compromised. The attacker must be able to observe and intercept messages going
between the two victims.