CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Friday, September 12, 2025

NIST SP 800-207: A Comprehensive Guide to Zero Trust Architecture

 NIST SP 800-207 Zero Trust Architecture

NIST Special Publication 800-207, titled "Zero Trust Architecture (ZTA)", is a foundational cybersecurity framework published by the National Institute of Standards and Technology (NIST) in August 2020. It redefines how organizations should approach security in a world where traditional network perimeters are no longer sufficient.

What Is Zero Trust?
Zero Trust (ZT) is a security philosophy that assumes no user, device, or system should be trusted by default, regardless of whether it is inside or outside the network perimeter. Every access request must be:
  • Explicitly verified
  • Continuously validated
  • Contextually evaluated
This model is a response to modern threats, remote work, BYOD (Bring Your Own Device), and cloud computing.

Core Principles of NIST SP 800-207
NIST outlines seven core tenets of Zero Trust:
1. All data sources and computing services are considered resources.
2. All communication is secured, regardless of network location.
3 Access is granted per session, not permanently.
4 Dynamic policy decisions are based on identity, device posture, and context.
5. Authentication and authorization are enforced before access is granted.
6. Continuous monitoring of asset integrity and security posture.
7. Logging and telemetry are essential for trust evaluation and policy updates.

Key Components of Zero Trust Architecture

NIST SP 800-207 defines a modular architecture with these core components:
Policy Engine (PE): Makes access decisions using identity, risk scores, and telemetry.
Policy Administrator (PA): Enforces decisions by issuing session credentials.
Policy Enforcement Point (PEP): Applies access control near the resource.
These components work together to ensure that access is granular, dynamic, and revocable.

Zero Trust Workflow

A typical ZTA access flow looks like this:
1. Subject (user/device) requests access.
2. PEP intercepts the request.
3. PA consults the PE to evaluate the request.
4. If approved, access is granted only for that session.

This model minimizes the "implicit trust zone" and reduces lateral movement risk.

Deployment Models

NIST SP 800-207 outlines three reference architectures:
1. Enhanced Identity Governance (EIG): Uses IdPs, MFA, and SSO for app-level control.
2. Microsegmentation: Isolates workloads using SDN or host-based agents.
3. Software-Defined Perimeter (SDP): Builds encrypted tunnels between users and services.

Most organizations adopt a hybrid approach tailored to their infrastructure and maturity level.

Implementation Strategy

NIST recommends a phased approach:
1. Asset Discovery
2. Define Trust Zones
3. Model Policies
4. Pilot in a Small Environment
5. Monitor, Adjust, and Expand

This ensures low disruption and high visibility during rollout.

Real-World Threat Mitigation

ZTA helps mitigate:
  • Lateral movement via microsegmentation
  • Credential theft with MFA and session expiration
  • Insider threats through least privilege and behavioral monitoring
  • Supply chain attacks with software attestation and signed artifacts
Compliance and Alignment

SP 800-207 aligns with:
  • NIST 800-53 Rev. 5
  • CMMC 2.0
  • ISO/IEC 27001
  • CIS Controls v8
  • Executive Order 14028
This makes it a strong foundation for both security and regulatory compliance.

Spanning Tree Priority Values: What They Are and Why They Matter

 Spanning Tree Priority Values

In the context of Spanning Tree Protocol (STP), priority values play a crucial role in determining the Root Bridge and the overall topology of a loop-free network. Here's a detailed explanation:

What Are Spanning Priority Values?
Spanning priority values are part of the Bridge ID, which is used to elect the Root Bridge in a network running STP. The Bridge ID consists of:
  • Bridge Priority (2 bytes)
  • MAC Address (6 bytes)
Together, they form an 8-byte identifier unique to each switch.

Role in Root Bridge Election
STP uses the Bridge ID to elect the Root Bridge, which is the central switch in the spanning tree topology. The election process works as follows:
  • Lowest Bridge ID wins.
  • If multiple switches have the same priority, the one with the lowest MAC address becomes the Root Bridge.
By default, the bridge priority is set to 32768 on most switches. You can manually configure it to influence which switch becomes the Root Bridge.

