Study guide

17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations

Computer Hacking Forensic Investigator CHFI 312-49

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Foundations of Digital Forensics & Cybercrime Investigation

1.1 Cybercrime Classifications, Forensic Science Principles & Legal Admissibility 1.2 RFC 3227 Order of Volatility, Live vs. Dead Acquisition & Forensic Readiness 1.3 Indicators of Compromise (IoCs), Cyber Attribution & Threat Intelligence 1.4 AI-Assisted Forensics, GitOps, Automation/Orchestration & Forensics-as-a-Service (FaaS)

2 Chapter 2: Modern Forensic Environments & Emerging Threats

2.1 Fileless Malware, In-Memory Execution & Living-off-the-Land (LotL) 2.2 IoT & Operational Technology (OT/SCADA) Forensic Fundamentals 2.3 Dark Web, Tor Network, Onion Routing & Hidden Services Forensics 2.4 Blockchain Transactions, Cryptocurrency Tracing & Digital Asset Investigations

3 Chapter 3: Legal Frameworks, Search Warrants & Evidence Rules

3.1 Federal Rules of Evidence (FRE 702, 901, 902, 1001-1003) & Daubert/Frye Standards 3.2 Fourth Amendment, Warrant Exceptions, Workplace Search & Consent Protocols 3.3 International Standards: ISO/IEC 27037, ACPO Principles & ENFSI Guidelines 3.4 Cybercrime Statutes, Privacy Compliance, CAN-SPAM & International Cooperation

4 Chapter 4: eDiscovery, Chain of Custody & Professional Ethics

4.1 Electronic Discovery Reference Model (EDRM) & Legal Spoliation Holds 4.2 Chain of Custody Documentation, Evidence Packaging & Tamper-Evident Handling 4.3 Expert Witness Testimony, Report Writing Standards & EC-Council Code of Ethics

5 Chapter 5: Storage Architecture, Boot Sequences & Media Forensics

5.1 Storage Media Architecture: Sectors, Clusters, RAM/File Slack & Unallocated Space 5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot 5.3 RAID Reconstruction (RAID 0, 1, 5, 6, 10) & SSD Forensic Challenges (TRIM, Wear Leveling)

6 Chapter 6: Windows File Systems: NTFS & FAT

6.1 NTFS Architecture: Master File Table ($MFT) Record Structure & Attribute Headers 6.2 NTFS Artifacts: Alternate Data Streams (ADS), Volume Shadow Copies (VSS) & $LogFile 6.3 FAT12/16/32 and exFAT Architecture, Directory Entries & File Deletion Mechanics

7 Chapter 7: Non-Windows File Systems & File Signatures

7.1 Linux File Systems: ext2/ext3/ext4 Inode Architecture, Superblocks & Journaling Forensics 7.2 macOS File Systems: HFS+ and Apple File System (APFS) Architecture & Snapshots 7.3 File Signatures, Magic Bytes, Hex Headers/Footers & File Carving Techniques

8 Chapter 8: Investigation Lifecycle, Lab Setup & First Response

8.1 Forensic Laboratory Accreditation: ISO/IEC 17025 Standards & Hardware/Software Controls 8.2 First Responder Duties: Crime Scene Containment, Electronic Triage & Volatile Triage 8.3 Physical Evidence Packaging, Anti-Static/Faraday Protection & Transport Security

9 Chapter 9: Forensic Acquisition & Verification Methodology

9.1 Hardware and Software Write-Blockers: Operational Validation & Bridge Verification 9.2 Bit-Stream Disk Imaging, Physical vs. Logical vs. Targeted Acquisition Methodology 9.3 Forensic Image Formats (RAW/DD, E01, AFF) & Cryptographic Hashing Verification (MD5, SHA-256)

10 Chapter 10: Anti-Forensics Techniques & Countermeasures

10.1 Steganography Detection: Spatial/Frequency Domain Steganalysis & Hidden Carrier Extraction 10.2 Timestomping Countermeasures: Comparing $STANDARD_INFORMATION vs $FILE_NAME Timestamps 10.3 Secure Wiping, Degaussing, File Shredding Countermeasures & Residual Artifact Recovery

11 Chapter 11: Windows Operating System Forensics

