CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Sunday, October 26, 2025

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.

Censys.io: Internet-Wide Scanning for Security Professionals

 Censys.io

Censys.io is a powerful cybersecurity intelligence platform designed to help security professionals, researchers, and analysts discover, monitor, and assess internet-connected assets. Here's a detailed breakdown of how it works and why it's valuable for host discovery and security analysis:

What Is Censys.io?
Censys.io is a search engine and data platform that continuously scans the public internet to catalog exposed devices, servers, and services. It provides structured, searchable data about:
  • IP addresses
  • Open ports and services
  • SSL/TLS certificates
  • Software versions
  • DNS records
  • Geolocation and routing data
How Censys Works
Censys uses internet-wide scanning to probe every IPv4 address and popular domain names. It performs:
  • Protocol handshakes to identify running services
  • TLS certificate parsing for security analysis
  • Port scanning across all 65,535 ports
  • Metadata enrichment using third-party sources like IPInfo and RouteViews
This data is then indexed and made available via:
  • A web interface for interactive search
  • An API for automation and integration
  • BigQuery and raw data formats for advanced analysis

Key Features
  • GeoIP Information: Uses IP geolocation APIs to provide location data for hosts.
  • Service Summaries: Lists exposed services, ports, and protocols for each host.
  • Certificate Search: Tracks SSL/TLS certificates and their chains.
  • Web Properties: Identifies websites, APIs, and apps with detailed HTTP response data.
  • Advanced Query Language: Enables precise searches using structured fields like host.services.port or web.endpoints.banne.
Use Cases
  • Attack Surface Management: Identify and reduce exposed services and misconfigurations.
  • Threat Hunting: Discover vulnerable or suspicious systems.
  • Reconnaissance: Used by ethical hackers and penetration testers for OSCP and CEH prep.
  • Compliance & Monitoring: Track changes in internet-facing infrastructure over time.

Thursday, October 23, 2025

MOA vs. MOU vs. Contract: Key Differences

 MOA (Memorandum of Agreement)

An MOA, or Memorandum of Agreement, is a formal document that outlines a mutual understanding between two or more parties regarding their roles, responsibilities, and expectations in a collaborative effort. It is commonly used in government, military, academic, and business contexts to define partnerships or joint activities without creating a legally binding contract.

Key Characteristics of an MOA
  • Non-binding (usually): Unlike contracts, MOAs typically do not carry legal enforceability unless explicitly stated.
  • Mutual Understanding: Focuses on cooperation and shared goals.
  • Clarity of Roles: Specifies what each party will do, contribute, or provide.
  • Duration: Includes start and end dates or conditions for termination.
  • Signatures: Signed by authorized representatives of each party to acknowledge agreement.
Common Components of an MOA
  • Purpose: Describes the reason for the agreement and the goals of the collaboration.
  • Scope of Work: Details the activities, services, or deliverables expected from each party.
  • Responsibilities: Clearly defines who is responsible for what.
  • Funding or Resources: Outlines any financial or material contributions.
  • Points of Contact: Lists individuals responsible for communication and coordination.
  • Duration and Termination: Specifies how long the agreement lasts and how it can be ended.
  • Amendments: Describes how changes to the agreement can be made.
  • Signatures: Confirms that all parties agree to the terms.
MOA vs. MOU vs. Contract


Example Use Cases
Government Agencies: Joint operations or shared services between departments.
Universities: Research collaborations or student exchange programs.
Businesses: Strategic partnerships or shared marketing efforts.
Nonprofits: Coordinated community outreach or resource sharing.

What Is Gophish? Open-Source Phishing Framework Explained

 Gophish

Gophish is an open-source phishing framework designed to help organizations and security professionals simulate real-world phishing attacks. It’s widely used for security awareness training, red team operations, and testing email defenses.

Key Features of Gophish
1. Phishing Campaign Management
  • Create and manage multiple phishing campaigns.
  • Schedule campaigns and track delivery, opens, clicks, and submitted credentials.
2. Email Templates
  • Build custom HTML or plain-text email templates.
  • Include dynamic fields (e.g., recipient name) for personalized phishing messages.
3. Landing Pages
  • Clone real websites or create custom landing pages.
  • Capture credentials or other user input for analysis.
4. User Groups
  • Import target lists via CSV or manually add users.
  • Organize targets into groups for segmented campaigns.
5. Real-Time Reporting
  • View campaign results in real time.
  • Track metrics like email opened, link clicked, data submitted, and browser used.
6. API Access
  • RESTful API for automation and integration with other tools.
  • Useful for large-scale or continuous testing environments.
Ethical Use and Considerations
  • Authorization Required: Gophish should only be used in environments where you have explicit permission.
  • Training Tool: Ideal for educating employees about phishing risks and improving response behavior.
  • Data Privacy: Ensure captured data is handled securely and ethically.
Example Workflow
1. Set up Gophish server (usually on a local or cloud-hosted machine).
2. Create an email template that mimics a legitimate service (e.g., Office 365).
3. Design a landing page that looks like a login form.
4. Upload a list of targets (e.g., employees).
5. Launch the campaign and monitor results.
6. Analyze data to identify users who clicked or submitted credentials.

Technical Details
  • Written in: Go (Golang)
  • Platform: Cross-platform (Windows, Linux, macOS)
  • Interface: Web-based dashboard
  • License: MIT