Alibaba Cloud Waf Command Injection Bypass Via Wildcard Payload In All 1 462 Built In Rule Set
Alibaba Cloud WAF 3.0 with all 1,462 built-in rules enabled failed to block a command injection payload that used the '?' wildcard to obfuscate file paths. An attacker could therefore run shell commands on a vulnerable application behind the WAF, defeating the WAF's protection.
A web application firewall (WAF) is an HTTP application firewall that applies a set of rules to an HTTP conversation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
The bypass defeats the WAF's core protection, so applications behind it remain exposed to command injection and other OWASP attacks if they are themselves vulnerable.
What the attacker needed
A vulnerable application behind the WAF; Alibaba WAF 3.0 with built-in rules enabled; ability to send crafted HTTP requests
How it was found
- Set up a vulnerable DVWA instance on an EC2 instance with an ALB and Alibaba WAF 3.0 enabled with all 1,462 built-in rules.
- Enable the WAF for the test domain.
- Log in to DVWA as admin and open the Command Injection page.
- Submit a command injection payload that uses the '?' wildcard, such as '[redacted]; cat /etc/passw?'.
- Observe that the request is not blocked and the command executes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web application firewall (WAF) is a filter that inspects web requests and blocks ones that look like attacks. Here, the filter missed a command that used the '?' wildcard character to hide parts of a file path, so the command still ran on the server. This means the WAF did not do its job for that particular trick.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.