CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Friday, September 4, 2026

Cryptographic Vulnerabilities for CompTIA Security+: Complete Exam Prep

Cryptographic Vulnerabilities: 
Security+ Exam Prep

Cryptography is one of the most heavily tested domains on the CompTIA Security+ exam. While understanding encryption algorithms and certificate management is important, Security+ also expects candidates to identify and mitigate cryptographic vulnerabilities.

A cryptographic vulnerability occurs when weaknesses in encryption algorithms, implementations, key management practices, or configurations allow attackers to undermine the confidentiality, integrity, authentication, or non-repudiation of data.

This guide covers the most important cryptographic vulnerabilities you need to understand for the Security+ exam and real-world cybersecurity operations.

Why Cryptographic Vulnerabilities Matter

Organizations use cryptography to protect:

  • Passwords
  • Payment information
  • Personally Identifiable Information (PII)
  • Healthcare records
  • Intellectual property
  • Authentication systems
  • VPN communications

When cryptography is improperly implemented or outdated, attackers may be able to:

  • Read sensitive information
  • Impersonate legitimate users
  • Modify protected data
  • Bypass authentication controls
  • Decrypt confidential communications

Common Cryptographic Vulnerabilities

Weak Encryption Algorithms

One of the most common cybersecurity mistakes is continuing to use outdated encryption standards.

Examples

DES (Data Encryption Standard)

DES uses:

  • 56-bit key

Modern computing power can crack DES relatively quickly.

3DES

  • 56-bit key

RC4

RC4 was once popular in:

  • SSL
  • TLS
  • WEP

Researchers discovered multiple weaknesses allowing attackers to recover encrypted information.

MD5 (128-bit)

Although technically a hashing algorithm rather than encryption, MD5 suffers from collision vulnerabilities and should not be used for security-sensitive applications.

SHA-1 (160-bit)

SHA-1 has known collision attacks and is largely deprecated.

Security+ Exam Tip

If the exam asks which algorithm should be replaced immediately, common insecure choices include:

  • DES
  • 3DES
  • RC4
  • MD5
  • SHA-1
  • WEP

Key Management Vulnerabilities

Even strong encryption becomes ineffective if key management is poor.

Hard-Coded Keys

Developers sometimes embed encryption keys directly into source code.

If attackers obtain the code, they obtain the key.

Poor Key Storage

Keys stored in:

  • Plaintext files
  • Shared network drives
  • Configuration files

can be easily stolen.

Lost Key Control

If cryptographic keys are shared among too many users:

  • Accountability decreases
  • Insider threats increase
  • Key compromise becomes difficult to detect

Key Reuse

Reusing identical keys across:

  • Multiple applications
  • Several databases
  • Entire environments

creates a single point of failure.

Compromise of one system may compromise all systems using the same key.

Weak Random Number Generation

Encryption relies heavily on randomness.

Cryptographic operations require:

  • Session keys
  • Encryption keys
  • Initialization vectors
  • Nonces

If predictable random values are generated, attackers may predict cryptographic secrets.

Poor Certificate Management

Digital certificates are frequently targeted on Security+ exams.

Expired Certificates

Expired certificates can:

  • Break TLS communications
  • Generate browser warnings
  • Reduce user trust

Self-Signed Certificates

Self-signed certificates lack trusted third-party validation.

Risks include:

  • Impersonation attacks
  • Reduced trust
  • Easier spoofing

Weak Certificate Authorities

Compromise of a Certificate Authority (CA) can result in fraudulent certificates being issued.

Attackers may then perform:

  • Website impersonation
  • SSL/TLS interception
  • Man-in-the-middle attacks

Man-in-the-Middle (MITM) Attacks

A MITM attack occurs when an attacker intercepts communication between two parties.

Potential outcomes:

  • Credential theft
  • Session hijacking
  • Data modification

Why Cryptography Fails Here

Poor certificate validation often enables MITM attacks.

Examples include:

  • Ignoring certificate warnings
  • Accepting invalid certificates
  • Using self-signed certificates

Downgrade Attacks

A downgrade attack forces communication to use weaker security protocols.

Example

Both systems support:

  • TLS 1.3

An attacker forces negotiation to:

  • TLS 1.0

The attacker then exploits weaknesses in the older protocol.

Deprecated Protocols

SSL

Secure Sockets Layer (SSL) is obsolete.

Avoid:

  • SSL 2.0
  • SSL 3.0

Early TLS Versions

Weak versions include:

  • TLS 1.0
  • TLS 1.1

Modern systems should use:

  • TLS 1.2
  • TLS 1.3

WEP

WEP uses weak encryption and poor key management.

Common vulnerabilities include:

  • IV reuse
  • Weak keys
  • Rapid key cracking

Modern wireless networks should use:

  • WPA2
  • WPA3

Hashing Vulnerabilities

