You are on page 1of 376

Introduction to Cyber

Security

From Security in Computing, Fifth Edition, by Charles P. Pfleeger, et al. (ISBN: 9780134085043). Copyright 2015 by Pearson Education, Inc. All rights reserved.
Objectives
Define computer security as well as basic computer security terms
Introduce the C-I-A Triad
Introduce basic access control terminology
Explain basic threats, vulnerabilities, and attacks
Show how controls map to threats
 What Is Computer Security?
• Protection of the items you value, called the assets of a computer or
computer system.
• There are many types of assets
 Hardware
 Software
 Data
 Or combinations of these
Assets
Values of Assets
 Basic Terms

• Vulnerability
• Threat
• Attack
• Countermeasure or control
Vulnerabilities, Threats,
Attacks, Controls
• Vulnerability is a weakness in the security system
• (i.e., in procedures, design, or implementation), that might be exploited to cause
loss or harm.

• Threat to a computing system is a set of circumstances that has the potential to


cause loss or harm.
• a potential violation of security

• A human (criminal) who exploits a vulnerability perpetrates an attack on the system.

• How do we address these problems?


• We use a control as a protective measure.
• That is, a control is an action, device, procedure, or technique that removes or reduces a
vulnerability.
Threat and Vulnerability
Relationship among threats, controls, and vulnerabilities:
• A threat is blocked by control of a vulnerability.
• To devise controls, we must know as much about threats as possible.

The fact that the violation might occur


means that the actions that might
cause it should be guarder against.
 C-I-A Triad
• When we talk about computer security, we mean that we are addressing
three important aspects of any computer-related system:
• Confidentiality
• Integrity
• Availability
• Sometimes two other desirable characteristics:
• Authentication
• Process or action of proving or showing something to be true, genuine, or valid.
• Nonrepudiation
• Refers to the ability to ensure that a party to a contract or a communication
cannot deny the authenticity of their signature on a document or the sending
of a message that they originated.
• Confidentiality ensures that computer-related assets are accessed only by
authorized parties.
• i.e. reading, viewing, printing, or even knowing their existence
• Secrecy or privacy
• Integrity means that assets can be modified only by authorized parties or only in
authorized ways.
• i.e. writing, changing, deleting, creating
• Availability means that assets are accessible to authorized parties at appropriate
times.
• i.e. often, availability is known by its opposite, denial of service.
Relationship between Confidentiality Integrity and
Availability
• In fact, these three characteristics can be independent, can overlap, and
can even be mutually exclusive.

Confidentiality

Secure
Integrity Availability
Access Control
Types of Threats
Types of Attackers
Threats
• In an interception means that some unauthorized party has gained access to an
asset.

• In an interruption, an asset of the system becomes lost, unavailable, or unusable.

• If an unauthorized party not only accesses but tampers (forges) with an asset, the
threat is a modification.

• Finally, an unauthorized party might create a fabrication of counterfeit objects on


a computing system.
Types of Harm
Method, Opportunity, and Motive
(MOM)
• A malicious attacker must have three things (MOM):

• method: the skills, knowledge, tools, and other things with which
to be able to pull off the attack
• Knowledge of systems are widely available

• opportunity: the time and access to accomplish the attack


• Systems available to the public are accessible to them

• motive: a reason to want to perform this attack against this system


Goals of Security
• Prevention
• Prevent attackers from violating security policy

• Detection
• Detect attackers’ violation of security policy

• Recovery
• Stop attack, assess and repair damage
• Continue to function correctly even if attack succeeds
Trust and Assumptions
• Trust underlies all aspects of security

• Policies
• Unambiguously partition system states
• Correctly capture security requirements

• Mechanisms
• Assumed to enforce policy
• Support mechanisms work correctly
 Control or Countermeasure
• Means to counter threats. Harm occurs when a threat is realized against a
vulnerability. To protect against harm, then, we can neutralize the threat, close
the vulnerability, or both.
• The possibility for harm to occur is called risk. We can deal with harm in several
ways:
• prevent it, by blocking the attack or closing the vulnerability
• deter it, by making the attack harder but not impossible
• deflect it, by making another target more attractive (or this one less so)
• mitigate it, by making its impact less severe
• detect it, either as it happens or some time after the fact
• recover from its effects
Controls/Countermeasures
Different Types of Controls
Controls Available
• Encryption
• We take data in their normal, unscrambled state, called:
• cleartext or plaintext, and transform them so that they are unintelligible to the outside
observer; the transformed data are called enciphered text or ciphertext.

• Encryption clearly addresses the need for confidentiality of data.

• Additionally, it can be used to ensure integrity;


• data that cannot be read generally cannot easily be changed in a meaningful manner.
Controls Available
• Encryption does not solve all computer security problems, and other tools must
complement its use.
• if encryption is not used properly, it may have no effect on security or could
even degrade the performance of the entire system.

• Weak encryption can actually be worse than no encryption at all,


• because it gives users an unwarranted sense of protection.

• Therefore, we must understand those situations in which encryption is most


useful as well as ways to use it effectively.
Controls Available
• Software/Program Controls
• Programs must be secure enough to prevent outside attack
• They must also be developed and maintained so that we can be confident of the programs'
dependability.

• Program controls include the following:


• Internal program controls: parts of the program that enforce security restrictions,
• i.e. access limitations in a database management program

• Operating system and network system controls: limitations enforced by the operating system
or network to protect each user from all other users
• i.e. chmod on UNIX: (Read, Write, Execute) vs. (Owner, Group, Other)

• Independent control programs: application programs,


• i.e. password checkers, intrusion detection utilities, or virus scanners, that protect against
certain types of vulnerabilities
Controls Available
• Development controls:
• quality standards under which a program is designed, coded
(implementation), tested, and maintained to prevent software faults from
becoming exploitable vulnerabilities
• i.e. Penetration testing (pen testing or ethical hacking), is the practice of testing a
computer system, network or web application to find security vulnerabilities that an
attacker could exploit.

• Software controls frequently affect users directly ?


• i.e. when the user is interrupted and asked for a password before being
given access to a program or data.
• Because they influence the usability of the system, software controls must be carefully
designed.
• Ease of use and capabilities are often competing goals in the design of a collection of
software controls.
Controls Available
• Hardware Controls
• Numerous hardware devices have been created to assist in providing computer
security. These devices include a variety of means, such as

• hardware or smart card implementations of encryption


• locks or cables limiting access or deterring theft
• devices to verify users' identities
• firewalls
• intrusion detection systems
• circuit boards that control access to storage media
Controls Available
• Policies and Procedures
• Sometimes, we can rely on agreed-on procedures or policies among users rather than
enforcing security through hardware or software means
• i.e. frequent changes of passwords
• We must not forget the value of community standards and expectations when we consider
how to enforce security.

• Physical Controls
• i.e. locks on doors,
• guards at entry points,
• backup copies of important software and data, and
• physical site planning that reduces the risk of natural disasters.
Effectiveness of Controls
• Awareness of Problem
• People using controls must be convinced of the need for security. That is,
people will willingly cooperate with security requirements only if they
understand
• why security is appropriate in a given situation.
Effectiveness of Controls
• Likelihood of Use
• Of course, no control is effective unless it is used

• Principle of Effectiveness:
• Controls must be used properly to be effective.
• They must be efficient, easy to use, and appropriate.

• This principle implies that computer security controls


• must be efficient enough, in terms of time, memory space, human activity, or other
resources used,
• using the control does not seriously affect the task being protected.
• Controls should be selective so that they do not exclude legitimate accesses.
Effectiveness of Controls
• Overlapping Controls
• Several different controls may apply to address a single vulnerability.

• Periodic Review
• Just when the security specialist finds a way to secure assets against certain
kinds of attacks, the opposition doubles its efforts in an attempt to defeat the
security mechanisms. Thus, judging the effectiveness of a control is an
ongoing task.
Principle of Weakest Link
• Security can be no stronger than its weakest link !!!
• Whether it is the power supply that powers the firewall or the operating
system under the security application or the human who plans, implements,
and administers controls, a failure of any control can lead to a security failure.
Summary
• Vulnerabilities are weaknesses in a system;
• threats exploit those weaknesses;
• controls protect those weaknesses from exploitation
• Confidentiality, integrity, and availability are the three basic security
primitives
• Different attackers pose different kinds of threats based on their
capabilities and motivations
• Different controls address different threats; controls come in many
flavors and can exist at various points in the system
Authentication, Access Control,
and Cryptography

From Security in Computing, Fifth Edition, by Charles P. Pfleeger, et al. (ISBN: 9780134085043).
Authentication
• The act of proving that a user is who she says she is.
• Methods:
– Something the user knows
– Something the user is
– Something the user has
Something You Know
• Passwords
• Security questions
• Attacks on “something you know”:
– Dictionary attacks
– Inferring likely passwords/answers
– Guessing
– Defeating concealment
– Exhaustive or brute-force attack
– Rainbow tables
Distribution of Password Types
Password Storage

Plaintext Concealed
Biometrics: Something You Are
Problems with Biometrics
• Intrusive
• Expensive
• Single point of failure
• Sampling error
• False readings
• Speed
• Forgery
Tokens: Something You Have
Federated Identity Management
Single Sign-On
Access Control
Access Policies
• Goals:
– Check every access
– Enforce least privilege
– Verify acceptable usage

• Track users’ access


o Enforce at appropriate granularity
o Use audit logging to track accesses
Implementing Access Control
• Reference monitor
• Access control directory
• Access control matrix
• Access control list
• Privilege list
• Capability
• Procedure-oriented access control
• Role-based access control
Reference Monitor
Access Control Directory
Access Control Matrix
Access Control List
Problems Addressed by Encryption
• Suppose a sender wants to send a message to a
recipient.
• An attacker may attempt to
– Block the message
– Intercept the message
– Modify the message
– Fabricate an authentic-looking alternate message
Encryption Terminology
• Sender
• Recipient
• Transmission medium
• Interceptor/intruder
• Encrypt, encode, or encipher
• Decrypt, decode, or decipher
• Cryptosystem
• Plaintext
• Ciphertext
Encryption/Decryption Process
Symmetric vs. Asymmetric
Secret Key vs. Public Key Encryption
Stream Ciphers
Block Ciphers
Stream vs. Block

Stream Block
Advantages  Speed of  High diff usion
transformation  Immunity to
 Low error insertion of
