Overview
Exploitation now routinely starts before a patch exists, and a patch that does exist still has to be tested and rolled out. For that stretch, every application is one you cannot change. For some it never ends: a vendor appliance, an unmaintained internal service, something under a change freeze.
In proxy mode Synapse terminates TLS, applies policy and forwards to the unchanged application over its existing port. The application needs no modification and does not need to know it is behind anything.
When you see this
- Exploitation is reported against a product or library you run, and there is no patch yet.
- A patch exists, but testing and rolling it out will take days or weeks.
- The application cannot be patched, redeployed or given a new library at all.
Steps
- 01
Put Synapse in front
Upstreams live in a separate file that reloads without a restart. On Kubernetes the same thing is driven from Ingress objects.
/etc/synapse/config.yaml mode: "proxy" proxy: address_http: "0.0.0.0:80" address_tls: "0.0.0.0:443" upstream: conf: "/etc/synapse/upstreams.yaml" - 02
Write the virtual patch
Block the exact request shape that reaches the vulnerability and leave everything else alone. Rules are checked when they load, rather than failing open at runtime.
WAF rule, action block http.request.method == "POST" and starts_with(http.request.path, "/admin")DecisionWas the app reachable while the flaw was already being exploited?Yes The rule protects you from now on, not before. Treat the host as suspect until you know otherwise: follow the contain a compromised host playbook.
No Carry on.
- 03
Put exceptions above the block
Evaluation stops at the first matching rule. An allow placed below a broad block never runs.
WAF rule, action allow, placed above the block ip.src in {192.0.2.0/24}DecisionDo trusted callers still need the patched path?Yes Add an allow for them and move it above the block.
No Keep the block alone.
- 04
Make the proxy the only path in
Anything that reaches the application by another route, such as a second interface, an internal caller or a management port, bypasses every rule. Close those with firewall rules.
- 05
Ship the real fix
A WAF rule is a shape, not a fix: it blocks the exploit you described, and a variant that reaches the same bug differently gets through. Use the time it buys to test and deploy the patch, then retire the rule.
Common mistakes
- Placing an allow rule below the block it was meant to escape.
- Leaving a second route to the application open.
- Treating the virtual patch as permanent.
Escalate when
- Requests that match the patched shape from an address inside your network.
Where this stops working
- Only traffic through the proxy is protected.
- Terminating TLS means holding certificates. With passthrough instead, the WAF and content scanning have nothing to read.