Hashing protects:

  • Passwords
  • File integrity
  • Digital signatures

Weak hashing implementations create vulnerabilities.

Collision Attacks

A collision occurs when:

  • Hash(A) = Hash(B)

for two different inputs.

Algorithms vulnerable to collisions:

  • MD5 (128-bit)
  • SHA-1 (160-bit)

Unsalted Password Hashes

Without salting:

  • password123

always generates the same hash.

With salting (exact same password for 10 users)

Each password hash will be unique

Attackers can leverage:

  • Rainbow tables
  • Precomputed hash databases

Proper Password Hashing

Modern implementations include:

  • Salt
  • Iterations
  • Key stretching

Examples:

  • bcrypt
  • PBKDF2
  • Argon2
  • scrypt

Digital Signature Vulnerabilities

Digital signatures provide:

  • Integrity
  • Authentication
  • Non-repudiation

Weaknesses arise when:

  • Signing keys are stolen
  • Weak hashing algorithms are used
  • Certificates expire

Private Key Compromise

If a signing key is stolen:

Attackers can:

  • Forge signed software
  • Create malicious updates
  • Impersonate legitimate organizations

Side-Channel Attacks

Not all attacks break the encryption algorithm itself.

Some attacks observe how cryptography operates.

Timing Attacks

Attackers measure:

  • Response Time

to infer information about cryptographic operations.

Power Analysis

Attackers monitor:

  • Power Consumption

during encryption processes to recover secret keys.

Electromagnetic Analysis

Attackers observe electromagnetic emissions from systems performing cryptographic operations.

Side-channel attacks exploit implementation weaknesses, not algorithm weaknesses.

Quantum Computing Risks

A sufficiently powerful quantum computer could weaken:

  • RSA
  • Diffie-Hellman
  • ECC

Organizations are researching:

  • Post-Quantum Cryptography (PQC)

to prepare for future threats.

Using HTTP Instead of HTTPS

  • Data remains unencrypted and vulnerable to interception.

Improper Key Rotation

  • Organizations that fail to rotate keys increase the likelihood of long-term compromise.

Sharing Service Accounts

Shared accounts often result in shared cryptographic credentials and poor accountability.

Security+ Quick Review Sheet

Weak Algorithms

Avoid:

  • DES
  • 3DES
  • RC4
  • MD5
  • SHA-1

Weak Protocols

Avoid:

  • SSL 2.0
  • SSL 3.0
  • TLS 1.0
  • TLS 1.1
  • WEP

Important Vulnerabilities

Know:

  • Plain Text
  • Downgrade attacks
  • MITM attacks
  • Collision attacks
  • Side-channel attacks
  • Key management failures
  • Certificate weaknesses

Thursday, September 3, 2026

What Every Security+ and CySA+ Candidate Should Know About Beaconing

Beaconing in Cybersecurity: 
Security+ and CySA+ Exam Prep

Beaconing is a critical concept for both the CompTIA Security+ (SY0-701) and CompTIA CySA+ (CS0-003) exams. It frequently appears in questions related to malware, command-and-control (C2) communications, network traffic analysis, threat hunting, indicators of compromise (IOCs), and incident response.

Understanding how beaconing works, how attackers use it, and how analysts detect it is essential for passing certification exams and performing effectively in a Security Operations Center (SOC).

Beaconing explained:

Beaconing is the periodic communication between a compromised device and an external system, typically a command-and-control (C2) server controlled by an attacker.

Once malware infects a system, it often attempts to "phone home" at regular intervals to:

  • Report that the infected system is active
  • Receive instructions
  • Download additional malware
  • Upload stolen data
  • Maintain communication with attackers

Exam Definition

Beaconing is recurring network communication between a compromised host and a command-and-control server used to maintain attacker access and exchange information.

Beaconing is associated with:

  • Malware infections
  • Advanced Persistent Threats (APTs)
  • Botnets
  • Remote Access Trojans (RATs)
  • Data exfiltration
  • Command-and-control frameworks

A successful attack often relies on an attacker maintaining communication with compromised systems.

Without beaconing, attackers may lose their ability to:

  • Issue commands
  • Collect data
  • Control malware
  • Move laterally

How Beaconing Works

A typical beaconing process follows this sequence:

1 1. Initial Compromise

2

3 2. Malware Installation

4

5 3. Establish Persistence

6

7 4. Contact C2 Server

8

9 5. Receive Commands

10

11 6. Execute Actions

12

13 7. Repeat Communication

Unlike normal user-driven traffic, beaconing often follows predictable timing patterns:

  • Every 5 minutes
  • Every 30 seconds
  • Every hour

The consistent timing can help analysts identify malicious activity.

Command-and-Control (C2) Server:

A command-and-control server is an external system used by attackers to manage compromised devices.