propagation symbol

Disadvantages  Low diff usion  Slowness of


 Susceptibility to encryption
malicious  Padding
insertions and  Error
modifications propagation
Cryptography
• The art of secret writing.
• It is technique of securing information and
communications through use of codes so that
only those person for whom the information is
intended can understand it and process it.
Cryptography (cont.)
• characterize cryptographic system by:

– type of encryption operations used


• substitution / transposition / product
– number of keys used
• single-key or private / two-key or public
– way in which plaintext is processed
• block / stream
Symmetric Encryption
• or conventional / private-key / single-key.
• sender and recipient share a common key.
• all classical encryption algorithms are private-
key.
Symmetric Cipher Model
Requirements
• two requirements for secure use of symmetric
encryption:
– a strong encryption algorithm
– a secret key known only to sender / receiver
• mathematically have:
Y = EK(X)
X = DK(Y)
Cryptanalysis
• objective to recover key not just message
• general approaches:
– cryptanalytic attack
– brute-force attack
Cryptanalytic Attacks
• ciphertext only
– only know algorithm & ciphertext, is statistical,
know or can identify plaintext
• known plaintext
– know/suspect plaintext & ciphertext
• chosen plaintext
– select plaintext and obtain ciphertext
• chosen ciphertext
– select ciphertext and obtain plaintext
• chosen text
– select plaintext or ciphertext to en/decrypt
More Definitions
• unconditional security
– no matter how much computer power or time is
available, the cipher cannot be broken since the
ciphertext provides insufficient information to
uniquely determine the corresponding plaintext

• computational security
– given limited computing resources (eg time
needed for calculations is greater than age of
universe), the cipher cannot be broken
Brute Force Search
• always possible to simply try every key
• most basic attack, proportional to key size
• assume either know / recognise plaintext

Key Size (bits) Number of Alternative Time required at 1 Time required at 106
Keys decryption/µs decryptions/µs
32 231 µs = 35.8 minutes 2.15 milliseconds
2 32
= 4.3 × 10 9

56 255 µs = 1142 years 10.01 hours


2 56
= 7.2 × 10 16

128
2128 = 3.4 × 1038 2127 µs = 5.4 × 1024 years 5.4 × 1018 years

168
2168 = 3.7 × 1050 2167 µs = 5.9 × 1036 years 5.9 × 1030 years

26 characters
(permutation) 26! = 4 × 1026 2 × 1026 µs = 6.4 × 1012 years 6.4 × 106 years
Classical Substitution Ciphers
• where letters of plaintext are replaced by
other letters or by numbers or symbols

• or if plaintext is viewed as a sequence of bits,


then substitution involves replacing plaintext
bit patterns with ciphertext bit patterns
Caesar Cipher
• earliest known substitution cipher.
• by Julius Caesar.
• first attested use in military affairs.
• replaces each letter by 3rd letter on.

• example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
Caesar Cipher
• can define transformation as:
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

• Mathematically, give each letter a number


a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

• then have Caesar cipher as:


c = E(p) = (p + k) mod (26) = (24+3) mod 26= 1 (b)
p = D(c) = (c – k) mod (26)
= (1-3) mod 26 = -2 mod 26= 24
Cryptanalysis of Caesar Cipher
• only have 26 possible ciphers
– A maps to A,B,..Z
• Attacker could simply try each in turn
• a brute force search
• given ciphertext, just try all shifts of letters
• do need to recognize when have plaintext
• eg. break ciphertext "GCUA VQ DTGCM"
Monoalphabetic Cipher
• rather than just shifting the alphabet, could shuffle
(jumble) the letters arbitrarily.
• each plaintext letter maps to a different random
ciphertext letter.
• hence key is 26 letters long.

Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN

Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Monoalphabetic Cipher Security
• now have a total of 26! = 4 x 1026 keys.
• with so many keys, might think is secure.
• but would be !!!WRONG!!!.
• problem is language characteristics.
Language Redundancy and Cryptanalysis

• human languages are redundant.


• eg "th lrd s m shphrd shll nt wnt"
• letters are not equally commonly used.
• in English E is by far the most common letter
– followed by T,R,N,I,O,A,S
• other letters like Z,J,K,Q,X are fairly rare.
• have tables of single, double & triple letter
frequencies for various languages.
English Letter Frequencies
Use in Cryptanalysis
• key concept - monoalphabetic substitution ciphers
do not change relative letter frequencies.
• discovered by Arabian scientists in 9th century.
 calculate letter frequencies for ciphertext.
 compare counts/plots against known values.
 if caesar cipher look for common peaks/troughs
 peaks at: A-E-I triple, NO pair, RST triple
 troughs at: JK, X-Z
 for monoalphabetic must identify each letter
– tables of common double/triple letters help
Playfair Cipher
• not even the large number of keys in a
monoalphabetic cipher provides security.
• one approach to improving security was to
encrypt multiple letters.
• the Playfair Cipher is an example.
• invented by Charles Wheatstone in 1854, but
named after his friend Baron Playfair.
Playfair Key Matrix
• a 5X5 matrix of letters based on a keyword
• fill in letters of keyword (sans duplicates)
• fill rest of matrix with other letters
• eg. using the keyword MONARCHY
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Encrypting and Decrypting
• plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'X’
2. if both letters fall in the same row, replace each
with letter to right (wrapping back to start from
end)
3. if both letters fall in the same column, replace
each with the letter below it (again wrapping to
top from bottom)
4. otherwise each letter is replaced by the letter in
the same row and in the column of the other
letter of the pair
Example of Playfair Cipher
• The sender and the receiver deicide on a particular key,
say ‘tutorials’.
• In a key table, the first characters (going left to right) in
the table is the phrase, excluding the duplicate letters.
• The rest of the table will be filled with the remaining
letters of the alphabet, in natural order. The key table
works out to be −
Process of Playfair Cipher

• First, a plaintext message is split into pairs of


two letters (digraphs). If there is an odd
number of letters, a Z is added to the last
letter. Let us say we want to encrypt the
message “hide money”. It will be written as −
• HI DE MO NE YZ
• The rules of encryption are −

– If both the letters are in the same column, take the letter
below each one (going back to the top if at the bottom)

T U O R I
A L S B C
D E F G H ‘H’ and ‘I’
are in same
K M N P Q column,
V W X Y Z hence take
letter below
them to
replace. HI
→ QC
• If both letters are in the same row, take the letter to the right
of each one (going back to the left if at the farthest right)

T U O R I
A L S B C
D E F G H ‘D’ and ‘E’
are in same
K M N P Q row, hence
V W X Y Z take letter to
the right of
them to
replace. DE
→ EF
• If neither of the preceding two rules are true, form
a rectangle with the two letters and take the
letters on the horizontal opposite corner of the
rectangle.
• Using these rules, the result of the encryption of
‘hide money’ with the key of ‘tutorials’ would be −
• QC EF NU MF ZV
• Decrypting the Playfair cipher is as simple as doing
the same process in reverse. Receiver has the same
key and can create the same key table, and then
decrypt any messages made using that key.
Security of Playfair Cipher
• security much improved over monoalphabetic.
• since have 26 x 26 = 676 digrams
• would need a 676 entry frequency table to analyse
(verses 26 for a monoalphabetic)
• and correspondingly more ciphertext

• was widely used for many years


– eg. by US & British military in WW1
• it can be broken, given a few hundred letters.
• since still has much of plaintext structure.
Polyalphabetic Ciphers
• polyalphabetic substitution ciphers
• improve security using multiple cipher alphabets
• make cryptanalysis harder with more alphabets to
guess and flatter frequency distribution
• use a key to select which alphabet is used for each
letter of the message
• use each alphabet in turn
• repeat from start after end of key is reached
Vigenère Cipher
• simplest polyalphabetic substitution cipher
• effectively multiple caesar ciphers
• key is multiple letters long K = k1 k2 ... kd
• ith letter specifies ith alphabet to use
• use each alphabet in turn
• repeat from start after d letters in message
• decryption simply works in reverse
Example of Vigenère Cipher
• write the plaintext out
• write the keyword repeated above it
• use each key letter as a caesar cipher key
• encrypt the corresponding plaintext letter
• eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ

a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Vigenere Cipher

• This scheme of cipher uses a text string (say, a


word) as a key, which is then used for doing a
number of shifts on the plaintext.
• For example, let’s assume the key is ‘point’.
Each alphabet of the key is converted to its
respective numeric value: In this case,
• p → 15, o → 14, i → 8, n → 13, and t → 19.
• Thus, the key is: 15 14 8 13 19.
Process of Vigenere Cipher
• The sender and the receiver decide on a key.
Say ‘point’ is the key. Numeric representation
of this key is ‘15 14 8 13 19’.
• The sender wants to encrypt the message, say
‘attack from south east’. He will arrange
plaintext and numeric key as follows −
a t t a c k f r o m s o u t h e a s t
1 1 8 1 1 1 1 8 1 1 1 1 8 1 1 1 1 8 1
5 4 3 9 5 4 3 9 5 4 3 9 5 4 3
• He now shifts each plaintext alphabet by the number
written below it to create ciphertext as shown below

a t t a c k f r o m s o u t h e a s t
1 1 8 1 1 1 1 8 1 1 1 1 8 1 1 1 1 8 1
5 4 3 9 5 4 3 9 5 4 3 9 5 4 3
p h b n v z t z b f h c c g a t o a g

• Here, each plaintext character has been shifted by a


different amount – and that amount is determined by
the key.
• The key must be less than or equal to the size of the
message.
Security of Vigenère Ciphers
• have multiple ciphertext letters for each
plaintext letter.
• hence letter frequencies are obscured.
• but not totally lost.
• start with letter frequencies
– see if look monoalphabetic or not
• if not, then need to determine number of
alphabets, since then can attach each
Autokey Cipher
• ideally want a key as long as the message
• Vigenère proposed the autokey cipher
• with keyword is prefixed to message as key
• knowing keyword can recover the first few letters
• use these in turn on the rest of the message
• but still have frequency characteristics to attack
key: initial key is 12 (M)
Key Stream: MATTACKSUCCESSFU
plaintext: ATTACK SUCCESSFUL
ciphertext: MTMTCMCMWEGWKXZF
Ci=(Pi+Ki)mod 26
One-Time Pad
• if a truly random key as long as the message is used,
the cipher will be secure
• called a One-Time pad
• is unbreakable since ciphertext bears no statistical
relationship to the plaintext
• since for any plaintext & any ciphertext there exists
a key mapping one to other
• can only use the key once though
• problems in generation & safe distribution of key
Transposition Ciphers
• now consider classical transposition or
permutation ciphers
• these hide the message by rearranging the
letter order
• without altering the actual letters used
• can recognise these since have the same
frequency distribution as the original text
Row Transposition Ciphers
• a more complex transposition
• write letters of message out in rows over a
specified number of columns
• then reorder the columns according to some
key before reading off the rows
Key: BACKIN
Plaintext: HELLOHOWAREYOUabcd
H E L L O H
Ciphertext: EWUHOOLAAOECLRBHYD

