CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Monday, October 27, 2025

Cisco Discovery Protocol Explained: Features, Commands, and Use Cases

 CDP (Cisco Discovery Protocol)

Cisco Discovery Protocol (CDP) is a proprietary Layer 2 network protocol developed by Cisco Systems. It is used to share information about directly connected Cisco devices, helping network administrators discover and manage network topology more efficiently.

Purpose of CDP
CDP allows Cisco devices to advertise their existence and capabilities to neighboring devices. It helps in:
  • Network mapping
  • Troubleshooting connectivity issues
  • Verifying device configurations
  • Identifying misconfigured or unauthorized devices
How CDP Works
  • CDP operates at Layer 2 (Data Link Layer) of the OSI model.
  • It sends periodic broadcast messages (CDP advertisements) to multicast MAC address 01:00:0C:CC:CC:CC.
  • These messages contain information such as:
    • Device ID (hostname)
    • IP address
    • Port ID
    • Platform (hardware model)
    • Capabilities (e.g., router, switch)
    • Software version
CDP Packet Structure
Each CDP packet includes:
  • Header: Protocol version and TTL (Time to Live)
  • TLVs (Type-Length-Value): Encoded fields that carry device information
Common CDP Commands (Cisco CLI)
  • show cdp neighbors: Displays directly connected Cisco devices
  • show cdp neighbors detail: Provides detailed info, including IP addresses
  • cdp enable: Enables CDP on an interface
  • no cdp enable: Disables CDP on an interface
  • cdp run: Enables CDP globally
  • no cdp run: Disables CDP globally
Security Considerations
  • CDP can expose sensitive network information if not properly secured.
  • It should be disabled on interfaces connected to untrusted networks (e.g., internet-facing ports).
  • Alternatives like LLDP (Link Layer Discovery Protocol) are preferred in multi-vendor environments.
Use Cases
  • Network topology discovery
  • Automated inventory management
  • Troubleshooting and diagnostics
  • VoIP deployments (e.g., auto-configuring IP phones)

Rubeus: Kerberos Exploitation for Penetration Testers

 Rubeus

Rubeus is a powerful post-exploitation tool designed to abuse Kerberos in Windows Active Directory (AD) environments. It’s widely used by penetration testers and red teamers to manipulate authentication mechanisms, extract credentials, and move laterally across compromised networks.

What Is Kerberos?
Kerberos is a network authentication protocol used in AD environments. It uses tickets to allow nodes to prove their identity securely. Rubeus interacts with these tickets to perform various attacks.

Key Capabilities of Rubeus
1. Kerberoasting
  • Extracts service account hashes from service tickets (TGS).
  • These hashes can be cracked offline to reveal plaintext passwords.
2. Ticket Harvesting
  • Dumps Kerberos tickets from memory (e.g., using sekurlsa::tickets via Mimikatz).
  • Useful for replay or pass-the-ticket attacks.
3. Pass-the-Ticket
  • Injects stolen Kerberos tickets into memory to impersonate users.
  • Enables lateral movement without needing passwords.
4. Overpass-the-Hash
  • Uses NTLM hashes to request Kerberos tickets.
  • Bridges NTLM and Kerberos authentication methods.
5. Golden Ticket Attack
  • Creates forged TGTs using the KRBTGT account hash.
  • Grants unrestricted access to the domain.
6. Silver Ticket Attack
  • Creates forged service tickets (TGS) for specific services.
  • Less detectable than Golden Tickets.
7. AS-REP Roasting
  • Targets accounts that don’t require pre-authentication.
  • Extracts encrypted data that can be cracked offline.
8. Ticket Renewal and Request
  • Requests new tickets or renews existing ones.
  • Useful for maintaining persistence.
Why Rubeus Is Valuable
  • Written in C#, making it easy to compile and modify.
  • It can be executed in memory to evade antivirus detection.
  • Integrates well with other tools like Mimikatz and Cobalt Strike.
Ethical Use
Rubeus should only be used in environments where you have explicit permission to test. Unauthorized use is illegal and unethical.

Sunday, October 26, 2025

Broadcast Domains: Definition, Examples, and Management

 Broadcast Domain

A broadcast domain is a logical division of a computer network in which all devices can directly receive broadcast frames from any other device within the same domain. In simpler terms, it's a segment of a network where a broadcast sent by one device is heard by all the different devices.

How It Works
When a device sends a broadcast message (e.g., ARP requests or DHCP discovery), that message is intended for all devices in the same broadcast domain. These messages are typically sent to the MAC address FF:FF:FF:FF:FF:FF, which is the broadcast address at the data link layer.