The C2 server may:

  • Send commands
  • Receive stolen data
  • Update malware
  • Deploy ransomware
  • Coordinate botnet activity

Example:

1 Compromised Laptop

2

3 Internet

4

5 Attacker C2 Server

The compromised device continuously checks in with the C2 server.

This periodic communication is known as beaconing.

Common Beaconing Methods

HTTP and HTTPS Beaconing

Most modern malware uses web traffic because it blends into normal network activity.

Examples:

1 GET /update

2 POST /checkin

Using HTTPS encryption allows attackers to hide communication contents.

Security+ Exam Tip

Traffic encrypted with HTTPS is not automatically safe.

Many malware families use HTTPS for command-and-control communications.

DNS Beaconing

DNS is frequently abused because nearly every organization allows outbound DNS traffic.

Example:

1 checkin.attackerdomain.com

The malware encodes information within DNS requests.

Benefits for attackers include:

  • Stealth
  • Widespread access
  • Firewall evasion

ICMP Beaconing

Attackers sometimes hide communications within ICMP traffic.

Examples:

1 ping requests

2 ping replies

Because ICMP is commonly allowed for troubleshooting, it may be overlooked.

Email-Based Beaconing

Some malware communicates using email accounts or email protocols.

The malware may:

  • Read instructions
  • Send reports
  • Exchange commands

Although less common today, it still appears in advanced attack scenarios.

Beaconing and Malware

Several malware categories rely heavily on beaconing.

Remote Access Trojans (RATs)

A RAT provides attackers with remote control of a victim system.

Examples:

  • Screen capture
  • File access
  • Command execution
  • Keystroke logging

The RAT continuously communicates with its operator through beaconing.

Botnets

A botnet is a collection of compromised devices under centralized control.

Each infected system:

1 Bot

2

3 C2 Server

4

5 Attacker

Beaconing allows synchronization across thousands of compromised systems.

Ransomware

Before deployment, ransomware operators often use beaconing to:

  • Identify valuable systems
  • Escalate privileges
  • Move laterally
  • Exfiltrate data

Many modern ransomware attacks involve command-and-control communication before encryption occurs.

Indicators of Beaconing Activity

Security analysts are often tasked with identifying beaconing behavior in network logs.

Consistent Time Intervals

One of the strongest indicators is regular communication.

Normal user activity is typically irregular.

Beaconing tends to be machine-driven and highly predictable.

Repeated Connections to the Same Destination

Analysts should investigate hosts repeatedly connecting to:

  • Unknown domains
  • Suspicious IP addresses
  • Foreign infrastructure
  • Known malicious servers

Low-Volume Traffic

Beacon traffic is often very small.

Example:

1 Request: 250 bytes

2 Response: 300 bytes

The goal is often simply to check in and await instructions.

Connections During Off-Hours

Unexpected communications occurring at:

  • Midnight
  • Weekends
  • Holidays

may indicate automated malware activity.

Detecting Beaconing

Security Information and Event Management (SIEM)

SIEM platforms help identify recurring patterns.

Examples:

  • Microsoft Sentinel
  • Splunk
  • QRadar

Detection capabilities include:

  • Log correlation
  • Behavioral analysis
  • Alert generation
  • Threat intelligence matching

Network Traffic Analysis

Security teams review:

  • Firewall logs
  • Flow data
  • Packet captures
  • Proxy logs

Common tools include:

  • Wireshark
  • Zeek
  • tcpdump

Analysts look for repetitive communication patterns.

Endpoint Detection and Response (EDR)

EDR solutions monitor endpoint behavior.

Examples:

  • Microsoft Defender for Endpoint
  • CrowdStrike Falcon
  • SentinelOne

They can identify:

  • Suspicious processes
  • Unauthorized outbound connections
  • Malware behaviors
  • Threat persistence mechanisms

Threat Hunting for Beaconing

Threat hunters frequently search for beacon activity.

A common hunting methodology includes:

Step 1

Identify systems making recurring outbound connections.

Step 2

Determine communication frequency.

Step 3

Analyze destination reputation.

Step 4

Inspect associated endpoint activity.

Step 5

Validate whether malicious command-and-control activity exists.

Beaconing Evasion Techniques

Sophisticated attackers know defenders look for predictable patterns.

As a result, they often employ:

Jitter

Instead of beaconing every 60 seconds:

1 52 seconds

2 67 seconds

3 49 seconds

4 71 seconds

Random intervals make detection more difficult.

CySA+ Exam Tip

If a question mentions randomized communication intervals, think jittered beaconing.

Domain Generation Algorithms (DGAs)

Malware may generate hundreds or thousands of domains daily.

Example:

1 abc123.com

   xyz987.net

This helps attackers evade domain blocking.

Encrypted Communications

Attackers increasingly use:

  • HTTPS
  • TLS
  • VPN tunnels