O W A R E Y

O U a b c d

B A C K I N
Product Ciphers
• ciphers using substitutions or transpositions are not
secure because of language characteristics
• hence consider using several ciphers in succession to
make harder, but:
– two substitutions make a more complex substitution
– two transpositions make more complex transposition
– but a substitution followed by a transposition makes a new
much harder cipher
• this is bridge from classical to modern ciphers
Rotor Machines
• before modern ciphers, rotor machines were most
common complex ciphers in use
• widely used in WW2
– German Enigma, Allied Hagelin, Japanese Purple
• implemented a very complex, varying substitution
cipher
• used a series of cylinders, each giving one
substitution, which rotated and changed after each
letter was encrypted
• with 3 cylinders have 263=17576 alphabets
Hagelin Rotor Machine
Steganography
• an alternative to encryption
• hides existence of message
– using only a subset of letters/words in a longer
message marked in some way
– using invisible ink
– hiding in LSB in graphic image or sound file
• has drawbacks
– high overhead to hide relatively few info bits
Summary
• have considered:
– classical cipher techniques and terminology
– monoalphabetic substitution ciphers
– cryptanalysis using letter frequencies
– Playfair cipher
– polyalphabetic ciphers
– transposition ciphers
– product ciphers and rotor machines
– stenography
DES (Data Encryption
Standard)
Basics
• The Data Encryption Standard (DES) is a symmetric-key block cipher
created in the early 1970s by an IBM team and adopted by the
National Institute of Standards and Technology (NIST).
• Symmetric-key means that it employs the same key in both encrypting
and decrypting the data.
• DES uses 16 rounds and the block size is 64-bit. Though, key length is
64-bit, DES has an effective key length of 56 bits, since 8 of the 64 bits
of the key are not used by the encryption algorithm.
DES Algorithm Steps
• The process begins with the 64-bit plain text block getting handed
over to an initial permutation (IP) function.
• The initial permutation (IP) is then performed on the plain text.
• Next, the initial permutation (IP) creates two halves of the permuted
block, referred to as Left Plain Text (LPT) and Right Plain Text (RPT).
• Each LPT and RPT goes through 16 rounds of the encryption process.
• Finally, the LPT and RPT are rejoined, and a Final Permutation (FP) is
performed on the newly combined block.
• The result of this process produces the desired 64-bit ciphertext.
1. Initial permutation (IP)
2. 16 Rounds

Details of one round in DES


Step1: Key Transformation
Step2: Expansion Permutation
Step3- S Box Substitution
Step4: P Box Permutation

In this step, S Box RPT will be permuted according to the P Box table
and gives rise to P Box RPT.
Step5: XOR
and Swap
3. Final permutation
DES Modes of Operation
• Electronic Codebook (ECB). Each 64-bit block is encrypted and
decrypted independently
• Cipher Block Chaining (CBC). Each 64-bit block depends on the
previous one and uses an Initialization Vector (IV)
• Cipher Feedback (CFB). The preceding ciphertext becomes the input for
the encryption algorithm, producing pseudorandom output, which in
turn is XORed with plaintext, building the next ciphertext unit
• Output Feedback (OFB). Much like CFB, except that the encryption
algorithm input is the output from the preceding DES
• Counter (CTR). Each plaintext block is XORed with an encrypted
counter. The counter is then incremented for each subsequent block
DES: The Data Encryption Standard
• Symmetric block cipher
AES: Advanced Encryption System
• Symmetric block cipher
• Developed in 1999 by
independent Dutch
cryptographers
• Still in common use
DES vs. AES
RSA Algorithm
Public Key (Asymmetric) Cryptography
• Instead of two users sharing one secret key, each user has two
keys: one public and one private.
• Messages encrypted using the user’s public key can only be
decrypted using the user’s private key, and vice versa.
Basics
• RSA algorithm is asymmetric cryptography algorithm. Asymmetric means
that it works on two different keys i.e. Public Key and Private Key. The
Public Key is given to everyone and Private key is kept private.
• An example of asymmetric cryptography :
o A client (for example browser) sends its public key to the server and
requests for some data.
o The server encrypts the data using client’s public key and sends the
encrypted data.
o Client receives this data and decrypts it.
Basics
Key Generation
RSA Encryption
RSA Decryption

𝐶𝑑
RSA Example
Security of RSA
Mathematical Attacks
Timing Attacks
• Consider the secret key = "CHARLES".
Now decrypt the following cipher text using Playfair
Cipher.

PRSBHADGDCBCAZRZVPAMBW
PR
SB
C H A R L
HA
E S B D F DG
DC
G I/J K M N BC
Secret Key = AZ
O P Q T U RZ
VP
V W X Y Z AM
BW
Rules:
If 2 alphabets in same row, write most left alphabet.
If 2 alphabets in same column, write above most alphabet.
If none of above, then make rectangle out of them (alphabet) and write their
opposite corners.
Plain Text TH ES CH EM ER EA LX LY WO RK SX
Cipher Text PR SB HA DG DC BC AZ RZ VP AM BW

Final Plaintext = THE SCHEME REALLY WORKS


• Consider the secret key = "playfair example".
Now encrypt the following plain text using Playfair
Cipher. Also, discuss rules followed in solving the
given problem.

hide the gold in the tree stump


Using "playfair example" as the key (assuming that I and J are interchangeable), the table
becomes (omitted letters in red):

hide the gold in the tree stump

Final Ciphertext = bmodzbxdnabekudmuixmmouvif


Vigenère Cipher
Encryption The plaintext(P) and key(K) are added modulo 26.

Ei = (Pi + Ki) mod 26

Decryption Di = (Ei - Ki) mod 26

• The plaintext is "JAVATPOINT", and the key is "BEST".


Encryption
Decryption
• What is cipher text of following plain text as per vignere
cipher? Keyword: GREEN

HELLOHOWAREYOU
Caesar Cipher
• Identify plain text from cipher text using Caesar
cipher with a shift of 4.

Cipher text: EXXEGOEXSRGI,

P = (C-shift) mod 26
Autokey Cipher
• Generate cipher text from plain text using Auto-key
cipher with initial key of 12.

Plain text: ATTACK SUCCESSFUL


Columnar Transposition Cipher
Row Transposition Cipher
• Bob chooses p=3 and q=11 as two large prime numbers. He also
chooses encryption key as 7. Now assume, Alice wants to send a
message to Bob. Bob received 29 as cipher text from Alice. What is
the decryption key and message sent by Alice to Bob?

n = p*q = 3*11 = 33
ø(n) = (p-1)*(q-1) = 2*10 = 20
choose d such that (d*e) % ø(n) = 1. One solution is d (private key) = 3
Decryption of cipher text (c) = 29 is M = 293 % 33 = 2
• Diffie-Hellman key exchange algorithm with example.
Program Security
Challenges to writing secure
code
Unintentional (Non-
malicious) Programming
Oversights
Non-malicious code
• Caused from a mistake done by a human such as programmers and
developers.
• Many such errors cause program malfunction but do not lead to more
serious security vulnerabilities.

• Program flaws can have two kinds of security implications:


- They can cause integrity problems leading to harmful output or action
- They offer an opportunity for exploitation by a malicious actor
1. Buffer Overflow
2. Incomplete Mediation
3. Time-of-Check to Time-of-Use
4. Undocumented Access Point
5. Off-by-One Error
6. Integer Overflow
7. Unterminated / Null-Terminated String
8. Parameter Length, Type, and Number
9. Unsafe Utility Program
10. Race Condition
 Buffer Overflow
• A buffer overflow occurs when a program or process attempts to
write more data to a fixed-length block of memory, or buffer, than the
buffer is allocated to hold.
• Buffers contain a defined amount of data; any extra data will
overwrite data values in memory addresses adjacent to the
destination buffer.
• That sort of overflow can be avoided if the program includes sufficient
bounds checking to flag or discard data when too much is sent to a
memory buffer.
Buffer Overflow Attack
• Exploiting a buffer overflow allows an attacker to control or crash a process or
to modify its internal variables.
• A threat actor can send carefully crafted input -- referred to as arbitrary
code -- to a program.
• The original data in the buffer includes the exploited function's return pointer
-- the address to which the process should go next.
• However, the attacker can set new values to point to an address of their
choosing. The attacker usually sets the new values to a location where the
exploit payload is positioned.
• This change alters the process's execution path and transfers control to the
attacker's malicious code.
 Incomplete Mediation
- Mediation means checking: the process of intervening to
confirm an actor’s authorization before it takes an
intended action.
- Attackers exploit incomplete mediation to cause security
problems.
• Consider the following URL. In addition to a web address, it contains two parameters,

http://www.somesite.com/subpage/userinput.asp?
parm1=(808)555-1212&parm2=2015Jan17
• As a security professional, you might examine the various parts of the URL to determine what they
mean and how they might be exploited.
• For instance, the parameters parm1 and parm2 look like a telephone number and a date, respectively.
• But what would happen if parm2 were submitted as 1800Jan01? Or 1800Feb30? Or 2048Min32? Or
1Aardvark2Many?
• Something in the program or the system with which it communicates would likely fail. One possibility is
that the system would fail catastrophically, with a routine’s failing on a data type error as it tried to
handle a month named “Min” or even a year (like 1800) that was out of expected range.
• Another possibility is that the receiving program would continue to execute but would generate a very
wrong result.
Solution to incomplete mediation
• Three properties of a reference monitor are
(1) small and simple enough to give confidence of correctness
(2) Unbypassable
(3) always invoked

• These three properties combine to give us solid, complete mediation.


 Time-of-Check to Time-of-Use
