CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Sunday, September 7, 2025

DNS Filtering Explained: How It Protects Your Network

 DNS Filtering

DNS filtering is a cybersecurity technique that blocks access to malicious, inappropriate, or unwanted websites by controlling Domain Name System (DNS) queries. It acts as a first line of defense by preventing devices from resolving domain names associated with harmful content.

How DNS Works
  • DNS translates human-readable domain names (like example.com) into IP addresses that computers use to communicate.
  • When you type a URL into your browser, your device sends a DNS query to a DNS server to get the IP address.
What Is DNS Filtering?
DNS filtering intercepts these DNS queries and checks them against a filtering policy or threat database. If the domain is flagged (e.g., for malware, phishing, adult content), the query is blocked or redirected.

Example:
  • You try to visit malicious-site.com.
  • DNS filter checks the domain.
  • If it's blacklisted, the request is blocked or redirected to a warning page.
Purposes of DNS Filtering
1. Security
  • Blocks access to malware, phishing, botnets, and command-and-control servers.
2. Content Control
  • Restricts access to adult content, gambling, social media, etc.
3. Compliance
  • Helps organizations meet regulatory requirements (e.g., HIPAA, CIPA).
4. Bandwidth Management
  • Prevents access to high-bandwidth sites like streaming platforms.
How DNS Filtering Is Implemented
  • Cloud-based DNS services (e.g., Cisco Umbrella, Cloudflare Gateway, Quad9)
  • On-premises DNS servers with filtering rules
  • Network appliances or firewalls with DNS inspection
  • Endpoint protection software with DNS filtering modules
Benefits
  • Lightweight and fast (no need to inspect full traffic)
  • Works across devices and platforms
  • Easy to deploy and manage
  • Can block threats before they reach the network
Limitations
  • Doesn’t inspect encrypted traffic (e.g., HTTPS content)
  • Can be bypassed using alternate DNS servers or VPNs
  • May block legitimate sites if filtering is too aggressive
Best Practices
  • Use a reputable DNS filtering provider with real-time threat intelligence.
  • Combine DNS filtering with firewalls, endpoint protection, and web filtering.
  • Regularly review and update filtering policies.
  • Educate users about safe browsing habits.

Saturday, September 6, 2025

Hacksplaining Explained: Interactive Cybersecurity for Developers

 Hacksplaining.com

Hacksplaining.com is a free, interactive web-based platform designed to teach web security through hands-on hacking simulations. It’s aimed primarily at developers and IT professionals who want to understand and defend against common security vulnerabilities.

Core Concept
Hacksplaining uses the philosophy:

“To defend against hackers, you must think like one.”

It allows users to hack simulated vulnerable applications directly in the browser, helping them understand how attacks work and how to prevent them.

Key Features
  • Interactive Lessons: Users engage with real-world scenarios like SQL Injection, Cross-Site Scripting (XSS), CSRF, and more.
  • Visual Demonstrations: Vulnerabilities are explained using animations and interactive examples.
  • Code Samples: Secure and insecure coding practices are shown in languages like Python, Java, PHP, Ruby, C#, and more.
  • Quizzes: Each lesson includes a quiz to reinforce learning.
  • OWASP Top Ten Coverage: Lessons align with the most critical web security risks.
For Teams and Enterprises
  • Enterprise Licensing: Companies can track employee progress and meet compliance goals.
  • Team Training: Developers can be trained to identify and fix vulnerabilities in their own codebases.
Why It Stands Out
  • No Cost for Individuals: All core lessons are free to access.
  • Practical Learning: Instead of passive reading, users actively exploit and then fix vulnerabilities.
  • Security Awareness: Helps developers build a security-first mindset from the ground up.

Friday, September 5, 2025

MAC Flooding Attacks: How They Work and How to Prevent Them

 MAC Flooding

MAC flooding is a type of network attack that targets switches in a local area network (LAN). It aims to overwhelm the switch’s MAC address table, causing it to behave like a hub and broadcast traffic to all ports, which can lead to data interception and network degradation.

Understanding How Switches Work
  • Switches maintain a MAC address table (also called a CAM table) that maps MAC addresses to specific ports.
  • When a frame arrives, the switch checks the destination MAC address and forwards it only to the correct port.
  • This makes switches more secure and efficient than hubs.
What Is MAC Flooding?

MAC flooding involves sending a large number of frames with fake or random source MAC addresses to a switch. The goal is to populate the MAC address table so that the switch can no longer learn new addresses.

When the table is full:
  • The switch enters a fail-open mode.
  • It starts broadcasting all incoming traffic to every port.
  • This allows an attacker connected to any port to capture traffic not meant for them using tools like Wireshark.
Goals of MAC Flooding
1. Data Interception
  • Gain access to sensitive data by forcing the switch to broadcast.
2. Network Disruption
  • Overload the switch, causing performance issues.
3. Preparation for Further Attacks
  • Set the stage for Man-in-the-Middle (MitM) or session hijacking.
