When your injection gets blocked, the reflexive move is to throw dozens of bypass payloads at the server. The smarter move is to isolate which specific thing got blocked — because the right bypass depends on the right filter.
The Reductive Method
Start with a full payload that gets blocked:
127.0.0.1; whoami
Three things could be blocked:
- The
;operator - The space
- The
whoamicommand
Isolate each by minimizing the input to just that one element:
Step 1 — Test the Operator Alone
127.0.0.1;
If this is blocked, ; is on the blacklist. Try a different operator (&, |, %0a, backticks).
Step 2 — Test Operator + Space
127.0.0.1; a
If step 1 passed but this is blocked, the space is filtered. Use IFS or tabs (see Space Filter Bypass).
Step 3 — Test the Full Command
127.0.0.1; whoami
If steps 1 and 2 passed but this fails, the word whoami is blacklisted. Obfuscate with quotes, backslashes, or case manipulation (see Command Obfuscation).
Why This Matters
Each filter type has specific bypasses — one doesn’t substitute for another:
| What’s blocked | Which section covers the bypass |
|---|---|
| Specific operators | Try alternate operators |
| Spaces | Space Filter Bypass |
Specific characters (/, \, quotes) | Character Filter Bypass |
Specific commands (cat, whoami) | Command Obfuscation |
Spraying everything at once wastes requests and often triggers rate limits before you find what works.
Inspecting the Response
Filters produce three response types:
Clean Rejection
The app returns something like:
- “Invalid input”
- “Access denied”
- “400 Bad Request”
- Redirect to error page
Clear signal — the filter saw and rejected your input.
Silent Dropping
The app returns a normal-looking response but your command didn’t run. The filter stripped the dangerous part and ran the sanitized remainder. Often harder to distinguish from “injection worked but produced no output”.
Test — inject something that has visible success and failure modes:
127.0.0.1; echo INJECTED_TEST_12345
If INJECTED_TEST_12345 appears in the response, injection worked. If not, something blocked it.
WAF Interception
Cloudflare, Akamai, AWS WAF show branded error pages. Easy to identify — the response HTML contains the WAF vendor’s name.
Length Limits
Some filters don’t block characters — they just truncate input past N characters. If your short payloads work but longer ones fail silently, you’re hitting a length limit. Use shorter obfuscation (tabs instead of $IFS).
Server-Side Fingerprinting
Knowing the backend narrows your payload choices:
Server: Microsoft-IIS→ Windows (usually CMD)Server: Apache→ usually Linux + bashServer: nginx→ usually Linux- PHP in URL (
.php) → likely Linux
Headers rarely reveal the shell, but platform identification gets you 80% there.
Testing Carefully
Some observations only from doing this a lot:
- Start with the smallest possible operator (just
;or just%0a) before adding commands - Test one bypass at a time — don’t stack bypasses without confirming the base technique works
- If you suspect a WAF, back off for 30 seconds between tests to avoid rate-based blocking
- Use
sleep 5to confirm execution before noisier payloads — a 5-second delay is unambiguous
