Chapter 22 of 29
Security Fundamentals: Threats, Principles, and Device Hardening
View your network through an attacker’s eyes to understand common threats, security principles, and baseline hardening steps for Cisco devices.
Viewing Your Network Like an Attacker
Think Like an Attacker
To defend a network, you must think like someone trying to break it. Every network has technical, human, and physical weaknesses that attackers try to chain together.
Your Role at CCNA Level
As a network associate, your focus is to recognize core security principles, understand common network threats, and apply baseline hardening on Cisco routers and switches.
Link to Earlier Modules
SSH, FTP/TFTP, SNMP, syslog, and NTP are not just operations tools. Misconfigured, they become attack paths; configured well, they support detection and investigation.
Exam Angle
CCNA security questions usually test concepts, simple configs, and your ability to spot weak or missing controls in a small network scenario or config snippet.
Core Security Principles: CIA Triad and Least Privilege
Confidentiality
Confidentiality means only authorized people or systems can access data. In networking, use SSH, HTTPS, and ACLs to keep management and user traffic private.
Integrity
Integrity means data is not changed in an unauthorized or undetected way. Man-in-the-middle attacks or rogue config changes are integrity failures.
Availability
Availability means systems and data are reachable when needed. DoS attacks, misconfigured ACLs, and single points of failure all threaten availability.
Least Privilege
Least privilege gives each user or device only the access it needs. Use separate privilege levels, named accounts, and restricted management access on Cisco devices.
Exam Tip
In questions, map controls to CIA: encryption and access control help confidentiality; checksums and signatures help integrity; redundancy and rate limits help availability.
Common Network Threats and Attack Surfaces
Spoofing Attacks
Spoofing is pretending to be another IP, MAC, or ARP identity. It enables man-in-the-middle, session hijacking, and bypassing simple IP-based filters.
Denial of Service
DoS and DDoS aim to make services unavailable by flooding bandwidth, exhausting CPU, or abusing protocol or application weaknesses.
Man-in-the-Middle
MitM attacks intercept and possibly alter traffic. On LANs, ARP spoofing and switch attacks are common methods, breaking confidentiality and integrity.
Password Attacks
Brute force, dictionary, and phishing attacks target credentials for SSH, web GUIs, VPNs, and more. Weak or reused passwords are easy targets.
Attack Surfaces on Cisco Devices
Key surfaces: management (vty, console, HTTP/S, SNMP), control (routing, STP, ARP, CDP), and data plane (user traffic, VLAN hopping, abused ports).
Baseline Device Hardening: Access, Passwords, and Banners
Secure Local Access
Start by securing how people log in: use `enable secret`, set console and vty passwords, and prefer `login local` with per-user accounts over a shared password.
Example Goals
Goal: require a strong enable password, configure a local user for SSH, and protect console and vty lines so only authenticated users can manage the device.
Legal Banners
A MOTD banner does not block attackers but provides a clear warning that access is authorized-only and monitored, which can support legal action.
Disable Unused Services
Reduce attack surface by disabling unused services like HTTP GUIs, CDP on untrusted links, and Telnet where SSH is available.
Exam Perspective
CCNA questions often show partial configs. You may need to spot missing `enable secret`, absent banners, or reliance on Telnet instead of SSH.
Cisco IOS Hardening Walkthrough: Configuration Example
Study this annotated Cisco IOS configuration that applies baseline hardening. Focus on how each command supports CIA and least privilege.
```cisco
! 1) Set a secure enable secret (hashed in the config)
conf t
hostname R1
enable secret S3cureEn@ble2026
!
! 2) Create a local user for SSH access
username netadmin privilege 15 secret N3tAdm!nP@ss
!
! 3) Secure the console line
line console 0
logging synchronous
exec-timeout 5 0 ! 5 minutes, 0 seconds
password C0ns0leP@ss
login
!
! 4) Secure vty lines (remote access)
line vty 0 4
transport input ssh ! disable telnet
exec-timeout 10 0 ! auto-logout idle sessions
login local ! use local usernames
!
! 5) Configure a MOTD banner
banner motd #
WARNING: Authorized access only. Activity may be monitored.
#
!
! 6) Enable SSH (version 2 only)
ip domain-name example.local
crypto key generate rsa modulus 2048
ip ssh version 2
!
! 7) Restrict which IPs can manage the device (basic ACL)
ip access-list standard MGMT-ACL
permit 192.168.10.0 0.0.0.255
!
line vty 0 4
access-class MGMT-ACL in
end
```
Key ideas:
- `enable secret` and user `secret` store hashed values, improving confidentiality of credentials.
- `exec-timeout` supports availability and security by logging out idle sessions.
- `transport input ssh` removes Telnet, protecting confidentiality and integrity of management traffic.
- `access-class` with an ACL limits which hosts can attempt remote management, applying least privilege.
In a real network, you would combine this with SNMPv3, syslog, and NTP from earlier modules for monitoring and traceability.
Timeouts, Logging, and Time: Making Attacks Visible
Session Timeouts
Use `exec-timeout` on console and vty lines to log out idle sessions. This reduces the risk of someone abusing an unattended open session.
Login Failure Controls
Modern IOS can rate-limit failed logins (for example, `login block-for ...`). This slows brute-force attacks on device credentials.
Syslog for Security
Send logs to a central syslog server. Failed logins, ACL denies, and interface events become evidence for detecting and investigating attacks.
NTP and Time Accuracy
NTP keeps device clocks aligned. Accurate timestamps are essential to reconstruct what happened during a security incident.
SNMPv3 Monitoring
SNMPv3 secures monitoring traffic. Watching CPU, memory, and interface counters helps you spot DoS or scanning activity early.
User Awareness and Physical Security Basics
Why Users Matter
Phishing, pretexting, and shadow IT target people, not protocols. Training users to protect credentials and report suspicious activity is critical.
Protecting Physical Access
Lock wiring closets, protect racks, and avoid leaving console cables exposed. Physical access can bypass many logical security controls.
Port Security Concept
Switch port security can limit which MAC addresses or how many devices can connect on an access port, blocking unauthorized endpoints.
Scenarios on the Exam
You may see cases of rogue switches, unauthorized devices, or console access. Think of both physical controls and switch features as solutions.
Thought Exercise: Attack Path on a Small Network
Apply what you have learned by mentally simulating an attack. No single answer is “the” correct one; this is about structured thinking.
Scenario
You manage a small office network:
- One Cisco router, one Layer 2 switch.
- Users in VLAN 10, servers in VLAN 20.
- Router is managed via Telnet on vty 0 4 from any IP.
- No MOTD banner, no ACLs on vty lines.
- Syslog and NTP are not configured.
- Wiring closet is usually locked, but sometimes propped open during moves.
Your Tasks
- Identify at least three attack paths an external attacker or malicious insider could use.
- Think about credentials, sniffing, spoofing, and physical access.
- Map each path to CIA.
- For each attack, which part(s) of the CIA triad are impacted, and how?
- List at least five hardening steps using commands or features you know that would significantly improve security.
- Consider: SSH, `enable secret`, vty ACLs, exec timeouts, banners, syslog, NTP, port security, physical controls.
Reflect (mentally or in notes)
- Which of your hardening steps are low effort but high impact?
- Which ones depend on user behavior (awareness) vs. pure configuration?
This is exactly the kind of reasoning you will apply on scenario-style CCNA questions and in real-world junior admin roles.
Quiz 1: Principles and Threats
Check your understanding of security principles and common threats.
Which option best describes how SSH on vty lines supports the CIA triad compared to Telnet?
- SSH mainly improves availability by reducing CPU usage compared to Telnet.
- SSH improves confidentiality and integrity of management traffic by encrypting sessions, reducing the risk of credential theft and tampering.
- SSH only improves confidentiality; integrity and availability are unaffected.
- SSH has no security benefit; it is just a newer replacement for Telnet.
Show Answer
Answer: B) SSH improves confidentiality and integrity of management traffic by encrypting sessions, reducing the risk of credential theft and tampering.
SSH encrypts management traffic, including usernames, passwords, and commands. This protects confidentiality (attackers cannot easily read credentials) and integrity (traffic is protected from modification in transit). It can indirectly support availability by making compromise less likely, but its primary strengths are confidentiality and integrity. Telnet sends everything in clear text.
Quiz 2: Device Hardening Basics
Test your ability to recognize correct Cisco hardening practices.
You see the following on a router: line vty 0 4 password cisco login transport input telnet Which change provides the MOST significant security improvement with minimal impact?
- Change the vty password to a more complex one but keep Telnet.
- Add a MOTD banner but leave vty configuration as is.
- Switch to `transport input ssh` and configure `login local` with user accounts.
- Disable all vty lines to force admins to use the console port only.
Show Answer
Answer: C) Switch to `transport input ssh` and configure `login local` with user accounts.
The best improvement is to replace Telnet with SSH and use local user accounts. SSH encrypts management traffic, and `login local` allows per-user credentials and better least privilege. A stronger Telnet password still travels in clear text; a banner helps legally but does not block attacks; disabling vty entirely is rarely practical.
Key Term Flashcards: Security Fundamentals
Flip through these cards to reinforce key security concepts and IOS hardening terms.
- Confidentiality
- Security property that ensures information is not disclosed to unauthorized individuals, devices, or processes. In networking, encryption and access control help maintain confidentiality.
- Integrity
- Security property that ensures data is not altered in an unauthorized or undetected way. Hashes, digital signatures, and secure protocols help protect integrity.
- Availability
- Security property that ensures systems and data are accessible when needed. DoS attacks, single points of failure, and misconfigurations threaten availability.
- Least Privilege
- Principle of giving users, devices, and processes only the minimum access they need to perform their tasks and no more, limiting damage if they are compromised.
- Spoofing
- An attack technique where an attacker pretends to be another device or user by forging IP, MAC, or ARP information to gain unauthorized access or redirect traffic.
- Man-in-the-Middle (MitM)
- An attack where an adversary secretly intercepts and possibly alters communications between two parties who believe they are communicating directly with each other.
- `enable secret` vs `enable password`
- `enable secret` stores a hashed value and is preferred for securing privileged EXEC mode. `enable password` stores a weaker, reversible form and should be avoided on modern devices.
- MOTD Banner
- A message-of-the-day banner displayed before login on Cisco devices, typically used to provide legal warnings and authorization notices to anyone accessing the device.
- Exec Timeout (`exec-timeout`)
- A line configuration command that automatically logs out idle console or vty sessions after a specified period, reducing risk from unattended open sessions.
- Syslog in Security
- A logging mechanism that sends system messages (including failed logins, ACL denies, and interface events) to a central server for monitoring and incident investigation.
- NTP and Security
- Network Time Protocol synchronizes device clocks so that log timestamps are accurate and comparable, which is critical for reconstructing events during security incidents.
- Access Control List (ACL)
- An Access Control List (ACL) is an ordered set of permit and deny statements that control which packets are allowed or blocked based on criteria such as source, destination, and protocol.
Key Terms
- ACL
- An Access Control List (ACL) is an ordered set of permit and deny statements that control which packets are allowed or blocked based on criteria such as source, destination, and protocol.
- NTP
- Network Time Protocol, used to synchronize clocks of network devices for accurate timestamps.
- Syslog
- A standard for message logging that allows devices to send event messages to a central server.
- Spoofing
- An attack technique where an attacker pretends to be another device or user by forging identity information such as IP, MAC, or ARP.
- Integrity
- Security property that ensures data is not altered in an unauthorized or undetected way.
- MOTD Banner
- A message-of-the-day banner on Cisco devices, commonly used to display legal and authorization warnings before login.
- Availability
- Security property that ensures systems and data are accessible when needed.
- Exec Timeout
- A Cisco IOS line setting that logs out idle sessions after a configured period of inactivity.
- Confidentiality
- Security property that ensures information is not disclosed to unauthorized individuals, devices, or processes.
- Least Privilege
- Principle of giving users, devices, and processes only the minimum access they need to perform their tasks and no more.
- Denial of Service (DoS)
- An attack that attempts to make a service unavailable by overwhelming resources or exploiting protocol or application weaknesses.
- Man-in-the-Middle (MitM)
- An attack where an adversary secretly intercepts and possibly alters communications between two endpoints.