Chapter 6
Chapter 6
8
Cont…
• Modification- means the attacker intercepts the message and change it.
• Masquerading- happens when the attacker impersonates somebody else.
• Replaying- means the attacker obtains a copy of a message sent by a user and
later tries to reply it.
• Repudiation- means that the sender of the message might later deny that she
has sent the message: the receiver of the message might later deny that he
has received the message.
Attacks threatening availability
• Denial of service (DoS) is very common attack. It may slow down or totally
interrupt the service of a system.
• The attacker can use several strategies to achieve this.
• They might make the system so busy that it collapses, or they might intercept
messages sent in one direction and make the sending system believe that one
of the parties involved in the communication or message has lost the
9
message and that it should be resent.
Security Problem
Intruder or attacker or cracker: attempt to breach the security
Threat: potential of security violation such as discovery of
vulnerability
Form of malicious access/ Security violation
• Breach of confidentiality- unauthorized reading of data
• Breach of integrity- unauthorized modification of data
• Breach of availability- unauthorized destruction of data
• Theft of service- unauthorized use of resources
• Denial of service (DOS)- prevention of legitimate use of the system
10
Cont…
• Four levels of security measures must be taken.
– Physical:- Data center, server and connected terminals
12
Authentication
• Authentication refers to identifying each user of the system and associating
the executing programs with those users.
• It is the responsibility of the OS to create a protection system which ensures
that a user who is running a particular program is authentic.
• OS generally identifies/authenticates users using the following three ways:
– Username / Password − User need to enter a registered username and password
with OS to login into the system.
– User card/key − User need to punch card in card slot, or enter key generated by
key generator in option provided by operating system to login into the system.
– User attribute – fingerprint/ eye retina pattern/ signature − User need to
pass his/her attribute via designated input device used by operating system to
login into the system.
– Implementing security measures and processes.
13
Cont…
One Time passwords
• One-time passwords provide additional security along with normal authentication.
• In One-Time Password system, a unique password is required every time user tries
to login into the system.
• It is a password that is valid for only one login session or transaction . It avoid
several shortcomings of traditional (static) password-based authentication.
• One-time password is implemented in various ways.
– Random numbers − Users are provided cards having numbers printed along with
corresponding alphabets. System asks for numbers corresponding to few alphabets
randomly chosen.
– Secret key − User are provided a hardware device which can create a secret id mapped
with user id. System asks for such secret id which is to be generated every time prior to
login.
– Network password − Some commercial applications send one-time passwords to user
on registered mobile/ email which is required to be entered prior to login. 14
Cont…
• Biometrics
– Palm and hand readers: finger length, finger width and line
patterns.
– Fingerprint readers.
– Eye retina pattern, face
• Two factor authentication scheme
– Password plus fingerprint scan or secret key plus password.
15
Program Threats
OS’s processes and kernel do the designated task as instructed. If a user program
made these process do malicious tasks, then it is known as Program Threats.
One of the common examples of program threat is a program installed in a
computer which can store and send user credentials via network to some hacker.
Following is the list of some well-known program threats.
• Trojan Horse − Such program traps user login credentials and stores them to send to
malicious user who can later on login to computer and can access system resources.
o Exploits mechanisms for allowing programs written by users to be executed by other users.
• Trap Door − If a program which is designed to work as required, have a security hole
in its code and perform illegal action without knowledge of user then it is called to
have a trap door.
o The designer of the code might leave a hole in the software that only she is capable of
using.
o Specific user identifier or password that circumvents normal security procedures.
16
Cont…
• Logic Bomb − Logic bomb is a situation when a program misbehaves only
when certain conditions met otherwise it works as a genuine program. It is
harder to detect.
• Virus − Virus as name suggest can replicate themselves on computer
system. They are highly dangerous and can modify/delete user files, crash
systems. A virus is generally a small code embedded in a program. As user
accesses the program, the virus starts getting embedded in other files/
programs and can make system unusable for user.
• Stack and Buffer Overflow
o The main function of a buffer is to temporarily store data. Each buffer has a capacity
of data it can hold.
o During a buffer overflow attack, the buffer or other temporary data stores are
overflowing with data.
o When the buffer overflows, the program attempting to write the data may overwrite
other memory locations containing important information.
o Threat actors look for buffer overflow vulnerabilities, which they can exploit to inject
scripts that help them hijack the system or crash it. 17
System Threats
• System threats refers to misuse of system services and
network connections to put user in trouble.
• System threats creates an environment that operating system
resources/ user files are misused.
o Viruses
18
Threat Monitoring
• Check for suspicious patterns of activity – i.e., several
incorrect password attempts may signal password guessing.
• Audit log – records the time, user, and type of all accesses to
an object; useful for recovery from a violation and developing
better security measures.
• Scan the system periodically for security holes; done when the
computer is relatively unused.
19
Cont…
• Check for:
– Short or easy-to-guess passwords
– Unauthorized set-uid programs
– Unauthorized programs in system directories
– Unexpected long-running processes
– Improper directory protections
– Improper protections on system data files
– Dangerous entries in the program search path (Trojan
horse)
20
Intrusion Detection
• Detect attempts to intrude into computer systems.
• Wide variety of techniques
– The time of detection
– The type of inputs examined to detect intrusion activity
– The range of response capabilities.
o Alerting the administrator, killing the intrusion process, false resource is exposed to the attacker
(but the resource appears to be real to the attacker) to gain more information about the attacker.
• The solutions are known as intrusion detection systems.
• Detection methods:
– Auditing and logging.
o Install logging tool and analyze the external accesses.
– Tripwire (UNIX software that checks if certain files and directories have been altered – i.e.
password files)
o Integrity checking tool for UNIX.
o It operates on the premise that a large class of intrusions results in anomalous modification of
system directories and files.
o It first enumerates the directories and files to be monitored for changes and deletions or additions.
Later it checks for modifications by comparing signatures.
• System call monitoring
– Detects when a process is deviating from expected system call behavior.
21
Security services
• Standards have been defined for security services to achieve
security goals and prevent security attacks.
23
Cont…
• Cryptography can help with both of these problems, through a system
of secrets and keys.
• Cryptography: Schemes for encryption and decryption; It comes from
the Greek words for secret writing.
• Cryptography has five ingredients
– Plaintext: the original message that is fed into the algorithm as input
– Encryption algorithm: performs various substitutions and transformations
on the plaintext
o Encryption: The process by which plaintext is converted into ciphertext
– Secret Key: is also input to the algorithm; the exact substitutions and
transformations performed by the algorithm depend on the key
o Larger key size means greater security but may decrease encryption or
decryption speed.
24
Cont…
– Ciphertext: the scrambled message produced as output. It
depends on the plaintext and the secret key; for a given
message, two different keys will produce two different
ciphertexts.
25
Cont…
Encryption
• The basic idea of encryption is to encode a message so that
only the desired recipient can decode and read it.
26
Cont…
• Encryption is useful to protect messages from intruders
– Eavesdropping (listening/spying the message)
• It is an issue of confidentiality
• An intruder may try to read the message
• If it is well encrypted, the intruder will not know the content
• However, just the fact the intruder knows that there is communication may be a
threat (Traffic analysis)
– Modification
• Modifying a plaintext is easy, but modifying encrypted messages is difficult
• It is an issue of integrity
– Insertion of Messages
• Inserting new message into a ciphertext is difficult
• It is an issue of integrity
27
Basic process of Encryption
1. The sender first creates a message, m in plaintext.
2. The message is then entered into an encryption algorithm, E, along with the
encryption key, Ke.
3. The encryption algorithm generates the ciphertext, c, = E(Ke)(m). For any
key k, E(k) is an algorithm for generating ciphertext from a message, and
both E and E(k) should be efficiently computable functions.
4. The ciphertext can then be sent over an unsecure network, where it may be
received by attackers.
5. The recipient enters the ciphertext into a decryption algorithm, D, along
with the decryption key, Kd.
6. The decryption algorithm re-generates the plaintext message, m, = D(Kd)(c).
For any key k, D(k) is an algorithm for generating a clear text message from a
ciphertext, and both D and D(k) should be efficiently computable functions.
7. The receiver reads the sender encrypted message.
28
Fig. Basic processes of Encryption 29
Cont…
31
Cont…
35
Cont…
Example
• Alice needs to send the message “Enemy attacks tonight” to Bob.
Alice and Bob have agreed to divide the text into groups of five
characters and then permute the characters in each group. The
following shows the grouping after adding a bonus character (z) at
the end to make the last group the same size as the others.
36
Cont…
• The third character in the plaintext block becomes the first character
in the ciphertext block, the first character in the plaintext block
becomes the second character in the ciphertext block and so on. The
permutation yields:
37
Cont…
Modern symmetric-key ciphers
• Since traditional ciphers are no longer secure, modern symmetric-
key ciphers have been developed during the last few decades.
• Modern ciphers normally use a combination of substitution,
transposition and some other complex transformations to create a
ciphertext from a plaintext.
• Modern ciphers are bit-oriented (instead of character-oriented). The
plaintext, ciphertext and the key are strings of bits.
• The two examples of modern symmetric-key ciphers are DES and
AES.
38
Cont…
The Data Encryption Standard (DES)
• DES is a symmetric-key block cipher published by the National Institute of
Standards and Technology (NIST) in 1977.
• DES has been the most widely used symmetric-key block cipher.
o Messages are broken down into 64-bit chunks, each of which are encrypted
using a 56-bit key through a series of substitutions and transformations.
• DES is known as a block cipher, because it works on blocks of data at a time.
The Advanced Encryption Standard (AES)
• AES is a symmetric-key block cipher published by the US NIST in 2001 in
response to the shortcoming of DES, for example its small key size.
• It uses key lengths of 128, 192, or 256 bits, and encrypts in blocks of 128 bits using
10 to 14 rounds of transformations on a matrix formed from the block.
• Read more about DES and AES
39
Asymmetric Encryption
• With asymmetric encryption, the decryption key, Kd, is not the same as the
encryption key, Ke, and more importantly cannot be derived from it, which
means the encryption key can be made publicly available, and only the
decryption key needs to be kept secret.
• Also called Public-key cryptography
• It is a form of cryptosystem in which encryption and decryption are performed
using different keys - one public key (KE) and one private key (KD) - that
form a unique pair.
• Proposed by Diffie and Hellman in 1976
• It is a revolutionary concept since it avoids the need of using a secure channel
to communicate the key.
• It has made cryptography available for the general public and made many of
today’s online applications feasible
40
Cont…
• Public-key algorithms are based on mathematical functions rather than on
substitution and permutation
• Public-key cryptography is involving the use of two separate keys, in contrast to
symmetric encryption, which uses only one key.
• The use of two keys has profound consequences in the areas of confidentiality,
key distribution, and authentication.
• Properties of Public Key Cryptosystem
– If you have the private key, you can easily decrypt what is encrypted by the
public key.
– Otherwise, it is computationally infeasible to decrypt what has been encrypted
by the public key.
• One of the most widely used asymmetric encryption algorithms is RSA, named
after its developers - Rivest, Shamir, and Adleman.
41
Cont…
43
.
44