to conceal command-and-control traffic.

Mitigating Beaconing Activity

Network Monitoring

Continuously monitor:

  • DNS traffic
  • Firewall logs
  • Proxy logs
  • Endpoint telemetry

Visibility is critical.

Egress Filtering

Control outbound communications.

Example:

1 Allow:

2 HTTPS to approved destinations

3 Block:

4 Unknown outbound traffic

This reduces attacker communication opportunities.

Threat Intelligence

Use threat intelligence feeds to identify:

  • Known malicious IPs
  • Malicious domains
  • Command-and-control infrastructure

Blocking known indicators can quickly disrupt attacks.

Endpoint Protection

Implement:

  • EDR
  • Antivirus
  • Application control
  • Behavioral monitoring

These defenses help detect malware before beaconing begins.

Network Segmentation

Segmentation limits attacker movement (VLANS, firewalls)

  • User Network
  • Servers
  • Critical Assets

If one segment is compromised, beaconing activity may be contained.

Beaconing in Incident Response

When beaconing is detected:

Containment

  • Isolate affected systems
  • Block suspicious domains
  • Disable compromised accounts

Investigation

  • Determine infection source
  • Analyze malware behavior
  • Identify affected systems

Eradication

  • Remove malware
  • Close vulnerabilities
  • Reset credentials

Recovery

  • Restore systems
  • Monitor for recurring activity
  • Validate remediation

These steps align closely with the Security+ and CySA+ incident response lifecycle.

Security+ Exam Takeaways

  • Beaconing is periodic communication between malware and a command-and-control server.
  • Command-and-control infrastructure enables attackers to manage compromised systems.
  • DNS, HTTP, HTTPS, and ICMP can all be used for beaconing.
  • Consistent communication intervals often indicate malicious activity.
  • HTTPS encryption does not mean traffic is legitimate.
  • Threat hunting frequently involves identifying beaconing patterns.
  • EDR, SIEM, and network monitoring are primary detection methods.

Beaconing refers to the regular communication between a compromised system and an attacker's command-and-control server. It is a common behavior of malware, botnets, RATs, and ransomware operators. For Security+ and CySA+, focus on understanding command-and-control concepts, recognizing indicators such as periodic outbound traffic and repeated connections, and knowing how SIEM, EDR, network monitoring, and threat hunting techniques are used to detect and respond to beaconing activity. Mastering beaconing concepts will help you answer questions covering network security, malware analysis, threat detection, and incident response across both certification exams.

Mastering Remote Code Execution (RCE): A Complete Security+ and CySA+ Exam Study Prep

Remote Code Execution (RCE): 
CompTIA CySA+ and Security+ Exam Prep

Remote Code Execution (RCE) is one of the most dangerous vulnerabilities discussed in cybersecurity and is a critical topic for both the CompTIA Security+ and CompTIA CySA+ certification exams. Understanding how RCE works, how attackers exploit it, and how defenders detect and mitigate it is essential for exam success and real-world security operations.

What Is Remote Code Execution (RCE)?

Remote Code Execution (RCE) is a vulnerability that allows an attacker to execute arbitrary commands or code on a target system from a remote location. If successful, the attacker can gain control over the affected system and perform actions with the privileges of the compromised application or service.

Exam Definition

Remote Code Execution is a security vulnerability that enables an attacker to run malicious code on a target system without physical access.

RCE vulnerabilities are often classified as critical severity because they can lead to:

  • Full system compromise
  • Data theft
  • Malware installation
  • Ransomware deployment
  • Privilege escalation
  • Lateral movement within a network

Why RCE Matters

For Security+ and CySA+ candidates, RCE represents the intersection of:

  • Vulnerability Management
  • Threat Intelligence
  • Secure Coding
  • Incident Response
  • Threat Detection

Many of the largest cyberattacks in recent history originated from an RCE vulnerability.

Examples include:

  • Microsoft Exchange ProxyLogon
  • Log4Shell (Apache Log4j)
  • WannaCry propagation mechanisms
  • SolarWinds-related exploitation techniques

How Remote Code Execution Works

An RCE attack generally follows these steps:


1 1. Discover Vulnerability

2

3 2. Craft Malicious Input

4

5 3. Trigger Application Weakness

6

7 4. Execute Arbitrary Commands

8

9 5. Gain System Access

10

11 6. Establish Persistence


The attacker identifies a flaw that allows specially crafted input to be interpreted as executable instructions.

Common Causes of RCE Vulnerabilities

1. Input Validation Failures

Applications that fail to validate user input may unintentionally execute malicious commands.

Instead of treating input as data:

  • username=ken

The application accepts:

  • username=ken; malicious command

Result:

The server processes both the expected input and the attacker's command.

Security+ Exam Tip

Always remember:

Improper input validation is one of the primary causes of RCE vulnerabilities.

2. Command Injection