11.1 Windows Registry Forensics: SYSTEM, SOFTWARE, SAM & NTUSER.DAT Hive Analysis 11.2 Execution Artifacts: Prefetch (.pf), Shimcache (AppCompatCache), Amcache.hve & UserAssist 11.3 User Activity Artifacts: ShellBags, LNK Shortcut Files, Jump Lists & Recycle Bin ($I/$R) 11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing

12 Chapter 12: Memory Forensics & Malware Analysis

12.1 Volatile Memory Acquisition: RAM Capture, Crash Dumps, Hiberfil.sys & Pagefile.sys 12.2 Memory Analysis with Volatility 3: pslist, pstree, malfind, netscan & Vadinfo 12.3 Static Malware Triage: Strings, PE Headers, Import Tables, Hashes & YARA Rule Matching 12.4 Dynamic Malware Analysis: Sandboxing, Process Monitor (Procmon), Regshot & Network Callouts 12.5 .NET Managed Malware Analysis & the GOOTLOADER Fileless Infection Chain

13 Chapter 13: Network, Web Application & Email Forensics

13.1 Network Forensics: PCAP Analysis, Protocol Dissection, Snort/Suricata & Flow Analysis 13.2 Web Server Forensics: Apache/IIS Access Logs, SQL Injection, XSS & Web Shell Detection 13.3 Email Forensics: RFC 5322 Headers, Authentication (SPF, DKIM, DMARC) & Mbox/PST Extraction 13.4 SIEM Event Correlation, Cross-Source Timeline Analysis & Super-Timeline Construction 13.5 Investigating Directory Traversal, Command Injection, Parameter Tampering, XXE, Cookie Poisoning & Brute Force 13.6 Network Device & Service Log Forensics: Firewall, IDS, Honeypot, Router, DHCP, Switch, VPN, DNS & SSH 13.7 Wireless Network Forensics: Rogue APs, Evil Twins, MAC Spoofing, Deauthentication & Jamming

14 Chapter 14: Mobile, Cloud & IoT Forensics

14.1 Mobile Device Forensics: Manual, Logical, File System & Physical Extraction (Android/iOS) 14.2 Mobile Artifact Analysis: Call Logs, SMS/Chat SQLite Databases, Location Data & Plists 14.3 Cloud Forensics: AWS CloudTrail, Azure Activity Logs & Multi-Tenant Evidence Collection 14.4 IoT Forensics: UART/JTAG Physical Interfaces, Firmware Extraction & Sensor Telemetry

15 Chapter 15: Commercial & Open-Source Forensic Suites

15.1 Commercial Forensic Platforms: EnCase Forensic, FTK (Forensic Toolkit) & FTK Imager 15.2 Open-Source Forensic Platforms: Autopsy, The Sleuth Kit (TSK) & SIFT/CAINE Workstations 15.3 Specialized DFIR Utilities: Eric Zimmerman Tools (EZ Tools) & Sysinternals Forensic Suite

16 Chapter 16: Analysis Toolkits, Python Scripting & Tool Validation

16.1 Reverse Engineering & Password Cracking: Ghidra, IDA Pro, Hashcat & John the Ripper 16.2 Python for Digital Forensics: Parsing Raw Artifacts, Custom Scapy Scripts & Evidence Automation 16.3 Forensic Tool Testing & Validation: NIST CFTT Methodology, ISO/IEC 17025 Standards & Daubert Compliance

17 Chapter 17: Database Forensics & Web Application Firewalls

17.1 MySQL Forensics: Internal Architecture, Data Directory, Information Schema & Utility Programs 17.2 SQL Server Forensics: SSMS, ApexSQL, SQLCMD Transaction-Log Collection, Plan Cache & Trace Files 17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations

18 Chapter 18: Social, Virtualized, Multimedia & Browser Investigations

18.1 Social Media, Social Engineering, Insider Threat & Identity Theft Forensics 18.2 Virtualization, Container & Microservices Forensics, Bluetooth and Electron Chat Applications 18.3 Multimedia Forensics: Image, Audio & Video Authentication, EXIF, PRNU and Deepfake Detection 18.4 Browser Artifact Recovery, Private Browsing, USB Enumeration, Partition Recovery & Packer Unpacking Tools

17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations

Key Takeaways Explain This Topic AI

