UNIT-4 Notes
UNIT-4 Notes
UNIT-IV
Syllabus:
Security Technology: Intrusion detection, Access control and other security
tools: Intrusion detection and prevention systems, Scanning and analysis tools,
Access control devices.
Cryptography: Foundations of cryptology, cipher methods, cryptographic
Algorithms, Cryptographic tools, Protocols for secure communications, Attacks on
cryptosystems
Objective: Introduces IDPS, Access controls and Foundations of Cryptography
Outcome: Usage of reactive solutions, network perimeter solution tools such as
firewalls, host solutions such as antivirus software and Intrusion Detection techniques
and knowledge of ethical hacking tools.
Intrusion Detection and Prevention Systems (IDPS)
Introduction:
• Technical solutions that are guided by policy with properly implementation are
essential to an information security program.
• Advanced technologies can be used to enhance the security of information
assets.
Some important intrusion prevention activities are writing and implementing good
enterprise information security policy, planning and executing effective information
security programs, installing and testing technology-based information security
counter measures (such as firewalls and intrusion detection systems), and
conducting and measuring the effectiveness of employee training and awareness
activities.
Intrusion detection systems (IDSs) became commercially available in the late 1990s.
IDPS terminology
According to the NIST documentation on industry best practices, there are several
compelling reasons to acquire and use an IDPS:
One of the best reasons to install an IDPS is that they serve as deterrents by
increasing the fear of detection among would-be attackers.
Another reason to install an IDPS is to cover the organization when its network cannot
protect itself against known vulnerabilities or is unable to respond to a rapidly
changing threat environment.
Types of IDPS:
• Network-bases IDPS
• Host-based IDPS.
The wireless IDPS focuses on wireless networks, while the NBA IDPS examines traffic
flow on a network in an attempt to recognize abnormal patterns like DDoS, malware,
and policy violations.
NIDPS
• When examining packets, a NIDPS looks for attack patterns within network
traffic
• An NIDPS can detect many more types of attacks than a host based IDPS, but
it requires a much more complex configuration and maintenance program.
• Installed at specific place in the network where it can watch traffic going into
and out of particular network segment.
• The NIDPS can monitor a specific grouping of host computers, or it can monitor
all traffic between the systems that make up an entire network. When placed
next to a hub, switch, or other key networking device, the NIDPS uses device’s
monitoring port.
• The monitoring port also known as a switched port analysis (SPAN) port or
mirror port, is a specially configured connection on a network device that is
capable of viewing all of the traffic that moves through the entire device.
To detect an attack, NIDPSs look for attack patterns and compares them with their
knowledge base.
TCP/IP stack reassembles the packets and applies protocol stack verification,
application protocol verification and other comparison techniques.
Protocol Stack Verification: NIDPSs look for invalid data packets. Data packet
configuration must match with defined configuration of various protocols (IP, TCP,
UDP)
DNS cache poisoning is the act of entering false information into a DNS cache, so that
DNS queries return an incorrect response and users are directed to the wrong
websites.
Protocol stack verification looks for violations in the protocol packet structure, the
application protocol verification looks for violations in the protocol packet’s use.
Advantages of NIDPSs
• Good network design and placement of NIDPS can enable organization to use
a few devices to monitor large network
• NIDPSs are usually passive and can be deployed into existing networks with
little disruption to normal network operations
• NIDPSs not usually susceptible to direct attack and may not be detectable by
attackers
Disadvantages of NIDPSs
• Can become overwhelmed by network volume and fail to recognize attacks
Wireless NIDPS
Monitors and analyzes wireless network traffic, looks for problems with wireless
protocols.
Issues associated with it include physical security, sensor range, access point and
wireless switch locations, wired network connections, cost
Examine network traffic in order to identify problems related to the flow of traffic.
Anomaly detection method is used to identify excessive packet flows in the case of
equipment malfunction, DoS attacks, virus and worm attacks, and some forms of
network policy violations.
NBA IDPSs typically monitor internal networks but occasionally monitor connections
between internal and external networks
Host-based IDPS
HIDPS benchmark and monitor the status of key system files and detect when an
intruder creates, modifies, or deletes monitored files.
An HIDPS can access encrypted information traveling over the network and use it to
make decisions about potential or actual attacks.
HIDPS triggers an alert when one of the following occurs: file attributes change, new
files are created, or existing files are deleted.
HIDPS maintains its own log file so that an audit trail is available even when hackers
modify files on the target system to cover their tracks.
Advantages of HIDPSs
• Can detect local events on host systems and detect attacks that may elude a
network based IDPS
• Functions on host system, where encrypted traffic will have been decrypted and
is available for processing
• Not affected by use of switched network protocols
• Can detect inconsistencies in how applications and systems programs were
used by examining records stored in audit logs
Disadvantages of HIDPSs
• Pose more management issues
• Vulnerable both to direct attacks and attacks against host operating system
• Does not detect multi-host scanning, nor scanning of non-host network devices
• Susceptible to some denial-of-service attacks
• Can use large amounts of disk space
• Can inflict a performance overhead on its host systems
Several detection methods are available to monitor and evaluate network traffic. Three
dominating methods are:
• the signature-based approach,
• the statistical-anomaly approach,
• the stateful packet inspection approach.
Signature-based IDPS
Stores and uses relevant data detected in a session to identify intrusions involving
multiple requests/responses allows IDPS to better detect specialized, multisession
attacks
Reviews log files generated by servers, network devices, and even other IDPSs for
patterns and signatures
Patterns that signify attack may be much easier to identify when entire network and
its systems are viewed holistically
IDPS Response Options: When an IDPS detects a possible intrusion, it has a number
of response options, depending on the implementing organization’s policy, objectives,
and system capabilities.
Active response: collecting additional information about the intrusion, modifying the
network environment, taking action against the intrusion
Passive response: setting off alarms or notifications, collecting passive data through
SNMP traps
The following list describes some of the responses an IDPS can be configured to
produce
• Audible/visual alarm
• SNMP traps and plug-ins
• E-mail message
• Page or phone message
• Log entry
• Evidentiary packet dump
• Take action against the intruder
• Launch program
• Reconfigure firewall
The process of selecting the best IDPS that fit for any particular organization is
challenging. The following considerations and questions may help an organization to
prepare a specification for acquiring and deploying an intrusion detection product.
• What are requirements that are levied from outside the organization?
• What are your organization’s resource constraints?
1. Centralized
2. Partially distributed
3. Fully distributed.
Centralized: In a centralized IDPS control strategy all IDPS control functions are
implemented and managed in a central location.
Fully distributed: In this all control functions are applied at the physical location of
each IDPS component. It is the opposite of Central strategy.
Partially distributed: It combines the best of the above two. In this strategy individual
agents can still analyze and respond to local threats and report to a hierarchical
central facility to enable organization to detect widespread attacks.
Honeypots: These are decoy systems designed to lure potential attackers so that he
is kept away from critical/main systems. They are also known as decoys, lures, and
fly-traps.
A padded cell is a honeypot that has been protected so that that it cannot be easily
compromised—in other words, a hardened honeypot.
Beside attracting hacker with tempting data, it can work as IDPS. Once it detects
hackers, it transfers them to a special environment where they can cause no harm.
This environment can be filled with interesting data, which can convince an attacker
that the attack is going according to plan.
IDPS researchers have used padded cell and honeypot systems since the late 1980s,
but until recently no commercial versions of these products were available.
The advantages and disadvantages of using the honeypot or padded cell are
Advantages:
Disadvantages:
• The legal implications of using such devices are not well understood.
• Honeypots and padded cells have not yet been shown to be generally useful
security technologies.
• An expert attacker, once diverted into a decoy system, may become angry and
launch a more aggressive attack against an organization’s systems.
• Administrators and security managers need a high level of expertise to use
these systems.
These systems use a combination of techniques to detect an intrusion and then trace
it back to its source.
The trap usually consists of a honeypot or padded cell and an alarm. While the
intruders are distracted, or trapped, by what they perceive to be successful
intrusions, the system notifies the administrator.
If the intruder is an internal person, trap and trace is easy. but if the intruder is from
external, administrator may even be tempted to back hack which is a dangerous
crime, if the hacker uses IP spoofing.
When using honeypots and honeynets, administrators should be careful not to cross
the line between enticement and entrapment.
To truly assess the risk within a computing environment, you must deploy technical
controls using a strategy of defense in depth, which is
These are typically used to collect information that attacker would need to launch
successful attack.
The next phase of the attack protocol is a data-gathering process called fingerprinting.
This is a systematic survey of all of the target organization’s Internet addresses. This
survey is conducted to identify the network services offered by the hosts in that range.
• Fingerprint comparison
• Palm print comparison
• Hand geometry
• Facial recognition using a photographic id card or digital camera, Retinal print
• Iris pattern
Characteristics considered truly unique: Fingerprints, Retina of the eye, Iris of the
eye.
Most of the technologies that scan human characteristics convert these images to
some form of minutiae.
Minutiae are unique points of reference that are digitized and stored in an encrypted
format when the user’s system access credentials are created.
Each subsequent access attempt results in a measurement that is compared with the
encoded value to determine the user.
Signature recognition: In this, signature is digitized and either saved for future
reference, or compared with a signature on a database for validation.
Voice recognition: Initial voiceprint of the user reciting a phrase is captured and
stored. Later, when the user attempts to access the system, the authentication
process requires the user to speak this same phrase so that the technology can
compare the current voiceprint against the stored value.
Effectiveness of Biometrics:
Acceptability of Biometrics
Many biometric systems that are highly reliable and effective are considered
somewhat intrusive to users.
Cryptography:
Introduction:
• Cryptography derived from the Greek words Krypto’s, meaning “hidden,” and
graphein, meaning “to write,” is the process of making and using codes to
secure the transmission of information.
• Cryptanalysis is the process of obtaining the original message (called the
plaintext) from an encrypted message (called the ciphertext) without knowing
the algorithms and keys.
• Encryption is the process of converting an original message into a form that is
unreadable.
• Decryption is the process of converting the ciphertext message back into
plaintext so that it can be readily understood.
Foundations of cryptology
Cryptology has a long and multicultural history. Since 1900BC to till date people are
using Cryptology for secure communication.
• 1942: Navajo code talkers entered World War II. Navajos developed code words
for subjects and ideas that did not exist in their native tongue.
• 1948: Claude Shannon suggested using frequency and statistical analysis in
the solution of substitution ciphers.
• 1970: Dr. Horst Feistel led an IBM research team in the development of the
Lucifer cipher.
• 1976: A design based on Lucifer was chosen by the U.S. National Security
Agency as the Data Encryption Standard is accepted worldwide.
• 1976: Whitefield Diffie and Martin Hellman introduced the idea of public-key
cryptography.
• 1977: Ronald Rivest, Adi Shamir, and Leonard Adleman developed a practical
public-key cipher for both confidentiality and digital signatures. 1978: Initial
RSA algorithm was published in Communication of ACM.
• 1991: Phil Zimmermann released the first version of PGP (Pretty Good Privacy);
PGP was released as freeware and became the worldwide standard for public
cryptosystems.
• 2000: Rijndael’s cipher was selected as the Advanced Encryption Standard.
Because of the advancement in technology and rapid growth in computer usage, need
for encryption in information technology environment greatly increased.
All popular Web browsers use built-in encryption features for secure e-commerce
applications.
Terminology
Cipher methods
There are two methods of encrypting plaintext: the bit stream method or the block
cipher method.
Bit Stream Ciphers: In the bit stream method, each bit in the plaintext is
transformed into a cipher bit, one bit at a time.
• Bit stream methods commonly use algorithm functions like the exclusive OR
operation (XOR).
Block Ciphers: In the block cipher method, the message is divided into blocks, for
example, sets of 8, 16, 32, or 64-bit blocks, and then each block of plaintext bits is
transformed into an encrypted block of cipher bits using an algorithm and a key.
Note that most computer-based encryption methods operate on data at the level of its
binary digits (bits), but some operate at the byte or character level.
Substitution Cipher
Substitute one value for another or one bit for another bit.
• Example: Substitute the letter with third letter to its right or substitute the bit
with fourth bit towards its left.
Plaintext = ABCDEFGHIJKLMNOPQRSTUVWXYZ
• In each subsequent row, the alphabet is shifted one letter to the right
until a 26 X 26 block of letters is formed.
Transposition Ciphers
Example:
Key pattern: 1 ->4, 2 ->8, 3 ->1, 4-> 5, 5-> 7, 6 ->2, 7 ->6, 8 ->3
Example plaintext message presented earlier, “SACK GAUL SPARE NO ONE,” yields
the following:
Plaintext: SACKGAUL|SPARENOO|NE | |
Ciphertext: UKAGLSCA|ORPEOSAN| E N | |
• To make the encryption even stronger, the keys and block sizes can be made
much larger
Exclusive OR (X-OR)
The exclusive OR operation (XOR) is a function of Boolean algebra in which two bits
are Compared.
A very simple symmetric cipher that is used in many applications where security is
not a defined requirement
Example: Plaintext is the word “CAT.” The ASCII binary representation of the
plaintext is “01000011 01000001 01010100”
key pattern is the letter “V” (01010110)
CAT 010000110100000101010100
VVV 010101100101011001010110
Cipher 000101010001011100000010
Vernam cipher was developed by AT&T, uses a set of characters only one time for
each encryption process (hence the name one-time pad).
• The pad values are added to numeric values that represent the plaintext
that needs to be encrypted
• Each character of the plaintext is turned into a number and a pad value
for that position is added
• The resulting sum for that character is then converted back to a
ciphertext letter for transmission
• If the sum of the two values exceeds 26, then 26 is subtracted from the
total
Plaintext: S A C K G A U L S P A R E N O O N E
Plaintext value: 19 01 03 11 07 01 21 12 19 16 01 18 05 14 15 15 14 05
Pad text: F P Q R N S B I E H T Z L A C D G J
Pad value: 06 16 17 18 14 19 02 09 05 08 20 26 12 01 03 04 07 10
Sum : 25 17 20 29 21 20 23 21 24 24 21 44 17 15 18 19 21 15
Modulo: 03 18
Ciphertext: Y Q T C U T W U X X U R Q O R S U O
Book Cipher
Uses text in book as key to decrypt a message. Ciphertext contains codes representing
page, line, and word numbers.
Example: Message: 259,19,8; 22,3,8; 375,7,4; 394,17,2.
Algorithm is the mechanical process of:
• Looking up the references from the ciphertext
• Converting each reference to a word by using the ciphertext’s value and
the key
To decrypt the ciphertext, the receiver must know the book used.
Typical sources are dictionaries and thesauruses
Hash Functions
Cryptographic Algorithms
In general, cryptographic algorithms are often grouped into two broad categories:
Symmetric and Asymmetric. In practice, today’s popular cryptosystems use a hybrid,
i.e. combination of symmetric and asymmetric algorithms.
Symmetric and Asymmetric algorithms are distinguished by types of keys used for
encryption and decryption operations.
Symmetric Encryption
Encryption methodologies that require the same secret key to encipher and decipher
the message.
• It is called private key encryption or symmetric encryption.
• Uses mathematical operations that can be programmed into extremely fast
computing algorithms and requiring minimal processing.
• Both sender and receiver must possess encryption key.
• If the copy of key is compromised, any intermediate person can decrypt and
read messages.
The primary challenge of symmetric key encryption is sharing the key to the receiver
Data Encryption Standard (DES): One of most popular and widely known symmetric
encryption cryptosystem.
3DES encryption is the same as that of standard DES, repeated three times.
• In the first operation, 3DES encrypts the message with key 1, then decrypts it
with key 2, and then it encrypts it again with key 1. In cryptographic notation,
this is [E{D[E(M,K1)],K2},K1]. Decrypting with a different key is essentially
another encryption, but it reverses the application of the traditional encryption
operations.
• In the second operation, 3DES encrypts the message with key 1, then it
encrypts it again with key 2, and then it encrypts it a third time with key 1
again, or [E{E[E(M,K1)],K2},K1].
• In the third operation, 3DES encrypts the message three times with three
different Keys. [E{E[E(M,K1)],K2},K3]. This is the most secure level of encryption
possible with 3DES.
The AES version of Rijndael can use a multiple round-based system. Depending on
the key size, the number of rounds varies from 9 to 13.
• for a 128-bit key, nine rounds plus one end round are used
• for a 192-bit key, eleven rounds plus one end round are used
• for a 256-bit key, thirteen rounds plus one end round are used
Asymmetric Encryption:
It uses two different but related keys, in which one key is used to encrypt and the
other key is used to decrypt the message.
• For Example: If A and B are two related keys. If key A is used to encrypt the
message, only key B can decrypt it, and if key B is used to encrypt a message,
only key A can decrypt it.
This technique has its highest value when one key is used as a private key, which
means that it is kept secret, known only to the owner of the key pair, and the other
key serves as a public key, which means that it is stored in a public location where
anyone can use it.
• The most common name for asymmetric encryption is public-key encryption
• Asymmetric algorithms are one-way functions. A one-way function is simple to
compute in one direction, but complex to compute in the opposite direction.
• Strength of public key encryption algorithm depends on the length of the two
prime numbers chosen.
One of the most popular public key cryptosystems is RSA, whose name is derived
from Rivest-Shamir-Adleman, the algorithm’s developers. The RSA algorithm was
the first public key encryption algorithm developed (in 1977) and published for
commercial use.
Algorithm:
Step-1: Choose two large prime numbers, p and q, of equal length, and compute p X
n, which is the public modulus.
Step-2: Choose a random number (public key) ‘e’, so that e and (p-1)(q-1) are
relatively prime (i.e., e and d must have no common factors except 1).
Step-3: Compute e X d =1 mod (p-1)(q-1), where ‘d’ is the private key. Thus d = e - 1
mod [(p-1)(q-1)]. d is a non negative integer.
Step-4: Then “(d, n) is the private key and (e, n) is the public key”.
1. Choose two large, random prime 1. Choose P =3, Q =11 (two prime
numbers: P, Q (usually P, Q > numbers).
10^100)
2. Compute: 2. N =P * Q => 3 * 11= 33;
N=P*Q Z =(P-1)*(Q-1) => 2 * 10 = 20
Z = (P-1)*(Q-1)
3. Choose a relatively prime number 3. Choose a number E that is relatively
E with Z (E < N) prime with Z..
E=7
4. Compute D such that E*D = 1 4. Compute D such that
mod Z E * D = 1 MOD Z
i.e., 7 * D mod 20 = 1
i.e., E * D mod Z = 1 therefore D=3
The problem with asymmetric encryption is for a single conversation between two
parties requires four keys.
So, hybrid systems, such as “Public-Key Infrastructure (PKI),” are more commonly
used than pure asymmetric systems.
Cryptographic tools
These are the most widely used tools that bring the functions of cryptography to the
world of information systems.
Digital certificates are public-key container files that allow computer programs to
validate the key and identify to whom it belongs.
• Directory enrolment,
• Key issuing systems,
• Tools for managing the key issuance,
• Verification and return of certificates.
The strength of a cryptosystem relies on both the raw strength of its key’s complexity
and the overall quality of its key management security processes.
PKI solutions can provide several mechanisms for limiting access and possible
exposure of the private keys.
These mechanisms include password protection, smart cards, hardware tokens, and
other hardware-based key storage devices that are memory-capable
Digital Signature
Nonrepudiation: the process that verifies the message was sent by the sender and
thus cannot be refuted
Digital Certificate:
• The certificate is often issued and certified by a third party, usually a certificate
authority.
• Digital signature is attached to certificate’s container file to certify file is from
entity it claims to be from.
• Digital certificates authenticate the cryptographic key that is embedded in the
certificate.
• Different client-server applications use different types of digital certificates to
accomplish their assigned functions
• Distinguished name (DN): It uniquely identifies a certificate entity to a user
public key.
• Example: X.509 v3
Hybrid Cryptosystems
• Except in digital certificates, pure asymmetric key encryption is not widely used
• Asymmetric encryption more often used with symmetric key encryption,
creating hybrid system
• Diffie-Hellman Key Exchange method:
– Most common hybrid system
– method for exchanging private keys using public key encryption.
– Provided foundation for subsequent developments in public-key
encryption
– It protects data from exposure to third parties
Steganography
• Process of hiding information
• Has been in use for a long time
• Most popular modern version hides information within files appearing to
contain digital pictures or other images
• Some applications hide messages in .bmp, .wav, .mp3, and .au files, as well as
in unused space on CDs and DVDs
Most of the software's that are currently used to protect the confidentiality of
information are not true cryptosystems.
S-HTTP (Secure Hypertext Transfer Protocol) and SSL (Secure Sockets Layer) are two
protocols designed to enable secure network communications across the Internet.
Secure Socket Layer (SSL) Protocol: It uses public key encryption to secure the
channel over public Internet
Cryptosystems are adopted to work with e-mail protocols to incorporate security into
it.
• Most popular once's are S/MIME, PEM, PGP
• First commonly used Internet e-mail standard was SMTP.
Drawbacks:
• Inability to transmit executable files or binary objects.
• Cannot handle character sets other than 7-bit ASCII.
MIME was developed to address the problems of SMTP.
It uses 3DES symmetric key encryption and RSA for key exchange.
Pretty Good Privacy (PGP): It uses IDEA Cipher for message encoding.
PGP also uses RSA for symmetric key exchange and digital signatures.
IPSec Headers
Attacks on cryptosystems
In this attacks ciphertext is repeatedly searched for clues that can lead to the
algorithm’s structure.
• To protect against this, modern algorithms attempt to remove the repetitive and
predictable sequences of characters from the ciphertext.
Known-plaintext attack:
An attacker may obtain duplicate texts, one in ciphertext and one in plaintext, and
thus reverse-engineer the encryption algorithm
Selected-plaintext attack:
Attackers may send a specific text to the selected victims, such that victims will send
that text to another by encrypting it. If the attacker gets the encrypted version of the
specific text sent by him to victims, he can attack on victims with this.
1. Man-in-the-middle
• Attackers attempt to place themselves between the sender and receiver.
• Once they’ve intercepted the request for key exchanges, they send each
participant a valid public key, which is known only to them.
• To the victims of such attacks, encrypted communication appears to be
occurring normally, but in fact the attacker is receiving each encrypted
message and decoding it (with the key given to the sending party), and then
encrypting and sending it to the intended recipient.
2. Correlation
Correlation attacks are a collection of brute-force methods that attempt to deduce
statistical relationships between the structure of the unknown key and the ciphertext
generated by the cryptosystem.
• Differential and linear cryptanalysis have been used to mount successful
attacks.
• Only defense is selection of strong cryptosystems, thorough key management,
and strict adherence to best practices of cryptography in frequency of changing
keys.
3. Dictionary Attack
• In a dictionary attack, the attacker encrypts every word in a dictionary using
the same cryptosystem as used by the target in an attempt to locate a match
between the target ciphertext and the list of encrypted words.
4. Timing Attack
• In a timing attack, the attacker eavesdrops on the victim’s session and uses
statistical analysis of patterns and inter-keystroke timings to discern sensitive
session information.
• Can be used to gain information about encryption key and possibly
cryptosystem in use.
• Once encryption successfully broken, attacker may launch a replay attack (an
attempt to resubmit recording of deciphered authentication to gain entry into
secure source).