How It’s Done
Attackers use tools like:
  • macof (part of the dsniff suite)
  • Yersinia
  • Scapy (Python-based packet crafting)
These tools generate thousands of frames with spoofed MAC addresses rapidly.

Detection and Prevention

Detection
  • Unusual traffic patterns or high volume of MAC address changes.
  • Switch logs show frequent MAC table updates.
  • IDS/IPS systems detect abnormal behavior.
Prevention
1. Port Security
  • Limit the number of MAC addresses per port.
  • Configure sticky MAC addresses.
2. MAC Address Table Aging
  • Adjust aging time to reduce vulnerability window.
3. 802.1X Authentication
  • Authenticate devices before allowing network access.
4. VLAN Segmentation
  • Isolate sensitive devices from general access.
5. Monitoring Tools
  • Use SNMP, NetFlow, or security appliances to monitor switch behavior.

ARP Spoofing Explained: How Attackers Hijack Network Traffic

 ARP Poisoning

ARP poisoning (also known as ARP spoofing) is a type of cyberattack that exploits the Address Resolution Protocol (ARP), which is used to map IP addresses to MAC (Media Access Control) addresses in a local network. Here's a detailed breakdown of how it works, why it's dangerous, and how it's mitigated:

How ARP Works

In a local network:
  • Devices communicate using IP addresses.
  • To send data to another device, the sender needs the recipient's MAC address.
  • ARP resolves this by sending a broadcast message like:
  • "Who has IP 192.168.1.1? Tell 192.168.1.100"
  • The device with that IP replies with its MAC address.
  • The sender stores this mapping in its ARP cache.
What Is ARP Poisoning?
ARP poisoning is when an attacker sends fake ARP messages to a network. These messages falsely associate the attacker's MAC address with the IP address of another device (like the gateway or another host).

Example:
  • Attacker sends a spoofed ARP reply:
  • "192.168.1.1 is at AA:AA:AA:AA:AA:AA" (attacker’s MAC)
  • Victim updates its ARP cache with this incorrect mapping.
  • Now, traffic meant for 192.168.1.1 goes to the attacker.
Goals of ARP Poisoning
1. Man-in-the-Middle (MitM) Attack
  • Attacker intercepts and possibly alters communication between two devices.
2. Data Theft
  • Sensitive information like login credentials can be captured.
Session Hijacking
  • An attacker can take over active sessions.
Denial of Service (DoS)
  • Redirecting traffic to a non-existent MAC address can disrupt communication.
How It’s Done

Attackers use tools like:
  • Ettercap
  • Cain & Abel
  • BetterCAP
  • arpspoof
These tools automate the sending of spoofed ARP packets to poison caches across the network.

Detection and Prevention

Detection
  • Unusual ARP traffic or frequent ARP replies.
  • Duplicate IP addresses with different MACs.
  • Tools like:
    • Wireshark (packet analysis)
    • ARPwatch (monitoring ARP activity)
Prevention
1. Static ARP Entries
  • Manually configure IP-MAC mappings (not scalable).
2. Packet Filtering
  • Use firewalls to block spoofed packets.
3. Encryption
  • Use HTTPS and VPNs to protect data even if intercepted.
4. Network Segmentation
  • Limit broadcast domains.
5. Dynamic ARP Inspection (DAI)
  • Available on managed switches; validates ARP packets against the DHCP snooping database.

Thursday, September 4, 2025

Subnetting Question 1 for Sept. 4th

 Subnetting Question 1 for Sept. 4th, 2025

Video Explanation in the next post

Subnetting Question 1 Sept 4th, 2025

Subnetting Question 1 Sept. 4th, 2025



Collapsed Core Architecture: A Simplified Network Design for Smaller Networks

 Collapsed Core Network

A collapsed core network (also known as a collapsed backbone or collapsed core architecture) is a simplified version of a traditional enterprise network design. It merges the core and distribution layers of the network into a single layer, typically for smaller or medium-sized networks where a complete three-tier architecture is unnecessary.

Traditional Three-Tier Network Architecture:
Access Layer – Connects end devices like PCs, printers, and phones.
Distribution Layer – Aggregates access layer switches, applies policies, and routes between VLANs.
Core Layer – High-speed backbone that connects distribution layers and provides fast transport across the network.

Collapsed Core Architecture:
In a collapsed core, the core and distribution layers are combined into a single layer, typically using high-performance switches or routers.

Key Characteristics:
  • Simplified design – Fewer devices and layers to manage.
  • Cost-effective – Reduces hardware and operational costs.
  • Easier management – Less complexity in configuration and troubleshooting.
  • Suitable for smaller networks – Ideal for small campuses, branch offices, or SMBs.
Advantages:
  • Lower latency due to fewer hops.
  • Reduced cost in hardware and maintenance.
  • Simplified troubleshooting and network design.
  • Scalability for moderate growth.
Considerations:
  • Limited scalability compared to full three-tier designs.
  • Single point of failure if redundancy isn’t properly implemented.
  • Performance bottlenecks occur if the collapsed core device is overloaded.