Overview
| Field | Value |
|---|---|
| URL | http://natas10.natas.labs.overthewire.org |
| Username | natas10 |
| Password | t7I5VHvpa14sJTUGV0cbEsbYfFP2dmOu |
Hints
Hint 1 — What does the filter block?
Hint 1 — What does the filter block?
The source adds a The characters
preg_match check:;, |, and & are blocked. These were used in the Level 9 solution. Are they the only characters that act as command separators in bash?Hint 2 — What else separates bash commands?
Hint 2 — What else separates bash commands?
In bash, a newline character acts as a command terminator — exactly like
;. The newline character (\n) URL-encoded is %0a. The filter above doesn’t check for it. Try injecting %0a between your grep arguments and a cat command.Solution
Full walkthrough
Full walkthrough
Understand what's blocked
The filter catches
;, |, and & in the submitted value. The Level 9 payload (&& cat ...) would be caught.Use newline as a separator
A URL-encoded newline (The shell receives:
%0a) is not in the blocklist. Send the payload via the URL directly:Character blacklists are inherently fragile. Newlines, null bytes, and other metacharacters are easy to overlook. The correct fix is to use
escapeshellarg() — which safely quotes the entire argument — or to avoid shell execution entirely. Allowlists (only permit alphanumerics) are more robust than blocklists.