• To improve efficiency, modern processors and operating systems usually
change the order in which instructions and procedures are executed.
• In particular, instructions that appear to be adjacent may not actually be
executed immediately after each other, either because of intentionally
changed order or because of the effects of other processes in concurrent
execution.
• Time-of-check-to-time-of-use (pronounced TOCK-too) flaw occurs when a
resource is checked for a particular value, such as whether a file exists or
not, and that value then changes before the resource is used, invalidating
the results of the check.
Example
• Consider a person’s buying a gift that costs $100. The buyer takes out five
$20 bills, carefully counts them in front of the seller, and lays them on the
table.
• Then, the seller turns around to write a receipt. While the seller’s back is
turned, the buyer takes back one $20 bill. When the seller turns around,
the buyer hands over the stack of bills, takes the receipt, and leaves with
the gift.
• Between the time the security was checked (counting the bills) and the
access occurred (exchanging the gift for the bills), a condition changed:
What was checked is no longer valid when the object (that is, the gift) is
accessed.
File Access Data Structure

Unchecked change to work descriptor


 Undocumented Access Point
(Trapdoor)
• During program development and testing, the programmer needs a way to
access the internals of a module. Reasons:
- result is not being computed correctly
- flow of control is not proceeding as it should
• Programmer creates an undocumented entry point or execution mode.
• Such an entry can transfer control to any point with any privileges the
programmer wanted.
Example
• Microsoft’s Excel spreadsheet program, in an old version, Excel 97, had the
following feature.
1. Open a new worksheet
2. Press F5
3. Type X97:L97 and press Enter
4. Press Tab
5. Hold <Ctrl-Shift> and click the Chart Wizard
• A user who did that suddenly found that the spreadsheet disappeared and
the screen filled with the image of an airplane cockpit! Using the arrow
keys, the user could fly a simulated plane through space.
 Off-by-One Error
• When learning to program, neophytes can easily fail with the off-by-one error:
miscalculating the condition to end a loop (repeat while i< = n or i<n? repeat until
i=n or i>n?) or overlooking that an array of A[0] through A[n] contains n+1
elements.
• For example, a program may manage a list that increases and decreases. Think of
a list of unresolved problems in a customer service department: Today there are
five open issues, numbered 10, 47, 38, 82, and 55; during the day, issue 82 is
resolved but issues 93 and 64 are added to the list.
• A programmer may create a simple data structure, an array, to hold these issue
numbers and may reasonably specify no more than 100 numbers. But to help
with managing the numbers, the programmer may also reserve the first position
in the array for the count of open issues.
Example
 Integer Overflow
• An integer overflow occurs because a storage location is of fixed,
finite size and therefore can contain only integers up to a certain limit.
• The overflow depends on whether the data values are signed (that is,
whether one bit is reserved for indicating whether the number is +ve
or -ve).
• When a computation causes a value to exceed one of the limits, the
extra data does not spill over to affect adjacent data items.
• That’s because the arithmetic is performed in a hardware register of
the processor, not in memory.
• Instead, either a hardware program exception or fault condition is
signalled, which causes transfer to an error handling routine, or the
excess digits on the most significant end of the data item are lost.
 Unterminated Null-Terminated
String
• Long strings (variable-length character) are the source of many buffer
overflows.
• Sometimes an attacker intentionally feeds an overly long string into a
processing program to see if and how the program will fail.
• Other times the vulnerability has an accidental cause:
A program mistakenly overwrites part of a string, causing the string to
be interpreted as longer than it really is.
Example
 Parameter Length, Type, and
Number
• Too many parameters. Even though an application receives only three
incoming parameters, for example, that application can incorrectly
write four outgoing result parameters.
• Wrong output type or size. A calling and called procedure need to
agree on the type and size of data values exchanged. If the caller
provides space for a two byte integer but the called routine produces
a four-byte result.
• Too-long string. A procedure can receive as input a string longer than
it can handle, or it can produce a too-long string on output, each of
which will also cause an overflow condition.
 Unsafe Utility Program
• Programming languages, especially C, provide a library of utility
routines to assist with common activities, such as moving and copying
strings.
• In C the function strcpy(dest,src) copies a string from src to dest,
stopping on a null, with the potential to overrun allocated memory.
• A safer function is strncpy(dest, src, max), which copies up to the null
delimiter or max characters, whichever comes first.
 Race Condition
• Two processes are competing within the same time interval, and the
race affects the integrity or correctness of the computing tasks.
• Two devices may submit competing requests to the operating system
for a given chunk of memory at the same time.
• In the two-step request process, each device first asks if the size
chunk is available, and if the answer is yes, then reserves that chunk
for itself.
• Depending on the timing of the steps, the first device could ask for
the chunk, get a “yes” answer, but then not get the chunk because it
has already been assigned to the second device.
Overbooking Example
• A race condition is difficult to detect because it depends on the
order in which two processes execute. But the execution order of
the processes can depend on:
- total load on the system
- amount of available memory space
- priority of each process
- number and timing of system interrupts to the processes

• The likelihood of a race condition increases with this increasing


system heterogeneity.
Malicious Code
• Malicious code is software that performs unauthorized functions
causing the normal operation of an information system to be
abnormal.
• According to SPECTRIA InfoSec Services, malicious code is defined as
“software which interferes with the normal operation of a computer
system” or “software, which executes without the express consent of
the user.”
• The most sophisticated types of threats to computer systems are
presented by malicious codes that exploit vulnerabilities in computer
systems.
Malicious Code
• Any code which modifies or destroys data, steals data, allows
unauthorized access, exploits or damage a system, and does
something that user did not intend to do, is called malicious code.
• There are several types of malicious code such as viruses, worms,
Trojan horses, logic bombs, trapdoors/backdoors and programming
flaws.

• The programming flaws can be included with malicious intent or just


be bad programming practices.
Malicious Code
• Independents
are self contained program that can be scheduled and ran by the
operating system.

• Needs host program


are essentially fragments of programs that can not exist independently
of some actual application program, utility or system program.
Malicious Code
• Trap doors
A trap door is a secret entry point into a program that allows
someone that is aware at the trap door to gain access without going
through the usual security access procedure.
In many cases attacks using trap doors can give a great degree of
access to the application, important data, or given the hosting system.
Trap doors have been used legitimately by programmers to debug
and test programs.
Some of the legitimate reasons for trap doors are:
1. Intentionally leaves them for testing, and make testing easier
2. Intentionally leaves them for covert means of access. In the other words,
allows access in event of errors.
3. Intentionally leaves them for fixing bugs.
But they may use illegitimately, to provide future, illegal access. Trap doors
become threats when they are used by unscrupulous programmers to gain
unauthorized access.

• Back door
is another name for a trap door, back doors provide immediate access to a
system by passing employed authentication and security protocols, Attackers
can use back doors to bypass security control and gain control at a system
without time consuming hacking.
Malicious Code
• Logic Bombs
The logic bomb is code embedded in some legitimate program that
execute when a certain predefined events occurs.
These codes surreptitiously inserted into an application or operating
system that causes it to perform some destructive or security –
compromising activity whenever specified conditions are met.
A bomb may sent a note to an attacker when a user is logged on to
the internet and is using an specific program such as a word
processor, this message informs the attacker that the user is ready for
an attack.
1. Attacker implants logic bomb
2. Victim reports installation
3. Attacker sends attack message
4. Victim dose as logic bomb installation

Notice that this bomb dose not actually begin the attack but tells the attacker
that the victim has met needed state for an attack to begin.
Malicious Code
• Trojan Horses
A malicious, security–breaking program that is disguised as
something benign, such as directory lister, archiver, game, or a
program to find and destroy viruses!"
A Trojan horse is a useful, or apparently useful program or command
procedure containing hidden code that when invoked performs some
unwanted or harmful function.
Trojan Horses can be used to accomplish functions indirectly that an
unauthorized user could not accomplish directly.
for example, to gain access to the files of another user on a shared
system, a user could create a Trojan Horse program that when
executed, changed the invoking user’s file permissions so that the file
are readable by any user.
The program appears to be performing a useful function but it may
also be quietly deleting the victim’s files.
Malicious Code
• Zombie
A zombie is a program that secretly takes over another internet
attached computer and then uses that computer to launch attacks
that are difficult to trace to the zombie’s creator.
Zombies are used in Denial of service attacks, typically against
targeted web sites.
The zombie is planted on hundreds of computers belonging to
unsuspecting third parties and then used to overwhelm the target
website by launching on overwhelming onslaught of internet traffic.
Malicious Code
• Viruses
A cracker program that searches out other programs and 'infects‘
them by embedding a copy of itself in them so that they become
Trojan horses.
When these programs are executed, the embedded virus is executed
too, thus propagating the ' infection ' this normally happens invisibly
to the user.
Unlike a worm, a virus can not infect other computers without
assistance.
It is propagated by vectors such as humans trading programs with
their friends the virus may do nothing but propagate itself and then
allow the program to run normally.
Usually, however, after propagating silently for a while, it starts doing
things like writing cute messages on the terminal or playing strange
tricks with the display.
Many nasty viruses, written by particularly perversely minded
crackers, do irreversible damage, like nuking the entire user’s files...
During its lifetime a typical virus goes through the following four phases:
1- Dormant phase: The virus is idle the virus will eventually be activated by
some event, such as a date. The presence of another program or file, or the
capacity of the disk exceeding some limit, not all viruses have this stage.
2- Propagation phase: The virus places an identical copy of itself into other
programs or into certain system areas on the disk. Each infected program will
now contain a clone of the virus, which will itself enter a propagation phase.
3- Triggering phase: The virus is activated to perform the function for which
it was intended. As with the dormant phase, the triggering phase can be
caused by a variety of system events, including a count of the number of
times that this copy of the virus has made copies of itself.
4- Execution phase: The function is performed. The function may be
harmless, such as a message on the screen, or damaging, such as the
destruction of programs and data files.
• Virus Anatomy,
Virus Structure has four ports
1. Mark can prevent re-infection attempt.
2. Infection Mechanism causes spread to
other files
3. Trigger are conditions for delivering payload
4. Payload is the possible damage to infected
computer
• Program File Viruses
• Memory – resident virus
lodges in main memory as part of a resident system program. From that
point on, virus infects every program that executes.
• Polymorphic virus
creates copies during replication that are functionally equivalents but have
distinctly different bit patterns.
In this case the “signature “of the virus will vary with each copy. To achieve
this variation, the virus may randomly insert superfluous instructions or
interchange the order of independent in-generally called a mutation
engine, creates a random encryption key to encrypt the reminder of the
virus. The key is stored with the virus, and the mutation engine itself is
altered.
When an infected program is invoked, the virus uses the stored random
key to decrypt the virus, when the virus replicates, a different random key
is selected.
• Boot Sector Virus
Boot sector viruses infect the system area of the disk that is read when the
disk is initially accessed or booted. This area can include the master boot
record, the operation system’s boot sector or both.
A virus infecting these areas typically takes the system instructions it finds
and moves them to some other area on the disk. The virus is then free to
place its own code in the boot record.
When the system initializes, the virus loads into memory and simply points
to the new location for the system instructions. The system then boots in a
normal fashion except the virus is now resident in memory.
A boot sector virus can replicate without your executing any programs
from an infected disk. Simply accessing the disk is sufficient.
• Stealth Virus
A format virus explicitly designed to hide itself from detection by antivirus
software.
When the virus is loaded into memory, it monitors system calls to files and
disk sectors, when a call is trapped the, virus modifies the information
returned to the process making the call so that it sees the original
uninfected information. This aids the virus in avoiding detection.
For example many boot sector viruses contain stealth ability. If the infected
disk is booted, programs such as FDISK report a normal boot record. The
virus is intercepting sector calls from FDISK and returning the original boot
sector information.
If you boot the system from a clean floppy disk however, the drive is
inaccessible. If you run FDISK again, the program reports a corrupted boot
sector on the drive.
• Macro Virus
Macro Virus is set of macro commands, specific to an application, which
automatically executes in an unsolicited manner and spread to that application’s
documents.
According to the national computer security agency (www.ncsa.com), macro
viruses now make up two – thirds of all computer viruses.
Macro viruses are particularly threatening for a number of reasons:
1- A macro virus is platform independent. Virtually all of the macro viruses infect
Microsoft word documents. Any hardware platform and operating system that
supports word can be infected.
2- Macro viruses infect documents, not executable portions of code. Most of the
information introduced on to a computer system is in the form of a document
rather than a program.
3- Macro viruses are easily spread. A very common method is by electronic mail.
• Email Virus
A more recent development in malicious software is the e-mail virus.
The first rapidly spreading e-mail viruses, such as Melissa, made use
of a Microsoft word macro embedded in an attachment.
If the recipient opens the e-mail attachment, the word macro is
activated then:
1- The e-mail virus sends itself to everyone on the mailing list in the
user’s e-mail package
2- The virus does local damage
• Worms
A program that propagates itself over a network, reproducing itself as
it goes.
Worm is also self-replicating but a stand-alone program that exploits
security holes to compromise other computers and spread copies of
itself through the network.
Unlike viruses, worms do not need to parasitically attach to other
programs.
Because of the recursive structure of this propagation, the spread
rate of worms is very fast and poses a big threat on the Internet
infrastructure as a whole.
Worms Anatomy

