Unit V
Unit V
Unit V
Email is often used to spread malware, spam and phishing attacks. Attackers use
deceptive messages to entice recipients to part with sensitive information, open
attachments or click on hyperlinks that install malware on the victim’s device.
Email is also a common entry point for attackers looking to gain a foothold in an
enterprise network and obtain valuable company data.
Requirements
Confidentiality
protection from disclosure
Authentication
Ensure the sender of message
Message integrity
protection from modification
Non-repudiation of origin
protection from denial by sender
These services are achieved by two schemes,
1. PGP
2. S/MIME
1. Five new message header files, these fields provide information about the body of the
message.
3. Transfer encodings that enable the conversion of any content format into a form that
is protected from alteration by the email system.
3. content- Transfer- Encoding- type of transformation used to represent the body of the
message
5. content- Description- text description of the object, this is useful when the object is not
readable (eg.audio files)
Multipart Mixed
Video mpeg
5.4 IP Security
The IP security (IPSec) is an Internet Engineering Task Force (IETF) standard suite
of protocols between 2 communication points across the IP network that provide data
authentication, integrity, and confidentiality.
It also defines the encrypted, decrypted and authenticated packets. The protocols
needed for secure key exchange and key management are defined in it.
IP security overview
Internet needs more and better security and need to secure end-user- to end-user
traffic using authentication and encryption mechanisms.
Different attacks may possible, IP spoofing, in which intruders create packets with
false IP address.
Applications of IP Sec
Enhancing e-commerce security
Secure remote access over the internet
Establishing extranet and intranet connectivity with partners.
Benefits of IPSec
A firewall/router provides strong security to all traffic crossing the perimeter
A firewall/router is resistant to bypass
can be transparent to end users
can provide security for individual users
secures routing architecture
5.4.1 IP security Architecture
IPSec Documents
The IPSec specification consists of numerous documents. The most important of
these, issued in November of 1998, are RFCs 2401, 2402, 2406, and 2408:
RFC 2401: An overview of a security architecture
RFC 2402: Description of a packet authentication extension to IPv4 and IPv6
RFC 2406: Description of a packet encryption extension to IPv4 and IPv6
RFC 2408: Specification of key management capabilities
Figure 5.5 shows overview of IPsec Architecture
Encapsulating Security Payload (ESP): Covers the packet format and general issues
related to the use of the ESP for packet encryption and, optionally, authentication.
Authentication Header (AH): Covers the packet format and general issues related to
the use of AH for packet authentication.
Domain of Interpretation (DOI): Contains values needed for the other documents to
relate to each other. These include identifiers for approved encryption and
authentication algorithms, as well as operational parameters such as key lifetime.
IP security services
IPSec provides security services at the IP layer.
Two protocols are used to provide security:
The data integrity feature ensures that undetected modification to a packet's content in
transit is not possible. T
It also prevents the address spoofing attacks observed in today's Internet. The AH also
guards against the replay attack.
Padding (0255 bytes): adding bits to obtain fixed length payload data
Pad Length (8 bits): Indicates the number of pad bytes immediately preceding
this field.
Next Header (8 bits): Identifies the type of data contained in the payload data
field by identifying the first header in that payload
Key Management
It is the determination and distribution of secret keys
Two types of key management
1. Manual: system admin manually configures each system with its own keys.
2. Automated: automated system enables the on demand creation of keys for security
associations.
The keys are generated uniquely for each session based on the security parameters
agreed during the TLS handshake
[Step2]
The server may send any messages associated with the ServerHello
Depending on the selected cipher suite, it will send its certificate for
authentication
The server may also send a key exchange message and a certificate
request message to the client, depending on the selected cipher suite
To mark the end of the ServerHello and the Hello message exchange,
the server sends a ServerHelloDone message
[Step3]
Next, if requested, the client will send its certificate to the server
In any case, the client will then send a key exchange message that sets the pre-
master secret between the client and the server
Optionally, the client may also send a Certificate Verify message to explicitly
verify the certificate that the server requested
[Step4]
Then, both the client and the server send the Change CipherSpec messages
and enable the newly negotiated cipher spec
The first message passed in each direction using the new algorithms, keys and
secrets is the Finished message, which includes a digest of all the handshake
messages
Each end inspects the Finished message to verify that the handshake was not
tampered with
TLS protocol provides transport layer security for Internet applications and
confidentiality using symmetric key cryptography and data integrity using a keyed
MAC
It also includes functionality for client and server authentication using public key
cryptography
Netscape originally developed the SSL (Secure Sockets Layer) protocol to transmit
information privately, ensure message integrity, and guarantee the server identity. SSL works
mainly through using public/private key encryption on data. It is commonly used on
web browsers, but SSL can also be used with email servers or any kind of client-server
transaction. For example, some instant messaging servers use SSL to protect conversations.
The Internet Engineering Task Force (IETF) created TLS (Transport Layer Security) as the
successor to SSL. It is most often used as a setting in email programs, but, like SSL, TLS can
have a role in any client-server transaction.
5.9SYSTEM SECURITY
The Security of a computer system is a crucial task.
Threat: A program which has the potential to cause serious damage to the
system.
Attack: An attempt to break security and make unauthorized use of an asset.
Henceforth, based on the above breaches, the following security goals are aimed:
1. Integrity
The objects in the system mustn’t be accessed by any unauthorized user & any user
not having sufficient rights should not be allowed to modify the important system
files and resources.
2. Secrecy
The objects of the system must be accessible only to a limited number of authorized
users. Not everyone should be able to view the system files.
3. Availability
All the resources of the system must be accessible to all the authorized users i.e. only
one user/process should not have the right to hog all the system resources. If such
kind of situation occurs, denial of service could happen. In this kind of situation, a
malware might hog the resources for itself & thus preventing the legitimate processes
from accessing the system resources.
1. Program Threats
A program written by a cracker to hijack the security or to change the behaviour of a
normal process.
2. System Threats
These threats involve the abuse of system services. They strive to create a situation in
which operating-system resources and user files are misused. They are also used as a
medium to launch program threats.
5.10 Intruders
An Intruder is a person who attempts to gain unauthorized access to a system, to
damage that system, or to disturb data on that system. In instantaneous, this person
attempts to violate Security by interfering with system Availability, data Integrity or
data Confidentiality.
Classes of intruders
Masquerader-unauthorized user who penetrates a system exploiting a
legitimate user’s account (outside)
Password Guessing
one of the most common attacks
attacker knows a login (from email/web page etc)
then attempts to guess password for it
defaults, short passwords, common word searches
user info (variations on names, birthday, phone, common words/interests)
exhaustively searching all possible passwords
check by login or against stolen password file
success depends on password chosen by user
surveys show many users choose poorly
Password Capture
The another attack involves password capture watching over shoulder as password is
entered
The extracting recorded info after successful login (web history/cache, last number
dialled)
Intrusion Detection
Act as deterrent
It is designed for:
Functions of Honeypots
The function of a honeypot is to represent itself on the internet as a potential target for
attackers.
Usually a server or other high-value target and to gather information and notify
defenders of any attempts to access the honeypot by unauthorized users.
Honeypots are most often used by large enterprises and by companies involved in
cybersecurity research, to identify and defend attacks from advanced persistent threat
actors. Honeypots can be an important tool for large organizations to take an active
defense stance against attackers, or for cybersecurity researchers who want to learn
more about the tools and techniques that attackers use.
The cost of maintaining a honeypot can be high, in part because of the specialized
skills required to implement and administer a system that appears to expose the
organization's network resources while still preventing attackers from gaining access
to any production systems.
Types of Honeypots
Based on design and deployment, there are two main types of honeypots:
Advantages of Honeypot
Collect real data: Honeypots collect data from actual attacks and other
unauthorized activities, providing analysts with a rich source of useful
information.
Disadvantages of Honeypot
Data: Honeypots only collect information when an attack occurs. Zero attempts to
access the honeypot means there is no data to analyze.
Honeypot network: Malicious traffic that has been captured is only collected
when an attack targets the honeypot network; if attackers suspect a network is a
honeypot, they will avoid it.
Malware is software designed to cause harm to a computer and user. Some forms of
malware “spy” on user Internet traffic. Examples include spyware and adware.
Spyware monitors a user’s location and if enabled, it can capture sensitive
information, e.g., credit card numbers, promoting identity theft. Adware also acquires
user information, which is shared with advertisers and then integrated with unwanted,
triggered pop-up ads.
Worms and viruses behave differently, as they can quickly proliferate and undermine
an entire computer system. They also may perform unsavory activities from a user’s
computer without the user’s knowledge. In the wake of a virus or worm, a computer
system can experience significant damage.
At all times, a firewall should be in place for additional security. Multiple, compatible
protective sources are encouraged as additional insurance against malware.
Figure 5.15 Classification of Malicious Program
Trapdoors or Backdoor
A trap door is a secret entry point into a program that allows someone that is aware of
the trap door to gain access without going through the usual security access
procedures.
Trap doors become threats when they are used by unscrupulous programmers to gain
unauthorized access.
Logic Bomb
Worms
Zombie
A zombie is a computer that has been implanted with a daemon that puts it under the
control of a malicious hacker without the knowledge of the computer owner.
Zombies are used by malicious hackers to launch DoS attacks.
The hacker sends commands to the zombie through an open port.
5.12 Viruses
Virus are self-replicating and are designed to infect other programs. They can wreak
havoc in a system by modifying or destroying files causing system crashes and
program malfunctions.
Once a virus is executing, it can perform any function, such as erasing files and
programs.
Types of Viruses
File Virus: This type of virus infects the system by appending itself to the end
of a file. It changes the start of a program so that the control jumps to its code.
After the execution of its code, the control returns back to the main program. Its
execution is not even noticed. It is also called Parasitic virus because it leaves
no file intact but also leaves the host functional.
Boot sector Virus: It infects the boot sector of the system, executing every time
system is booted and before operating system is loaded. It infects other bootable
media like floppy disks. These are also known as memory virus as they do not
infect file system.
Source code Virus: It looks for source code and modifies it to include virus and
to help spread it.
Polymorphic Virus: A virus signature is a pattern that can identify a virus (a
series of bytes that make up virus code). So, in order to avoid detection by
antivirus a polymorphic virus changes each time it is installed. The functionality
of virus remains same but its signature is changed.
Encrypted Virus: In order to avoid detection by antivirus, this type of virus
exists in encrypted form. It carries a decryption algorithm along with it. So, the
virus first decrypts and then executes.
Stealth Virus: It is a very tricky virus as it changes the code that can be used to
detect it. Hence, the detection of virus becomes very difficult. For example, it
can change the read system call such that whenever user asks to read a code
modified by virus, the original form of code is shown rather than infected code.
Tunnelling Virus: This virus attempts to bypass detection by antivirus scanner
by installing itself in the interrupt handler chain. Interception programs, which
remain in the background of an operating system and catch viruses, become
disabled during the course of a tunnelling virus. Similar viruses install
themselves in device drivers.
Multipartite Virus: This type of virus is able to infect multiple parts of a
system including boot sector, memory and files. This makes it difficult to detect
and contain.
Armored Virus: An armored virus is coded to make it difficult for antivirus to
unravel and understand. It uses a variety of techniques to do so like fooling
antivirus to believe that it lies somewhere else than its real location or using
compression to complicate its code.
Macro Virus
Macro virus are particularly threatening for number of reasons.
platform independent
Macro viruses take advantage of the macro feature found in Word and other office
applications.
Successive releases of Word provide increased protection against macro viruses, and
they no longer are the predominant virus threat
Email Virus
At the end of 1999, a more powerful version of the e-mail virus appeared, activated
merely by opening an e-mail that contains the virus rather than opening an
attachment.
As a result, instead of taking months or years to propagate, now take only hours.
This makes it very difficult for antivirus software to respond before much damage is
done.
Worms
A worm is a program that can replicate itself and send copies from computer to
computer across network connections.
Upon arrival, the worm may be activated to replicate and propagate again, and
usually to also perform some unwanted function.
A worm actively seeks out more machines to infect and each machine that is infected
serves as an automated launching pad for attacks on other machines.
To replicate itself, a network worm uses some sort of network vehicle such as email,
remote execution, or remote login. Once active within a system, a network worm can
behave as a computer virus or bacteria, or it could implant Trojan horse programs or
perform any number of disruptive or destructive actions.
Operation of worms
A computer worm infection spreads without user interaction. All that is necessary is
for the computer worm to become active on an infected system.
Before widespread use of networks, computer worms were spread through
infected storage media, such as floppy diskettes, which, when mounted on a system,
would infect other storage devices connected to the victim system. USB drives are
still a common vector for computer worms.
Computer worms often rely on the actions of, and vulnerabilities in,
networking protocols to propagate.
For example, the WannaCry ransomware worm exploited a vulnerability in the first
version of the Server Message Block (SMBv1) resource sharing protocol
implemented in the Windows operating system.
Once active on a newly infected computer, the WannaCry malware initiates a network
search for new potential victims: systems that respond to SMBv1 requests made by
the worm.
The worm is able to continue to propagate within an organization in this way. When a
bring your own device (BYOD) is infected, the worm can spread to other networks,
giving hackers even more access.
A computer virus or worm hybrid is a piece of malware that spreads like a worm,
but that also modifies program code like a virus or else carries some sort of
malicious payload, such as a virus, ransomware or some other type of malware.
A bot worm may be used to infect computers and turn them into zombies or bots,
with the intent of using them in coordinated attacks through botnets.
Email worms are usually spread as malicious executable files attached to what appear
to be ordinary email messages.
Ethical worm is a computer worm designed to propagate across networks with the
express purpose of delivering patches for known security vulnerabilities.
Morris Worms
The Morris Worm was a self-replicating computer program (worm) written by Robert
Tappan Morris, a student at Cornell University, and released from MIT on November
2, 1988.
Financial benefits
Research projects
Play pranks
Users should practice good cybersecurity hygiene to protect themselves against being
infected with computer worms and virus. Measures that will help prevent the threat of
computer worms and virus infections:
Scan the files when downloaded from internet or your email attachments
Beware when you install the pirated software.
Encrypt files to protect sensitive data stored on computers, servers and mobile devices
Keep your antivirus updated and scan your system at least once a week.
Possibility of virus infection may corrupt data, so usually maintain your data backup.
5.13 Firewalls
A firewall is a network security device, which monitors all incoming and outgoing
traffic and based on a defined set of security rules it accepts, rejects or drops that
specific traffic.
The firewall acts as a guard. It guards a corporate network acting as a shield between
the inside network and the outside world such as internet. All the traffic in either
direction must pass through the firewall. The firewall can be implemented as
hardware and software, or a combination of both.
Firewall Limitations
cannot protect from attacks bypassing it
eg sneaker net, utility modems, trusted organisations, trusted services (eg
SSL/SSH)
cannot protect against internal threats
eg disgruntled or colluding employees
cannot protect against access via WLAN
if improperly secured against external use
cannot protect against malware imported via laptop, PDA, storage infected outside
Operation of firewall
Firewall match the network traffic against the rule set defined in its table. Once the
rule is matched, associate action is applied to the network traffic.
For example, Rules are defined as any employee from HR department cannot access
the data from code server and at the same time another rule is defined like system
administrator can access the data from both HR and technical department. Rules can
be defined on the firewall based on the necessity and security policies of the
organization.
From the perspective of a server, network traffic can be either outgoing or incoming.
Firewall maintains a distinct set of rules for both the cases.
Mostly the outgoing traffic, originated from the server itself, allowed to pass. Still,
setting a rule on outgoing traffic is always better in order to achieve more security and
prevent unwanted communication.
Most traffic which reaches on the firewall is one of these three major Transport Layer
protocols- TCP, UDP or ICMP. All these types have a source address and destination
address. Also, TCP and UDP have port numbers. ICMP uses type code instead of port
number which identifies purpose of that packet.
Types of Firewall
1. Packet Filter
2. Application level gateways
3. Circuit level gateways
1.Packet Filters
It works in the network layer of the OSI Model.
It applies a set of rules (based on the contents of IP and transport header fields) on
each packet and based on the outcome, decides to either forward or discard the packet.
For example, a rule could specify to block all incoming traffic from a certain IP
address or disallow all traffic that uses UDP protocol. Figure 5.17 shows packet filter
firewall
If there is no match with any predefined rules, it will take default action.
The default action can be to ‘discard all packets’ or to ‘accept all packets’
Advantages
Simple
Transparent to users
Very fast
Disadvantages
Don’t support advanced user authentication schemes
Don’t examine upper layer data, they cannot prevent attacks
Attacks on Packet Filters
IP address Spoofing
In this kind of attack, an intruder from the outside tries to send a packet towards the
internal corporate network with the source IP address set equal to one of the IP
address of internal users.
Prevention
Firewall can defeat this attack if it discards all the packets that arrive at the incoming
side of the firewall, with source IP equal to one of the internal IPs.
Source Routing Attacks
In this kind of attack, the attacker specifies the route to be taken by the packet with a
hope to fool the firewall.
Prevention
Firewall can defeat this attack if it discards all the packets that use the option of
source routing aka path addressing.
Tiny Fragment Attacks
Many times, the size of the IP packet is greater than the maximum size allowed by the
underlying network such as Ethernet, Token Ring etc. In such cases, the packet needs
to be fragmented, so that it can be carried further. The attacker uses this characteristic
of TCP/IP protocol. In this kind of attack, the attacker intentionally creates fragments
of the original packet and send it to fool the firewall.
Prevention
Firewall can defeat this attack if it discards all the packets which use the TCP protocol
and is fragmented. Dynamic Packet Filters allow incoming TCP packets only if they
are responses to the outgoing TCP packets.
2. Application Gateways
It is also known as Proxy server. It works as follows:
Step-1: User contacts the application gateway using a TCP/IP application such as
HTTP.
Step-2: The application gateway asks about the remote host with which the user wants
to establish a connection. It also asks for the user id and password that is required to
access the services of the application gateway.
Step-3: After verifying the authenticity of the user, the application gateway accesses
the remote host on behalf of the user to deliver the packets.
Advantages
Disadvantages
Processing overhead
Two spliced connection between end user, so gateway must examine and forward all
traffic in both direction
3.Circuit-Level Gateways
It also changes the source IP address in the packet and puts its own address at the
place of source IP address of the packet from end users. This way, the IP addresses of
the internal users are hidden and secured from the outside world.
Figure 5.19 Circuit-Level Gateways
The computer generally hosts a single application, for example a proxy server, and
all other services are removed or limited to reduce the threat to the computer.
It is hardened in this manner primarily due to its location and purpose, which is
either on the outside of a firewall or in a demilitarized zone (DMZ) and usually
involves access from untrusted networks or computers.
Screened subnet
This configuration creates an isolated sub network
Two packet filtering routers are used.
One between bastion host and internet
One between bastion host and internal network
Advantages
Three levels of defence.
Internal network is invisible to internet.
Inside network cannot construct direct routes to internet.