What Defines a Broadcast Domain?
  • Routers: Break up broadcast domains. A broadcast sent in one domain will not pass through a router to another.
  • Switches and Hubs: By default, do not break broadcast domains. All ports on a switch (unless configured with VLANs) are in the same broadcast domain.
  • VLANs (Virtual LANs): Can be used to create multiple broadcast domains on a single switch.
Example Scenario
Imagine a small office network:
  • All computers are connected to the same switch.
  • If one computer sends a broadcast (e.g., looking for a printer), all others receive it.
  • This is one broadcast domain.
Now, if a router is placed between two switches:
  • Broadcasts from one side won’t reach the other.
  • Each side is now a separate broadcast domain.
Why Broadcast Domains Matter
  • Performance: Too many devices in a single broadcast domain can lead to excessive broadcast traffic, slowing the network.
  • Security: Isolating broadcast domains can help contain potential threats or misconfigurations.
  • Scalability: Segmenting networks into smaller broadcast domains makes them easier to manage and troubleshoot.
How to Manage Broadcast Domains
  • Use routers or Layer 3 switches to segment networks.
  • Implement VLANs to logically separate devices even if they’re on the same physical switch.
  • Monitor broadcast traffic to avoid broadcast storms.

KRACK Wi-Fi Attack: How It Works and How to Stay Safe

 KRACK (Key Reinstallation Attack)

KRACK (Key Reinstallation Attack) is a serious vulnerability discovered in 2017 that affects the WPA2 protocol, which secures most modern Wi-Fi networks. Here's a detailed explanation:

What Is KRACK?
KRACK is a man-in-the-middle (MitM) attack that exploits a flaw in the 4-way handshake used by WPA2 to establish a secure connection between a client (like a phone or laptop) and a Wi-Fi access point.

The attack was discovered by Mathy Vanhoef, a security researcher, and it revealed that WPA2, previously considered very secure, had a critical design flaw.

How the WPA2 4-Way Handshake Works
When a device connects to a Wi-Fi network, the 4-way handshake is used to:
1. Confirm that both the client and access point know the correct password.
2. Generate a fresh encryption key, called the PTK (Pairwise Transient Key).
3. Install the key to encrypt traffic.

How KRACK Exploits the Handshake
The vulnerability lies in Step 3 of the handshake. If an attacker replays the third message of the handshake, the client will reinstall the same encryption key, resetting associated parameters such as the packet number (nonce).

This allows the attacker to:
  • Decrypt packets.
  • Replay packets.
  • Forge packets.
  • In some cases, inject malware or manipulate data.
What KRACK Can Do
  • Eavesdrop on sensitive data like passwords, emails, and credit card numbers.
  • Hijack connections to websites or services.
  • Inject malicious content into unencrypted HTTP traffic.
Who Is Affected?
  • All WPA2 implementations were vulnerable at the time of discovery.
  • Affected devices include Windows, Linux, Android, macOS, iOS, and many IoT devices.
  • Android and Linux were especially vulnerable due to how they handled key reinstallation (they reset the key to all zeros).
How to Protect Against KRACK
1. Update your devices: Most major vendors released patches shortly after the vulnerability was disclosed.
2. Use HTTPS: Even if Wi-Fi is compromised, HTTPS encrypts web traffic.
3. Use VPNs: Adds an extra layer of encryption.
4. Replace outdated routers: Some older routers may never receive patches.

Final Thoughts
KRACK didn’t break the encryption algorithm itself (like AES), but instead exploited a flaw in how the protocol was implemented. It was a wake-up call for the security community and led to the development of WPA3, which addresses many of WPA2’s weaknesses.

Saturday, October 25, 2025

What Is a CMDB and Why It Matters in ITSM

 CMDB (Configuration Management Database)

A CMDB, or Configuration Management Database, is a centralized repository that stores information about the components of an IT environment. These components, known as Configuration Items (CIs), can include hardware, software, systems, facilities, and personnel. The CMDB is a core component of IT Service Management (ITSM), especially within frameworks such as ITIL (Information Technology Infrastructure Library).

Purpose of a CMDB
The main goal of a CMDB is to provide a clear and accurate view of the IT infrastructure, enabling better decision-making, faster incident resolution, and more effective change management.

Key Elements of a CMDB
1. Configuration Items (CIs):
  • These are the assets tracked in the CMDB.
  • Examples: servers, routers, applications, databases, users, documents.
2. Attributes:
  • Each CI has attributes such as name, type, version, location, owner, and status.
3. Relationships:
  • CMDBs track how CIs relate to one another (e.g., a web server depends on a database server).
4. Lifecycle Status:
  • CIs are tracked through their lifecycle: planning, deployment, operation, and retirement.