Priority Value Range and Configuration
  • Range: 0 to 65535
  • Lower value = higher priority
  • Common practice:
    • Set Root Primary to a lower priority (e.g., 24576)
    • Set Root Secondary to a slightly higher priority (e.g., 28672)
This ensures predictable Root Bridge selection and failover behavior.

Commands to Set Priority (Cisco Example)

1 spanning-tree vlan 1 root primary
2 spanning-tree vlan 1 root secondary
3

These commands automatically adjust the priority to ensure the switch becomes the Root Bridge (or backup) for the specified VLAN.

Why It Matters
Properly setting spanning priority values:
  • Prevents suboptimal paths
  • Ensures network stability
  • Helps in redundancy planning
If left to default, STP might elect a less optimal switch as the Root Bridge, leading to inefficient traffic flow.

Tuesday, September 9, 2025

NIST SP 800-61r2: A Retrospective on a Pivotal Incident Response Framework

 NIST SP 800-61r2

NIST Special Publication 800-61 Revision 2 (SP 800-61r2), titled Computer Security Incident Handling Guide, is a foundational document published by the National Institute of Standards and Technology (NIST) to help organizations develop and implement effective incident response capabilities. Although it was officially withdrawn in April 2025 and replaced by Revision 3, Revision 2 remains widely referenced and influential 1.

Here’s a detailed breakdown of its contents and guidance:

Purpose and Scope
SP 800-61r2 provides guidelines for incident handling and response, aiming to help organizations:
  • Detect and analyze security incidents.
  • Contain, eradicate, and recover from incidents.
  • Improve incident response capabilities over time.
It is platform-agnostic, meaning it applies regardless of the hardware, operating system, or application.

Structure of the Document

The guide is divided into four major sections:
1. Introduction
  • Defines what constitutes a security incident.
  • Emphasizes the importance of incident response in minimizing damage and recovery time.
  • Encourages proactive planning and continuous improvement.
2. Incident Response Life Cycle

This is the core of the guide, outlining a four-phase lifecycle:
  • Preparation
    • Establish policies, procedures, and tools.
    • Train staff and conduct exercises.
    • Set up communication channels and legal protocols.
  • Detection and Analysis
    • Monitor systems for signs of incidents.
    • Use logs, intrusion detection systems (IDS), and other tools.
    • Classify and prioritize incidents based on impact.
  • Containment, Eradication, and Recovery
    • Short-term and long-term containment strategies.
    • Remove malicious components and restore systems.
    • Validate system integrity before returning to production.
  • Post-Incident Activity
    • Conduct lessons-learned meetings.
    • Update policies and procedures.
    • Improve defenses based on findings.
3. Organizing an Incident Response Capability
  • Discusses team structure (centralized vs. distributed).
  • Covers staffing, training, and resource allocation.
  • Addresses legal and regulatory considerations.
4. Handling Specific Incidents
  • Provides examples of incident types:
    • Network-based attacks
    • Malware infections
    • Insider threats
  • Offers tailored response strategies for each.
Key Principles and Recommendations
  • Incident classification: Not all events are incidents; proper classification is crucial.
  • Evidence handling: Maintain integrity for legal and forensic purposes.
  • Communication: Internal and external communication plans are vital.
  • Metrics and reporting: Track performance and report incidents to stakeholders.
Strengths and Limitations

Strengths:
  • Comprehensive and practical.
  • Adaptable to various organizational sizes and sectors.
  • Encourages continuous improvement.
Limitations:
  • Lacks detailed guidance on emerging threats like ransomware and APTs.
  • Could benefit from a more risk-based approach

NIST SP 800-115: A Technical Guide to Security Testing and Assessment

 NIST SP 800-115

NIST SP 800-115, titled "Technical Guide to Information Security Testing and Assessment", is a foundational document published by the National Institute of Standards and Technology (NIST). It provides a structured yet flexible framework for conducting technical security assessments, including penetration testing, vulnerability scanning, and security reviews.

Purpose of NIST SP 800-115
The guide helps organizations:
  • Plan and execute security testing and assessments
  • Analyze findings
  • Develop mitigation strategies. It is not a comprehensive testing program but rather a framework of best practices for conducting technical security evaluations.