- Mark structurally similar to viruses, except a


stand-alone program instead of program
fragment
- Infection Mechanism searches for weakly
protected computers through a network (i.e.,
worms are network based)
- Triggers are Conditions for delivering payload
- Payload might drop a Trojan horse or
parasitically infect files, so worms can have
Trojan horse or virus characteristics
Detecting and Removing
Malicious Code
Something wasn't right:
• sluggish performance
• too much network activity
• a missing file.
Detecting and Removing
Malicious Code
• Backups and Evidence
If you haven't rebuilt a cracked box.
Lost months worth of data.
Spent precious downtime reconfiguring.

• Detecting Malicious Code


What Do the Logs Say?
How's it Behaving?
Output from Unix command top:
Output from portscan tool nmap:
Simple tcpdump filter designed to ignore standard traffic
Netstat Output
Countermeasures

For Users
• For Developers
• Specifically for Security
• Countermeasures that don’t work

From Security in Computing, Fifth Edition, by Charles P. Pfleeger, et al. (ISBN: 9780134085043).
Countermeasures for Users
User Vigilance
• The easiest control against malicious code is hygiene: not engaging in
behavior that permits malicious code contamination.
• The two components of hygiene are avoiding points of contamination
and blocking avenues of vulnerability.
To avoid contamination,
Use only commercial software acquired from reliable, well-established
vendors.
Test all new software on an isolated computer.
Open attachments—and other potentially infected data files—only when
you know them to be safe.
Install software—and other potentially infected executable code files—
only when you really, really know them to be safe.
Recognize that any website can be potentially harmful.
Make a recoverable system image and store it safely.
Make and retain backup copies of executable system files.
For blocking system vulnerabilities,
As new vulnerabilities become known we should apply patches.
Zero-day attacks are especially problematic, because a vulnerability
presumably unknown to the software writers is now being exploited.
Systems run many different software products from different vendors, but
a vendor’s patch cannot and does not consider possible interactions with
other software.
We should apply all patches promptly except when doing so would cause
more harm than good, which of course you seldom know in advance.
Virus Detectors
• Virus scanners are tools that look for signs of malicious code infection.
Most such tools look for a signature or fingerprint, a telltale pattern in
program files/memory. Limitations of detection tools:
1. Detection tools are necessarily retrospective, looking for patterns of
known infections. As new infectious code types are developed, tools
need to be updated frequently with new patterns.
2. Patterns are necessarily static. If malicious code always begins with, or
even contains, the same four instructions, the binary code of those
instructions may be the invariant pattern for which the tool searches.
Because tool writers want to avoid misclassifying good code as malicious,
they seek the longest pattern they can.
Virus Signatures
• A virus cannot be completely invisible. Code must be stored somewhere,
and the code must be in memory to execute.
• The virus executes in a particular way, using certain methods to spread.
Each of these characteristics yields a telltale pattern, called a signature,
that can be found by a program that looks for it.
• The virus’s signature is important for creating a program, called a virus
scanner, that can detect and, in some cases, remove viruses.
• The scanner searches memory and long-term storage, monitoring
execution and watching for the telltale signatures of viruses.
Code Analysis
• To determine what it does, how it propagates and where it originated.

Compilation and Decompilation Process


• In case of an infestation, an analyst may be called in.
• The analyst starts with code that was actually executing, active in
computer memory, but that may represent only a portion of the
actual malicious package.
• In any event, analysis starts from machine instructions. Using a tool
called a disassembler, the analyst can convert machine-language
binary instructions to their assembly language equivalents, but the
trail stops there.
• These assembly language instructions have none of the informative
documentation, variable names, structure, labels or comments, and
the assembler language representation of a program is much less
easily understood than its higher-level language counterpart.
Storage Patterns
• Most viruses attach to programs that are stored on media such as disks.
The attached virus piece is invariant, so the start of the virus code becomes
a detectable signature.
Countermeasures for Developers
• Software Engineering Techniques
To create a design or code in small, self-contained units, called
components or modules (modular).
If a component is isolated from the effects of other components, then the
system is designed in a way that limits the damage any fault causes
(encapsulation).
When information is hidden, each component hides its precise
implementation or some other design decision from the others. Thus,
when a change is needed, the overall design can remain intact while only
the necessary changes are made to particular components (information
Hiding).
Modularity
Coupling

Encapsulation and Information Hiding


Mutual Suspicion
• Describe the relationship between two programs.
• Mutually suspicious programs operate as if other routines in the
system were malicious or incorrect.
• A calling program cannot trust its called subprocedures to be correct,
and a called subprocedure cannot trust its calling program to be
correct.
• Each protects its interface data so that the other has only limited
access.
• Confinement
Used by an operating system on a suspected program to help ensure that
possible damage does not spread to other parts of a system. A confined
program is strictly limited in what system resources it can access.
• Simplicity
The case for simplicity—of both design and implementation—should be self-
evident:. simple solutions are easier to understand, leave less room for error,
and are easier to review for faults
• Generic Diversity
It reduces the number of targets susceptible to one attack type.
Address-space-layout randomization
Testing
• A process activity that concentrates on product quality: It seeks to locate
potential product failures before they actually occur.
• Security testing tries to anticipate the hundreds of ways a program can fail.
Types:
 Module testing, component testing, or unit testing
 Integration Testing
 Function Testing
 Performance Testing
 Acceptance Testing
 Installation Testing
 Regression Testing
Black box vs White box Testing
• Black-box testing treats a system or its components as black boxes;
testers cannot “see inside” the system, so they apply particular inputs
and verify that they get the expected output.
• White-box testing allows visibility. Here, testers can examine the
design and code directly, generating test cases based on the code’s
actual construction.
Countermeasures Specifically for
Security
• Design Principles for Security
Least privilege
Economy of mechanism
Open design
Complete mediation
Permission based
Separation of privilege
Least common mechanism
Ease of use
• Penetration Testing (Ethical hacking) for Security
It involves the use of a team of experts trying to crack the system being
tested (as opposed to trying to break into the system for unethical
reasons).
Penetration testing is both an art and science. The artistic side requires
careful analysis and creativity in choosing the test cases. But the
scientific side requires rigor, order, precision, and organization.
• A system that fails penetration testing is known to have faults; one
that passes is known only not to have the faults tested for.
• Proofs of Program Correctness
A security specialist wants to be certain that a given program computes
a particular result, computes it correctly, and does nothing beyond
what it is supposed to do.
• Validation
Assuring that the system developers have implemented all
requirements. Different ways:
Requirements checking
Design and code reviews
System testing
• Defensive Programming
Program designers must not only write correct code but must also
anticipate what could go wrong.
value inappropriate for data type
value out of range for given use
value unreasonable
value out of scale or proportion
incorrect number of parameters
incorrect order of parameters
• Trustworthy Computing Initiative
Microsoft company case study of security problem. The analysis and
progress plan became known as the Trusted Computing Initiative. In this
effort all developers underwent security training, and secure software
development practices were instituted throughout the company.
• Design by Contract
Can assist in identifying potential sources of error. The trademarked form
of this technique involves a formal program development approach and
refer to documenting for each program module its preconditions,
postconditions, and invariants.
Countermeasures that don’t
work
• Penetrate-and-Patch
Fails because it is hurried, misses the context of the fault, and focuses on
one failure, not the complete system.
• Security by Obscurity
Things meant to stay hidden seldom do. Attackers find and exploit many
hidden things.