Functions and Benefits
  • Change Management: Understand the impact of changes before implementation.
  • Incident & Problem Management: Quickly identify affected systems and root causes.
  • Asset Management: Track ownership, usage, and lifecycle of IT assets.
  • Compliance & Auditing: Maintain records for regulatory and internal audits.
  • Service Impact Analysis: Assess how outages or changes affect business services.
CMDB Tools
Popular CMDB tools include:
  • ServiceNow CMDB
  • BMC Helix CMDB
  • Ivanti Neurons
  • ManageEngine AssetExplorer
  • Freshservice CMDB
Challenges in CMDB Implementation
  • Data Accuracy: Keeping CI data up to date is critical.
  • Complexity: Large environments can have thousands of interrelated CIs.
  • Integration: CMDBs must integrate with other ITSM tools and monitoring systems.

SQLMap for Ethical Hackers: Discover, Exploit, and Secure Web Apps

 SQLMap

SQLMap is an open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities in web applications. It’s widely used by security professionals, ethical hackers, and penetration testers to assess the security of database-driven applications.

What Is SQL Injection?
SQL injection is a web security vulnerability that allows an attacker to interfere with the queries an application makes to its database. SQLMap helps identify and exploit these vulnerabilities.

Key Features of SQLMap
1. Database Fingerprinting
  • Identifies the type and version of the database (e.g., MySQL, PostgreSQL, Oracle, MSSQL).
  • Helps tailor attacks to specific database systems.
2. Data Extraction
  • Retrieves data from tables and columns.
  • Can dump entire databases if vulnerable.
3. Database Takeover
  • Offers options to access the underlying operating system.
  • Can execute commands, read/write files, and even establish a reverse shell.
4. Automated Testing
  • Supports a wide range of SQL injection techniques: boolean-based blind, time-based blind, error-based, UNION query-based, and stacked queries.
5. Support for Authentication
  • Handles HTTP authentication, cookies, sessions, and custom headers.
  • Useful for testing authenticated areas of web apps.
6. Integration with Other Tools
  • Can be used with proxy tools like Burp Suite.
  • Supports output in various reporting formats.
Common Use Cases
  • Penetration Testing: Assessing the security of web applications.
  • Bug Bounty Hunting: Finding vulnerabilities in public-facing apps.
  • Security Audits: Verifying compliance with security standards.
  • Training and Education: Learning how SQL injection works in a controlled environment.
Basic Usage Example


This command tells SQLMap to test the URL for SQL injection and list available databases.

Ethical Considerations
SQLMap should only be used on systems you own or have explicit permission to test. Unauthorized use is illegal and unethical.

Friday, October 24, 2025

Types of Cloud Deployment: Public, Private, Hybrid & Community

 Cloud Deployment Models

Cloud deployment models define how cloud services are made available to users and how infrastructure is managed. Here’s a detailed explanation of each major cloud deployment model:

1. Public Cloud
Definition:
A public cloud is a cloud environment owned and operated by a third-party provider, offering services over the internet to multiple customers.

Key Characteristics:
  • Resources are shared among multiple users (multi-tenancy).
  • Highly scalable and cost-effective.
  • No need for users to manage infrastructure.
Examples:
  • Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP)
Use Cases:
  • Startups and small businesses needing quick deployment.
  • Applications with variable or unpredictable workloads.
  • Development and testing environments.
2. Private Cloud
Definition:
A private cloud is a cloud environment dedicated to a single organization, either hosted on-premises or by a third-party provider.

Key Characteristics:
  • Greater control over infrastructure and data.
  • Enhanced security and compliance.
  • Customizable to specific business needs.
Examples:
  • VMware vSphere, OpenStack, Microsoft Azure Stack
Use Cases:
  • Organizations with strict regulatory or security requirements.
  • Enterprises need complete control over their data and infrastructure.
  • Mission-critical applications.
3. Hybrid Cloud
Definition:
A hybrid cloud combines public and private clouds, allowing data and applications to be shared between them.

Key Characteristics:
  • Flexibility to move workloads between environments.
  • Optimized cost and performance.
  • Supports gradual cloud adoption.
Examples:
  • AWS Outposts, Azure Arc, Google Anthos
Use Cases:
  • Businesses need to keep sensitive data on-premises while leveraging the scalability of the public cloud.
  • Disaster recovery and backup solutions.
  • Workload balancing between environments.
4. Community Cloud
Definition:
A community cloud is shared by several organizations with similar interests or requirements, such as compliance or security.

Key Characteristics:
  • Shared infrastructure tailored to a specific community.
  • Cost-effective compared to private cloud.
  • Collaborative management and governance.
Examples:
  • Government agencies sharing a cloud for public services, healthcare organizations sharing infrastructure for patient data.
Use Cases:
  • Organizations with common regulatory concerns.
  • Joint ventures or consortiums.
  • Research institutions collaborating on shared projects.