Courseiva
hardMultiple ChoiceObjective-mapped

CAS-004 Practice Question: A security analyst reviews logs from a web…

A security analyst reviews logs from a web application firewall (WAF) and notices that an attacker is bypassing the WAF by encoding malicious payloads using base64 and then sending them in HTTP headers. Which WAF configuration change would BEST detect and block such attacks?

⚠ Common exam trap

A common mix-up: candidates confuse protocol-level validation (Option B) with content inspection, assuming strict RFC compliance would catch encoded payloads, but base64 is perfectly valid HTTP header content and requires application-layer decoding logic to detect.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add custom signatures to detect base64-encoded patterns in headers

Base64-encoded payloads in HTTP headers are a known evasion technique that bypasses signature-based WAF rules designed for plaintext attacks. By adding custom signatures that specifically match base64-encoded patterns (e.g., detecting long strings of base64 characters or known malicious base64 strings), the WAF can decode and inspect the payload before applying detection logic. This directly addresses the attacker's encoding method without relying on generic protocol or rate controls.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Enable geoblocking to restrict traffic from the attacker's country

    Why it's wrong here

    Geoblocking is not effective if the attacker uses proxies.

  • Implement strict HTTP protocol validation to reject malformed requests

    Why it's wrong here

    Encoded payloads can be protocol-compliant.

  • Add custom signatures to detect base64-encoded patterns in headers

    Why this is correct

    Custom signatures can identify known encoded attack patterns.

  • Increase the rate limiting threshold to allow more requests per second

    Why it's wrong here

    Rate limiting does not examine payload content.

About these practice questions

One of 968 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.