IT141 · SESSION 8 · FIELD NOTES

LAN Security Concepts: Someone on the Inside

Seven sessions of building, and the network works. Every port answers, every switch forwards, every host gets an address. That's the problem. A switch trusts whatever is plugged into it: it learns any MAC address, and it forwards any DHCP offer and any ARP reply to hosts that believe them. This session walks through how an attacker with one cable and one free wall jack turns that trust against the network, and names the defence for each. Session 9 builds them.

Exam Module group 7–9 New material Module 10 — LAN Security Concepts Network change none: today is about exposure Next session Module 11 — Switch Security Configuration

Module 10

What Session 8 covers

The module-group exam on Modules 7–9 comes first. Then one module, in NetAcad's order: protecting endpoints; controlling who gets onto the network and its devices (AAA and 802.1X); and the Layer 2 attacks a switch is open to, one at a time, each with the defence that stops it.

Cold open · Night Shift, 02:14

The NOC's night shift has a habit: once the building is quiet, the Surveyor runs a drill. Tonight she slides a printout across the desk. "Suppose S1 showed you this." It's a MAC address table, page after page of addresses nobody recognizes, every one of them on the same port: F0/5, a wall jack by the visitors' chairs that the floor plan says is empty. "Eight thousand devices on a floor with eleven desks. What happened?" The Rookie reaches for the console cable. "Shut the port?" "That's the first answer. Nothing's wrong with S1. It's a printout. But nothing on S1 would stop this either. Tonight we learn every trick someone with one free wall jack could try. Next week we lock every door."

Topology used on this page The network exactly as Session 7 left it; nothing changes today. Some of the output on this page is illustrative: it shows what an attack would look like on HQ's switches, and it's labelled. Packet Tracer doesn't run these attacks, and nobody runs them on a network they don't own.

Module group exam

Modules 7–9: cross-module review

The exam covers DHCPv4, SLAAC and DHCPv6, and FHRP. If you can answer these cold, Sessions 6 and 7 have landed.

Where to actually study The checkpoints, flashcards and quizzes for Session 6 and Session 7, plus the Which method? drill.

Module 10.1

Endpoint security

Most attacks that make the news fall into a few kinds, and most of them reach the network through an endpoint: a laptop, desktop, server or IP phone, including the ones employees bring from home.

AttackWhat it does
DDoS (distributed denial of service)Many compromised devices, called zombies, flood a target at once, to slow or stop public access to it
Data breachServers or hosts are broken into to steal confidential information
MalwareMalicious software infects hosts. Ransomware, such as WannaCry, encrypts a host's data and demands payment to unlock it.

Devices at the edge

DeviceJob
VPN-enabled routerA secure connection for remote users across a public network. VPN can also be built into the firewall.
NGFW (next-generation firewall)Stateful inspection plus application control, a next-generation IPS (NGIPS), advanced malware protection (AMP) and URL filtering
NAC (network access control)AAA services and access policies for every kind of user and device. Cisco's ISE (Identity Services Engine) is one.

Protecting the endpoints themselves

Endpoints traditionally run their own protection: antivirus and antimalware, a host-based firewall, and a HIPS (host-based intrusion prevention system). Today they're best protected by a combination: NAC, AMP software on each host, and two appliances that watch the two ways most malware arrives.

ApplianceWatchesDoes
ESA (Email Security Appliance)Email (SMTP)Blocks known threats, discards email with bad links, catches malware that slipped through, encrypts outgoing mail. It pulls fresh threat data from Cisco Talos every few minutes.
WSA (Web Security Appliance)Web trafficURL filtering and blocklists, malware scanning, application control (allow, limit or block chat, video and so on), and decrypting web traffic to inspect it

Module 10.2

Access control: AAA and 802.1X

Two questions: who may log in to a network device, and who may plug a device into the network?

CCNA 1 callback In CCNA 1, AAA was a concept, with configuring it against a RADIUS or TACACS+ server left for later courses. In this course it stays a concept, but now you can see where the SSH login you've used since Session 1 fits into it.

