Unit5 Notes
Unit5 Notes
➢ PGP provides a confidentiality and authentication service that can be used for electronic mail
and file storage applications.
➢ Developed by Phil Zimmermann.
PGP has grown explosively and is now widely used. A number of reasons can be cited for this
growth.
1. It is available free worldwide in versions that run on a variety of platforms.
2. The commercial version satisfies users who want a product that comes with vendor support.
3. It is based on algorithms that have survived extensive public review and are considered
extremely secure.
4. It has a wide range of applicability.
5. It was not developed by, nor is it controlled by, any governmental or standards organization.
6. PGP is now on an Internet standards track (RFC 3156; MIME Security with OpenPGP).
Nevertheless, PGP still has an feeling of an antiestablishment endeavor.
Operational Description:
The actual operation of PGP, as opposed to the management of keys, consists of five services:
authentication, confidentiality, compression, e-mail compatibility, and segmentation.
Authentication:
1. Sender creates message
2. Generates a digital signature for the message
3. Use SHA-1 to generate 160-bit hash of message
4. Signed hash with RSA using sender's private key, and is attached to message
5. Receiver uses RSA with sender's public key to decrypt and recover hash code
6. Receiver verifies received message using hash of it and compares with decrypted hash code
Confidentiality:
1. Sender generates a message and encrypts it.
2. Generates a128-bit random number as session key
3. Encrypts the message using CAST-128 / IDEA / 3DES in CBC mode with session key
4. Session key encrypted using RSA with recipient's public key and attached to the message.
5. Receiver uses RSA with private key to decrypt and recover session key
6. Session key is used to decrypt message
Compression
✓ PGP compresses messages to save space for e-mail transmission and storage.
✓ By default PGP compresses message after signing but before encrypting
o so can store uncompressed message & signature for later verification
o Encryption after compression strengthens security (because compression has less
redundancy)
✓ Uses ZIP compression algorithm
✓ Message encryption is applied after compression to strengthen cryptographic security. Because the
compressed message has less redundancy than the original plaintext, cryptanalysis is more difficult.
E-mail Compatibility
✓ When using PGP will have binary data (8-bit octets) to send (encrypted message, etc)
✓ However email was designed only for text
✓ Hence PGP must encode raw binary data into printable ASCII characters
✓ Uses radix-64 algorithm
✓ Maps three octets of binary data are mapped into four ASCII characters and also append a CRC to
detect the transmission errors.
The plaintext input to CAST-128 is itself derived from a stream of 128-bit randomized numbers.
These numbers are based on the keystroke input from the user.
b. Key identifiers
• Each PGP user has a pair of keyrings:
– public-key ring contains all the public-keys of other PGP users known to this user, indexed
by key ID
– private-key ring contains the public/private key pair(s) for this user, indexed by key ID &
encrypted keyed from a hashed passphrase
• Security of private keys thus depends on the pass-phrase security
PGP provides a pair of data structures at each node, one to store the public/private key pair owned by
that node and one to store the public keys of the other users known at that node. These data structures are
referred to as private key ring and public key ring.
The general structures of the private and public key rings are shown below:
Timestamp - the date/time when this entry was made.
Key ID - the least significant bits of the public key.
Public key - public key portion of the pair.
Private Key - private key portion of the pair.
User ID - the owner of the key
Key legitimacy field – indicates the extent to which PGP will trust that this is a valid public key for
this user.
S/MIME FUNCTIONALITY
✓ Enveloped data: This consists of encrypted content of any type and encrypted content encryption
keys for one or more recipients.
✓ Signed data: A digital signature is formed by taking the message digest of the content to be signed
and then encrypting that with the private key of the signer. The content plus signature are then
encoded using base64 encoding.
✓ Clear-signed data: As with signed data, a digital signature of the content is formed. However, in
this case, only the digital signature is encoded using base64. As a result, recipients without S/MIME
capability can view the message content, although they cannot verify the signature.
✓ Signed and enveloped data: Signed-only and encrypted-only entities may be nested, so that
encrypted data may be signed and signed data or clear-signed data may be encrypted.
CRYPTOGRAPHIC ALGORITHMS
✓ Create message digest to form digital signature
o Must use SHA-1, Should support MD5
✓ Encrypt message digest to form signature
o Must support DSS, Should support RSA
✓ Encrypt session key for transmission
o Should support Diffie-Hellman, Must support RSA
✓ Encrypt message for transmission with one-time session key
o Must support triple DES, Should support AES, Should support RC2/40
✓ Create a message authentication code
o Must support HMAC with SHA-1, Should support HMAC with SHA-1
S/MIME – ENHANCED SECURITY SERVICES
✓ Signed receipts --The receiver returns a signed receipt back to the sender to verify the message
arrived
✓ Security labels --Permission, priority or role of message being sent
✓ Secure mailing lists--Sending to multiple recipients at once securely by using a public key for the
whole mailing list
ENVELOPED DATA
The steps for preparing an envelopedData MIME entity are
1. Generate a pseudorandom session key for a particular symmetric encryption algorithm (RC2/40 or
triple DES).
2. For each recipient, encrypt the session key with the recipient’s public RSA key.
3. For each recipient, prepare a block known as RecipientInfo that contains an identifier of the
recipient’s public-key certificate, for an identifier of the algorithm used to encrypt the session key,
and the encrypted session key.
4. Encrypt the message content with the session key.
The RecipientInfo blocks followed by the encrypted content constitute the envelopedData. This information
is then encoded into base64.
SIGNED DATA
The signedData smime-type can be used with one or more signers. The steps for preparing a signedData
MIME entity are
1. Select a message digest algorithm (SHA or MD5).
2. Compute the message digest (hash function) of the content to be signed.
3. Encrypt the message digest with the signer’s private key.
4. Prepare a block known as SignerInfo that contains the signer’s public key certificate, an identifier
of the message digest algorithm, an identifier of the algorithm used to encrypt the message digest,
and the encrypted message digest.
✓ The signedData entity consists of a series of blocks, including a message digest algorithm identifier, the
message being signed, and SignerInfo. The signedData entity may also include a set of public-key
certificates sufficient to constitute a chain from a recognized root or top-level certification authority to
the signer. This information is then encoded into base64.
Clear Signing
• Achieved using the multipart content type with a signed subtype
• This signing process does not involve transforming the message to be signed
• Recipients with MIME capability but not S/MIME capability are able to read the incoming message
REGISTRATION REQUEST
The certification request includes certification RequestInfo block, followed by an identifier of the public-key
encryption algorithm, followed by the signature of the certificationRequestInfo block made using the
sender’s private key.
The certificationRequestInfo block includes a name of the certificate subject (the entity whose public key is
to be certified) and a bit-string representation of the user’s public key.
CERTIFICATES-ONLY MESSAGE
A message containing only certificates or a certificate revocation list (CRL) can be sent in response to a
registration request. The message is an application/pkcs7-mime type/subtype with ansmime-type parameter
of degenerate. The steps involved are the same as those for creating a signedData message, except that there
is no message content and the signerInfo field is empty.
IP SECURITY
OVERVIEW OF IPSEC
Applications of IPSec
IPSec provides the capability to secure communications across a LAN, across private and public
WANs, and across the Internet. Examples of its use include the following:
• Secure branch office connectivity over the Internet
• 2 Secure remote access over the Internet
• Establishing extranet and intranet connectivity with partners
• Enhancing electronic commerce security
Benefits of IPSec:
• When IPSec is implemented in a firewall or router, it provides strong security
• IPSec in a firewall is resistant to bypass if all traffic from the outside must use IP, and the
firewall is the only means of entrance from the Internet into the organization.
• IPSec is below the transport layer (TCP, UDP) and so is transparent to applications. There is
no need to change software on a user or server system when IPSec is implemented in the
firewall or router.
• IPSec can be transparent to end users. There is no need to train users on security mechanisms
• IPSec can provide security for individual users if needed.
Routing Applications
IPSec can play a vital role in the routing architecture required for internet working.
The following are examples of the use of IPSec. IPSec can assure that
• A router advertisement (a new router advertises its presence) comes from an authorized
router
• A neighbor advertisement (a router seeks to establish or maintain a neighbor relationship with
a router in another routing domain) comes from an authorized router.
• A redirect message comes from the router to which the initial packet was sent.
• A routing update is not forged.
ARCHITECTURE OF IP SECURITY
✓ Fundamental to the operation of IPsec is the concept of a security policy applied to each IP packet that
transits from a source to a destination.
✓ IPsec policy is determined primarily by the interaction of two databases, the security association
database (SAD) and the security policy database (SPD).
✓ Security Associations: A key concept that appears in both the authentication and confidentiality
mechanisms for IP is the security association (SA).
✓ An association is a one-way logical connection between a sender and a receiver that affords security
services to the traffic carried on it. If a peer relationship is needed for two-way secure exchange, then
two security associations are required.
✓ Security services are afforded to an SA for the use of AH or ESP, but not both.
IP Sec Architecture
A security association is uniquely identified by three parameters.
✓ Security Parameters Index (SPI): A bit string assigned to this SA and having local significance only.
The SPI is carried in AH and ESP headers to enable the receiving system to select the SA under which a
received packet will be processed.
✓ IP Destination Address: This is the address of the destination endpoint of the SA, which may be an
end-user system or a network system such as a firewall or router.
✓ Security Protocol Identifier: This field from the outer IP header indicates whether the association is an
AH or ESP security association. Hence, in any IP packet, the security association is uniquely identified
by the Destination Address in the IPv4 or IPv6 header and the SPI in the enclosed extension header (AH
or ESP).
SECURITY ASSOCIATION DATABASE
A security association is normally defined by the following parameters in an SAD entry.
✓ Security Parameter Index: A 32-bit value selected by the receiving end of an SA to uniquely
identify the SA. SPI is used to construct the packet’s AH or ESP header.
✓ Sequence Number Counter: A 32-bit value used to generate the Sequence Number field in AH or
ESP headers.
✓ Sequence Counter Overflow: A flag indicating whether overflow of the Sequence Number Counter
should generate an auditable event and prevent further transmission of packets on this SA.
✓ Anti-Replay Window: Used to determine whether an inbound AH or ESP packet is a replay.
✓ AH Information: Authentication algorithm, keys, key lifetimes, and related parameters being used
with AH.
✓ ESP Information: Encryption and authentication algorithm, keys, initialization values, key
lifetimes, and related parameters being used with.
✓ Lifetime of this Security Association: A time interval or byte count after which an SA must be
replaced with a new SA (and new SPI) or terminated, plus an indication of which of these actions
should occur.
✓ IPsec Protocol Mode: Tunnel, transport, or wildcard.
✓ Path MTU: Any observed path maximum transmission unit (maximum size of a packet that can be
transmitted without fragmentation) and aging.
IP TRAFFIC PROCESSING
IPsec is executed on a packet-by-packet basis. When IPsec is implemented, each outbound IP packet is
processed by the IPsec logic before transmission, and each inbound packet is processed by the IPsec logic
after reception and before passing the packet contents on to the next higher layer.
OUTBOUND PACKETS
A block of data from a higher layer, such as TCP, is passed down to the IP layer and an IP packet is formed,
consisting of an IP header and an IP body. Then the following steps occur:
✓ IPsec searches the SPD for a match to this packet.
✓ If no match is found, then the packet is discarded and an error message is generated.
✓ If a match is found, further processing is determined by the first matching entry in the SPD. If the policy
for this packet is DISCARD, then the packet is discarded. If the policy is BYPASS, then there is no
further IPsec processing; the packet is forwarded to the network for transmission.
✓ If the policy is PROTECT, then a search is made of the SAD for a matching entry. If no entry is found,
then IKE is invoked to create an SA with the appropriate keys and an entry is made in the SA.
✓ The matching entry in the SAD determines the processing for this packet. Either encryption,
authentication, or both can be performed, and either transport or tunnel mode can be used. The packet is
then forwarded to the network for transmission.
Authentication Header
➢ The Authentication Header provides support for data integrity and authentication of IP packets.
➢ The Authentication Header consists of the following fields:
• Next Header (8 bits): Identifies the type of header immediately following this header.
• Payload Length (8 bits): Length of Authentication Header in 32-bit words, minus 2.
• Reserved (16 bits): For future use.
• Security Parameters Index (32 bits): Identifies a security association.
• Sequence Number (32 bits): A monotonically increasing counter value. This can recognize
replayed packets and discard them.
• Authentication Data (variable): A variable-length field (must be an integral number of 32-bit
words) that contains the Integrity Check Value (ICV) or MAC produced by MAC algorithm.
Modes of Transfer
Both AH and ESP support two modes of use: transport and tunnel mode.
Transport Mode:
Transport mode provides protection primarily for upper-layer protocols. That is, transport mode
protection extends to the payload of an IP packet.
Tunnel Mode:
Tunnel mode provides protection to the entire IP packet. To achieve this, after the AH or ESP fields
are added to the IP packet, the entire packet plus security fields is treated as the payload of new "outer" IP
packet with a new outer IP header.
The entire original, or inner, packet travels through a "tunnel" from one point of an IP network to
another; no routers along the way are able to examine the inner IP header. Because the original packet is
encapsulated, the new, larger packet may have totally different source and destination addresses, adding to
the security.
Transport Mode:
For this mode using IPv4, the ESP header is inserted into the IP packet immediately prior to the
transport-layer header (e.g., TCP, UDP, ICMP) and an ESP trailer (Padding, Pad Length, and Next Header
fields) is placed after the IP packet; if authentication is selected, the ESP Authentication Data field is added
after the ESP trailer.
The entire transport-level segment plus the ESP trailer are encrypted. Authentication covers all of the
cipher text plus the ESP header.
Transport mode operation provides confidentiality for any application that uses it, thus avoiding the
need to implement confidentiality in every individual application. This mode of operation is also reasonably
efficient, adding little to the total length of the IP packet. One drawback to this mode is that it is possible to
do traffic analysis on the transmitted packets.
AH FORMAT IN IPV6:
ESP FORMAT IN IPV6:
In the first message, Alice transmits her “cookie” value. After that, all messages start with the cookie pair
(initiator cookie, responder cookie), and that pair serves as the IKE connection identifier.
✓ Note that in an IKE exchange between Alice and Bob, all messages start with the same cookie pair,
in the same order.
✓ If Alice initiated the IKE connection, her cookie value always appears in the “initiator cookie” field.
✓ To reduce clutter, we won’t write “(initiator cookie, responder cookie)” in the figures for the
messages. To reduce clutter, CP indicates crypto proposal, and CPA indicates crypto proposal
accepted.
✓ This is the one required protocol. And it is the most broken. One situation in which this protocol
might be useful is in the “road warrior” case, where an employee’s laptop is configured with a shared
secret with the company’s firewall.
✓ This would allow the employee to authenticate to the firewall and establish an encrypted tunnel. But
the way this mode is designed requires the identities to be the IP addresses. This makes it useless in
the road warrior case, because a road warrior’s IP address is dependent on where she is that day.
✓ The problem with this protocol is that Alice sends her identity in message 5 encrypted with a key K
which is a function of the shared secret J. Bob can’t decrypt message 5 in order to find out who he’s
talking to unless he knows J, which means he needs to know who he’s talking to. The working group
noticed this, and rather than fixing the protocol (which wouldn’t have been hard), they instead said
that in this mode Alice’s identity has to be her IP address! This makes it almost useless in practice,
and it certainly doesn’t hide identities.
ISAKMP/IKE encoding
✓ Messages have a fixed header, and then a sequence of what ISAKMP refers to as payloads. Similar
in spirit to IPv6 extension headers, each payload starts with TYPE OF NEXT PAYLOAD and
LENGTH OF THIS PAYLOAD.
The payload types are:
✓ 0 = end (i.e., no next payload)
✓ 1 = SA (security association): contains DOI and “situation”, a modifier of DOI, and must include
payloads 2 and 3
✓ 2 = P (proposal): proposed SPI, or SPI in reverse direction
✓ 3 = T (transform): cryptographic choices
✓ 4 = KE (key exchange):, the Diffie-Hellman value
✓ 5 = ID (endpoint identifier in phase 1, traffic selector in phase 2)
✓ 6 = CERT (certificate)
✓ 7 = CR (certificate request) (can include the name of the certifier from whom you’d like a certificate)
✓ 8 = hash (some sort of checksum)
✓ 9 = signature
✓ 10 = nonce
✓ 11 = notification
✓ 12 = delete (subtype of notification, meaning you are closing this SPI)
✓ 13 = vendor ID (can be thrown in to show what implementation you’re using). To avoid dealing with
a registry of vendor IDs, and allowing the field to be fixed size, this is an MD of some sort of string
guaranteed to uniquely describe the vendor, such as its name and telephone number.
✓ 14–127 reserved for future use
✓ 128–255 = private use (i.e., so NSA can use it and not publish what they’re using it for)
ISAKMP FORMAT
Fixed Header
All messages start with a 28-octet fixed length header.
#
octets
8 initiator’s cookie
8 responder’s cookie
1 next payload
1 version number (major/minor)
1 exchange type
1 Flags
4 message ID
4 message length (in units of (after encryption)
octets)
The fields are:
✓ initiator’s cookie (8 octets)
✓ responder’s cookie (8 octets). Note this will =0 in the first message, since it is unknown at that point
✓ next payload type
✓ version (1 octet). This is worth ranting about. The version number field is divided into two 4-bit
fields. The intention is that the top nibble is the major version number and the bottom nibble is the
minor version number.
✓ exchange type (1 octet). The values defined are:
▪ 1 = base. An exchange type defined by ISAKMP but not used by IKE. This adds an extra
message to aggressive mode, so that Alice (the initiator) can send her proposed parameters
before sending her Diffie-Hellman value, so that the Diffie-Hellman group could also be
negotiated.
▪ 2 = identity protection. This is what is called “main mode” in IKE.
▪ 3 = authentication only. Not used by IKE.
▪ 4 = aggressive. Same as what’s called “aggressive mode” in IKE.
▪ 5 = informational. Not really an “exchange”, since it’s a single message without an
acknowledgment, used to tell the other side something such as that you are refusing the
connection because you don’t like the version number.
▪ 6–31 = reserved values by ISAKMP for assignment by IANA as new ISAKMP exchange
types
▪ 32–239 = to be defined within a particular DOI
▪ 240–255 = for private use
✓ flags:
o bit 0 (LSB): encrypted—whether the fields after the header are encrypted
o bit 1: commit—A flag so badly named, and so confusingly defined in ISAKMP, that IKE
wound up using the same bit and the same name for almost the opposite purpose.
o bit 2: authentication only—this means that the fields after the header are not encrypted. This
bit gives no additional information over merely not setting the “encrypted” flag.
✓ Message ID: Unique ID for this message.
✓ Message length: Length of entire message, in units of octets.
SSL Architecture:
SSL itself is not a single layer protocol as depicted in the image; in fact it is composed of two sub-layers.
• Lower sub-layer comprises of the one component of SSL protocol called as SSL Record Protocol.
This component provides integrity and confidentiality services.
• Upper sub-layer comprises of three SSL-related protocol components and an application protocol.
Application component provides the information transfer service between client/server interactions.
Technically, it can operate on top of SSL layer as well. Three SSL related protocol components are
o SSL Handshake Protocol
o Change Cipher Spec Protocol
o Alert Protocol.
SSL Record Protocol
The SSL Record Protocol provides two services for SSL connections:
Confidentiality: The Handshake Protocol defines a shared secret key that is used for conventional
encryption of SSL payloads.
Message Integrity: The Handshake Protocol also defines a shared secret key that is used to form a
message authentication code (MAC).
The diagram indicates the overall operation of the SSL Record Protocol. The Record Protocol takes
an application message to be transmitted, fragments the data into manageable blocks, optionally compresses
the data, applies a MAC, encrypts, adds a header, and transmits the resulting unit in a TCP segment.
Received data are decrypted, verified, decompressed, and reassembled and then delivered to higher-level
users.
The first step is fragmentation. Each upper-layer message is fragmented into blocks of 214 bytes
(16384 bytes) or less. Next, compression is optionally applied. Compression must be lossless and may not
increase the content length by more than 1024 bytes. In SSLv3 (as well as the current version of TLS), no
compression algorithm is specified, so the default compression algorithm is null.
The next step in processing is to compute a message authentication code over the compressed data.
The final step of SSL Record Protocol processing is to prepend a header, consisting of the
following fields:
• Content Type (8 bits): The higher layer protocol used to process the enclosed fragment.
• Major Version (8 bits): Indicates major version of SSL in use. For SSLv3, the value is 3.
• Minor Version (8 bits): Indicates minor version in use. For SSLv3, the value is 0.
• Compressed Length (16 bits): The length in bytes of the plaintext fragment (or compressed
fragment if compression is used). The maximum value is 214 + 2048.
• ChangeCipherSpec Protocol
✓ Simplest part of SSL protocol. It comprises of a single message exchanged between two
communicating entities, the client and the server.
✓ As each entity sends the ChangeCipherSpec message, it changes its side of the connection into the
secure state as agreed upon.
✓ The cipher parameters pending state is copied into the current state.
✓ Exchange of this Message indicates all future data exchanges are encrypted and integrity is
protected.
• SSL Alert Protocol
✓ This protocol consists of a single message which consists of a single byte with the value Alert
Protocol
✓ The Alert Protocol is used to convey SSL-related alerts to the peer entity.
✓ Each message in this protocol consists of two bytes.
✓ The first byte takes the value warning(1) or fatal(2) to convey the severity of the message.
✓ The second byte contains a code that indicates the specific alert. This protocol is used to report
errors – such as unexpected message, bad record MAC, security parameters negotiation failed, etc.
✓ It is also used for other purposes – such as notify closure of the TCP connection, notify receipt of
bad or unknown certificate, etc.
• SSL Handshake Protocol
✓ It is the most complex part of SSL. It is invoked before any application data is transmitted. It
creates SSL sessions between the client and the server.
✓ Establishment of session involves Server authentication, Key and algorithm negotiation,
Establishing keys and Client authentication (optional).
✓ A session is identified by unique set of cryptographic security parameters.
✓ Multiple secure TCP connections between a client and a server can share the same session.
✓ Handshake protocol actions through four phases. These are discussed in the next section.
• Client_hello contains of list of cryptographic algorithms supported by the client, in decreasing order
of preference.
• Server_hello contains the selected Cipher Specification (CipherSpec) and a new session_id.
• The CipherSpec contains fields like −
✓ Cipher Algorithm (DES, 3DES, RC2, and RC4)
✓ MAC Algorithm (based on MD5, SHA-1)
✓ Public-key algorithm (RSA)
✓ Both messages have “nonce” to prevent replay attack.
Phase 2 − Server authentication and key exchange.
• Server sends certificate. Client software comes configured with public keys of various “trusted”
organizations (CAs) to check certificate.
• Server sends chosen cipher suite.
• Server may request client certificate. Usually it is not done.
• Server indicates end of Server_hello.
Phase 3 − Client authentication and key exchange.
Salient Features
✓ TLS protocol has same objectives as SSL.
✓ It enables client/server applications to communicate in a secure manner by authenticating,
preventing eavesdropping and resisting message modification.
✓ TLS protocol sits above the reliable connection-oriented transport TCP layer in the networking
layers stack.
✓ The architecture of TLS protocol is similar to SSLv3 protocol. It has two sub protocols: the TLS
Record protocol and the TLS Handshake protocol.
✓ Though SSLv3 and TLS protocol have similar architecture, several changes were made in
architecture and functioning particularly for the handshake protocol.
Comparison of TLS and SSL Protocols
There are main eight differences between TLS and SSLv3 protocols. These are as follows −
1)Protocol Version − The header of TLS protocol segment carries the version number 3.1 to differentiate
between number 3 carried by SSL protocol segment header.
2)Message Authentication − TLS employs a keyed-hash message authentication code (H-MAC). Benefit is
that H-MAC operates with any hash function, not just MD5 or SHA, as explicitly stated by the SSL
protocol.
3)Session Key Generation − There are two differences between TLS and SSL protocol for generation of
key material. Method of computing pre-master and master secrets is similar. But in TLS protocol,
computation of master secret uses the HMAC standard and pseudorandom function (PRF) output instead of
ad-hoc MAC. The algorithm for computing session keys and initiation values (IV) is different in TLS than
SSL protocol.
4)Alert Protocol Message −TLS protocol supports all the messages used by the Alert protocol of SSL,
except No certificate alert message being made redundant. The client sends empty certificate in case client
authentication is not required.Many additional Alert messages are included in TLS protocol for other error
conditions such as record_overflow, decode_error etc.
5)Supported Cipher Suites − SSL supports RSA, Diffie-Hellman and Fortezza cipher suites. TLS protocol
supports all suits except Fortezza.
6)Client Certificate Types − TLS defines certificate types to be requested in a certificate_request message.
SSLv3 support all of these. Additionally, SSL support certain other types of certificate such as Fortezza.
7)CertificateVerify and Finished Messages −In SSL, complex message procedure is used for
the certificate_verify message. With TLS, the verified information is contained in the handshake messages
itself thus avoiding this complex procedure. Finished message is computed in different manners in TLS and
SSLv3.
8)Padding of Data − In SSL protocol, the padding added to user data before encryption is the minimum
amount required to make the total data-size equal to a multiple of the cipher’s block length. In TLS, the
padding can be any amount that results in data-size that is a multiple of the cipher’s block length, up to a
maximum of 255 bytes.
The above differences between TLS and SSLv3 protocols are summarized in the following table.
SET Transactions :
✓ The customer opens an account with a card issuer.
✓ MasterCard, Visa, etc.
✓ The customer receives a X.509 V3 certificate signed by a bank.
✓ X.509 V3
✓ It verifies the customer’s RSA public key and its expiration date.
✓ A merchant who accepts a certain brand of card must possess two X.509 V3 certificates.
✓ One for signing & one for key exchange
✓ The customer places an order for a product or service with a merchant.
✓ The merchant sends a copy of its certificate for verification.
These transactions are as shown in the following diagram
SET Transaction
• Customer opens account: The customer obtains a credit card account, such as MasterCard or Visa,
with a bank that supports electronic payment and SET.
• Customer receives a certificate: After verification the customer receives X.509V3, digital
certificate which is signed by the bank. This certificate verifies the customer’s RSA public key and
expiration date.
• Merchants have their own certificates:
✓ Merchants who accepts card need to have 2 certificates for 2 public keys owned by them.
✓ One certificate is used for signing of message and the other is used for key exchange.
✓ The merchants also need the copy of payment gateway’s public key certificate.
• Customer places an order:
✓ The customer places the order containing the list of items to be purchased to the merchant.
✓ The merchant returns the order form having the items, price, total price and order number.
• Merchant is verified: The merchant along with the order form sends its certificate copy. The
customer can verify the same.
• Order and payment are sent:
✓ The customer sends order and payment information into the merchant along with customer’s
certificate.
✓ This is order conformation of the order form.
✓ The payment contains the card details. This is encrypted, so it cannot be read by the merchant.
✓ The certificate sent can be verified by the merchant.
• Merchant requests payment authorization: The merchant sends the payment information to the
payment gateway. The merchant requests for authentication of the customer, credit limit, validity.
• Merchant confirms order: The merchant sends conformation of the order to the customer.
• Merchant provides goods or service
• Merchant requests payment
Dual Signature
The purpose of the dual signature is to link two messages that are intended for two different
recipients. In this case, the customer wants to send the order information (OI) to the merchant and the
payment information (PI) to the bank. The merchant does not need to know the customer's credit card
number, and the bank does not need to know the details of the customer's order.
The customer takes the hash (using SHA-1) of the PI and the hash of the OI. These two hashes are
then concatenated and the hash of the result is taken. Finally, the customer encrypts the final hash with his or
her private signature key, creating the dual signature. The operation can be summarized as
DS = E(PRc, [ H ( H (PI) || H (O I )])
Where PRc is the customer's private signature key. Now suppose that the merchant is in possession
of the dual signature (DS), the OI, and the message digest for the PI (PIMD). The merchant also has the
public key of the customer, taken from the customer's certificate.
Payment Authorization
The payment authorization ensures that the transaction was approved by the issuer. This
authorization guarantees that the merchant will receive payment; the merchant can therefore provide the
services or goods to the customer. The payment authorization exchange consists of two messages:
Authorization Request and Authorization response.
• Verifies all certificates
• Decrypts digital envelope of authorization block to obtain symmetric key & then decrypts
authorization block
• Verifies merchant's signature on authorization block
• Decrypts digital envelope of payment block to obtain symmetric key & then decrypts payment
block
• Verifies dual signature on payment block
• Verifies that transaction ID received from merchant matches that in PI received (indirectly) from
customer
• Requests & receives an authorization from issuer
• Sends authorization response back to merchant
Fig: Purchase Request – Merchant
Payment Capture
To obtain payment, the merchant engages the payment gateway in a payment capture
transaction, consisting of a capture request and a capture response message.
• Merchant sends payment gateway a payment capture request
• Gateway checks request
• Then causes funds to be transferred to merchants account
• Notifies merchant using capture response
INTRUDER
One of the most publicized attacks to security is the intruder, generally referred to as hacker or
cracker. Three classes of intruders are as follows:
1. Masquerader – an individual who is not authorized to use the computer and who penetrates a
system’s access controls to exploit a legitimate user’s account.
2. Misfeasor – a legitimate user who accesses data, programs, or resources for which such access is not
authorized, or who is authorized for such access but misuse his or her privileges.
3. Clandestine user – an individual who seizes supervisory control of the system and uses this control
to evade auditing and access controls or to suppress audit collection.
The masquerader is likely to be an outsider; the misfeasor generally is an insider; and the clandestine user
can be either an outsider or an insider.
Intrusion Techniques
The objective of the intruders is to gain access to a system or to increase the range of privileges
accessible on a system.
Typically, a system must maintain a file that associates a password with each authorized user. If such
a file is stored with no protection, then it is an easy matter to gain access to it. The password files can be
protected in one of the two ways:
1. One way encryption – The system stores only an encrypted form of user’s password. In practice,
the system usually performs a one way transformation (not reversible) in which the password is used
to generate a key for the encryption function and in which a fixed length output is produced.
2. Access control – Access to the password file is limited to one or a very few accounts.
The following techniques are used for learning passwords.
1. Try default passwords used with standard accounts that are shipped with the system. Many
administrators do not bother to change these defaults.
2. Exhaustively try all short passwords.
3. Try words in the system’s online dictionary or a list of likely passwords.
4. Collect information about users such as their full names, the name of their spouse and children,
pictures in their office and books in their office that are related to hobbies.
5. Try user’s phone number, social security numbers and room numbers.
6. Try all legitimate license plate numbers.
7. Use a torjan horse to bypass restriction on access.
8. Tap the line between a remote user and the host system.
INTRUSION DETECTION
Motivation
1. If an intrusion is detected quickly enough, the intruder can be identified and ejected from the system
before any damage is done or any data are compromised.
2. An effective intrusion detection system can serve as a deterrent, so acting to prevent intrusions.
3. Intrusion detection enables the collection of information about intrusion techniques that can be used
to strengthen the intrusion prevention facility.
Intrusion detection is based on the assumption that the behavior of the intruder differs from that of a
legitimate user in ways that can be quantified.
Although the typical behavior of an intruder differs from the typical behavior of an authorized user, there
is an overlap in these behaviors. Thus, a loose interpretation of intruder behavior, which will catch more
intruders, will also lead to a number of "false positives," or authorized users identified as intruder.
Rule-Based detection
1)Anomaly detection 2)Penetration identification
2. Rule-based detection:
Involves an attempt to define a set of rules that can be used to decide that a given behavior is that of
an intruder.
a) Rule-based Anomaly detection: Rules are developed to detect deviation from previous usage
patterns.
✓ Analyze historical audit records to identify usage patterns & auto-generate rules for them
✓ Then observe current behavior & match against rules to see if conforms
✓ Like statistical anomaly detection does not require prior knowledge of security flaws
b) Rule-based penetration identification: An expert system approach that searches for suspicious
behavior.
Honeypots
Honeypots are decoy systems that are designed to lure a potential attacker away from critical
systems. Honeypots are designed to
➢
Divert an attacker from accessing critical systems
➢
Collect information about the attacker's activity
➢
Encourage the attacker to stay on the system long enough for administrators to respond
Audit Records
A fundamental tool for intrusion detection is the audit record. Some record of ongoing activity by
users must be maintained as input to an intrusion detection system. Basically, two plans are used:
1. Native audit records: Virtually all multiuser operating systems include accounting software that
collects information on user activity. The advantage of using this information is that no additional
collection software is needed. The disadvantage is that the native audit records may not contain the
needed information or may not contain it in a convenient form.
2. Detection-specific audit records: A collection facility can be implemented that generates audit
records containing only that information required by the intrusion detection system. One advantage
of such an approach is that it could be made vendor independent and ported to a variety of systems.
The disadvantage is the extra overhead involved in having, in effect, two accounting packages
running on a machine.
MALICIOUS SOFTWARE
Malicious software is software that is intentionally included or inserted in a system for a harmful
purpose.
VIRUS AND RELATED
THREATS Malicious Programs
Table: Terminology of Malicious Programs
Name Description
Virus Attaches itself to a program and propagates copies of itself to other programs
Worm Program that propagates copies of itself to other computers
Logic bomb Triggers action when condition occurs
Trojan horse Program that contains unexpected additional functionality
Backdoor (trapdoor) Program modification that allows unauthorized access to functionality
Exploits Code specific to a single vulnerability or set of vulnerabilities
Downloaders Program that installs other items on a machine that is under attack. Usually, a
downloader is sent in an e-mail.
Auto-rooter Malicious hacker tools used to break into new machines remotely
Kit (virus generator) Set of tools for generating new viruses automatically
Spammer programs Used to send large volumes of unwanted e-mail
Flooders Used to attack networked computer systems with a large volume of traffic to carry
out a denial of service (DoS) attack
Table: Terminology of Malicious Programs
Name Description
Keyloggers Captures keystrokes on a compromised system
Rootkit Set of hacker tools used after attacker has broken into a computer system and gained
root-level access
Zombie Program activated on an infected machine that is activated to launch attacks on other
machines
We can also differentiate between those software threats that do not replicate and those that
do. A Programs or fragments of programs that are activated by a trigger.
Example: logic bombs, backdoors, and zombie programs.
A program fragment or an independent program that, when executed, may produce one or more
copies of itself to be activated later on the same system or some other system.
Example: Viruses and worms are examples.
Backdoor or Trapdoor
➢
Secret entry point into a program
➢
Allows those who know access bypassing usual security procedures
➢
Have been commonly used by developers
➢
A threat when left in production programs allowing exploited by attackers
➢
Very hard to block in O/S
➢
Requires good s/w development & update
Logic Bomb
➢
One of oldest types of malicious software
➢
Code embedded in legitimate program
➢
Activated when specified conditions met
• Eg presence/absence of some file
• Particular date/time
• Particular user
➢
When triggered typically damage system
• Modify/delete files/disks, halt machine, etc
Trojan Horse
➢
Program with hidden side-effects
➢
Which is usually superficially attractive
• Eg game, s/w upgrade etc
➢
When run performs some additional tasks
• Allows attacker to indirectly gain access they do not have directly
➢
Often used to propagate a virus/worm or install a backdoor
➢
Or simply to destroy data
Zombie
➢
Program which secretly takes over another networked computer
➢
Then uses it to indirectly launch attacks
➢
Often used to launch distributed denial of service (ddos) attacks
➢
Exploits known flaws in network systems
Virus Structure
A virus can be prepended or postpended to an executable program, or it can be embedded in some
other fashion. The key to its operation is that the infected program, when invoked, will first execute the
virus code and then execute the original code of the program.
An infected program begins with the virus code and works as follows.
• The first line of code is a jump to the main virus program. The second line is a special marker
• That is used by the virus to determine whether or not a potential victim program has already been
infected with this virus.
• When the program is invoked, control is immediately transferred to the main virus program. The
virus program first seeks out uninfected executable files and infects them. Next, the virus may
perform some action, usually detrimental to the system.
• This action could be performed every time the program is invoked, or it could be a logic bomb that
triggers only under certain conditions.
• Finally, the virus transfers control to the original program. If the infection phase of the program is
reasonably rapid, a user is unlikely to notice any difference between the execution of an infected and
uninfected program.
A virus such as the one just described is easily detected because an infected version of a program is
longer than the corresponding uninfected one. A way to thwart such a simple means of detecting a virus is to
compress the executable file so that both the infected and uninfected versions are of identical length. We
assume that program P1 is infected with the virus CV. When this program is invoked, control passes to its
virus, which performs the following steps:
1. For each uninfected file P2 that is found, the virus first compresses that file to produce P'2, which is
shorter than the original program by the size of the virus.
2. A copy of the virus is prepended to the compressed program.
3. The compressed version of the original infected program, P'1, is uncompressed.
4. The uncompressed original program is executed.
Types of Viruses
Following categories as being among the most significant types of viruses:
1. Parasitic virus: The traditional and still most common form of virus. A parasitic virus attaches itself
to executable files and replicates, when the infected program is executed, by finding other executable
files to infect.
2. Memory-resident virus: Lodges in main memory as part of a resident system program. From that
point on, the virus infects every program that executes.
3. Boot sector virus: Infects a master boot record or boot record and spreads when a system is booted
from the disk containing the virus.
4. Stealth virus: A form of virus explicitly designed to hide itself from detection by antivirus software.
5. Polymorphic virus: A virus that mutates with every infection, making detection by the "signature"
of the virus impossible.
6. Metamorphic virus: As with a polymorphic virus, a metamorphic virus mutates with every
infection. The difference is that a metamorphic virus rewrites itself completely at each iteration,
increasing the difficulty of detection. Metamorphic viruses my change their behavior as well as their
appearance.
7. Macro Viruses
• 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.
• Macro viruses infect documents, not executable portions of code. Most of the information
introduced onto a computer system is in the form of a document rather than a program.
• Macro viruses are easily spread. A very common method is by electronic mail.
Macro viruses take advantage of a feature found in Word and other office applications such
as Microsoft Excel, namely the macro. In essence, a macro is an executable program embedded in a
word processing document or other type of file.
8. E-mail Viruses
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
➢
Replicating but not infecting program
➢
Typically spreads over a network
➢
Using users distributed privileges or by exploiting system vulnerabilities
➢
Widely used by hackers to create zombie pc's, subsequently used for further attacks
➢
Major issue is lack of security of permanently connected systems
To replicate itself, a network worm uses some sort of network vehicle. Examples include the following:
• Electronic mail facility: A worm mails a copy of itself to other systems.
• Remote execution capability: A worm executes a copy of itself on another system.
• Remote login capability: A worm logs onto a remote system as a user and then uses
commands to copy itself from one system to the other.
The new copy of the worm program is then run on the remote system where, in addition to any
functions that it performs at that system, it continues to spread in the same fashion.
A network worm exhibits the same characteristics as a computer virus: a dormant phase, a
propagation phase, a triggering phase, and an execution phase. The propagation phase generally
performs the following functions:
1. Search for other systems to infect by examining host tables or similar repositories of remote
system addresses.
2. Establish a connection with a remote system.
3. Copy itself to the remote system and cause the copy to be run
As with viruses, network worms are difficult to counter.
VIRUS COUNTERMEASURES
Antivirus Approaches
The ideal solution to the threat of viruses is prevention: The next best approach is to be able to do the
following:
• Detection: Once the infection has occurred, determine that it has occurred and locate the virus.
• Identification: Once detection has been achieved, identify the specific virus that has infected a
program.
• Removal: Once the specific virus has been identified, remove all traces of the virus from the
infected program and restore it to its original state. Remove the virus from all infected systems so
that the disease cannot spread further.
If detection succeeds but either identification or removal is not possible, then the alternative is to discard the
infected program and reload a clean backup version.
There are four generations of antivirus software:
• First-generation - simple scanners
o Scanner uses virus signature to identify virus
o Or change in length of programs
• Second-generation - heuristic scanners
o Uses heuristic rules to spot viral infection
o Or uses crypto hash of program to spot changes
• Third-generation - activity traps
o Memory-resident programs identify virus by actions
• Fourth-generation - full-featured protection
o Packages with a variety of antivirus techniques
o Eg scanning & activity traps, access-controls
At the start of each simulation, the emulator begins interpreting instructions in the target code, one at
a time. Thus, if the code includes a decryption routine that decrypts and hence exposes the virus, that code is
interpreted. In effect, the virus does the work for the antivirus program by exposing the virus. Periodically,
the control module interrupts interpretation to scan the target code for virus signatures.
2. Digital Immune System
• General purpose emulation & virus detection
• Any virus entering org is captured, analyzed, detection/shielding created for it, removed
Error! Hyperlink reference not valid. illustrates the typical steps in digital immune system operation
3. Behavior-Blocking Software
➢
Integrated with host O/S
➢
Monitors program behavior in real-time
• Eg file access, disk format, executable mods, system settings changes, network access
➢
For possibly malicious actions
• If detected can block, terminate, or seek ok
➢
Has advantage over scanners
➢
But malicious code runs before detection
Monitored behaviors can include the following:
• Attempts to open, view, delete, and/or modify files;
• Attempts to format disk drives and other unrecoverable disk operations;
• Modifications to the logic of executable files or macros;
• Modification of critical system settings, such as start-up settings;
• Scripting of e-mail and instant messaging clients to send executable content; and
• Initiation of network communications.
FIREWALLS DESIGN PRINCIPLES
Internet connectivity is no longer an option for most organizations. However, while
internet access provides benefits to the organization, it enables the outside world to reach and
interact with local network assets.
This creates the threat to the organization. While it is possible to equip each workstation
and server on the premises network with strong security features, such as intrusion protection,
this is not a practical approach.
The alternative, increasingly accepted, is the firewall. The firewall is inserted between
the premise network and internet to establish a controlled link and to erect an outer security
wall or perimeter.
The aim of this perimeter is to protect the premises network from internet based attacks
and to provide a single choke point where security and audit can be imposed.
The firewall can be a single computer system or a set of two or more systems that
cooperate to perform the firewall function.
Firewall Characteristics
• All traffic from inside to outside, and vice versa, must pass through the firewall.
This is achieved by physically blocking all access to the local network except via
the firewall.
• Only authorized traffic, as defined by the local security policy, will be allowed to
pass. Various types of firewalls are used, which implement various types of security
policies.
• The firewall itself is immune to penetration. This implies that use of a trusted
system with a secure operating system. This implies that use of a trusted system
with a secure operating system.
Four techniques that firewall use to control access and enforce the site’s security policy is
as follows:
• Service control – determines the type of internet services that can be accessed,
inbound or outbound. The firewall may filter traffic on this basis of IP address and
TCP port number; may provide proxy software that receives and interprets each
service request before passing it on; or may host the server software itself, such as
web or mail service.
• Direction control – determines the direction in which particular service request
may be initiated and allowed to flow through the firewall.
• User control – controls access to a service according to which user is attempting to
access it.
• Behavior control – controls how particular services are used.
Capabilities of Firewall
• A firewall defines a single choke point that keeps unauthorized users out of the
protected network, prohibits potentially vulnerable services from entering or leaving
the network, and provides protection from various kinds of IP spoofing and routing
attacks.
• A firewall provides a location for monitoring security related events. Audits and
alarms can be implemented on the firewall system.
• A firewall is a convenient platform for several internet functions that are not
security related.
• A firewall can serve as the platform for IPsec.
Limitations of Firewall
• The firewall cannot protect against attacks that bypass the firewall.
• The firewall does not protect against internal threats.
• The firewall cannot protect against the transfer of virus-infected programs or files.
Because of the variety of operating systems and applications supported inside the
perimeter, it would be impractical and perhaps impossible for the firewall to scan all
incoming files, e-mail, and messages for viruses.
ROLES OF FIREWALLS
• The firewall imposes restrictions on packets entering or leaving the private network.
• All traffic from inside to outside, and vice versa, must pass through the firewall, but only
authorized traffic will be allowed to pass.
• Packets are not allowed through unless they conform to a filtering specification or unless
there is negotiation involving some sort of authentication.
• The firewall itself must be immune to penetration.
• Firewalls create checkpoints between an internal private network and an untrusted Internet.
Once the choke points established, the device can monitor, filter, and verify all inbound
and outbound traffic.
• The firewall may filter on the basis of IP source and destination addresses and TCP port
number.
• The firewall also enforces logging and provides alarm capacities as well. Placing logging
services at firewalls, security administrators can monitor all access to and from the Internet.
• Firewalls may block TELNET or RLOGIN connections from the Internet to the intranet. It
block SMTP and FTP connections to the Internet from internal systems not authorized to
send e-mail or to move files.
• The firewall provides protection from various kinds of IP spoofing and routing attacks. It
can also serve as the platform for IPsec.
• A firewall can limit network exposure by hiding the internal network systems and
information from the public Internet.
• A firewall provides a location for monitoring security-related events. Audits and alarms
can be implemented on the firewall system.
Four general techniques that firewalls use to control access and enforce the site's security
policy
1. Service control: Determines the types of Internet services that can be accessed, inbound or
outbound. The firewall may filter traffic on the basis of IP address and TCP port number;
may provide proxy software that receives and interprets each service request before passing
it on; or may host the server software itself, such as a Web or mail service.
2. Direction control: Determines the direction in which particular service requests may be
initiated and allowed to flow through the firewall.
3. User control: Controls access to a service according to which user is attempting to access
it. This feature is typically applied to users inside the firewall perimeter (local users).
4. Behavior control: Controls how particular services are used. For example, the firewall
may filter e-mail to eliminate spam, or it may enable external access to only a portion of the
information on a local Web server.
Firewall limitations
• It cannot protect against internal threats such as an employee who cooperates with an
external attacker.
• The firewall cannot protect against attacks that bypass the firewall.
• It is also unable to protect against the transfer of virus-infected programs or files because it
is impossible for it to scan all incoming files, e-mail, and messages for viruses.
FIREWALL-RELATED TERMINOLOGY
To design and configure a firewall, some familiarity with the basic terminology is
required.
1. Bastion Host
A bastion host is a publicly accessible device for the network's security, which has a
direct connection to a public network such as the Internet. The bastion host serves as a
platform for any one of the three types of firewalls: packet filter, circuit-level gateway, or
application-level gateway.
Bastion hosts must check all incoming and outgoing traffic and enforce the rules
specified in the security policy. They must be prepared for attacks from external and possibly
internal sources.
The bastion host's role falls into the following three common types:
1. Single-homed bastion host: This is a device with only one network interface, normally
used for an application-level gateway. The external router is configured to send all
incoming data to the bastion host, and all internal clients are configured to send all
outgoing data to the host.
2. Dual-homed bastion host: This is a firewall device with at least two network interfaces.
The advantage of using such hosts is that they create a complete break between the external
network and the internal network. This break forces all incoming and outgoing traffic to
pass through the host.
3. Multihomed bastion host: Used to allow the user to enforce strict security mechanisms.
When the security policy requires all inbound and outbound traffic to be sent through a
proxy server, a new proxy server should be created for the new streaming application.
2. Proxy Server
• Proxy servers are used to communicate with external servers on behalf of internal clients.
• A proxy service is set up and torn down in response to a client request, rather than existing
on a static basis.
• Application proxies forward packets only when a connection has been established using
some known protocol. When the connection closes, a firewall using application proxies
rejects individual packets, even if they contain port numbers allowed by a rule set.
• The audit log is an essential tool for detecting and terminating intruder attacks. Therefore,
each proxy maintains detailed audit information by logging all traffic, each connection, and
the duration of each connection.
• Each proxy is independent of other proxies on the bastion host. If there is a problem with
the operation of any proxy, or if future vulnerability is discovered, it is easy to replace the
proxy without affecting the operation of the proxy's applications.
• A proxy generally performs no disk access other than to read its initial configuration file.
This makes it difficult for an intruder to install Trojan horse sniffers or other dangerous
files on the bastion host.
3. SOCKS
• The SOCKS protocol version 4 provides for unsecured firewall traversal for TCP-based
client/server applications, including HTTP, TELNET, and FTP.
• The new protocol extends the SOCKS version 4 model to include UDP, allows the
framework to include provision for generalized strong authentication schemes, and extends
the addressing scheme to encompass domain name and IPv6addresses.
• SOCKS define how to establish authenticated connections, but currently, it does not
provide a clear-cut solution to the problem of encrypting the data traffic.
4. Choke Point
• A choke point is the point at which a public Internet can access the internal network.
• The most comprehensive and extensive monitoring tools should be configured on the choke
points.
• Proper implementation requires that all traffic be funneled through these choke points.
• All traffic is flowing through the firewalls, security administrators, as a firewall strategy,
need to create choke points to limit external access to their networks.
• Once these choke points have been clearly established, the firewall devices can monitor,
filter, and verify all inbound and outbound traffic.
7. VPN
• VPNs are appropriate for any organization requiring secure external access to internal
resources.
• All VPNs are tunnelling protocols in the sense that their information packets or payloads
are encapsulated or tunnelled into the network packets.
• All data transmitted over a VPN is usually encrypted because an opponent with access to
the Internet could eavesdrop on the data as it travels over the public network.
• The VPN encapsulates all the encrypted data within an IP packet.
• Authentication, message integrity, and encryption are very important fundamentals for
implementing a VPN.
• Without such authentication procedures, a hacker could impersonate anyone and then gain
access to the network.
TYPES OF FIREWALLS
Firewalls are classified into three common types:
1. Packet filtering Router
2. Circuit-level gateways
3. Application-level gateways
The packet filter is typically set up as a list of rules based on matches to fields in the IP
or TCP header. If there is a match to one of the rules, that rule is invoked to determine whether
to forward or discard the packet. If there is no match to any rule, then a default action is taken.
Two default policies are possible:
Default = discard: That which is not expressly permitted is
prohibited. Default = forward: That which is not expressly
prohibited is permitted.
If a packet is passed through the filter and has a source port of 23, it will immediately be
discarded. If a packet with a destination port of 23 is passed through this filter, it is discarded
only after rule 2 has been applied. All other packets will be discarded.
One approach to handling FTP connections is explained with the following rule set.
Rule 1 allows any host with the network address 192.168.10.0 to initiate a TCP session on any
destination IP address on port 21. Rule 2 blocks any packet originating from any remote
address with a source port of 20 and contacting a host with a network address 192.168.10.0 on
any port less than 1024. Rule 3 allows any remote address that has a source port of 20 and is
contacting any host with a network address of 192.168.10.0 on any port. Once a connection is
set up, the ACK flag ( ) of a TCP segment is set to acknowledge segments sent from
the other side. If any packet violates rule 2, it will be immediately discarded, and rule 3 will
never be executed.
Advantages of packet filter router
• Simple
• Transparent to users
• Very fast
FIREWALL DESIGNS
Part –A (2 Marks)
22. What are Honeypots in Intrusion Detection System? [April/May 2010] [Nov/Dec
2013][MAY 2011]
A relatively recent innovation in intrusion detection technology is the honeypot.
Honeypots are decoy systems that are designed to lure a potential attacker away from critical
systems. Honeypots are designed to
• Divert an attacker from accessing critical systems
• Collect information about the attacker's activity
• Encourage the attacker to stay on the system long enough for administrators to
respond
24. What are the two types of audit records? [May/June 2012]
This audit record is a fundamental tool for intrusion detection. Here they record of
ongoing activity by users are maintained. This is an input to the intrusion detection system.
• Native Audit Record: This is maintained in multiuser operating system.
• Detection Specific Audit Record: A facility is implemented to generate the audit
record.