Command injection occurs when user-supplied data is passed directly to the operating system shell.

Vulnerable Logic

  • ping <user_input>

If the application does not sanitize the input, an attacker may append additional commands.

Potential Consequences

  • Reading sensitive files
  • Creating new accounts
  • Installing malware
  • Downloading malicious payloads

Exam Objective

Expect questions involving:

  • Command Injection
  • Shell Injection
  • OS Command Injection

These are frequently associated with RCE.

3. Deserialization Vulnerabilities

Serialization converts objects into a storable or transmittable format.

Deserialization restores those objects.

If applications deserialize untrusted data, attackers may inject malicious objects that execute code.

4. Buffer Overflow Attacks

A buffer overflow occurs when data exceeds allocated memory boundaries.

Attackers may overwrite:

  • Memory locations
  • Function pointers
  • Return addresses

This can allow execution of attacker-controlled code.

Security+ Reminder

Buffer overflows are often associated with:

  • Legacy software
  • C and C++ applications
  • Memory corruption vulnerabilities

5. Vulnerable Libraries and Dependencies

Many modern applications rely on third-party components.

If a dependency contains an RCE flaw, applications using it become vulnerable.

Famous Example: Log4Shell

Apache Log4j contained a critical RCE vulnerability that allowed attackers to execute code through specially crafted log messages.

CySA+ Relevance

Analysts must:

  • Monitor vulnerability feeds
  • Track CVEs
  • Assess software inventories
  • Implement patch management

Types of Remote Code Execution

Authenticated RCE

Requires valid credentials before exploitation.

Example:

A malicious insider uses administrator access to exploit a vulnerable management console.

Risk:

  • High impact
  • Lower likelihood

Unauthenticated RCE

Requires no credentials.

This is considered significantly more dangerous.

Example:

A publicly exposed service executes attacker commands directly from the Internet.

Risk:

  • Extremely high
  • Frequently exploited by threat actors

Real-World RCE Attack Scenario

Imagine an organization hosts a vulnerable web application.

Step 1: Reconnaissance

  • An attacker scans public-facing systems.

Step 2: Vulnerability Discovery

  • A command injection flaw is identified.

Step 3: Exploitation

  • Malicious input is submitted through a web form.

Step 4: Shell Access

  • The attacker gains command-line access.

Step 5: Privilege Escalation

  • Administrative permissions are obtained.

Step 6: Data Exfiltration

  • Sensitive information is stolen.

Step 7: Persistence

  • Backdoors are installed.

This sequence reflects the attack lifecycle commonly discussed in CySA+ scenario-based questions.

Indicators of RCE Activity

Security analysts must recognize signs of exploitation.

Endpoint Indicators

  • Unknown processes
  • New user accounts
  • Abnormal services
  • Unexpected scheduled tasks
  • Modified system files

Example

  • cmd.exe launched by webserver.exe

This would be highly suspicious.

Network Indicators

Look for:

  • Unusual outbound traffic
  • Connections to known malicious IPs
  • Unexpected DNS requests
  • Downloads from external sites

Exam Tip

Unusual outbound communications often indicate:

  • Malware
  • Command-and-control activity
  • Active compromise

Log Indicators

Review:

  • Web server logs
  • Authentication logs
  • Application logs
  • Endpoint telemetry

Potential findings:

1 Repeated malformed requests

2 Unexpected process execution

3 Numerous failed validation events

Detecting Remote Code Execution

Security Information and Event Management (SIEM)

SIEM solutions help identify suspicious patterns.

They can correlate:

  • Network events
  • Authentication events
  • Endpoint logs
  • Application logs

Examples:

  • Microsoft Sentinel
  • Splunk
  • QRadar

Endpoint Detection and Response (EDR)

EDR solutions monitor endpoints for suspicious behavior.

Common detections include:

  • PowerShell misuse
  • Privilege escalation
  • Process injection
  • Fileless attacks

Examples:

  • Microsoft Defender for Endpoint
  • CrowdStrike Falcon
  • SentinelOne

Vulnerability Scanning

Organizations use scanners to identify RCE vulnerabilities before attackers do.

Examples:

  • Nessus
  • Qualys
  • OpenVAS

CySA+ Focus

Know the difference between:

  • Vulnerability scanning
  • Penetration testing
  • Threat hunting
  • Security assessments

Mitigating Remote Code Execution

1. Patch Management

The most effective defense is timely patching.

Best practices:

  • Maintain inventories
  • Monitor vendor advisories
  • Apply security updates promptly
  • Prioritize critical vulnerabilities

2. Input Validation

Applications should:

  • Validate input length
  • Use allowlists
  • Reject unexpected characters
  • Sanitize user input

3. Principle of Least Privilege

Applications should run with only necessary permissions.

Benefits:

  • Limits attacker capabilities
  • Reduces impact of successful RCE