Core Components of the Framework
NIST SP 800-115 outlines a four-phase process for penetration testing and security assessments:

1. Planning Phase
  • Define scope and objectives
  • Establish rules of engagement
  • Address legal and ethical considerations
  • Finalize documentation and consent
2. Discovery Phase
  • Information Gathering: Collect data on systems, IPs, ports, and services
  • Vulnerability Analysis: Compare findings against known vulnerabilities (e.g., NVD)
3. Attack Phase
  • Gaining Access: Exploit vulnerabilities to access systems
  • Privilege Escalation: Attempt to gain deeper control
  • Data Compromise: Explore what sensitive data can be accessed
  • Persistence Simulation: Leave behind artifacts to demonstrate impact
4. Reporting Phase
  • Summarize findings
  • Provide actionable recommendations
  • Prioritize remediation efforts
Techniques Covered

The guide includes a wide range of testing techniques:
  • Documentation Review
  • Log Analysis
  • System Configuration Review
  • Network Sniffing
  • File Integrity Checking
  • Password Cracking
  • Social Engineering
  • Wireless Scanning
  • Vulnerability Validation
Benefits of Using NIST SP 800-115
  • Ensures consistency and quality in security assessments
  • Helps meet compliance and audit requirements
  • Provides a common language for security professionals
  • Supports risk-based decision-making

Monday, September 8, 2025

What Is Nmap? A Beginner’s Guide to Network Scanning + Video

 NMAP (Network Mapper)

Nmap (short for Network Mapper) is a powerful, open-source tool used for network discovery and security auditing. It’s widely used by system administrators, network engineers, and cybersecurity professionals to map networks, identify devices, and detect vulnerabilities.

What Nmap Does
Nmap sends specially crafted packets to target hosts and analyzes the responses to determine:
  • Which hosts are up
  • What services (e.g., HTTP, FTP) they offer
  • What operating systems they run
  • What firewalls or filters are in place
  • What ports are open, closed, or filtered
Key Features
1. Host Discovery
  • Identifies live hosts on a network.
  • Example: nmap -sn 192.168.1.0/24
2. Port Scanning
  • Detects open ports and services.
  • Example: nmap -p 1-1000 192.168.1.1
3. Service Version Detection
  • Determines the version of services running.
  • Example: nmap -sV 192.168.1.1
4. OS Detection
  • Guesses the operating system of a host.
  • Example: nmap -O 192.168.1.1
5. Scriptable Interaction (NSE)
  • Uses the Nmap Scripting Engine to automate tasks like vulnerability detection, brute forcing, and malware discovery.
  • Example: nmap --script vuln 192.168.1.1
6. Firewall Evasion Techniques
  • Includes options for spoofing, fragmentation, and timing to bypass firewalls and IDS.
Common Use Cases
  • Network inventory and management
  • Penetration testing
  • Vulnerability assessment
  • Compliance auditing
  • Troubleshooting connectivity issues
Platforms
Nmap runs on:
  • Linux
  • Windows
  • macOS
  • BSD variants
It also has a graphical front-end called Zenmap, which makes it easier for beginners to use.

Ethical Considerations
  • Always get permission before scanning networks you don’t own.
  • Unauthorized scanning can be considered illegal or malicious.

CREST Explained: Certifications, Accreditation, and Industry Impact

 CREST

(Council of Registered Ethical Security Testers)

CREST (Council of Registered Ethical Security Testers) is a globally recognized not-for-profit accreditation and certification body that plays a vital role in the cybersecurity industry. Here's a detailed breakdown of what CREST is, what it does, and why it matters:

What Is CREST?
CREST is an international membership organization that sets rigorous standards for cybersecurity service providers and professionals. Founded in 2006, it aims to build trust in the digital world by improving the quality and consistency of cybersecurity services worldwide.

Mission and Goals
CREST focuses on four key pillars:
  • Capability: Developing and measuring the skills of cybersecurity professionals.
  • Capacity: Expanding the global pool of cybersecurity talent.
  • Consistency: Ensuring high-quality service delivery across the industry.
  • Collaboration: Engaging with governments, academia, and industry to share knowledge and improve standards.