Logging in to a device

The simplest method is a password on the console and vty lines. SSH is better: it needs a username and a password, and the session is encrypted. HQ's switches and R1 check those against a local database of usernames on each device:

S1 · the local user database SSH has used since Session 1
S1# show running-config | include username username admin secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0 S1# show running-config | section line line con 0 password 7 0822455D0A16544541 login line vty 0 4 login local transport input ssh line vty 5 15 login local transport input ssh

AAA

AAA is the framework for controlling access to a device or a network:

AQuestionWhat it does
AuthenticationWho are you?Checks a username and password (or certificate) before letting anyone in
AuthorizationWhat may you do?Decides, automatically after login, which commands or services the user is allowed
AccountingWhat did you do?Logs usage: start and stop times, commands typed, bytes sent. Used for auditing, billing and troubleshooting, and as evidence.
Local AAAServer-based AAA
Where the accounts liveOn each router and switchOn one central AAA server
How the device asksIt checks its own listRADIUS or TACACS+
SuitsA small networkMany routers and switches: one place to add, change or remove a user

802.1X: who may plug in

IEEE 802.1X is port-based access control. A switch port (or a wireless access point) lets only authentication messages through (plus a few control protocols such as CDP and STP) until the device on it has proved who it is. Three roles:

RoleWhoJob
Supplicant (client)The PC or phone, running 802.1X client softwareProves its identity
AuthenticatorThe switch, or a wireless access pointThe go-between: passes the client's credentials to the server, and opens the port only if the server says yes
Authentication serverUsually a RADIUS serverDecides whether the client is allowed on

Had F0/5 in the Surveyor's printout run 802.1X, a stranger's laptop would have got nothing through it except the login exchange.

Module 10.3

Layer 2: the weak link

Firewalls, VPNs and intrusion prevention guard Layer 3 and up. But every layer sits on Layer 2: an attacker who can read or redirect frames on the LAN makes the security above it useless. And LANs were built on trust, back when everyone plugged into them worked for the company.

CategoryAttacksMitigationConfigured in
MAC tableMAC address floodingPort securitySession 9
VLANVLAN hopping, double-taggingTrunk guidelines: access ports never trunk, no DTP, an unused native VLANSession 2, already
DHCPDHCP starvation, DHCP spoofingDHCP snooping (and port security for starvation)Session 9
ARPARP spoofing, ARP poisoningDynamic ARP Inspection (DAI)Session 9
Address spoofingMAC and IP address spoofingIP Source Guard (IPSG)Named only
STPSTP manipulationBPDU Guard on access portsSession 9
ReconnaissanceCDP (and LLDP) reconnaissanceCDP off on edge ports (LLDP is already off by default)Session 9

None of that works if the switches themselves are easy to take over. Protect management too:

Module 10.4

MAC address table flooding

A switch learns each frame's source MAC and the port it came in on. That table lives in memory, and it has a fixed size.

S1 · the MAC table on a normal day
S1# show mac address-table dynamic Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 10 0060.5c3b.a801 DYNAMIC Fa0/1 10 00d0.97cc.00c1 DYNAMIC Po2 10 00e0.f70c.0011 DYNAMIC Po2 30 0090.2b5d.0030 DYNAMIC Po2 30 00d0.97cc.00c1 DYNAMIC Po2 99 0002.16aa.0012 DYNAMIC Po2 99 00d0.97cc.00c1 DYNAMIC Po2

A MAC address flooding attack fills the table on purpose. A tool such as macof sends thousands of frames a second, each from a made-up source MAC. The table fills in seconds. Once it's full, the switch can't learn any new address, so frames for a host it doesn't know become unknown unicasts, and the switch floods them out every port in the VLAN, including the attacker's. For those frames, the switch has turned into a hub.