4. Network Segmentation

Segmentation limits attacker movement after compromise.

Example:

1 DMZ

2

3 ├─ Web Servers

4

5 └─ Internal Network

Compromising a web server should not automatically provide access to sensitive systems.

5. Application Whitelisting

Only approved executables are allowed to run.

Benefits:

  • Prevents unauthorized code execution
  • Blocks many malware payloads

6. Web Application Firewalls (WAF)

WAFs inspect HTTP traffic for malicious payloads.

They can detect:

  • Injection attempts
  • Exploitation signatures
  • Malicious requests

RCE in the Cyber Kill Chain

Remote Code Execution often appears during the:

CySA+ questions frequently test where exploitation occurs in attack frameworks.

Security+ Exam Takeaways

Remember these key points:

  • RCE allows attackers to execute code remotely.
  • Command injection commonly results in RCE.
  • Input validation mitigates many RCE vulnerabilities.
  • Patch management is the most important defense.
  • Unauthenticated RCE vulnerabilities are extremely critical.
  • Vulnerable third-party libraries can introduce RCE risk.
  • Indicators include unusual processes, network traffic, and system modifications.

CySA+ Analyst Perspective

As a cybersecurity analyst, your responsibilities include:

  • Monitoring threat intelligence feeds
  • Reviewing vulnerability scan results
  • Investigating alerts
  • Correlating log data
  • Identifying indicators of compromise (IOCs)
  • Supporting incident response efforts
  • Recommending remediation actions

Sunday, August 30, 2026

Percent Encoding in Cybersecurity: A Security+ and CySA+ Guide to Detecting Web Attacks, Log Anomalies, and WAF Evasion

Understanding Percent Encoding
CompTIA Security+ and CySA+ Exam Prep

Percent encoding, also known as URL encoding, is one of the most commonly encountered concepts in web application security, log analysis, threat hunting, and incident response. While CompTIA Security+ focuses on recognizing web-based attacks and secure application concepts, CySA+ expands into log analysis, SIEM investigations, threat hunting, and vulnerability assessment where percent encoding appears frequently.

Understanding percent encoding can help you identify:

  • SQL injection attempts
  • Cross-site scripting (XSS) attacks
  • Directory traversal attacks
  • Command injection attacks
  • Obfuscated malware traffic
  • Web server log anomalies
  • WAF bypass attempts

What Is Percent Encoding?

Percent encoding is a method for representing characters in URLs using hexadecimal values.

The format is:

%HH

Where:

  • % indicates encoding
  • HH is the hexadecimal ASCII value

Example:

  • Space = %20

Original URL:

  • https://example.com/search?q=security plus

Encoded URL:

  • https://example.com/search?q=security%20plus

Why Percent Encoding Exists

Certain characters have special meaning inside URLs.

Examples include:

1     /

2     ?

3     &

4     =

5     #

6     %

To prevent confusion, these characters may be encoded.

For example:

/

becomes:

%2F

Common Percent Encodings

Character Encoding

Space %20

!     %21

"     %22

#     %23

$     %24

&     %26

'     %27

(     %28

)     %29

+     %2B

,     %2C

/     %2F

:     %3A

;     %3B

<     %3C

=     %3D

>     %3E

?     %3F

@     %40

Why Security Analysts Care About Percent Encoding

Attackers rarely send attacks in plain text.

Instead, attackers encode payloads to:

  • Avoid detection
  • Bypass web filters
  • Evade IDS/IPS rules
  • Bypass WAF signatures
  • Obfuscate malicious activity

Example:

Normal:

../../../etc/passwd

Encoded:

..%2F..%2F..%2Fetc%2Fpasswd

Or

%2E%2E%2F%2E%2E%2F%2E%2E%2Fetc%2Fpasswd

A web application firewall may miss poorly written detection rules that only search for:

../../../

Directory Traversal Examples

Security+ and CySA+ often test directory traversal attacks.

Attack:

../../../etc/passwd

Encoded version:

..%2F..%2F..%2Fetc%2Fpasswd

Or

%2E%2E%2F%2E%2E%2F%2E%2E%2Fetc%2Fpasswd

Double encoded:

..%252F..%252F..%252Fetc%252Fpasswd

Explanation:

%25 = %

Thus:

%252F

becomes:

%2F

which becomes:

/

This technique can defeat improperly configured web filters.

SQL Injection and Percent Encoding

Attackers frequently encode SQL injection payloads.

Normal payload:

' OR 1=1--

Encoded:

%27%20OR%201%3D1--

Breakdown:

' = %27

space = %20

= = %3D

Security analysts reviewing logs should recognize this immediately.

Example log:

GET /login.php?id=%27%20OR%201%3D1--

This indicates a possible SQL injection attempt.

Cross-Site Scripting (XSS)

XSS attacks often appear encoded.

