Notes
open one at a time
1.What it can cause
Requests the URL map sends to legacy-api get none of the WAF rules the API path has.
- Requests the URL map sends to legacy-api get none of the WAF rules the API path has.
- An attacker only has to find one path that reaches the legacy backend.
- The load balancer looks protected, which is exactly why nobody checks.
2.Why it is wrong
Cloud Armor attaches to the backend service, several links down the chain - not to the load balancer. Coverage can differ between two paths on the same LB.
Cloud Armor attaches to the backend service, several links down the chain, not to the load balancer. So one path is protected and the other is not, and nothing about the load balancer’s configuration makes that visible. Same outcome as the run.app bypass, opposite cause: there the WAF is walked around, here it was never attached.
The idea
Cloud Armor attaches to the backend service, several links down the chain - not to the load balancer. Coverage can differ between two paths on the same LB.
Learn it
- Cloud Armor: the WAF · GCP 12.1
3.How you would find it
gcloud compute backend-services list --format="table(name,region,protocol,securityPolicy)"
gcloud compute backend-services list \ --format="table(name,region,protocol,securityPolicy)"4.The change that closes it
harbour-waf attached, so both paths get the same rule set.
- As found
- legacy-backend-service has no securityPolicy field set.
- Fixed
- harbour-waf attached, so both paths get the same rule set.
gcloud compute backend-services update legacy-backend-service \ --region=asia-southeast1 --security-policy=harbour-waf # audit every backend service at oncegcloud compute backend-services list \ --format="table(name,region,securityPolicy)"