CNS Unit-Iv
CNS Unit-Iv
1. Although Web browsers are very easy to use, Web servers are
relatively easy to configure and manage, and Web content is
increasingly easy to develop, the underlying software is
extraordinarily complex.
A web threat is any threat that uses the World Wide Web to facilitate cybercrime. Web threats
use multiple types of malware and fraud, all of which utilize HTTP or HTTPS protocols, but may
also employ other protocols and components, such as links in email or IM, or malware
attachments or on servers that access the Web.
Different types of security threats
Botnets.
Distributed denial-of-service (DDoS)
Hacking.
Malware.
Pharming.
Phishing.
Ransomware.
Spam.
1
One way to group these threats is in terms of passive and active
attacks.
Passive attacks include eavesdropping on network traffic between
browser and server.
Active attacks include impersonating another user, altering
messages in transit between client and server, and altering
information on a Web site.
2
1. One way to provide Web security is to use IP security (IPsec) (Figure
a). The advantage of using IPsec is that it is transparent to end
users and applications and provides a general-purpose solution .
One of the most widely used security services is the Secure Sockets Layer (SSL) and
follow-on
Internet standard known as Transport Layer Security (TLS) and it is defined in RFC
5246.
1. For full generality , SSL or TLS could be provided as part of the underlying
protocol suite to transparent to applications.
3
2. Alternatively SSL can be embedded in specific packages in browsers equipped
with SSL and most web servers have implemented the protocol.
SSL Architecture
SSL is designed to make use of TCP to provide a reliable end-to-end secure service.
SSL is not a single protocol but rather two layers of protocols as illustrated in Fig…..
The SSL record protocol provides basic security services to various higher-layer
protocols.
In particular, the HTTP – Hypertext Transfer Protocol which provides the transfer
service for Web Client/server interaction. This can be operated on top of SSL
4
Once a session is established, there is a current operating state both read and write
i.e. receive and send.
During the Handshake protocol, pending read and write states are created.
Upon successful conclusion of the Handshake Protocol the pending states become
the current states.
Different parameters are defined for session and connection state, they are
Peer certificate – An X509.v3 certificate of the peer. This element of the state may
be
Null.
Compression method – The algorithm used to compare data prior to encryption.
Cipher spc – specifies the bulk date encryption algorithm such as AES, and
hash algorithm such as MD5 or SHA-1 for MAC calculation.
Master secret – 48-byte secret shared between the client and the server.
Is resumable – A flag indicating whether the session can be used to initiate new
connections.
A connection state is defined by the following parameter:
Server and client random – Byte sequence that are chosen by the server and client
for each connection.
Server with MAC secret – The secret key used in MAC operation on data sent by the
server.
Client with Mac secret – The secret key used in MAC operation on date sent by the
client.
Server with key – The secret encryption key for data encrypted by the server and
decrypted by the server.
Client with key – The symmetric encryption key for data encrypted by the client and
decrypted by the server.
Initialization vectors – When a block cipher in CBC mode is used, an initialization
vector (IV) is maintained for each key.
Sequence numbers – Each party maintains separate sequence numbers for
transmitted and received messages for each connection.
When a party sends or receives a change cipher spec message,
the appropriate sequence number is set to Zero.
Sequence numbers may not exceed 264 -1.
5
o Message Integrity: The Handshake protocol also defines a shared secret key
that is used to form a message authentication code (MAC).
6
Next the compressed message plus the MAC are encrypted using symmetric
encryption.
Encryption may not increase the content length by more than 1024 bytes, so that
length may not exceed 214 + 2048.
The following encryption are permitted.
The final step of SSL Record Protocol processing is to prepare a header consisting of
the following fields.
o Content Type ( 8 bits ): The higher-layer protocol used to process the
enclosed fragment.
o Major Version (8 bits): Indicates major version of SSL is in use.
o Minor Version (8 bits): Indicates minor version is in use.
7
o Compressed Length (16 bits): The length in bytes of the plaintext fragment .
The maximum value is 214+2048.
Fig illustrates the SSL record format.
The change cipher spec protocol is one of the three SSL specific protocols that use
the SSL record protocol.
This protocol consists of a single message as shown in the fig. which consists of a
single byte with the value 1.
The purpose of this message is to cause the pending state to be copied into the
current state, which updates the cipher suite to be used on this connection.
Alert Protocol
The Alert protocol is used to convey SSL-related alerts to the peer entity.
Alert messages are compressed and encrypted as specified by the current
state.
Each message in this protocol consists of two bytes as shown in Fig..
8
The first byte takes the value warning (1) or fatal (2) to convey the severity of
the message.
o If the level is fatal – SSL immediately terminates the connection and
other connections on the same session may continue, but no new
connections may be established.
The second byte contains a code that indicates the specific alert. They are…..
Handshake Protocol
The most complex part of SSL is the Handshake protocol.
This protocol allows the server and client to authenticate each other and to
negotiate an encryption and MAC algorithm and cryptographic key to be used to
protect the data sent in an SSL record.
The handshake is used before any application data is transmitted.
9
The handshake protocol consists of series of messages exchanged by client and
server. Fig shows the format of handshake protocol each message has three fields.
They are
o Type (1 byte): Indicates one to ten messages shown in table defined as
message types.
o Length (3 bytes): The length of the message in bytes.
o Content ( >= 0 bytes): The parameters associated with this message , these
are listed in Table below.
Fig shows the initial exchange needed to establish a logical connection between
client and server.
The exchange can be viewed in four phases.
10
Phase 1 – Establish Security Capabilities
This phase is used to initate a logical connection and to establish the security
capabilities that will be associated with it.
The exchange initiated by the client which sends a client_hello message with the
following parameters
o Version: This highest SSL version understood by the client.
o Random: A Client generated by a secure structure consisting of 32 bit time
stamp and 28 bytes .
o Session ID: A variable length session identifier.
o Cipher Suite: This is a list contains the combination of cryptographic
algorithms supported by the client.
o Compression Method: This is a list of the compression methods the client
supports.
Phase 2 – Server Authentication and Key Exchange
The server begins this phase by sending its certificate if it needs to be authenticated.
The message contains one or a chain of X.509 certificates.
11
Phase 3 – Client Authentication and Key Exchange
Upon receipt of the server_done message the client should verify that the server
provided a valid certificate and check that the server_hello parameters are
acceptable.
If the server has requested a certificate, the client begins this phase by sending a
certificate message.
Next the client_key_exchange message, which must be sent in this phase.
The content of the message depends on the type of key exchange.
Phase 4 -Finish
This phase completes the setting up of a secure connection.
The client sends a change_cipher_pec message and copies the pending cipherspec
into the current cipherspec.
Cryptographic computations
There are two way of computations, they are
1. Creation of a shared master secret by means of the key exchange
2. The generation of cryptographic parameters from the master secret.
12
HTTPS – Hyper Text Transfer Protocol over SSL
The principle difference seen by the user of a web browser is that URL
addresses being with https:// rather than http://
A normal HTTP connection uses port 80.
If HTTPS is specified port 443 is used which invokes SSL.
Connection Initiation
For HTTPS, The agent acting as the HTTP client also acts as the TLS.
The client initiates a connection to the server on the appropriate port
and then sends the TLS certificate to being the TLS handshake.
When TLs handshake finishes the client may the initiate the first HTTP
request.
All HTTP data is to be sent as TLS application data.
There are three levels of awareness of a connection in HTTPS.
o At the HTTP level, an HTTP client requests a connection to an
HTTP server by sending a connection request to the next lower
layer.
o Typically the next layer is TCP,
o AT the next level of TLS, a session is established between a TLS
client and a TLS server.
Connection Closure
An HTTP client or server can indicate the closing of a connection by
including the following line in an HTTP record:connection:close.
13
This indicates that the connection will be closed after this record is
delivered.
The closure of an HTTPS connection requires that TLS close the
connection with the peer TLS entity on the remote side, which will
involve closing he underlying TCP connection.
At the TLS level the proper way to close a connection is for each side to
use the TLS alert protocol to send a close_notify alert.
TLS implementation must initiate an exchange of closure alert before
closing a connection without waiting for the peer to ends its closure
alert generating an “ incomplete close”.
14
Transport Layer Protocol
Host Keys –
Server authentication occurs at the transport layer based on the server
processing a public/private key pair.
A server may have multiple host keys using multiple different
asymmetric encryption algorithms.
Multiple hosts may share the same host key.
RFC 4251 dictates two alternative trust model that can be used.
o The client has a local database that associates each host name
with the corresponding public host key.
o The host name-to-key association is certified by a trusted
certification authority (CA).
Packet Exchange –
Fig illustrates the sequence of event in the SSH Transport Layer Protocol.
15
First the client establishes a TCP connection to the server, this is done via the
TCP protocol.
Once the connection is established the client and server exchange data
referred to as packets.
Each packet is in the following format .. below FIG
16
Packet Length: Length of the packet in bytes, not including the packet length
and MAC fields.
Padding Length: Length of the random padding filed.
Payload: Useful contents of the packet. Prior to algorithm negotiation, this
field is uncompressed, if compression is negotiated then field is compressed.
Random Padding: Once a encryption algorithm has been negotiated this field
is added.
It contains random bytes of padding so that total length of the packet is a
multiple of the cipher block size or 8 bytes for a stream cipher.
Message authentication code(MAC): If message authentication has been
negotiated this field contains the MAC value.
The MAC value is computed over the entire packet plus a sequence number,
excluding the MAC field.
The SSH Transport Layer packet exchange consists of a sequence of steps
shown in fig..
17
WIRELESS NETWORK SECURITY
Wireless Security
Wireless networks and the wireless devices that use them, introduce a
host of security problems over and above those found in wired
networks.
Some of the key factors contributing to the higher security risk of
wireless networks compared to wired networks include the following …
Channel:
Wireless networking typically involves broadcast communications, which is far
more susceptible to eavesdropping and jamming than wired networks.
Wireless networks are also more vulnerable to active attacks in communications protocol.
Mobility:
Wireless devices are in principal and usually in practice, far more portable and
mobile than wired devices.
The mobility results in a number of risks.
Resources:
Some wireless devices , such as smartphone and tablets, have sophisticated
operating systems but limited memory and processing resources with which to
counter threats, including denial of service and malware.
Accessibility:
Some wireless devices, such as sensors and robots, may be left unattended in
remote location.
This greatly increases their vulnerability to physical attacks.
The wireless client can be a cell phone, a wi-fi enabled laptop or tablet, a
wireless sensor, a Bluetooth device.
The wireless access point provides a connection to the network or
services.
o Examples of access points are..
Cell towers, wi-fi hotspots and wireless access point to wired local or
WANs.
18
The transmission medium which carries the radio waves for the data
transfer.
19
A network injection attack targets wireless access points that are
exposed to nonfiltered network traffic, such as routing protocol
messages or network management messages.
Wireless Security Measures
Following can group wireless security measures into those dealing with
wireless transmissions, wireless access point and wireless networks.
Securing wireless Transmissions:
The principal threats to wireless transmission are eavesdropping,
altering or inserting messages, and disruption.
To deal with eavesdropping two types of countermeasures are
appropriate, they are
o Signal-hiding techniques:
Organizations can take a number of measures to make it more
difficult for an attacker to locate their wireless access points,
including turning off service set identifier(SSID) broadcasting by
wireless access points;
assigning cryptic names to SSIDs
reducing signal strength
locating wireless access points
o Encryption:
Encryption of all wireless transmission is effective against
eavescountering attempts to alter or insert transmissions,
Securing Wireless Access Points:
The main threat involving wireless access points is unauthrorized access
to the network.
The principal approach for preventing such access is the IEEE 802.1X
standard for port based network access control.
The standard provides an authentication mechanism for devices wishing
to attach to a LAN or wireless network.
Securing Wireless Networks:
Recommends the following techniques for wireless network security..
1. Use Encryption-Wireless routers are typically equipped with built-in
encryption mechanism.
2. Use antivirus and antispyware software and a firewall -These
facilities should be enabled on all wireless network endpoints.
3. Turn off identifier broadcasting – wireless routers are typically
configured to broadcast and identifying signal so that any device
within range can learn of the router’s existence.
4. Change the identifier on your router from the default.
5. Change your router’s pre-set password for administration.
20
6. Allow only specific computers to access your wireless network.
Mobile devices have become an essential element for organizations as part of the
overall network infrastructure.
Mobile devices such as smartphones, tablets, and memory sticks provide increased
convenience for individuals as well as the potential for increased productivity in the
workplace.
Because of their use and unique characteristics, security for mobile devices is
complex issue.
An organization needs to implement as security policy through a combination of
security features built into the mobile devices and additional security controls
provided by network components that regulate the use of the mobile devices.
21
Security Threats
22
QR codes are designed to be captured by a mobile device camera and used by the
mobile device easily.
23
Device Security
A number of organizations will supply mobile devices for employee use and
preconfigure those devices to conform to the enterprise security policy.
Many organizations will find it convenient or even necessary to adopt a bring-your-
own-device (BYOD) policy that allows the personal mobile devices of employees to
have access to corporate resources.
IT managers should be able to inspect each device before allowing network access.
The organization should configure the device with security controls, including the
following:
o Enable auto-lock, which causes the device to lock if it has not been used for a
given amount of time, requiring the user to re-enter a four-digit PIN or
password to re-activate the device.
o Enable password or PIN protection.
o Avoid using auto-complete features that remember user names or
passwords.
o Enable remote wipe.
o Ensure that SSL protection is enabled, if available.
o Make sure that software, including operating systems and applications is up
to date.
o Install antivirus software as it becomes available.
o Either sensitive data should be prohibited from storage on the mobile device
or it should be encrypted.
o IT staff should also have the ability to remotely access devices.
o The organizations may prohibit all installation of third-party applications,
implementing whitelisting to prohibit installation of all unapproved
applications.
o The organization can implement and enforce restrictions on what devices can
synchronize and on the use of cloud-based storage.
o To deal with the threat of untrusted content, security response can include
training of personnel on the risks inherent in untrusted content and disabling
camera use on corporate mobile devices.
o To counter the threat of malicious use of location services.
Traffic Security
Traffic security is based on the usual mechanisms for encryption and authentication.
All traffic should be encrypted and travel by secure means, such as SSL or IPv6.
Virtual private networks (VPN’s) can be configured so that all traffic between the
mobile device and the organization’s network is via a VPN.
Barrier Security
The organization should have security mechanisms to protect the network from
unauthorized access.
24
The security strategy can also include firewall policies specific to mobile device
traffic.
Firewall policies can limit the scope of data and application access for all mobile
devices.
25
Recently Wi-Fi Alliance has developed certification procedures for IEEE 802.11
security standards, referred to as Wi-Fi Protected Access (WPA).
The most recent version of WPA known as WPA2, incorporates all of the features of
the IEEE 802.11i WLAN security specification.
Physical Layer
The lowest layer of the IEEE 802 reference model is the physical layer, which includes
such functions as encoding/decoding of signals and bit transmission/reception.
In addition, the physical layer includes a specification of the transmission medium.
In the case of IEEE 802.11, the physical layer also defines frequency bands and
antenna characteristics.
Media Access Control
All LANs consist of collections of devices that share the network’s transmission
capacity.
26
Some means of controlling access to the transmission medium is needed to provide
an orderly and efficient use of that capacity. This is the function of a media access
control (MAC) layer.
The MAC layer receives data from a higher-layer protocol, typically the Logical Link
Control (LLC) layer, in the form of a block of data known as the MAC service data unit
(MSDU).
In general the MAC layer performs the following functions:…
o On transmission, assemble data into a frame, known as a MAC protocol data
unit (MPDU) with address and error-detection fields.
o On reception, disassemble frame, and perform address recognition and error
detection.
o Govern access to the LAN transmission medium.
The exact format of the MPDU differs somewhat for the various MAC protocol in
use.
In general all the MPDUs have a format similar to that as in figure….
27
IEEE 802.11 Services
IEEE 802.11 services define nine services that need to be provided by the wireless
LAN to achieve functionality equivalent to that which is inherent to wired LAN’s.
Table shows the list of services …….
28
IEEE 802.11i Wireless LAN Security
There are two characteristics of a wired LAN that are not inherent in a wireless LAN.
1. In order to transmit over a wired LAN, a station must be physically connected to
the LAN.
2. Similarly, in order to receive a transmission from a station that is part of a wired
LAN, the receiving station also must be attached to the wired LAN.
These difference between wired and wireless LANs suggest the increased need for
robust security services and mechanisms for wireless LANs.
The original 802.11 specification included a set of security features for privacy and
authentication that were quite weak.
For privacy 802.11 defined the Wired Equivalent Privacy (WEP) algorithm.
The privacy portion of the 802.11 standard contained major weakness.
In order to accelerate the introduction of strong security into WLANs, the Wi-Fi
Alliance promulgated Wi-Fi Protected Access (WPA) as a Wi-Fi standard.
WPA is set of security mechanisms that eliminates most 802.11 security issues and
was based on the current state of the 802.11i standard.
The final form of the 802.11i standard is referred to as a Robust Security Network
(RSN).
29
Fig shows the cryptographic algorithms used for these services..
30
1. Two wireless station in the same BSS communicating via the access point (AP) for
that BSS.
2. Two wireless stations (STAs) in the same ad hoc IBSS communicating directly with
each other.
3. Two wireless stations in different BSSs communicating via their respective APs across
a distribution system.
4. A wireless station communicating with an end station on a wired network via its AP
and the distribution system.
31
Discovery:
An AP uses messages called Beacons and Probe Responses to advertise its IEEE
802.11i security policy.
The STA uses these to identify the AP for a WLAN with which it wishes to
communicate.
The STA associates with the AP, which it uses to select the cipher suite and
authentication mechanism.
Authentication:
During this phase, the STA and AP prove their identities to each other.
The AP blocks non-authentication traffic between the STA and AP until the
authentication transaction is successful.
Key generation and distribution:
The AP and the STA perform several operations that cause cryptographic keys to
be generated and placed on the AP and the STA.
Frames are exchanged between the AP and STA .
Protected data transfer:
Frames are exchanged between the STA and the end station through the AP.
AS denoted by the shading and the encryption module icon, secure data transfer
occurs between the STA and the AP.
Connection termination:
32
The AP and STA exchange frames.
During this phase the secure connection is torn down and the connection is restored
to the original state.
https://searchsecurity.techtarget.com/definition/Secure-Sockets-Layer-SSL
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-858-computer-
systems-security-fall-2014/lecture-notes/
https://assignmentessayhelp.com/mobile-security-research-it-sample/
33