Normal XSS:

<script>alert(1)</script>

Encoded:

%3Cscript%3Ealert%281%29%3C%2Fscript%3E

Breakdown:

1 < = %3C

2 > = %3E

3 ( = %28

4 ) = %29

5 / = %2F

Log review questions on CySA+ frequently include encoded XSS payloads.

Command Injection Examples

Original payload:

; cat /etc/passwd

Encoded:

%3B%20cat%20%2Fetc%2Fpasswd

Breakdown:

1 ; = %3B

2 space = %20

3 / = %2F

Analysts should immediately recognize:

cat /etc/passwd

as a Linux file disclosure attempt.

Identifying Attacks in Logs

Security analysts spend significant time reviewing logs.

Example:

192.168.1.100 - GET /index.php?page=..%2F..%2Fetc%2Fpasswd

Decoded:

../../etc/passwd

Potential attack:

Directory Traversal

Example:

GET /search?q=%3Cscript%3Ealert%281%29

Decoded:

<script>alert(1)

Potential attack:

Cross-Site Scripting

Example:

GET /login?id=%27%20OR%201%3D1--

Decoded:

' OR 1=1--

Potential attack:

SQL Injection

Double Encoding

More advanced attackers use double encoding.

Example:

../

becomes:

%2E%2E%2F

Double encoded:

%252E%252E%252F

The server decodes:

First pass:

%2E%2E%2F

Second pass:

../

The attack then executes.

CySA+ often includes questions involving obfuscated payloads like this.

WAF Evasion

Web Application Firewalls inspect incoming traffic.

Attackers frequently encode requests to evade detection.

Blocked:

<script>

Encoded variation:

%3Cscript%3E

Double encoded variation:

%253Cscript%253E

Poorly configured WAFs may miss these patterns.

Percent Encoding in Threat Hunting

Threat hunters frequently search SIEM data for encoded indicators.

Useful indicators include:

1     %2F

2     %252F

3     %3Cscript

4     %3E

5     %27

6     %20OR

Common hunting queries:

%2e%2e

%252e

%3cscript

%27%20or

These often reveal attack recon activity.

Exam-Relevant Attack Patterns

Directory Traversal

..%2F..%2F..%2F

Recognize:

Directory Traversal

SQL Injection

%27%20OR%201%3D1--

Recognize:

SQL Injection

Cross-Site Scripting

%3Cscript%3E

Recognize:

XSS

Command Injection

%3Bcat%20%2Fetc%2Fpasswd

Recognize:

Command Injection

Security+ Exam Tips

For Security+:

Know how to identify:

  • SQL Injection
  • XSS
  • Command Injection
  • Directory Traversal

Understand that percent encoding is commonly used to:

  • Obfuscate attacks
  • Bypass filters
  • Exploit web applications

CySA+ Exam Tips

For CySA+:

Expect to:

  • Analyze web logs
  • Decode attack strings
  • Investigate IDS alerts
  • Interpret SIEM events
  • Identify WAF bypass techniques

Saturday, August 29, 2026

Nmap Port States Explained: The Ultimate Security+ and CySA+ Exam Prep Guide

Nmap Port States Explained: 
CompTIA Security+ and CySA+ Exam Prep

If you're studying for CompTIA Security+ (SY0-701) or CompTIA CySA+ (CS0-003), understanding Nmap port states is critical. Nmap is one of the most widely used network scanning tools in cybersecurity, and exam questions frequently require you to interpret scan results, identify attack surfaces, and understand how defenders and attackers use port scanning during reconnaissance, vulnerability assessment, and incident response.

This guide covers every Nmap port state, how Nmap determines them, common exam scenarios, and practical examples that map directly to Security+ and CySA+ objectives.

What Is Nmap?

Nmap (Network Mapper) is an open-source network discovery and security auditing tool used to:

  • Discover hosts on a network
  • Identify open ports
  • Detect services and applications
  • Determine operating systems
  • Perform vulnerability reconnaissance

Example command:

  • nmap 192.168.1.100

Output:

1 PORT STATE SERVICE

2 22/tcp open      ssh

3 80/tcp open      http

4 443/tcp      open      https

The most important field for exam purposes is the STATE column.

Why Port States Matter

A port state tells you how a target system responded to scan attempts.

Understanding port states helps security professionals:

  • Identify exposed services
  • Verify firewall configurations
  • Detect unauthorized listening services
  • Investigate suspicious hosts
  • Prioritize remediation efforts

For exam questions, port states often help determine:

  • Whether a service is reachable
  • Whether filtering is occurring
  • Whether a host is alive
  • Whether firewall rules are functioning properly

The Six Nmap Port States

Nmap defines six major port states:

1. Open

2. Closed

3. Filtered

4. Unfiltered

5. Open|Filtered

6. Closed|Filtered