What approaches an attacker can use in case of passwords?


• A Perfect Good-Bad Code Separator
Every program uses memory, activates certain machine hardware, takes
a particular amount of time, additional activities such as reordering a
list or even presenting an output in a particular color.

Halting problem, which asks whether a computer program stops


execution or runs forever.
It is impossible to write a program to solve the halting problem for
any possible program and any possible stream of input.
If we could identify all good programs we would solve the halting
problem, which is provably unsolvable.
Browser
Attacks
Types
• Man-in-the-Browser
Eg. Trojan horse that intercepts data passing through the browser. Code
inserted into the browser can read, copy, and redistribute anything the user
enters in a browser.
• Keystroke Logger
It is either hardware or software that records all keystrokes entered. The
logger either retains these keystrokes for future use by the attacker or sends
them to the attacker across a network connection.
• Page-in-the-Middle
A user is redirected to another page. A page attack might wait until a user
has gone to a particular web site and present a fictitious page for the user.
• Program Download Substitution
Attacker presents a page with a desirable and seemingly innocuous program
for the user to download, for example, a browser toolbar or a photo
organizer utility. A user agreeing to install a program has no way to know
what that program will actually do.
• User-in-the-Middle
A CAPTCHA is a puzzle that supposedly only a human can solve, so a server
application can distinguish between a human who makes a request and an
automated program generating the same request repeatedly.
Eg. web sites that request votes to determine the popularity of television
programs. To avoid being fooled by bogus votes from automated program
scripts, the voting sites sometimes ensure interaction with an active
human by using CAPTCHAs.
How Browser Attacks Succeed:
Failed Identification and
Authentication
• Human Authentication
Driver’s license or identity card, a letter of introduction from a mutual
acquaintance or trusted third party, a picture (for recognition of a face),
a shared secret, or a word.
• Computer Authentication
If a computer’s address or a component’s serial number cannot be
spoofed, that is a reliable authenticator. Computers do not innately
“know” anything, but they can remember or store many things and
derive many more.
• When a user communicates online with a bank, the communication is
really user-to-browser and computer-to-bank’s computer. Your bank
takes steps to authenticate you, but how can you authenticate your
bank?

What are points


where authentication
is vulnerable?
Successful Identification and
Authentication
Shared Secret
• The basic concept is that something only the two entities on the end
should know. To be effective, a shared secret must be something no
malicious middle agent can know.
• Banks and credit card companies struggle to find new ways to make
sure the holder of a credit card number is authentic. The first secret
was mother’s maiden name, which is something a bank might have
asked when someone opened an account. However, when all financial
institutions started to use this same secret, it was no longer as secret.
One-Time Password
• It is good for only one use. To use a one-time password scheme, the
two end parties need to have a shared secret list of passwords.
• When one password is used, both parties mark the word off the list
and use the next word the next time.

Out-of-Band Communication
• Transferring one fact along a communication path separate from that
of another fact. Eg. bank card PINs are always mailed separately from
the bank card so that if the envelope containing the card is stolen, the
thief cannot use the card without the PIN.
Continuous Authentication
• Encryption can provide continuous authentication, but care must be
taken to set it up properly and guard the end points.
• If two parties carry on an encrypted communication, an interloper
wanting to enter into the communication must break the encryption
or cause it to be reset with a new key exchange between the
interceptor and one end. (This latter technique is known as a session
hijack).
Q1: The SilentBanker man-in-the-browser attack depends on malicious
code that is integrated into the browser. These browser helpers are
essentially unlimited in what they can do.
Suggest a design by which such helpers are more rigorously controlled.
Does your approach limit the usefulness of such helpers?
A1:
If a computer responds to a prompt with a user’s password, software can
direct that computer to save the password and later reuse it or repeat it to
another process, as was the case with the SilentBanker man-in-the-
browser attack.
If authentication involves computing a cryptographic result, the encryption
key has to be placed somewhere during the computing, and it might be
susceptible to copying by another malicious process.
Or on the other end, if software can interfere with the authentication-
checking code to make any value succeed, authentication is compromised.
Thus, vulnerabilities in authentication include not just the authentication
data but also the processes used to implement authentication
Q2:A cryptographic nonce is important for confirming that a party is
active and fully participating in a protocol exchange. One reason
attackers can succeed with many web-page attacks is that it is relatively
easy to craft authentic-looking pages that spoof actual sites.
Suggest a technique by which a user can be assured that a page is both
live and authentic from a particular site. That is, design a mark, data
interchange, or some other device that shows the authenticity of a web
page.
A2:
Before giving any information to a website, you should make sure it is
secure. Below are some quick tips that you can use to tell if a site is
secure.
Check the SSL Certificate. Look at the URL of the website. If it begins
with “https” instead of “http” it means the site is secured using an SSL
Certificate (the s stands for secure). SSL Certificates secure all of your
data as it is passed from your browser to the website’s server.
To get an SSL Certificate, the company must go through a validation
process.
Web Attacks
targeting Users
 False or Misleading Content
• Defaced Web Site
Occurs when an attacker replaces or modifies the content of a
legitimate web site.
For example, in January 2010, BBC reported that the web site of
the incoming president of the European Union was defaced to
present a picture of British comic actor Rowan Atkinson (Mr. Bean)
instead of the president.

How nature and objectives of attack varies?


• Fake Website
• Fake Code
Protecting Web Sites Against
Change
• Integrity Checksums
A checksum is hash code, or error detection code is a
mathematical function that reduces a block of data (including an
executable program) to a small number of bits.
Changing the data affects the function’s result in mostly
unpredictable ways, meaning that it is difficult to change the
data in such a way that the resulting function value is not
changed.
• Signed Code or Data
A partial approach to reducing the risk of false code is signed
code. Users can hold downloaded code until they inspect the
seal. After verifying that the seal is authentic and covers the
entire code file being downloaded, users can install the code
obtained.
A digital signature can vouch for the authenticity of a program,
update, or dataset. The problem is, trusting the legitimacy of the
signer.
 Malicious Web Content
• Substitute Content on a Real Web Site
• Web Bug
A web page is made up of many files: some text, graphics,
executable code, and scripts.
When the web page is loaded, files are downloaded from a
destination and processed; during the processing they may
invoke other files (perhaps from other sites) which are in turn
downloaded and processed, until all invocations have been
satisfied.
When a remote file is fetched for inclusion, the request also
sends the IP address of the requester, the type of browser, and
the content of any cookies stored for the requested site.
• Clickjacking
Tricking a user into clicking a link by disguising what the link points
to.

Why this Attack succeeds? Facebook Clickjack Attack


• Drive-By Download
An attack in which code in downloaded, installed, and executed
on a computer without the user’s permission and usually without
the user’s knowledge.
Example - In April 2011, a web page from the U.S. Postal Service
was compromised with the Blackhole commercial malicious-
exploit kit. Clicking a link on the postal service web site
redirected the user to a web site in Russia, which presented what
looked like a familiar “Error 404— Page Not Found” message, but
instead the Russian site installed malicious code carefully
matched to the user’s browser and operating system type
Protecting Against Malicious
Web Pages
• Access control accomplishes separation, keeping two classes of
things apart.
• Users download code to add new applications, update old ones, or
improve execution. Additionally, often without the user’s
knowledge or consent, applications, including browsers, can
download code either temporarily or permanently to assist in
handling a data type.
• The relevant measures here would include least privilege, user
training, and visibility.
• Responsibility of the web page owner
Ensure that code on a web page is good, clean, or suitable.
Code on web pages can come from many sources: libraries,
reused modules, third parties, contractors, and original
programming.
Website owners focus on site development, not maintenance.
Even if code on a site was good when the code was first made
available for downloads, few site managers monitor over time to
be sure the code stays good.
Obtaining User or
Website Data and
Email Attacks
Obtaining User or Website Data
Code Within Data
1. Cross-Site Scripting
• Executable code is included in the interaction between client and
server and executed by the client or server.
• Eg., a Google search on the string “cross site scripting” becomes

http://www.google.com/search?q=cross+site+scripting
&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official
&client=firefox-a&lr=lang_enent or server.
2. SQL Injection
• Operates by inserting code into an exchange between a client and
database server. Eg., Bank application
3. Dot-Dot-Slash
• Enter the dot-dot. In both Unix and Windows, ‘..’ is the directory
indicator for “predecessor.” And ‘../..’ is the grandparent of the current
location.
• So someone who can enter file names can travel back up the
directory tree one .. at a time.
• Eg., passing the following URL causes the server to return the
requested file, autoexec.nt, enabling an attacker to modify or delete
it.
4. Sever-Side Include
• Web pages can be organized to invoke a particular function
automatically. For example, many pages use web commands to send
an email message in the “contact us” part of the displayed page.
• One of the server-side include commands is exec, to execute an
arbitrary file on the server.
 Website Data: A User’s Problem, Too

• Some website data affect users significantly. Consider one of the most
common data items that web sites maintain: user IDs and passwords.
• Faced with many passwords to remember, users skimp by reusing the
same password on multiple sites. Even that reuse would be of only
minor consequence if websites protected IDs and corresponding
passwords.
• Websites’ ID and password tables are both valuable to attackers and
frequently obtained. Even if it is the website that is attacked, it is the
users who suffer the loss.
 Foiling Data Attacks

• Depend on passing commands disguised as input. Countermeasures:


• An input preprocessor could watch for and filter out specific
inappropriate string forms, such as < and > in data expected to
contain only letters and numbers.
• Access control on the part of backend servers that might receive and
execute these data attacks. For example, a database of names and
telephone numbers might support queries for a single person.
Email Attacks
Fake Email
Fake Email Messages as Spam
• False messages try to get people to click to download a browser
enhancement or even just click for more detail. Spammers use more
realistic topics for false messages to entice recipients to follow a
malicious link. Types:
fake “nondelivery” messages
false social networking messages, especially attempts to obtain login
details
current events messages
shipping notices
• Volume of Spam
• Why Send Spam?
• Pump and Dump
• Advertising
• Malicious Payload
• Links to Malicious Web Sites
• The Price Is Right
• How to eliminate/reduce spams: Legal, Source Addresses, Screeners,
Volume Limitations, Postage
Fake (Inaccurate) Email Header Data
• Headers on email are easy to spoof, and thus recipients believe the
email has come from a safe source.
• The header form is standardized, but within the Internet email
network as a message is forwarded to its destination, each receiving
node trusts the sending node to deliver accurate content.
• However, a malicious, or even faulty, email transfer agent may send
messages with inaccurate headers, specifically in the “from” fields.
Phishing
Protecting Against Email
Attacks
• PGP (Pretty Good Privacy)
It addresses the key distribution problem with a “ring of trust” or a
user’s “keyring.”
One user directly gives a public key to another, or the second user
fetches the first’s public key from a server.
And one person can give a second person’s key to a third (and a fourth,
and so on).
Thus, the key association problem becomes one of caveat emptor. If I
trust you, I may also trust the keys you give me for other people.
PGP performs following:

