Normal Request Test
Send a normal request to prove that the website still works when WAF is enabled.
Sample payload
q=hello
This landing page simulates a website placed behind Cloudflare WAF to test its ability to detect, block, and log malicious requests such as XSS, SQL Injection, and sensitive file access.
Layer
Application-layer protection
Goal
Block threats before origin
Logs
Security Events visibility
Request Flow
User / Attacker
Sends a request to the website.
Cloudflare WAF
Analyzes the request and applies security rules.
Origin Server
Receives only filtered, allowed traffic.
Overview
A concise explanation of what this demo is designed to prove during the presentation.
Inspect URI paths, query strings, and headers for suspicious attack patterns.
Prevent script injection attempts before they reach the origin server.
Stop common query tampering payloads that target application inputs.
Record blocked requests in Cloudflare Security Events for later review.
Architecture
Cloudflare acts as a protective layer between users and the origin server. All incoming requests are inspected by the WAF before they reach the website server.
Client
Protection Layer
Inspection & Filtering
Infrastructure
How the request moves through the protection layer.
The user sends a request to the domain.
DNS is routed through Cloudflare, so the request reaches Cloudflare first.
WAF inspects the URI, query string, headers, and security rules.
Valid requests are forwarded, while malicious requests are blocked and logged.
Testing
Use the buttons below to trigger real GET requests based on the current domain. These requests can then be inspected and blocked by Cloudflare WAF.
Send a normal request to prove that the website still works when WAF is enabled.
Sample payload
q=hello
Send an XSS payload in the query string to test script-blocking rules.
Sample payload
<script>alert(1)</script>
Send a basic SQL Injection payload through the query string.
Sample payload
' OR '1'='1
Simulate an attempt to access a sensitive configuration file.
Sample payload
/.env
Simulate unauthorized access to the WordPress configuration file.
Sample payload
/wp-config.php
Clicking a test button performs a real GET navigation to the current domain, allowing WAF inspection and logging.
Forms
These forms simulate how attackers interact with website inputs. Submissions are real GET requests, so Cloudflare WAF can inspect them.
Rules
These example rules are written for the Cloudflare dashboard and are suitable for a live demo presentation.
Rule 1: Block XSS Demo
Expression-based rule
Expression:
lower(http.request.uri.query) contains "<script"
Action:
Block
Rule 2: Block SQL Injection Demo
Expression-based rule
Expression:
lower(http.request.uri.query) contains "or '1'='1"
or lower(http.request.uri.query) contains "union select"
Action:
Block
Rule 3: Block Sensitive File Access
Expression-based rule
Expression:
http.request.uri.path contains "/.env"
or http.request.uri.path contains "/wp-config.php"
Action:
Block
Results
A comparison of how requests behave before the WAF is enabled and after Cloudflare begins filtering malicious traffic.
| Attack Type | Before WAF is enabled | After WAF is enabled |
|---|---|---|
| Normal request | The website may receive the request or return a normal response. | Valid requests are allowed. |
| XSS payload | The website may receive the request or return a normal response. | Malicious requests are blocked or challenged by Cloudflare. |
| SQL Injection payload | The website may receive the request or return a normal response. | Malicious requests are blocked or challenged by Cloudflare. |
| Access to /.env | The website may receive the request or return a normal response. | Malicious requests are blocked or challenged by Cloudflare. |
| Access to /wp-config.php | The website may receive the request or return a normal response. | Malicious requests are blocked or challenged by Cloudflare. |
Logs
Use the Security Events dashboard to verify blocked traffic and inspect the details of each request.
Open the Cloudflare Dashboard.
Select the demo domain.
Go to Security â Events.
Filter by Action = Block.
Check the details: Time, Client IP, Host, Path, Rule name, and Action.
Sample entries for presentation purposes
| Time | Client IP | Path | Rule | Action |
|---|---|---|---|---|
| Just now | 203.0.113.18 | /search?q=<script>alert(1)</script> | Block XSS Demo | Block |
| 2 mins ago | 198.51.100.42 | /search?id=1' OR '1'='1 | Block SQL Injection Demo | Block |
| 5 mins ago | 192.0.2.64 | /.env | Block Sensitive File Access | Block |
| 12 mins ago | 203.0.113.7 | /search?q=hello | N/A (Allowed) | Allowed |
Presentation
This website is placed behind Cloudflare WAF to demonstrate application-layer protection.
Normal requests are still allowed, so legitimate users can continue to access the website without disruption.
When malicious payloads such as XSS, SQL Injection, or sensitive file access are sent, Cloudflare can block or challenge them before they reach the origin server.
Blocked requests are recorded in Cloudflare Security Events, which helps us review the attack details later.
This proves that a WAF adds an important security layer for protecting websites from common application-layer attacks.