04 - Network Security Technologies-7.11.2022
04 - Network Security Technologies-7.11.2022
data to be transmitted
E.g., user datagram protocol (UDP)
via encapsulation
A layer can be implemented in hardware or
software
The bottommost layer must be in hardware
Application Application
Transport Transport
Fiber
Ethernet Wi-Fi
Optics
Physical Layer
04/23/24 Computer Networks 5
Encapsulation
A packet typically consists of
Control information for addressing the packet:
Payload
Footer
or trailer
Header Header Payload
7
Internet Packet Encapsulation
Application
Packet Application Layer
TCP
Header TCP Data Transport Layer
IP
Header IP Data Network Layer
Frame
Header Frame Data Frame
Footer Link Layer
04/23/24 Computer Networks 8
Internet Packet Encapsulation
Data link frame
IP packet
TCP or UDP packet
Application packet
connected to a computer
Operation of a switch
Learn the MAC address of
destination computer
192.168.1.1 is at
00:11:22:33:44:01
192.168.1.105 is at
00:11:22:33:44:02
ARP Cache ARP Cache
192.168.1.105 00:11:22:33:44:02 192.168.1.1 00:11:22:33:44:01
27
Poisoned ARP Caches
192.168.1.106
00:11:22:33:44:03
Data Data
192.168.1.105 is at 192.168.1.1 is at
00:11:22:33:44:03 00:11:22:33:44:03
192.168.1.1 192.168.1.105
00:11:22:33:44:01 00:11:22:33:44:02
28
Telnet Protocol (RFC 854)
Telnet is a protocol that provides a general, bi-
directional, not encrypted communication
telnet is a generic TCP client
Allows a computer to connect to another one
Provides remote login capabilities to computers on the
Internet
Sends whatever you type
Prints whatever comes back
33
Internet Protocol
34
IP Addresses and Packets
IP addresses IP header includes
IPv4: 32-bit addresses Source address
IPv6: 128-bit addresses
Destination address
Packet length (up to 64KB)
Address subdivided into Time to live (up to 255)
network, subnet, and host IP protocol version
E.g., 128.148.32.110 Fragmentation information
Broadcast addresses Transport layer protocol
E.g., 128.148.32.255 information (e.g., TCP)
Private networks v length
not routed outside of a LAN fragmentation info
10.0.0.0/8 TTL prot.
172.16.0.0/12 source
192.168.0.0/16 destination
35
IP Address Space and ICANN
Hosts on the internet must Examples
003/8 May 94 General Electric
have unique IP addresses 009/8 Aug 92 IBM
Internet Corporation for 012/8 Jun 95 AT&T Bell Labs
013/8 Sep 91 Xerox Corporation
Assigned Names and 015/8 Jul 94 Hewlett-Packard
Numbers 017/8 Jul 92 Apple Computer
International nonprofit 018/8 Jan 94 MIT
019/8 May 95 Ford Motor
organization 040/8 Jun 94 Eli Lily
Incorporated in the US 043/8 Jan 91 Japan Inet
Allocates IP address space 044/8 Jul 92 Amateur Radio
Digital
Manages top-level domains 047/8 Jan 91 Bell-Northern Res.
Historical bias in favor of US 048/8 May 95 Prudential
corporations and nonprofit Securities
054/8 Mar 92 Merck
organizations 055/8 Apr 95 Boeing
056/8 Jun 94 U.S. Postal Service
36
IP Routing
A router bridges two or more networks
Operates at the network layer
Maintains tables to forward packets to the
appropriate network
Forwarding decisions based solely on the
destination address
Routing table
Maps ranges of addresses to LANs or other
gateway routers
37
Internet Routes
Internet Control Message Protocol (ICMP)
Works side-by-side with Internet Protocol
Simple messages encapsulated in single IP packets
Sending and responding to network layer messages
Tools based on ICMP
Ping: sends series of echo request messages and
provides statistics on roundtrip times and packet loss
Traceroute: sends series ICMP packets with increasing
TTL value to discover routes
38
ICMP Attacks
Ping of death
ICMP specifies messages must fit a single IP
packet (64KB)
Send a ping packet that exceeds maximum size
using IP fragmentation
Reassembled packet caused several operating
systems to crash due to a buffer overflow
Smurf
A denial service attack using ping to spoofed IP
address
39
Smurf Attack
Amplifying
echo
Network response
echo
request
echo
response
Attacker echo
response
Victim
40
Denial of Service Attack
Send large number of packets to
host providing service
Slows down or crashes host Source:
M.T. Goodrich,
Often executed by botnet Probabalistic Packet Marking for Large-S
cale IP Traceback
Attack propagation , IEEE/ACM Transactions on Networking
Starts at zombies 16:1, 2008.
Travels through tree of internet
routers rooted
Ends at victim
IP source spoofing
Hides attacker
Scatters return traffic from victim
Examples
ping 10.10.10.1 -l (size) 70000
ping to broadcast address
ping from multiple sources
42
IP Vulnerabilities
Unencrypted transmission
Eavesdropping possible at any intermediate
43
IP Vulnerabilities
No integrity checking
Entire packet, header and payload, can be
leverage
44
Packet Sniffers
Packet sniffers “read” information traversing a network
Packet sniffers intercept network packets, possibly
using ARP cache poisoning
Can be used as legitimate tools to analyze a network
Monitor network usage
Filter network traffic
Analyze network problems
Can also be used maliciously
Steal information (i.e. passwords, conversations,
etc.)
Analyze network information to prepare an attack
45
Detecting Sniffers
Sniffers are almost always passive
They simply collect data
They do not attempt “entry” to “steal” data
This can make them extremely hard to detect
Most detection methods require suspicion that
sniffing is occurring
Then some sort of “ping” of the sniffer is
necessary
It should be a broadcast that will cause a
response only from a sniffer
46
Detecting Sniffers
Another solution on switched hubs is ARP watch
An ARP watch monitors the ARP cache for
duplicate entries of a machine
If such duplicates appear, raise an alarm
Problem: false alarms
47
Stopping Packet Sniffing
The best way is to encrypt packets securely
Sniffers can capture the packets, but they are
meaningless
SSH is also a much more secure method of connection
Packets are encrypted with Private/Public key pairs
makes sniffing virtually useless
On switched networks, almost all attacks will be via
ARP spoofing
Add machines to a permanent store in the cache
This store cannot be modified via a broadcast reply
Thus, a sniffer cannot redirect an address to itself
48
Unencrypted Telnet Session
Telnet password not encrypted
SSH Session
Encrypted SSH Session
Stopping Packet Sniffing
The best security is to not let them in in the first
place
Sniffers need to be on your subnet in a
switched hub in the first place
All sniffers need to somehow access root at
some point to start themselves up
53
Firewalls, Tunnels, and
Network Intrusion Detection
54
Firewalls
A firewall is an integrated collection of security
measures designed to prevent unauthorized
electronic access to a networked computer system.
A network firewall is similar to firewalls in building
construction, because in both cases they are
intended to isolate one "network" or "compartment"
from another.
55
Firewall Policies
To protect private networks and individual machines from
the dangers of the greater Internet, a firewall can be
employed to filter incoming or outgoing traffic based on a
predefined set of rules called firewall policies.
Firewall policies
Untrusted
Internet
56
Policy Actions
Packets flowing through a firewall can have one of three outcomes:
Accepted: permitted through the firewall
Dropped: not allowed through with no indication of failure
Rejected: not allowed through, accompanied by an attempt to
inform the source that the packet was rejected
Policies used by the firewall to handle packets are based on several
properties of the packets being inspected, including the protocol used,
such as:
TCP or UDP
the source and destination IP addresses
the source and destination ports
the application-level payload of the packet (e.g., whether it
contains a virus).
57
Blacklists and White Lists
There are two fundamental approaches to
creating firewall policies (or rulesets) to
effectively minimize vulnerability to the outside
world while maintaining the desired functionality
for the machines in the trusted internal network
(or individual computer).
Whitelist approach
A safer approach to defining a firewall ruleset
is the default-deny policy, in which packets are
dropped or rejected unless they are
specifically allowed by the firewall.
58
Blacklists and White Lists
Blacklist approach
All packets are allowed through except those
that fit the rules defined specifically in a
blacklist.
This type of configuration is more flexible in
ensuring that service to the internal network is
not disrupted by the firewall, but is naïve from
a security perspective in that it assumes the
network administrator can enumerate all of the
properties of malicious traffic.
59
Configuring Standard and Extended IPv4 ACLs with CLI
Protocol Type
command.
Applied on a VTY port using the access-class
command.
Configuring Standard and Extended IPv4 ACLs with CLI
67
Firewall Types
application layer
It works like a proxy it can “understand”
certain applications and protocols.
It may inspect the contents of the traffic,
blocking what it views as inappropriate content
(i.e. websites, viruses, vulnerabilities, ...)
68
Stateless Firewalls
A stateless firewall doesn’t maintain any remembered
context (or “state”) with respect to the packets it is
processing. Instead, it treats each packet attempting to
travel through it in isolation without considering packets
that it has processed previously.
SYN
Seq = x
Port=80
Client SYN-ACK
Seq = y
Ack = x + 1
ACK
Seq = x + 1
Ack = y + 1
Trusted internal Server
network
Firewall
Client (blocked)
SYN
Seq = y Attacker
Port=80
71
Statefull Firewall Example
Allow only requested TCP connections:
76.120.54.101
SYN
Seq = x Server
128.34.78.55 Port=80
Client SYN-ACK
Seq = y
Ack = x + 1
ACK
Seq = x + 1
Ack = y + 1
Trusted internal
SYN-ACK
network (blocked) Seq = y
Attacker
Port=80
R1(config)# access-list 100 permit tcp any eq 443 192.168.1.0 0.0.0.255 established
R1(config)# access-list 100 deny ip any any
R1(config)# interface s0/0/0
R1(config-if)# ip access-group 100 in
The first-generation IOS traffic filtering solution
to support the two-way nature of TCP virtual
circuits was the TCP established keyword for
extended IP ACLs.
Stateful firewall allows a complete TCP
communication. When a https request goes out
to the server, then reply https is allowed to go
into the router. Request followed by Reply.
Another example would be a three way
handshake. SYN SYN,ACK ACK
Block all traffic coming from the Internet except
for the TCP reply traffic associated with
established TCP traffic initiated from inside
network
• https source port
n port
• https destinatio
Go to 192.168.3.1 server turn on the https service.
Step 1 :Browse (https://192.168.3.1) the server 192.168.3.1 from
192.168.2.1 using browser at 192.168.2.1
The browse (https) should work
Now try to ping from 192.168.2.1 to 192.168.3.1
The ping should work
Step 2 : R2(config)# access-list 120 permit tcp any eq 443
192.168.3.0 0.0.0.255 established
R2(config)# access-list 100 deny ip any any
Statefull Firewall Example
The established keyword forces the router to check whether the TCP ACK or
RST control flag is set.
If the ACK flag is set, the TCP traffic is allowed in. If not, it is assumed that the
traffic is associated with a new connection initiated from the outside.
Stateful vs. Stateless Firewall
be avoided.
78
Location of DMZ in isolating
internal network
79
Systems to place in DMZ
80
Systems to place in DMZ
81
DMZ architectures
82
DMZ architectures
83
Single firewall architecture
84
Dual firewall architecture
85
IPSec
IPSec defines a set of protocols to provide
confidentiality and authenticity for IP packets
Each protocol can operate in one of two modes,
transport mode or tunnel mode.
In transport mode, additional IPsec header information
is inserted before the data of the original packet, and
only the payload of the packet is encrypted or
authenticated.
In tunnel mode, a new packet is constructed with IPsec
header information, and the entire original packet,
including its header, is encapsulated as the payload of
the new packet.
86
Virtual Private Networking (VPN)
Virtual private networking (VPN) is a
technology that allows private networks to be
safely extended over long physical distances by
making use of a public network, such as the
Internet, as a means of transport.
VPN provides guarantees of data confidentiality,
integrity, and authentication, despite the use of
an untrusted network for transmission.
87
Types of VPNs
Hardware VPN:
Hardware VPN appliances are network equipment dedicated only
to the purpose of VPN.
Hardware VPN can offer the best performance for organizations
and companies relying heavily on VPN to communicate between
their different branches.
Software VPN:
A typical use of VPN service where the user access a corporate
data network from a home PC across the internet
The employee installs VPN software on a home PC
The software is already configured to communicate with the
corporate network’s VPN endpoint
The user can then log into the corporate network by using an
appropriate authentication and authorization methodology
Web based VPN
Securely connects to the corporate network using a web-browser
over the Internet.
88
A Virtual Private Network (VPN) is a private network that is created via tunneling
over a public network, usually the Internet.
VPNs have multiple benefits, including:
• Compatibility with broadband technology
• Cost savings
• Security
• Scalability
VPN Topologies
Site-to-Site VPNs
Created when connection devices on both sides of the VPN
connection are aware of the VPN configuration in advance.
The VPN remains static and internal hosts have no knowledge
that a VPN exists.
VPN Topologies
Remote-Access VPNs
• Allows for dynamically changing connection information
and can be enabled and disabled when needed.
• Example – A telecommuter’s PC being responsible for
establishing the VPN.
Intrusion Detection Systems
Intrusion
Actions aimed at compromising the security of
the target (confidentiality, integrity, availability of
computing/networking resources)
Intrusion detection
The identification through intrusion signatures
and report of intrusion activities
Intrusion prevention
The process of both detecting intrusion activities
and managing automatic responsive actions
throughout the network
93
IDS Components
The IDS manager compiles data from the IDS sensors to
determine if an intrusion has occurred.
This determination is based on a set of site policies, which
are rules and conditions that define probable intrusions.
If an IDS manager detects an intrusion, then it triggers an
alert.
IDS Manager
Untrusted
Internet
router
router router
94
Intrusions
An IDS is designed to detect a number of
threats, including the following:
masquerader: an attacker who is falsely
using the identity and/or credentials of a
legitimate user to gain access to a computer
system or network
Misfeasor: a legitimate user who performs
actions he is not authorized to do
Clandestine user: a user who tries to block
or cover up his actions by deleting audit files
and/or system logs
95
Intrusions
IDS is designed to detect automated attacks and
threats, including the following:
port scans: information gathering intended to
determine which ports on a host are open
Denial-of-service attacks: network attacks
meant to overwhelm a host and shut out
legitimate accesses
Malware attacks: replicating malicious
software attacks.
ARP spoofing: an attempt to redirect IP
traffics in a local-area network
DNS cache poisoning: a pharming attack
directed at changing a host’s DNS cache
97
Possible Alarm Outcomes
Alarms can be sounded (positive) or not (negative)
Intrusion Attack No Intrusion Attack
Alarm
Sounded
No
Alarm
Sounded
99
Types of Intrusion Detection Systems
Statistical Intrusion Detection
A profile is built, which is a statistical representation
100
Network-Based IPS Implementations
Tune Signature
An administrator must balance the number of
incorrect alarms that can be tolerated with the
ability of the signature to detect actual intrusions.
If IPS systems use untuned signatures, they
produce many false positive alarms.
IPS Alarm in Syslog File
Defense in Depth
106
SSID
Multiple wireless networks can coexist
Each network is identified by a 32-character service set ID (SSID)
prospective clients
SSIDs are not signed, thus enabling a simple spoofing attack
Place a rogue access point in a public location (e.g., cafe, airport)
107
WEP
Wired Equivalent Privacy (WEP) is a security
algorithm for IEEE 802.11 wireless networks.
Its intention was to provide data confidentiality
comparable to that of a traditional wired network
WEP, recognizable by the key of 10 or 26
hexadecimal digits, is widely in use and is often
the first security choice presented to users by
router configuration tools.
Although its name implies that it is as secure as
a wired connection, WEP has been
demonstrated to have numerous flaws
108
Slow Attack: WEP Sniffing
109
Fast Attack: Packet Injection
110
Wi-Fi Protected Access (WPA)
WEP became widely known as insecure
In 2005, FBI publically cracked a WEP key in only 3 minutes!
Wi-Fi Protected Access (WPA) proposed in 2003
WPA uses Temporal Key Integrity Protocol (TKIP).
TKIP attempts to address the cryptographic weaknesses of
WEP’s RC4 implementation
WEP is especially weak because it simply concatenates
the IV with the encryption key to generate the RC4 seed.
TKIP remedies this by increasing the IV length to 48 bits
and by incorporating a key-mixing algorithm that combines
the key with the IV in a more sophisticated way before
using it as an RC4 seed to generate a keystream
111
WPA2
WPA2 uses the strong AES cipher for protecting
both integrity and confidentiality
The AES cipher has not been broken so far
The only disadvantage of WPA2 is in the
amount of processing power that it needs in
order to protect your network.
This translates to a direct need for more
powerful hardware or suffer a reduction in
network performance for heavily used networks.
112
Steps to secure organization wireless
Hiding the Network ID
Using Encyption
Using Firewall
Sniffing Out Intruders
Limiting the IP Addresses
Filtering out MAC Addresses
END
Q&A
Attendance UCCN1223 Group 1
Attendance UCCN1213 Group 1