Attacks and Mitigation Techniques
Attacks and Mitigation Techniques
Source :
http://vapenik.s.cnl.sk/pcsiete/CCNA4/05_Network_Security_and
Port Security prevents many attacks including MAC
_Monitoring.pdf
Address Flooding and DHCP Starvation.
https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoi
VaWYOnlgqaZt
MAC Address Flooding Attack/
Content Addressable Memory (CAM) Table Flooding Attack
• It is a type of network attack where an attacker connected to a switch port floods the
switch interface with very large number of Ethernet frames with different fake
source MAC address.
• In a typical MAC flooding Attack, a switch is fed many Ethernet frames, each containing
different source MAC addresses, by the attacker. The intention is to consume the
limited memory set aside in the switch to store the MAC Address Table.
• After launching a successful MAC flooding attack, a malicious user can use a packet
analyzer to capture sensitive data being transmitted between other computers, which
would not be accessible were the switch operating normally.
MAC Address Review
48 Bit Hexadecimal (Base16) Unique Layer Two Address
1234.5678.9ABC
First 24 bits = Manufacture Code Second 24 bits = Specific Interface,
Assigned by IEEE Assigned by Manufacture
0000.0cXX.XXXX XXXX.XX00.0001
All F’s = Broadcast
FFFF.FFFF.FFFF
S1#
S1# show
show mac-address-table
mac-address-table
Mac
Mac Address
Address Table
Table
-------------------------------------------
-------------------------------------------
Vlan
Vlan Mac
Mac Address
Address Type
Type Ports
Ports
----
---- -----------
----------- --------
-------- -----
-----
S1#1 0001.9717.22e0
000a.f38e.74b3 DYNAMIC Fa0/4
Fa0/1
1 00d0.ba07.8499
000a.f38e.74b3 DYNAMIC Fa0/2
Fa0/1
1 0090.0c23.ceca DYNAMIC Fa0/3
S1#1 00d0.ba07.8499 DYNAMIC Fa0/2
S1#
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
CAM Table Attack Solution: Port Security
Fa0/25 … 1
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
MAC Address Table
Flooding Attack
• Common LAN switch attack is the MAC Address Table Flooding attack.
• An attacker sends fake source MAC addresses until the switch MAC Address Table is full and the switch is
overwhelmed.
• Switch is then in Fail-Open mode and broadcasts all frames, allowing the attacker to capture those frames.
• Configure Port Security to mitigate these attacks.
Source : http://vapenik.s.cnl.sk/pcsiete/CCNA4/05_Network_Security_and_Monitoring.pdf
Mitigate MAC Address Flooding Table Attacks
Source:
https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
http://vapenik.s.cnl.sk/pcsiete/CCNA4/05_Network_Security_and_Monitoring.pdf
Mitigate DHCP Attacks
DHCPDISCOVER
Broadcast
DHCPACK
Unicast
Discover
DHCP Discover
DHCP
Discover
Discover
DHCP
DHCP
Attacker Connects
Rogue DHCP Server
Client Broadcasts
Discover
DHCP
Discover
DHCP Discovery
DHCP
Messages
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
DHCP Spoofing Attack Contd.
DHCP
Server
DHCP Offer
DHCP Offer
Legitimate and Rogue
DHCP Reply
DHCP Offer
DHCP Offer
DHCP Offer
DHCP Rogue DHCP
Client Server
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
DHCP Spoofing Attack Contd.
DHCP Server
Request
DHCP
DHCP Request
Request
DHCP
Request
DHCP
Request
DHCP
Request
DHCP
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
• This creates a “man-in-the-middle” attack and can go
entirely undetected as the intruder intercepts the data
DHCP Spoofing Attack Contd. flow through the network.
DHCP
Server
DHCP Ack
DHCP Ack
DHCP Ack
Rogue Acknowledges
DHCP Rogue DHCP
Client Server
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
DHCP Starvation Attack
DHCP
DHCP
DHCP Discovery
Request
Ack
DHCP XXX(size
OfferX (size
(size
(size of
of scope)
ofscope)
of scope)
scope)
DHCP
Server
DHCP
DHCPserver offers
Server parameters all Requests
Acknowledges
Attacker initiates a DHCP
Attacker Requests all Offers
starvation attack
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
Solution: Configure DHCP Snooping
• DHCP snooping is a Cisco Catalyst feature that determines which switch ports can
respond to DHCP requests.
• If a rogue device on an untrusted port attempts to send a DHCP offer packet into the
network, the port is shut down.
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
Solution: Configure DHCP Snooping Contd.
T Trusted port DHCP
Server
U Untrusted port
T
T
T T T T
Source: U U
https://drive.google.com/drive/folders/
1aXNR1Zfr44dZcZOTVPoiVaWYOn
lgqaZt
DHCP Rogue DHCP
Client Server
Switched Port Analyzer (SPAN and RSPAN)
• Network traffic passing through ports or VLANs can be analyzed by using Switched
Port Analyzer (SPAN) or Remote SPAN (RSPAN).
• SPAN can send a copy of traffic from one port to another port on the same switch
where a network analyzer or monitoring device is connected.
• RSPAN can send a copy of traffic to a port on a different switch.
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
Source (SPAN) Port
SPAN Terminology • A port that is monitored with use of the SPAN feature.
• Can be a Layer 2 or Layer 3 port (including VLAN).
Source: https://drive.google.com/drive/folders/1aXNR1Zfr44dZcZOTVPoiVaWYOnlgqaZt
Remote Switched Port Analyzer (RSPAN)
• RSPAN can copy traffic from ports or VLANs on one switch (i.e., source switch) to a
port on a different switch (i.e., destination switch).
• A VLAN must be designated as the RSPAN VLAN and not be used for any other
purposes.
Note:
• SPAN and RSPAN vary by switching platforms.
What is Scanning?
• Method to gather information regarding the devices running on the network
• Typically to discover services or servers on a network
• Which hosts are up?
• Which services are offering?
• Do not confuse with “host vulnerability scanner” which further explore a computer by
testing for common vulnerabilities (nessus, SAINT)
Why Scanning?
• Network Security assessment
• Evaluation and Auditing the security
• Firewall Penetration Test (Policy Auditing)
• Intrusion Detection System Proof/Evaluation
• Identifying Unexpected New Servers
• Identifying open ports for proactively protect the network (Network and security admin)
• Identifying open ports for Attacking it (Hackers).
Nmap
• A well known and free security scanner written by Fyodor (http://insecure.org/nmap/)
• First released Sept 1, 1997 in Phrack 51 “The Art of Port Scanning”
(http://www.phrack.org/issues.html?issue=51
• Many updates since then:
• OS Detection (http://www.phrack.org/issues.html?issue=54&id=9#article)
• Version scanning
• ARP Scanning
• Closed Port:
• Like the TCP
SYN scan
• Open Port:
• completes the TCP
3W-Handshake (3WHS).
• Then sends RST.
Source: http://www.just.edu.jo/~tawalbeh/nyit/incs745/presentations/DoS2.ppt
•“ping” sends the data packets to the victim
PING OF DEATH •“10.128.131.108” is the IP address of the victim
•“-t” means the data packets should be sent until the program is stopped
•“-l” specifies the data load to be sent to the victim
You will get results similar to the ones shown below
ping 10.128.131.108 –t |65500
If you want to see the effects of the attack on the target computer,
you can open the task manager and view the network activities.
•Right click on the taskbar
•Select start task manager
•Click on the network tab
•You will get results similar to the following Source: https://www.guru99.com/ultimate-guide-to-dos-attacks.html
Smurf Attack
▪ A Smurf attack is another DoS attack that uses ICMP. In this, a request is sent to a
network broadcast address with the target as the spoofed source. When hosts
receive the echo request, they send an echo reply back to the target. sending
multiple Smurf attacks directed at a single target in a distributed fashion might
succeed in crashing it.
• Sending a ICMP Echo Request to a broadcast address triggers all hosts included in
the network to respond with an ICMP response packet, thus creating a large mass
of packets which are routed to the victim's spoofed address.
Hacking Activity: Launch a DoS attack
Nemesy is used to generate data packets and flood the target computer, router or server.
Source[S2]: https://www.cloudflare.com/learning/ddos/ddos-attack-tools/low-orbit-ion-cannon-loic/
How to Launch DoS Attack by using LOIC
Follow these simple steps to enact a DOS attack against a website (but do so at your
own risk).
Step 1: Run the tool.
Step 2: Enter the URL of the website in The URL field and click on Lock O.
Then, select attack method (TCP, UDP or HTTP). These options are
necessary to start the attack.
Step 3: Change other parameters per your choice or leave it to the default.
Click on the Big Button. Attack is mounted on the target.
Firewalls
• What is a Firewall?
• A hardware device, a software package, or a combination of both
• A barrier between the Internet and an edge network (internal network)
• A mechanism to filter Incoming (ingress) and outgoing (egress) packets.
• May be hardware and/or software
• Hardware is faster but can be difficult to update
• Software is slower but easier to update
There are five major processing mode categories of firewall: Packet Filtering Firewall,
Application Gateways, Circuit Gateway, MAC layer Gateways and Hybrid Firewalls.