Illustration Illustration: what an attack would look like. Packet Tracer doesn't run it.
S1 · during a MAC flooding attack from F0/5
S1# show mac address-table count Mac Entries for Vlan 10: --------------------------- Dynamic Address Count : ... Static Address Count : 0 Total Mac Addresses : ... ... Total Mac Address Space Available: 0 S1# show mac address-table dynamic vlan 10 Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 10 0060.5c3b.a801 DYNAMIC Fa0/1 10 0a3f.1c77.e201 DYNAMIC Fa0/5 10 2e91.04b8.5d3c DYNAMIC Fa0/5 10 4a1c.9e02.77d3 DYNAMIC Fa0/5 10 6c08.f3a1.0b9e DYNAMIC Fa0/5 10 8e55.2d19.c460 DYNAMIC Fa0/5 ...

Module 10.5

VLAN attacks

Both VLAN attacks aim to get frames into a VLAN the attacker isn't in, without going through a router.

VLAN hopping

The attacker's host pretends to be a switch. It speaks DTP to the switch port, and if the port is willing, the two form a trunk. Now the attacker sends and receives on every VLAN the trunk carries.

Session 2 callback This is "Will it trunk?" with a laptop on one end. A port left in dynamic auto trunks with anything that asks in desirable mode.
S2 · PC-D's port: a static access port that won't negotiate
S2# show interfaces f0/11 switchport Name: Fa0/11 Switchport: Enabled Administrative Mode: static access Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off Access Mode VLAN: 30 (LOGISTICS) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none ...
S1 · Po1: a trunk built by hand
S1# show interfaces po1 switchport Name: Po1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: Off Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 900 (NATIVE) ... Trunking VLANs Enabled: 10,30,99,900 ...

Compare a desk port on a 2960 nobody has configured, after a laptop plugged into it sends DTP in desirable mode:

Illustration Illustration: what an attack would look like. Packet Tracer doesn't run it. This is a factory-default switch, not one of HQ's (look at the prompt).
A factory-default 2960 · F0/5 after the laptop asked for a trunk
Switch# show interfaces f0/5 switchport Name: Fa0/5 Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) ...

Double-tagging

The second VLAN attack needs a stranger set-up, so here it is on paper, on a version of HQ that doesn't exist: suppose one of S1's access ports were in VLAN 900, the native VLAN.

IntruderS1 port, VLAN 900? 900 30 data 1 · two tags; outer = native S1strips 900 2 · reads only the outer tag;native frames cross untagged Po2 30 data D1sees tag 30 3 · an ordinary VLAN 30 frame,forwarded via Po3 and S2 Po3, S2 PC-DVLAN 30 4 · the reply has no wayback to VLAN 900: one-way
Figure 1. Double-tagging on a hypothetical HQ. It only works because the outer tag matches the trunk's native VLAN, so S1 strips it and sends the frame untagged. The next switch reads the hidden inner tag and delivers the frame into VLAN 30.

NetAcad's three guidelines stop both VLAN attacks, and HQ has followed all three since Session 2:

Module 10.5

DHCP attacks

DHCP hands out the most important settings a host has (its address, gateway and DNS server) to anyone who asks, from anyone who answers. Both attacks are stopped by DHCP snooping.

