CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Tuesday, October 28, 2025

WinPEAS: Windows Privilege Escalation Tool Overview

 WinPEAS
(Windows Privilege Escalation Awsome Script)

WinPEAS (Windows Privilege Escalation Awesome Script) is a powerful post-exploitation tool used primarily by penetration testers, ethical hackers, and red teamers to identify privilege escalation opportunities on Windows systems. Here's a detailed breakdown of its purpose, functionality, and usage:

What Is WinPEAS?
WinPEAS is part of the PEASS-ng suite developed by Carlos Polop. It automates scanning Windows systems for misconfigurations, vulnerabilities, and security weaknesses that could allow a low-privileged user to escalate their privileges. 

Key Features
  • Automated Enumeration: Scans for privilege escalation vectors across services, registry, file permissions, scheduled tasks, and more.
  • Color-Coded Output: Highlights critical findings in red, informative ones in green, and other categories in blue, cyan, and yellow for quick visual analysis. [manageengine.com]
  • Lightweight & Versatile: Available in .exe, .ps1, and .bat formats, compatible with both x86 and x64 architectures.
  • Offline Analysis: Output can be saved for later review.
  • Minimal Privilege Requirement: Can run without admin rights and still gather valuable system data.
Privilege Escalation Vectors Detected
WinPEAS identifies a wide range of potential vulnerabilities, including:
  • Unquoted Service Paths: Services with paths not enclosed in quotes can be exploited to run malicious executables.
  • Weak Service Permissions: Services that can be modified by non-admin users.
  • Registry Misconfigurations: Keys like AlwaysInstallElevated that allow MSI files to run with admin privileges.
  • Writable Directories & Files: Identifies locations where low-privileged users can write or modify files.
  • DLL Hijacking Opportunities: Detects insecure DLL loading paths.
  • Scheduled Tasks: Finds misconfigured or vulnerable scheduled tasks.
  • Token Privileges: Checks for powerful privileges like SeDebugPrivilege or SeImpersonatePrivilege. 
WinPEAS Variants
  • winPEAS.exe: C# executable, requires .NET ≥ 4.5.2.
  • winPEAS.ps1: PowerShell script version.
  • winPEAS.bat: Batch script version for basic enumeration.
Each variant is suited for different environments and levels of access. The .exe version is the most feature-rich. 

Execution Steps
1. Download: Get the latest version from the https://github.com/peass-ng/PEASS-ng/releases/latest.
2. Transfer to Target: Use SMB, reverse shell, or HTTP server.
3. Run the Tool:


Or redirect output:


4. Analyze Output: Focus on red-highlighted sections for critical escalation paths.

Use Cases
  • CTFs and Training Labs
  • Internal Penetration Tests
  • Real-World Breach Simulations
  • Security Audits

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.