A WAF inspects HTTP and HTTPS at Layer 7 against request content, which is what distinguishes it from a network firewall operating on the 5-tuple and from an IPS matching generic network signatures.

WAFs deploy as a reverse proxy, a transparent bridge, a host-based module such as ModSecurity inside Apache or IIS, or a cloud service, and only the reverse-proxy and cloud modes can terminate TLS to inspect encrypted request bodies.

The WAF audit log is frequently the only place the full request body is preserved, because standard IIS and Apache access logs record the URI and query string but not POST content.

Negative security models block known-bad signatures such as the OWASP ModSecurity Core Rule Set and miss novel attacks, while positive models allow only explicitly permitted input and miss nothing but require per-application tuning.

A WAF cannot see attacks that bypass it entirely by reaching the origin server directly, and it cannot detect business-logic abuse such as parameter tampering, which is why origin access controls and application-level logging remain mandatory.

Last updated: September 2026

17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations

Quick Answer: Blueprint Domain 3 pairs Web Application Firewall (WAF) and benefits and limitations of WAF with the MySQL database topics. A WAF is a Layer 7 control that inspects HTTP/HTTPS request and response content — unlike a network firewall, which decides on the 5-tuple, and unlike a generic IPS, which matches network-level signatures. For the examiner the operational point is blunt: the WAF audit log is frequently the only artifact that preserved the full request body , because IIS and Apache access logs record the URI and query string but not POST content.

WAF Position in the Security Stack

  • Control Layer Decision basis Blind to
  • Network firewall 3–4 Source/destination IP, port, protocol, state Everything inside an allowed HTTP session
  • IPS/IDS 3–7 Network signatures, protocol anomalies Encrypted traffic without decryption; application semantics

WAF 7 HTTP method, URI, headers, cookies, full body , response content Non-HTTP protocols; attacks that never traverse it

  • RASP Inside the app runtime Actual code execution paths Nothing in-process, but requires app instrumentation
  • Deployment Modes

Mode How it sits Forensic consequence

Reverse proxy All traffic terminates on the WAF, which re-originates to the origin Sees decrypted bodies; rewrites the client IP , so the origin must honor X-Forwarded-For or every log line shows the WAF's address

Transparent bridge / inline Layer 2 device in the path No IP rewriting; cannot decrypt without keys

Host-based module ModSecurity inside Apache/Nginx/IIS Sees traffic already decrypted by the web server; consumes origin CPU

Cloud / CDN-integrated Cloudflare, AWS WAF, Azure Front Door, Akamai, Imperva Scales and absorbs volumetric attack; logs live with the provider and must be exported under retention policy

Warning

The reverse-proxy client-IP problem ruins timelines. When a WAF or CDN fronts the site, every origin access-log entry records the proxy's address unless the origin is configured to log X-Forwarded-For or CF-Connecting-IP . An examiner who attributes an attack to the WAF's own IP has produced a false finding. Always verify which header carries the true client address and whether the origin trusts it.

Security Models

Negative (blocklist) model — block what matches known-bad patterns. The reference implementation is the OWASP ModSecurity Core Rule Set (CRS) .

Benefit: deploys immediately with broad coverage and no application knowledge.

Limitation: cannot stop a novel attack or a well-obfuscated variant of a known one.

Positive (allowlist) model — permit only explicitly defined input: each parameter's type, length, character set, and range.

Benefit: blocks unknown attacks by construction.

Limitation: requires a learned or hand-built profile per application and breaks on every legitimate application change.

Anomaly scoring (CRS 3.x default) is the pragmatic middle: each matched rule adds to a score, and the request is blocked only when the score crosses an inbound threshold. This reduces false positives and, forensically, means a logged rule match is not necessarily a blocked request — the examiner must read the score and the final disposition, not the presence of an alert.

  • ModSecurity Rules and Audit Logs
  • A rule has the form: SecRule REQUEST_URI|ARGS|REQUEST_BODY|REQUEST_HEADERS "@rx (?i)(union[\s\x00]+select)" \
  • "id:942100,phase:2,block,t:none,t:urlDecodeUni,t:lowercase,\
  • msg:'SQL Injection Attack Detected',severity:'CRITICAL',\
  • tag:'attack-sqli',logdata:'Matched Data: %{MATCHED_VAR} in %{MATCHED_VAR_NAME}'"