AttackHowThe damage
DHCP starvationA tool such as Gobbler sends DHCPDISCOVERs from thousands of made-up MAC addresses until every address in the pool is leasedDenial of service: real clients get no address. It's often the first step of a spoofing attack.
DHCP spoofingA rogue DHCP server on the LAN answers clients before, or instead of, the real oneWhatever it hands out: a wrong gateway (the attacker's own host, a man-in-the-middle), a wrong DNS server (fake websites), or a wrong address (denial of service)
Session 6 callback Session 6 warned that the home router on S3 F0/3, plugged in by a LAN port instead of its internet port, would start answering the Shipping LAN's DHCP requests. That's DHCP spoofing, with no attacker at all: a rogue server can be an accident.
Illustration If the home router on S3 F0/3 were plugged in by a LAN port. A Packet Tracer copy of the network could show this one; the course network never did it.
PC-B · a lease from the home router's LAN side
C:\> ipconfig /all FastEthernet0 Connection:(default port) Connection-specific DNS Suffix..: ... Physical Address................: 0060.70AA.0020 Link-local IPv6 Address.........: FE80::260:70FF:FEAA:20 IPv6 Address....................: 2001:DB8:ACAD:20:260:70FF:FEAA:20 IPv4 Address....................: 192.168.0.100 Subnet Mask.....................: 255.255.255.0 Default Gateway.................: FE80::2 192.168.0.1 DHCP Servers....................: 192.168.0.1 DHCPv6 IAID.....................: DHCPv6 Client DUID..............: ... DNS Servers.....................: 2001:DB8:ACAD:20::100 ...

Module 10.5

ARP spoofing and poisoning

ARP has no way to check who's telling the truth. A host broadcasts "who has 192.168.10.1?" and believes whatever reply comes back. It even accepts replies nobody asked for.

A reply nobody asked for is a gratuitous ARP. It has honest uses: in Session 3 a new SVI announced itself with one, and in Session 7's HSRP what-if, a new active router did the same. An attacker uses the same message to lie. It sends gratuitous ARPs saying "192.168.10.1 is at my MAC" (ARP spoofing), and the hosts' ARP caches are now poisoned. Every frame they send to their gateway goes to the attacker, who copies it and passes it on: a man-in-the-middle.

PC-C · the gateway's real MAC
C:\> arp -a Internet Address Physical Address Type 192.168.10.1 00d0.97cc.00c1 dynamic
Illustration Illustration: what an attack would look like. Packet Tracer doesn't run it.
PC-C · after ARP poisoning from S1 F0/5
C:\> arp -a Internet Address Physical Address Type 192.168.10.1 0040.0bad.0005 dynamic 192.168.10.102 0040.0bad.0005 dynamic

IPv6 replaces ARP with ICMPv6 Neighbor Discovery, which can be forged the same way; switches have separate features to protect it, beyond this course. On IPv4, the mitigation is Dynamic ARP Inspection (DAI), which Session 9 configures.

Module 10.5

Address spoofing

Using someone else's address.

Module 10.5

STP manipulation

Spanning Tree elects the root bridge from whatever BPDUs it hears. It doesn't ask who sent them.

An attacker's host sends BPDUs announcing a lower bridge ID than D1's. The switches hold a new election and the attacker wins. With one cable, that mostly causes disruption: every change of topology costs a reconvergence and extra flooding. An attacker connected to two switches can do worse, and sit in the middle of the traffic between them. The mitigation is BPDU Guard on every access port: a port with nothing but hosts on it should never hear a BPDU, so if it does, the switch shuts it.

Session 4 callback Session 4 showed the PortFast and BPDU Guard commands as syntax, and said they'd be used in Session 9. This is the attack they're for.
S1 · VLAN 10 on a normal day
S1# show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 24586 Address 00D0.97CC.00D1 Cost 3 Port 28(Port-channel2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28682 (priority 28672 sys-id-ext 10) Address 0060.47BB.0011 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Po1 Desg FWD 9 128.27 P2p Po2 Root FWD 3 128.28 P2p
Illustration Illustration: what an attack would look like. Packet Tracer doesn't run it.
S1 · a laptop on F0/5 claims to be the root
S1# show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 10 Address 0040.0BAD.0005 Cost 19 Port 5(FastEthernet0/5) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28682 (priority 28672 sys-id-ext 10) Address 0060.47BB.0011 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/5 Root FWD 19 128.5 P2p Po1 Desg FWD 9 128.27 P2p Po2 Desg FWD 3 128.28 P2p

Module 10.5

CDP reconnaissance

Before attacking, an attacker looks around. Cisco Discovery Protocol does a lot of the looking for them.

CDP is on by default on every Cisco device and every port. It announces the device's name, IP address, model, IOS version, capabilities and VLAN every 60 seconds, unencrypted and unauthenticated. Administrators use it to map and troubleshoot a network. So can anyone who captures one frame on an access port.

Here's what S1 knows about S2 from CDP. Every CDP-enabled port sends the same kind of advertisement, desk ports included. A laptop plugged into F0/5 would receive S1's every 60 seconds.

S1 · what one CDP frame tells anyone listening
S1# show cdp neighbors detail ------------------------- Device ID: S2 Entry address(es): IP address: 192.168.99.12 Platform: cisco WS-C2960-24TT-L, Capabilities: Switch IGMP Interface: FastEthernet0/23, Port ID (outgoing port): FastEthernet0/23 Holdtime : 171 sec Version : Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2013 by Cisco Systems, Inc. Compiled Wed 26-Jun-13 02:49 by prod_rel_team advertisement version: 2 VTP Management Domain: '' Native VLAN: 900 Duplex: full Management address(es): IP address: 192.168.99.12 ------------------------- Device ID: S2 ... Interface: FastEthernet0/24, Port ID (outgoing port): FastEthernet0/24 ...

The fix is to stop advertising where strangers can listen. These are Module 10's commands. HQ doesn't change today; Session 9 turns CDP off on the desk ports along with everything else.

S1 · CDP and LLDP off (the commands, not applied at HQ today)
! Per port: stop CDP on the desk ports only (the trunks keep it) S1(config)# interface range f0/1 - 20 S1(config-if-range)# no cdp enable S1(config-if-range)# end S1# show cdp interface f0/5 S1# ! ! Globally: CDP off on every port of the switch S1# configure terminal S1(config)# no cdp run S1(config)# end S1# show cdp % CDP is not enabled ! ! LLDP, the IEEE standard equivalent S1# configure terminal S1(config)# interface range f0/1 - 20 S1(config-if-range)# no lldp transmit S1(config-if-range)# no lldp receive S1(config-if-range)# exit S1(config)# no lldp run

Walk the network

Exposure map: where HQ stands tonight

Every attack on this page needs a way in. Here's which ones the network as built already stops, and which are still open until Session 9.

THREAT LEVEL: INSIDER

CASE FILE D-06

The Impostor

Wears whatever badge the network will accept. Floods a switch with thousands of made-up MAC addresses until it can't learn real ones, and starts flooding their frames to every port in the VLAN. Answers DHCP requests before the real server can, handing out its own address as the gateway. Tells every host on the VLAN that the gateway's IP address now lives at its MAC. Claims to be the root bridge. It needs no password and forces no lock: it just uses the trust a switch gives to anything plugged into it.

Tell: one access port with hundreds of MAC addresses in show mac address-table; a gateway whose MAC changed in a PC's arp -a; a PC with a lease from an address range nobody configured; a root bridge in show spanning-tree that isn't D1.

See also: Attacks and their mitigations · Name that attack

Debrief The Impostor's tricks all start the same way. What does every one of them need, and why does HQ's design already stop VLAN hopping and double-tagging, but none of the others? (Each one needs a live port to plug into. VLAN hopping needs a port that will negotiate a trunk, and double-tagging needs an access port in the native VLAN. HQ has neither: every access port is static, and VLAN 900 has no access ports. The other attacks work through an ordinary access port, which is exactly what a desk jack is. Stopping them means the switch has to check what arrives on its access ports: Session 9.)
WhereOpen to, tonightAlready stopped by designSession 9 fix
S1 and S2 host ports in use (PC-A, PC-C, PC-D)MAC flooding, DHCP spoofing and starvation, ARP poisoning, MAC and IP spoofing, STP manipulation, CDP reconnaissanceVLAN hopping: they're static access portsPort security, BPDU Guard, CDP off; DHCP snooping and DAI treat them as untrusted
S1 and S2 unused ports inside the VLAN 10 and 30 rangesThe same list. This is the main hole: an empty desk jack is live in a user VLAN. It's why every illustration on this page uses S1 F0/5.VLAN hopping: static accessPark them: VLAN 999, shut, as Session 2 promised
Parked ports (S1 and S2 F0/21–22, D1's spares)Nothing while they're shutShut, in VLAN 999: no gateway, no hostsAlready done
Trunks Po1, Po2, Po3Not reachable from a desk. They carry a flood onward if a table overflows.Static trunks with nonegotiate: no DTP. Native VLAN 900 with no hosts: no double-tagging.Trusted for DHCP snooping and DAI; CDP stays on
D1No live access portsEvery unused port parkedTrust decisions: it's the relay and the gateway
Management (VLAN 99, SSH)CDP on desk ports gives away 192.168.99.11 and .12A management VLAN with no hosts; SSH with login localCDP off on desk ports
Shipping: S3DHCP spoofing (the home router by a LAN port, Session 6's warning), a stray router's RAs (Session 7's warning), ARP poisoning, MAC flooding, STP, CDP. S3's management address shares VLAN 20 with the users.Not shown on these pages yetThe same features, and every unused port parked

Drill

Name that attack

A symptom from the NOC's logs. Which attack is it?

CCNA 1 callback CCNA 1's "name that attack" sorted attacks by kind: reconnaissance, access, denial of service. This one goes a layer down: every attack here lives at Layer 2.

Drill · Name that attack

Watch for this

Common Module 10 mistakes

Most Module 10 mistakes are matching an attack to the wrong defence, or thinking a defence covers more than it does.

1 · VLAN hopping vs double-tagging

Two different attacks. Hopping forms a trunk with DTP and works both ways. Double-tagging hides a second tag behind the native VLAN and only goes one way.

2 · ARP poisoning vs MAC spoofing

ARP poisoning changes the hosts' ARP caches; the switch's MAC table stays right. MAC spoofing changes the switch's MAC table; the hosts' caches stay right. Ask which table is lying.

3 · DHCP starvation vs spoofing

Starvation empties the real server's pool (its tell is on the server). Spoofing adds a fake server (its tell is on the client). One often follows the other.

4 · Thinking MAC flooding reaches every VLAN

The flood stays inside each VLAN. An attacker in VLAN 10 sees VLAN 10's traffic, not VLAN 30's.

5 · One fix for every attack

Each mitigation has a target: port security for flooding, DHCP snooping for DHCP, DAI for ARP, IPSG for address spoofing, BPDU Guard for STP. DHCP starvation is the one with two: snooping and port security.

6 · Mixing up the 802.1X roles

The supplicant is the client, the authenticator is the switch or access point, and the authentication server (usually RADIUS) decides. The switch passes credentials along; it doesn't judge them.

7 · "Parked" doesn't mean "safe from everything"

Parking protects the ports nobody uses. The attacks on this page work just as well through a port somebody does use. Session 9 needs both: parking for the empty ports, port security and the rest for the live ones.

End of session

What works now, and what doesn't

Nothing changed today. What's new is knowing what the network can't yet survive.

TestResultWhy
Everything that worked at the end of Session 7WorksNo change today
A laptop on an empty HQ desk jackGets a VLAN 10 or 30 addressThe unused ports inside those ranges are live. Session 9 parks them.
A laptop trying to trunk at HQNoEvery port is static access, a static trunk with nonegotiate, routed, or parked
Double-tagging at HQNoThe native VLAN, 900, has no access ports
MAC flooding, rogue DHCP, ARP poisoning, a fake root bridgeNothing stops themSession 9
CDP on desk portsOn, advertising every switch's management addressSession 9
Coming up in Session 9 Module 11 locks the doors: port security on every access port, every unused port parked, DHCP snooping with trusted and untrusted ports, Dynamic ARP Inspection, and PortFast with BPDU Guard. Case File D-06 stays open until then.

Recurring segment

The Ticket

Turn it into steps before you open the answer.

Ticket #141-08 · Priority: high · From: Front Desk

Since this morning, two PCs at the front desk can reach each other but not the internet or the file server. A third PC is fine. A visitor was using the spare desk by the window yesterday. We restarted everything and it didn't help.

One way to break it down
  1. Same subnet works, everything beyond it doesn't: the problem is the gateway, or what the PCs think the gateway is.
  2. "We restarted everything" means every PC sent a fresh DHCP discover. If a rogue server answered first, the restarted PCs have its settings. Check ipconfig /all: is the address 192.168.10.x, is the gateway 192.168.10.1, and is the DHCP server R1's 10.0.0.9? A lease from a server nobody configured is DHCP spoofing.
  3. If the settings are right, check arp -a: does 192.168.10.1 map to D1's real MAC, or to a MAC that also belongs to another address? That's ARP poisoning.
  4. Find the port: look up the rogue MAC in S1's and S2's show mac address-table. Expect the spare desk's jack, a live, unused port in VLAN 10.
  5. Tonight: shut that port, then renew the affected PCs (ipconfig /release and /renew, or arp -d for a poisoned cache).
  6. For good: park every unused port; DHCP snooping and DAI, with only the uplinks trusted. Session 9.

Before Session 9

Checkpoint: Module 10

If you can do these cold, you're ready to configure switch security.

Study

Flashcards

Click to flip. Double-click to mark as known.

Check yourself

Sample questions

Pick an answer to see if you're right. Same style as the module-group exam.

Applied

Worked examples

Think it through before you expand the answer.

Flooding

Could it see VLAN 30?

Suppose an attacker on S1 F0/5 (VLAN 10) filled S1's MAC table, and then captured frames sent to PC-C after PC-C had been quiet for a while. Could it also capture PC-D's traffic in VLAN 30?

Show answer

No. Once PC-C's entry aged out, S1 couldn't learn it again while the table was full, so frames for PC-C became unknown unicasts and were flooded out every port in VLAN 10, including F0/5. VLAN 30's traffic floods too, because S1 can't learn there either, but only out VLAN 30's ports. Flooding never crosses into another VLAN. To see it, the attacker would need a port in VLAN 30, or a trunk.

VLAN attacks

Why can't double-tagging work at HQ?

An attacker on a VLAN 10 port at HQ sends a frame with two 802.1Q tags: outer 10, inner 30. What happens?

Show answer

Nothing useful for the attacker. Double-tagging needs the attacker's access port to be in the trunk's native VLAN, so the first switch sends the frame across the trunk untagged and the hidden inner tag is the only one left. The attacker is in VLAN 10, and HQ's native VLAN is 900, which has no access ports at all. At most, the frame stays in VLAN 10 (many switches simply drop a tagged frame arriving on an access port). It can't reach VLAN 30.

DHCP

Starvation, then spoofing

Why would an attacker run DHCP starvation before plugging in a rogue DHCP server?

Show answer

With the real server's pool empty, the real server can't answer new clients, so the rogue server's offers are the only ones they get. Starvation alone is a denial of service; with spoofing after it, the attacker controls every new client's gateway and DNS server.

ARP

Who sees the poisoned entry?

An attacker in VLAN 30 sends gratuitous ARPs claiming 192.168.30.1. PC-C is in VLAN 10. Is PC-C's ARP cache poisoned?

Show answer

No. ARP is a broadcast, and broadcasts stay inside their VLAN. Only hosts in VLAN 30 hear the lie, and only they would send their gateway traffic to the attacker.

Mitigation

One attack, two answers

Port security and DHCP snooping both appear in NetAcad's list against DHCP starvation. Why does each one help?

Show answer

Starvation comes from one port pretending to be thousands of clients. Port security limits how many MAC addresses that port may use, so the switch drops the made-up ones. DHCP snooping can rate-limit DHCP messages on untrusted ports, so one port can't send thousands of requests a second. (It also checks that each request's client MAC matches the frame's source, but a tool that fakes both passes that check.)

CDP

Off everywhere?

A colleague suggests no cdp run on every switch at HQ. Why might that be too much?

Show answer

CDP is useful on links between Cisco devices: it warns about native VLAN mismatches and tells IP phones their voice VLAN. The risk is on edge ports, where users and attackers plug in. no cdp enable on the access ports closes the leak and keeps CDP where it helps.

Reference

Glossary & index

Every term from this session. Search, or jump by letter.