1. Create a random session key for a symmetric algorithm.


2. Encrypt the message, using the session key (for message
confidentiality).
3. Encrypt the session key under the recipient’s public key.
4. Generate a message digest or hash of the message; sign the hash by
encrypting it with the sender’s private key (for message integrity and
authenticity).
5. Attach the encrypted session key to the encrypted message and digest.
6. Transmit the message to the recipient.
• S/MIME (Secure Multipurpose Internet Mail
Extensions)
Uses hierarchically validated certificates, usually represented in X.509
format, for key exchange.
Thus, with S/MIME, the sender and recipient do not need to have
exchanged keys in advance as long as they have a common certifier they
both trust.
S/MIME handles (secures) all sorts of attachments, such as data files
(for example, spreadsheets, graphics, presentations, movies, and
sound).
TOP
Web Security Issues and
Solutions
Issue 1:
SQL
Injections
• Restrict searches for users.
• Don’t allow freeform input by users.
• Validate all data server-side.
• Clearly define who can and can’t access the data.
Issue 2:
Cross-Site
Scripting (XSS)
Attacks
• Validate all client-side inputs.
• Use properly configured firewalls.
• Update your software and anti-malware.
• Use a strong content security policy.
Issue 3:
Secure
Authentication
• Require use of strong passwords (which should never
be shared).
• Use passwordless authentication.
• Implement stringent session management.
• Set unique session keys.
• Don’t use session IDs in URLs.
• Limit login attempts.
• Don’t open links from unknown sources.
Issue 4: Sensitive data
Exposure
The sensitive data you need to protect includes but is not limited to:

 Personally identifiable information (PII) of employees, customers,


and partners
 Financial information of the organization or customers
 Trade secrets, intellectual property, and other sensitive company
documents
 Customer and supplier lists
• Use strong TLS certificates for data in motion.
• Protect data at rest.
• Secure your network.
• Implement a zero-trust model for information
sharing.
• Use security automation.
Security in
Operating System
 Operating System Structure
OS functions that involve computer
security
1. Enforced sharing
2. Interprocess communication and synchronization
3. Protection of critical operating system data
4. Guaranteed fair service
5. Interface to hardware
6. User authentication
7. Memory protection
8. File and I/O device access control
9. Allocation and access control to general objects
 A Bit of History

Single Users

Multiprogramming and Shared Use

Multitasking
 Protected Objects
The rise of multiprogramming meant that several aspects of a
computing system required protection:
memory
sharable I/O devices, such as disks
serially reusable I/O devices, such as printers and tape drives
sharable programs and subprocedures
networks
sharable data
Operating System Design to Protect Objects

Figure: Layered Operating System


Authentication Functions Spanning Layers in an
Operating System
Operating System Modules
Operating System Design for Self-Protection

• The operating system must protect itself in order to protect its users
and resources.

Figure: OS loaded in stages


 Operating System Tools to
Implement Security Functions
• Audit
Audit logs show what happened in an incident; analysis of logs can
guide prevention of future successful strikes.
• Virtualization
Virtual Machine
Presenting a user the appearance of a system with only the resources
the user is entitled to use.
• Hypervisor
software that implements a virtual machine.
• Sandbox
An environment from which a process can have only limited, controlled
impact on outside resources.
• Honeypot
System to lure an attacker into an environment that can be both
controlled and monitored.
How OS can control sharing?
• Separation and Sharing
Separation occurs by space (physical), time (temporal), access control
(logical), or cryptography. So, OS offer protection at any of several
levels:
Do not protect
Isolate
Share all or share nothing
Share but limit access
Limit use of an object
Hardware Protection of Memory
• Fence
• Base/Bound Register

When two pairs of base/bound registers are used?


• Tagged Architecture
• Virtual Memory - Segmentation
Segment Address Translation

Advantages of hiding
addresses?

Security benefits of
Segmentation?
• Virtual Memory - Paging
• Combined Paging with Segmentation
Security in
design of OS
• Simplicity of Design
• Layered Design
 Layered Trust
Separation: physical, temporal, logical, and cryptographic
Encapsulation: Each layer uses the more central layers as services,
and each layer provides a certain level of functionality to the
layers farther out
Damage control: possible with hierarchical structuring
• Kernelized Design
Security kernel: locus of all security enforcement
Coverage
Separation
Unity
Modifiability
Compactness
• Reference Monitor
• Correctness and Completeness
• Secure Design Principles
least privilege
economy of mechanism
open design
complete mediation
permission based
separation of privilege
least common mechanism
ease of use
• Trusted system
one with evidence to substantiate the claim it implements some
function or policy. To trust any program, we looking for certain key
characteristics:
Functional correctness
Enforcement of integrity
Limited privilege
Appropriate confidence level
• Trusted System Functions
Trusted Computing Base (TCB)
Everything necessary for a system to enforce its security policy. It
constitute:
hardware, including processors, memory, registers, a clock, and I/O devices
some notion of processes, so that we can separate and protect security-
critical processes
primitive files, such as the security access control database and
identification and authentication data
protected memory, so that the reference monitor can be protected against
tampering
some interprocess communication
System separated into TCB and non-TCB sections
• TCB Design and Implementation
• Secure Startup
Secure startup ensures no malicious code can block or interfere with
security enforcement.
• Trusted Path
A trusted path precludes interference between a user and the security
enforcement mechanisms of the operating system.
• Object Reuse
Object sanitization ensures no leakage of data if a subject uses a
memory object released by another subject.
• Audit
Trusted systems must also track any security relevant changes, such as
installation of new programs or modification to the operating system.
Rootkit
• Root: most privileged subject (in a Unix system)
• Rootkit: Tool or script that obtains privileges of root
Phone Rootkit
Rootkit Evades Detection
 Antivirus tools (and most programs) do not contain code to query the disk,
determine the disk format, identify files and where they are stored, find the file
names and properties from an index table, or structure the results for use and
display.
 Instead the tools call builtin functions through an application programming
interface (API) to get this information. What if malicious code intruded on that
sequence of calls?
OS Security Exercise
• If two users share access to a segment, they must do so
by the same name. Must their protection rights to it be
the same? Why or why not?
• No.

For example, a data table might have shared access by


many users. To facilitate maintenance of integrity, all
table modifications may be done by one user. However,
many other users could have read access to the table.
• What are some other modes of access that users might
want to apply to code or data, in addition to the
common read, write, and execute permission?
• Limit the number of concurrent accesses;
• Limit types of processes that can access;
• Limit times of day for access.
• Which approach is used to restricting system access to
authorized users.

a) Role-based access control


b) Process-based access control
c) Job-based access control
d) None of the mentioned
• The protection domain of a process contains
_____________

a) object name
b) rights-set
c) both object name and rights-set
d) none of the mentioned
• Explain how a fence register is used for relocation of a
user’s program.
• The address in the fence register is the starting address
of the user space. Thus, the user program can be
written relative to address 0. Adding the fence register’s
contents will properly relocate the user’s address
references.
• Give an example of an object whose sensitivity may
change during execution.
• One example is a printer that is used to print both
confidential and non-confidential data.
• Another example is a portion of unused disk space that
would initially have low sensitivity. However, once the
space is assigned to an active file, it would acquire a
different sensitivity value, depending on the sensitivity
of the data in the file.
• Why should the directory of one user not be generally
accessible to other users (not even for read-only
access)?
• The knowledge of the existence of certain objects should
not be available to unauthorized users.
• For example, a knowledge that Jones and Smith are
working together on a project (as evidenced by shared
access to many files) might be sensitive.
• Sometimes, testing or development versions of hardware
components or software systems should not be known by
all users.
• List two disadvantages of using physical separation in a
computing system. List two disadvantages of using
temporal separation in a computing system.
• Disadvantages (of both forms of separation):
Inability to share
Inconvenience to users
Record keeping burden
Inefficient resource utilization
PRIVACY
 Privacy Concepts
• Aspects of Information Privacy
1. Controlled Disclosure
2. Sensitive Data
3. Affected Subject
Controlled Disclosure
• Privacy is the right to control who knows certain things about you.
• People may ask you for your telephone number: your auto mechanic,
a shop clerk, your tax authority, a new business contact, or a new
friend.
• In each case, you consider why the person wants the number and
then decide whether to give it out.
• But the key point is that you decide.
Sensitive Data
• Identity
• Finances
• Legal
• Health
• Opinions, preferences, and membership
• Biometrics
• Documentary evidence
• Privileged communications
• Academic and employment information
• Location data
• Digital footprint
Affected Subject
• Companies may have data they consider private or sensitive: product
plans, key customers, profit margins, and newly discovered
technologies, as examples.
• For private enterprise, privacy usually relates to gaining and
maintaining an edge over the competition.
• Other organizations, such as schools, hospitals, or charities, may need
to protect personal data about their students, patients, or donors.
Computer-Related Privacy
Problems
1. Information collection
2. Information usage
3. Information retention
4. Information disclosure
5. Information security
6. Access control
7. Monitoring
8. Policy changes
Data Collection
• Capacities of computer storage devices continue to grow, driving the
cost per byte down.
• Availability of massive, inexpensive storage encourages collecting and
saving data.

Google had 17 data centers in 2014, accounting for 0.01 percent of the
world’s total energy usage.
Microsoft has over a billion users and over 100,000 servers.
Notice and Consent
• Notice of collection and consent to allow collection of data are
foundations of privacy.
Telephone companies record the date, time, duration, source, and
destination of each telephone call.
ISPs track sites visited.
Some sites keep the IP address of each visitor to the site.
The user is not necessarily aware of this third category of data collection and
thus cannot be said to have given informed consent to the collection.
Control and Ownership of Data
• Disseminated data are almost impossible to get back.