Let's explore each one.

1. Open

An open port means an application is actively listening and accepting connections.

Example:

PORT STATE SERVICE

80/tcp open       http

What It Means

The host:

  • Is online
  • Is accepting TCP/UDP traffic
  • Has a service bound to the port

Security Implications

Open ports increase attack surface.

For example:

  • 21/tcp open ftp

Could indicate:

  • Anonymous access
  • Weak credentials
  • Misconfigured FTP service

2. Closed

A closed port is reachable but no application is listening.

Example:

PORT STATE SERVICE

23/tcp closed telnet

What It Means

The host replied:

  • Connection refused

or sent:

  • RST packet (Reset)

Security Implications

Closed ports generally indicate:

  • Host exists
  • Port is accessible
  • Service is not running

Exam Scenario

Question:

A scan shows:

1 22 open

2 80 open

3 3389 closed

Interpretation:

  • SSH and HTTP are available.
  • Remote Desktop is disabled/not listening.

3. Filtered

The scanner cannot determine whether a port is open because packet filtering blocks responses.

Example:

PORT STATE SERVICE

3389/tcp      filtered ms-wbt-server

What Causes This?

Usually:

  • Firewalls
  • ACLs
  • IDS/IPS devices
  • Security groups
  • Network filtering

Example

Firewall Rule:

  • Deny inbound TCP 3389

Nmap Result:

  • 3389/tcp filtered

Security Implications

This often indicates:

  • Defensive controls exist
  • Access restrictions are functioning

Security+ Exam Tip

One of the most common test questions:

Closed vs Filtered

Closed:

  • Host responded.

Filtered:

  • Host did not respond due to filtering.

4. Unfiltered

An unfiltered port is accessible, but Nmap cannot determine if it is open or closed.

Example:

  • 80/tcp unfiltered

When Does This Occur?

Most commonly with:

  • nmap -sA

ACK scans.

What It Means

The port is reachable through any firewall.

However:

  • Service status remains unknown

Exam Relevance

CySA+ may present ACK scan output and ask what it indicates.

Answer:

1. Firewall is allowing traffic, but

2. service state is undetermined.

5. Open|Filtered

Nmap cannot determine whether the port is open or filtered.

Example:

  • 53/udp open|filtered

Common With UDP Scanning

UDP is connectionless:

nmap -sU

If Nmap doesn't receive:

A response indicating the port is open

An ICMP error indicating the port is closed

it reports:

  • open|filtered

Why This Happens

Many UDP services simply don't respond.

Examples:

  • DNS
  • SNMP
  • NTP

6. Closed|Filtered

Nmap cannot determine whether the port is closed or filtered.

Example:

  • 123/udp closed|filtered

Why It Happens

Insufficient information exists to determine:

  • Whether a firewall blocked the traffic
  • Whether the service is actually closed

Quick Comparison Table

Common Exam Scenarios

Scenario 1

Output:

PORT STATE

443/tcp      open

Question:

What does this indicate?

Answer:

  • HTTPS service is accepting connections.

Scenario 2

Output:

  • 3389/tcp filtered

Question:

Most likely cause?

Answer:

  • Firewall or ACL blocking access.

Scenario 3

Output:

  • 53/udp open|filtered

Question:

Why is the result inconclusive?

Answer:

  • UDP scans often receive no response.

Scenario 4

Output:

  • 25/tcp closed

Question:

What can be determined?

Answer:

  • Host is reachable but SMTP is not listening.

CySA+ Incident Response Perspective

As a security analyst, Nmap results can support investigations.

Examples:

Unexpected Open Ports

  • 4444/tcp open

Possible indicators:

  • Backdoor
  • Malware listener
  • Unauthorized service

Expected Port Suddenly Closed

  • 443/tcp closed

Possible indicators:

  • Service outage
  • Misconfiguration
  • Incident in progress

Unexpected Filtering

  • 80/tcp filtered

Possible indicators:

  • Firewall change
  • IPS action
  • Network access issue

Nmap Commands Worth Memorizing

Basic Scan

  • nmap 10.0.0.10

SYN Scan

  • nmap -sS 10.0.0.10

UDP Scan

  • nmap -sU 10.0.0.10

ACK Scan

  • nmap -sA 10.0.0.10

Service Detection

  • nmap -sV 10.0.0.10

OS Detection

  • nmap -O 10.0.0.10

Security+ and CySA+ Exam Memory Trick

Think of port states in terms of doors:

Final Takeaways

For the exam, focus on these key facts:

  • Open = Service running and accepting connections
  • Closed = Host reachable but service not listening
  • Filtered = Firewall or filtering device blocks determination
  • Unfiltered = Reachable but state unknown, commonly seen with ACK scans
  • Open|Filtered = Most commonly seen in UDP scans
  • Closed|Filtered = Nmap lacks enough information to determine state