Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
AND
NETWORK SECURITY
UNIT - I
Computer Security
It
Levels of Impact
Levels
Low
Moderate
High
Low Impact
Moderate Impact
The loss could be expected to have a serious adverse effect on
organizational operations, organizational assets, or individuals.
A serious adverse effect means that, for example, the loss
might
(i)
(ii)
(iii)
(iv)
High Impact
The loss could be expected to have a severe or catastrophic
adverse effect on organizational operations, organizational
assets, or individuals.
A severe or catastrophic adverse effect means that, for
example, the loss might
(i)
Cause a severe degradation in or loss of mission
capability to an extent and duration that the organization is
not able to perform one or more of its primary functions;
(ii)
Result in major damage to organizational assets;
(iii)
Result in major financial loss; or
(iv)
Result in severe or catastrophic harm to individuals
involving loss of life or serious life threatening injuries.
Security Requirements
Confidentiality student grades
Integrity patient information
Availability authentication service
Authenticity admission ticket
Non-repudiation stock sell order
Aspects of Security
consider 3 aspects of information security:
Security attack
Security mechanism (control)
Security service
Terms
Fabricate message
Modify message
Handling Attacks
Security Service
Security Services
X.800:
Security Mechanism
feature
cryptographic techniques
2.
3.
4.
1.
2.
2.
3.
SESSION HIJACKING
It means stealing of the session-id and using it to impersonate and
access data
It is a passive attack and is difficult to detect
Attack Methods
Guessing Session Id
Session Fixing
Session Sniffing
Defence Methods
Re-generating session-ids
difficult to sniff
Input validation
SPOOFING
Spoofing
Protocol Spoofing
DNS Spoofing
MAC Spoofing
PROTOCOL SPOOFING
DNS SPOOFING
MAC SPOOFING
SOFTWARE VULNERABILITIES
BUFFER OVERFLOW
HEAP OVERFLOW
FORMAT STRING VULNERABILITIES
BUFFER OVERFLOW
Lower
memory
addresses
Higher
memory
addresses
A process in memory:
- text (Program code; marked
read-only, so any attempts to
write to it will result in
segmentation fault)
- data segment (Global and
static variables)
- stack (Dynamic variables)
The process is blocked and is
rescheduled to run again with a
larger memory space if the user
attack exhausts available memory.
Stack Basics
Stack Basics
Lower memory
addresses
High memory
addresses
void function(){
return;
}
void main(){
..
Function();
..
}
top of
memory
buffer1 sfp ret a b c
][
][ ][ ][ ][ ][ ]
bottom of stack
We want:
bottom of
memory
top of
memory
bottom of
stack
HEAP OVERFLOW
A heap overflow is a type of buffer overflow that
occurs in the heap data area.
output
passed as
%d
decimal (int)
value
%u
unsigned decimal
(unsigned int)
hexadecimal (unsigned
int)
string ((const) (unsigned)
char *)
value
reference
%x
%s
%n
value
reference
&a
Vulnerable Type
Type 1:
char tmpbuf[512];
snprintf (tmpbuf, sizeof (tmpbuf), "foo: %s", user);
tmpbuf[sizeof (tmpbuf) - 1] = \0;
syslog (LOG_NOTICE, tmpbuf);
Type 2:
Vulnerable Type(Solution)
Type 1:
Type 2:
%08x.%08x.%08x.%08x);
AAA0_08048560.4000d360.40027154.
30414141.3830255f.30252e78.252e7838
.2e783830
Exploitation
Primarily
SQL INJECTION
SQL Injection is a technique that can be
used to attack on data driven applications.
It will occurs when developers fails to
validate user input before using it to query
a relational database. This is mostly
known as an attack for websites but can
be used to attack any type of SQL
database.
PHISHING
Phishing
BASICS OF CRYPTOGRAPHY
Deciphering
or decryption:
plaintext from ciphertext
Decryption algorithm:
recovering
performs decryption
Secret key:
: a scheme
Cryptanalysis:
Cryptology:
cryptography + cryptanalysis
61
Ciphers
Symmetric Encryption
or conventional /
secret-key / single-key
sender and recipient share a common key
all classical encryption algorithms are
symmetric
The only type of ciphers prior to the
invention of asymmetric-key ciphers in
1970s
by far most widely used
63
Requirements
two requirements for secure use of
symmetric encryption:
is known
implies a secure channel to distribute key
Cryptography
can characterize by:
Caesar Cipher
earliest known substitution cipher
by Julius Caesar
first attested use in military affairs
replaces each letter by 3rd letter on
example:
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
d e f
3 4 5
p q
15 16
g h i
6 7 8
r s
17 18
j k l m
9 10 11 12
t u v w x y Z
19 20 21 22 23 24 25
Cryptanalysis of Caesar
Cipher
A maps to A,B,..Z
Monoalphabetic Cipher
Monoalphabetic Cipher
Security
!!!WRONG!!!
problem is language characteristics
Use in Cryptanalysis
Playfair Cipher
not even the large number of keys in a
keyword
fill in letters of keyword (sans duplicates)
fill rest of matrix with other letters
eg. using the keyword MONARCHY
MONAR
CHYBD
EFGIK
LPQST
UVWXZ
2.
3.
4.
Polyalphabetic Ciphers
Vigenre Cipher
simplest polyalphabetic substitution cipher
Example
plaintext letter
hence letter frequencies are obscured
but not totally lost
start with letter frequencies
One-Time Pad
if a truly random
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
a number of rows
then read off cipher row by row
eg. write message out as:
m e m a t r h t g p r y
e t e f e t e o a a t
giving ciphertext
MEMATRHTGPRYETEFETEOAAT
Rotor Machines
Steganography
an alternative to encryption
hides existence of message
has drawbacks
Fall, 2005
into
blocks, each of which is then en/decrypted
like a substitution on very big characters
64-bits or more
stream ciphers
Block Ciphers
Permutation
1
2
3
4
1
2
3
4
Block of ciphertext
Key
Add some secret
key bits
toS-box
provide
Each
permutes
confusion
its input bits in a
random-looking way
to provide diffusion
(spread plaintext bits
throughout ciphertext)
Procedure must be
reversible
(for decryption)