Security Chapter 4
Security Chapter 4
Department of
Computer Science
Computer Security
• The mail is sent to a mail server which is permanently available on the network.
• When the recipient’s machine connects to the network, it reads the mail from the mail server.
• In general, the e-mail infrastructure consists of a mesh of mail servers, also termed as Message
Transfer Agents (MTAs) and client machines running an e-mail program comprising of User
Agent (UA) and local MTA.
• Typically, an e-mail message gets forwarded from its UA, goes through the mesh of MTAs and
finally reaches the UA on the recipient’s machine.
• The popular framework developed for ensuring security at network layer is Internet Protocol
Security (IPsec).
Features of IPsec
• IPsec is not designed to work only with TCP as a transport protocol. It works with UDP as well
as any other protocol above IP such as ICMP, OSPF etc.
• IPsec protects the entire packet presented to IP layer including higher layer headers.
• Since higher layer headers are hidden which carry port number, traffic analysis is more
difficult.
• IPsec works from one network entity to another network entity, not from application process to
application process. Hence, security can be adopted without requiring changes to individual
user computers/applications.
• Tough widely used to provide secure communication between network entities, IPsec can
provide host-to-host security as well.
• The most common use of IPsec is to provide a Virtual Private Network (VPN), either between
two locations (gateway-to-gateway) or between a remote user and an enterprise network (host-
4.5.4 Link layer security
• We have seen that rapid growth of Internet has raised a major concern for network security.
• Several methods have been developed to provide security in the application, transport, or
network layer of a network.
• Many organizations incorporate security measures at higher OSI layers, from application layer
all the way down to IP layer.
• However, one area generally left unattended is hardening of Data Link layer. This can open the
network to a variety of attacks and compromises.
Security Concerns in Data Link Layer
• Data link Layer in Ethernet networks is highly prone to several attacks. The most common
attacks are −
ARP Spoofing
• Address Resolution Protocol (ARP) is a protocol used to map an IP address to a physical
machine address recognizable in the local Ethernet.
• When a host machine needs to find a physical Media Access Control (MAC) address for an IP
address, it broadcasts an ARP request.
• The other host that owns the IP address sends an ARP reply message with its physical address.
• Each host machine on network maintains a table, called ‘ARP cache’. The table holds the IP
address and associated MAC addresses of other host on the network.
• Since ARP is a stateless protocol, every time a host gets an ARP reply from another host, even
though it has not sent an ARP request, it accepts that ARP entry and updates its ARP cache.
• The process of modifying a target host’s ARP cache with a forged entry known as ARP
poisoning or ARP spoofing.
• ARP spoofing may allow an attacker to masquerade as legitimate host and then intercept data
frames on a network, modify or stop them.
• Often the attack is used to launch other attacks such as man-in-the-middle, session hijacking,
or denial of service.
MAC Flooding
• Every switch in the Ethernet has a Content-Addressable Memory (CAM) table that stores the
MAC addresses, switch port numbers, and other information.
• The table has a fixed size. In the MAC flooding attack, the attacker floods the switch with
MAC addresses using forged ARP packets until the CAM table is full.
• Once CAM is flooded, the switch goes into hub-like mode and starts broadcasting the traffic
that do not have CAM entry.
• The attacker who is on the same network, now receives all the frames which were destined
only for a specific host.
Port Stealing
• Ethernet switches have the ability to learn and bind MAC addresses to ports.
• When a switch receives traffic from a port with a MAC source address, it binds the port
number and that MAC address.
• The port stealing attack exploits this ability of the switches. The attacker floods the switch with
forged ARP frames with the target host’s MAC address as the source address.
• Switch is fooled to believe that the target host is on port, on which actually an attacker is
connected.
• Now all data frames intended for the targeted host are sent to the attacker’s switch port and not
to the target host.
• Thus, the attacker now receives all the frames which were actually destined only for the target
host.
DHCP Attacks
• Dynamic Host Configuration Protocol (DHCP) is not a datalink protocol but solutions to
DHCP attacks are also useful to thwart Layer 2 attacks.
• DHCP is used to dynamically allocate IP addresses to computers for a specific time period.