CREST Certification

CREST offers certifications for both individuals and organizations:

For Individuals:
  • Certifications like CPSA, CRT, and CCSAS validate technical skills in areas such as penetration testing, incident response, and threat intelligence.
For Organizations:
  • CREST accreditation is a quality assurance benchmark. It confirms that a company meets strict standards in areas like:
    • Operating procedures
    • Personnel development
    • Testing methodologies
    • Data security
Accreditation Process

To become CREST-accredited, companies must:
1. Submit a detailed application.
2. Provide documentation (e.g., insurance, compliance certificates).
3. Undergo audits and possibly on-site assessments.
4. Demonstrate that staff hold relevant CREST certifications.

CREST also provides feedback during the process to help applicants meet standards.

Global Reach
CREST operates internationally, with regional councils in the UK, Americas, Asia, Australasia, and EMEA. It supports cybersecurity ecosystems across borders, recognizing that cyber threats are a global concern.

Benefits of CREST Accreditation
  • Trust and credibility in the cybersecurity market
  • Competitive edge for bidding on contracts
  • Compliance support for regulated industries
  • Proof of technical competence and ethical standards

Sunday, September 7, 2025

ASLR: A Critical Defense Against Buffer Overflow and ROP Exploits

 ASLR Address Space Layout Randomization

Address Space Layout Randomization (ASLR) is a security technique used in modern operating systems to randomize the memory addresses used by system and application components. Its primary goal is to make the exploitation of memory corruption vulnerabilities (such as buffer overflows) significantly harder for attackers.

Why ASLR Matters
Many attacks rely on knowing the exact location of code or data in memory. For example, if an attacker wants to execute malicious code via a buffer overflow, they need to know where to jump in memory. ASLR disrupts this by randomizing memory layout, making it unpredictable.

How ASLR Works
When a program is loaded into memory, ASLR randomizes the locations of:
  • Stack
  • Heap
  • Shared libraries
  • Executable code
  • Memory-mapped files
This means that each time a program runs, its memory layout is different.

Example:
Without ASLR:
  • Stack always starts at address 0x7fff0000
  • libc always loads at 0x40000000
With ASLR:
  • Stack might start at 0x7fffa123
  • libc might load at 0x41b2f000
Security Benefits
  • Mitigates buffer overflow and return-oriented programming (ROP) attacks
  • Increases the difficulty of successful exploitation
  • Forces attackers to guess memory addresses, which often leads to crashes
Limitations
  • Not foolproof: If an attacker can leak memory addresses (e.g., via an info leak), ASLR can be bypassed.
  • Partial ASLR: Some systems or applications may only randomize certain regions.
  • Performance impact: Minimal, but present in some cases.
ASLR in Practice
  • Enabled by default in most modern OSes:
    • Windows (since Vista)
    • Linux (via execstack, PaX, or kernel settings)
    • macOS
  • Can be disabled for debugging or legacy compatibility
  • Enhanced with other techniques like DEP (Data Execution Prevention) and stack canaries
Testing ASLR
You can check if ASLR is active by:

On Linux:

1 cat /proc/sys/kernel/randomize_va_space
2

  • 0: Disabled
  • 1: Conservative randomization
  • 2: Full randomization
ASLR Memory Layout Diagram Description
Imagine a horizontal block representing a process's memory space. Here's how it typically looks without ASLR vs with ASLR:

Without ASLR (Fixed Layout)
+----------------------+ 0x00000000
| Executable Code      | (fixed address)
+----------------------+
| Shared Libraries     | (fixed address)
+----------------------+
| Heap                 | (fixed address)
+----------------------+
| Stack                | (fixed address)
+----------------------+ 0xFFFFFFFF

With ASLR (Randomized Layout)
+----------------------+ 0x00000000
| Executable Code      | (randomized address)
+----------------------+
| Shared Libraries     | (randomized address)
+----------------------+
| Heap                 | (randomized address)
+----------------------+
| Stack                | (randomized address)
+----------------------+ 0xFFFFFFFF

Each component is loaded at a different address every time the program runs, making it harder for attackers to predict where to inject or redirect malicious code.