• In many instances, you are asked to provide data (with proper notice)
and you consent to do so, explicitly or implicitly. But what happens
when the data are transferred to the requesting person or system?
• Having collected data with your permission, others may keep the data
you give them; you have ceded control (and sometimes ownership,
depending on the law in your region) of that copy of the data to
them.
 Privacy Principles and Policies
• Fair Information Practices
• U.S. Privacy Laws
• Controls on U.S. Government Websites
• Controls on Commercial Websites
• Non-U.S. Privacy Principles
• Individual Actions to Protect Privacy
• Governments and Privacy
• Identity Theft
Fair Information Practices
• Collection limitation.
• Data quality.
• Purpose specification.
• Use limitation.
• Security safeguards.
• Openness.
• Individual participation.
• Accountability.

Ways to protect stored data?


U.S. Privacy Laws
• 1974 Privacy Act: It is the strongest U.S. privacy law because of its breadth:
It applies to all personal data held anywhere in the federal government.
• Privacy laws in the United States vary by municipality and state; few
national laws exist.

consumer credit is addressed in the Fair Credit Reporting Act,


healthcare information in the Health Insurance Portability and Accountability Act
(HIPAA),
financial service organizations in the Gramm–Leach–Bliley Act (GLBA),
children’s web access in the Children’s Online Privacy Protection Act (COPPA),
student records in the Federal Educational Rights and Privacy Act
Controls on U.S. Government
Websites
• The Federal Trade Commission (FTC) has jurisdiction over websites,
including those of the U.S. government, that solicit potentially private
data.
• The FTC determined that, in order to obey the Privacy Act,
government websites would have to address five privacy factors:
Notice. Choice. Access. Security. Enforcement.

• What need to be disclosed by privacy policies of federal government


agencies as per e-Government Act of 2002 by U.S. Congress ?
Controls on Commercial Websites
No Deceptive Practices
• Privacy notices are enforceable: A site that says it will not release data
must abide by that rule, but a site that says nothing is not
constrained.
• This approach can lead to bizarre results, however. A company is
allowed to collect personal information and pass it in any form to
anyone, as long as the company’s privacy policy said it would do so, or
at least if the policy does not say it would not do so. Vowing to
maintain privacy and intentionally not doing so is an illegal deceptive
practice.
Non-U.S. Privacy Principles
• European Privacy Directive
provides strong protection for privacy rights, binding on governments,
businesses, and other organizations.

• Privacy in Other Countries


http://www.informationshield.com/intprivacylaws.html

• Conflicting Laws
Different laws in different jurisdictions will inevitably clash.
Individual Actions to Protect
Privacy
• Anonymity
For example, a rock star buying a beach house might want to avoid
unwanted attention from neighbors.
• Multiple Identities—Linked or Not
To your bank, you are your account number. To your motor vehicles bureau,
you are your driver’s license number. And to your credit card company, you
are your credit card number.
• Pseudonymity
Multiple identities can also be convenient; Similarly, disposable identities
(that you use for a while and then stop using) can be convenient.
Governments and Privacy
• Authentication
• Data Access Risks
• Steps to Protect Against Privacy Loss
Data minimization. Data anonymization. Auditing. Security and controlled
access. Training. Quality. Restricted usage. Data left in place. Policy.

State laws require notification of loss of personal data as a result of a


computer incident.
Identity Theft
• Taking or assuming another person’s identity.
• Example, using another person’s credit card without permission is
fraud.
• It occurs in many ways:
1. unauthorized opening of an account in someone else’s name,
2. changing account information to enable the thief to take over and
use someone else’s account or service,
3. perpetration of fraud by obtaining identity documents in the stolen
name.
PRIVACY

Authentication, Data Mining, Web, Email Security, Emerging


Technologies, Where the Field Is Headed
 Authentication and Privacy
• Individual Authentication
When you are born, your birth is registered at a government records office, and the
office issues a birth certificate to your parents. A few years later, your parents enroll
you in school, presenting the birth certificate so that the school can issue you a
school identity card.
• Identity Authentication
We use many different identities. There may or may not be ways to connect all
these different identities. A credit card links to the name and address of the card
payer, who may be you, your spouse, or anyone else willing to pay your expenses.
• Anonymized Records
Sometimes, individual data elements are not sensitive, but the linkages
among them are.
For instance, some person is named Erin, some person has the medical
condition diabetes; neither of those facts is sensitive. The linkage that Erin
has diabetes becomes sensitive.

Medical researchers want to study populations to determine incidence of


diseases, common factors, trends, and patterns. To preserve privacy,
researchers often deal with anonymized records: records from which
identifying information has been removed. If those records can be
reconnected to the identifying information, privacy suffers.
 Data Mining
• Private sector data mining is a lucrative and rapidly growing industry. The
more data are collected, the more opportunities open for learning from
various aggregations.
• Determining trends, market preferences, and characteristics may be good
because they lead to an efficient and effective market.

• Government Data Mining


• Privacy-Preserving Data Mining
1. Privacy for Correlation
2. Privacy for Aggregation
 Privacy on the Web
• Understanding the Online Environment
The Internet is like a big, unregulated bazaar. Every word you speak can be
heard by many others.

• Payments on the Web


Credit Card Payments
Payment Schemes

• Site and Portal Registrations


• Whose Page Is This?
Third-Party Ads
Contests and Offers

• Precautions for Web Surfing


Cookies are files of data put in place by a website. Third-party cookies permit
an aggregator to link information from a user’s visit to websites of different
organizations. There is online profiling. Sensitive information, such as credit
card number or even name and address, should be encrypted or otherwise
protected in the cookie.
Web Bugs invisible graphics embedded in an image that resides on a web page.
Solution is not to restrict the image but to restrict the action the bug can invoke.
However, restricting web bugs also restricts the richness of content display.
Spyware collects and reports activity by web users. Keystroke loggers
can seriously compromise privacy by obtaining passwords, bank account
numbers, contact names, and web-search arguments.
Hijackers Another category of spyware is software that hijacks a
program installed for a different purpose. The privacy issue for a service
such as Altnet is that even if a user authorizes use of spare computing
power or sharing or files or other resources, there may be no control
over access to other sensitive data on the user’s computer.
Adware displays selected advertisements in pop-up windows or in the
main browser window. Writers of adware software are paid to get their
clients’ ads in front of users. It is usually installed as part of another
piece of software without notice.
• Shopping on the Internet

Web merchants are under no obligation to price products the same for all
customers, or the same as other sellers price the same product.

Example is Amazon.com, which priced a DVD at 30 percent, 35 percent,


and 40 percent off list price concurrently to different customers.
A fair market occurs when seller and buyer have complete knowledge: If
both can see and agree with the basis for a decision, each knows the
other party is playing fairly.
 Email Security
• Where Does Email Go, and Who Can Access It?
Mail from Janet to Scott can easily involve at least six parties: (a) Janet and her computer,
(b) Janet’s organization’s SMTP server, (c) Janet’s organization’s ISP, (d) the ISP
connecting to Scott’s POP server, (e) Scott’s POP server, and (f) Scott and his computer.
Any of them can log the fact it was sent or can even keep a copy of the message .
• Interception of Email
Email is subject to interception and modification at many points from sender to recipient.
S/MIME and PGP are two widely used email protection programs. A virtual private
network can protect data on the connection between a client’s workstation and some
edge point, usually a router or firewall, at the organization to which the client belongs.
• Monitoring Email
In many countries, companies and government agencies can legitimately
monitor their employees’ email use. Similarly, schools and libraries can
monitor their students’ or patrons’ computer use. Network administrators
and ISPs can monitor traffic for normal business purposes, such as to
measure traffic patterns or to detect spam.

• Anonymous, Pseudonymous, and Disappearing Email


1. Simple Remailers
2. Multiple Remailers
3. Disappearing Email
• Spoofing and Spamming
Spoofing the source address of an email message is not difficult. This
limitation facilitates the sending of spam because it is impossible to
trace the real sender of a spam message.

Phishing is a form of spam in which the sender attempts to convince


the receiver to reveal personal data, such as banking details. The
sender enhances the credibility of a phishing message by spoofing a
convincing source address or using a deceptive domain name.

User awareness is the best defense.


 Privacy Impacts of Emerging
Technologies
• Radio Frequency Identification (RFID)
Consumer Products
Your shirt, shoes, pen, wallet, credit card, mobile phone, media player, and candy bar
wrapper might each have an RFID tag. One tag from an employee ID might reveal for
whom you work, another from a medicine bottle might disclose a medical condition.
RFID Tags for Individuals
Some people with an unusual medical condition have already had an RFID tag
permanently implanted on their bodies. This way, even if a patient is brought
unconscious to a hospital, the doctors can scan for a tag, receive the person’s unique
number, and look up the person’s medical record by that number.
• Electronic Voting
Privacy and the Voting Process
Generating and counting ballots is the most obvious step in the election
process; building and maintaining the list of eligible voters, recording who
has voted, supporting absentee ballots, and transmitting election results to
election headquarters are other important steps. Each of these has obvious
privacy implications.

Privacy-Preserving Technology
Encrypting a vote with the public key of the election board, could preserve
confidentiality. The difficulty is in ensuring that only authorized people can
vote and that an authorized person can vote only once .
• VoIP and Skype
Cellular telephony and Internet-based phone service have significantly
changed the situation of traditional telephony. Voice over IP (VoIP) is a
protocol for transmission of voice traffic over the Internet.
Major VoIP carriers include Skype, Google Talk, and Vonage.
Privacy can be sacrificed even if the voice traffic is solidly encrypted,
the source and destination of the phone call will be somewhat exposed
through packet headers.

• Privacy in Cloud
 Where the Field Is Headed
• Various privacy rights organizations, such as the Center for Democracy and Technology,
the Electronic Privacy Information Center (EPIC), Privacy.Org, and Privacy International,
and professional computing societies, such as IEEE and ACM, must continue their efforts.
• The Johns Hopkins Information Security Institute, of which Rubin is Technical Director,
has produced several good studies of privacy vulnerabilities.
• Annie Antón of Georgia Institute of Technology has developed tools to analyze privacy
policies.
• Bob Gellman is a well-respected consultant on privacy issues.
• IEEE Security & Privacy magazine has at least one article about privacy in every issue, in
its Privacy Interests department.

You might also like