Phases run in order: 1 request headers, 2 request body, 3 response headers, 4 response body, 5 logging. A rule inspecting REQUEST_BODY must be in phase 2 — a phase-1 rule simply cannot see the body, which is a common misconfiguration finding.

SecRuleEngine has three values that decide what the logs will contain:

  • Setting Behavior Forensic meaning of a log entry
  • On Detect and block An entry with Access denied means the attack was stopped

DetectionOnly Detect, allow through An entry means the attack reached the application — check the origin for impact

  • Off No inspection No entries at all; absence of alerts proves nothing
  • Audit Log Structure

ModSecurity's audit log is segmented by letter, and each segment answers a different forensic question:

  • Part Contents
  • A Audit log header: unique transaction ID, timestamp, source IP and port, destination IP and port
  • B Request headers
  • C Request body — the segment no access log preserves
  • E Intended response body
  • F Final response headers
  • H Trailer: matched rule IDs, messages, anomaly score, and the action taken
  • K Full list of every rule that matched

Configure SecAuditLogParts ABCEFHKZ to retain all of it; the default omits C in some distributions, which silently discards exactly the evidence a POST-based injection or XXE investigation requires.

Cloud WAFs express the same data as JSON — AWS WAF logs to Kinesis Firehose with terminatingRuleId , action , httpRequest.clientIp , and matched rule details; Cloudflare's firewall events carry RuleID , Action , ClientIP , and ClientRequestPath .

Why the WAF Log Is Often the Decisive Artifact

It preserves the POST body. An XXE <!DOCTYPE ... <!ENTITY SYSTEM ...> , a SQL injection in a JSON body, or a serialized-object payload never appears in an IIS or Apache access log. Part C of the audit log is the only copy.

It records the decision. The trailer states whether the request was blocked and at what anomaly score, which establishes exposure rather than mere attempt.

It survives origin log rotation. WAF logs often ship to a separate SIEM with longer retention than the web server's own logs.

It timestamps the campaign. Rule-match counts per source IP over time distinguish a single opportunistic scan from a sustained, targeted campaign.

Limitations the Examiner Must State

Limitation Consequence for the investigation

Bypass via direct origin access If the origin server's IP is reachable without going through the cloud WAF, the attacker skips inspection entirely and no WAF log exists . Origin IP leakage through DNS history, mail headers, or certificate transparency logs is the usual cause.

Encrypted traffic without termination A bridge-mode WAF without TLS keys inspects nothing.

Business-logic attacks Parameter tampering, IDOR, and workflow abuse are syntactically valid requests. A WAF has no concept of the correct price or the right owner, so it cannot detect them.

Evasion Case variation, comment insertion ( UN/**/ION ), double and mixed encoding, HTTP parameter pollution, chunked transfer encoding, and oversized bodies exceeding SecRequestBodyLimit all evade naive rules.

Zero-day and novel payloads A negative model matches only what it knows.

Client-side attacks DOM-based XSS executes entirely in the browser; the malicious payload may never traverse the WAF.

False positives and tuning drift Rules disabled to fix a business breakage create permanent blind spots. Always retrieve the ruleset and exclusion list as it stood at the incident time , not as it stands today.

Insider and authenticated abuse A legitimate authenticated user extracting data at scale generates perfectly valid requests.

Important

"The WAF shows no alerts" is not a finding of no attack. It is consistent with SecRuleEngine Off , a disabled or excluded rule, a direct-to-origin bypass, a business-logic attack the WAF cannot model, or an evasion the ruleset did not match. The examiner must establish the WAF's configuration, engine mode, ruleset version, and exclusion list at the time of the incident before drawing any negative inference from log silence.

Investigative Workflow

Identify deployment mode and whether TLS was terminated at the WAF.

Retrieve the ruleset version, engine mode, and exclusion list effective at the incident time from configuration management.

Export audit log parts A, B, C, H, K for the window and hash the export.

Separate attempted from reached-the-application : entries under DetectionOnly , or entries whose anomaly score fell below the blocking threshold, mean the request was served.

Join the WAF transaction ID to the origin access log entry, using the true client IP from X-Forwarded-For , to confirm what the application actually returned.

Confirm whether the origin was reachable directly, which determines whether the WAF log set is complete or partial.

Loading diagram... What a WAF Can and Cannot See