Horizon Inc Cloudflare One demo

Demo library › Chapter 16

Close the front door on an Internet-facing appliance

ReadyLab only~15 minWAF custom rulesWAF attack scoreManaged RulesAccessCloudflare TunnelService tokensSecurity Events

An AI-driven attack on a legacy remote-access gateway on the Internet. The WAF closes every variant of the flaw, the attacker finds the next one, and Access gates the whole product behind identity - with the WAF still inspecting behind it.

Transforming Enterprise Security: Defend against AI-enabled threats, Modernize remote access

The problem

Horizon Inc still runs Horizon Connect, an on-premises remote-access gateway in front of their VPN hardware, and its sign-in page is on the Internet for anyone to find. Since June 2026, gateways like it - NetScaler, Ivanti, Check Point - have been taken over without a password, often before a patch existed, and AI agents now find and exploit them with ease. Every Internet-facing employee system is an unbounded attack surface. More information is in the solution brief, The Identity-Gated Edge.

Lands with: CISOs, heads of infrastructure and security architects

Before and after

What this looks like at a typical customer before Cloudflare, and after. Click either to enlarge.

Before

Employees, a nightly export job, Internet-wide scanners and an AI-driven attacker all reach the legacy remote-access gateway directly, on a public IP with port 443 open. The firewall lets any HTTPS through, an IPS signature catches only yesterday's payload, and the gateway's logs live on the appliance itself. A pre-authentication flaw in its session decoder gives the attacker the session table and the network behind it, until somebody patches.
The appliance on the Internet: its own login page, an open port, and a signature that is always a step behind.

After

Every request to the gateway's hostname arrives at Cloudflare. The WAF inspects it first and blocks the known exploit; Access then checks identity from the company's identity provider, device posture, or the nightly job's service token, so anonymous requests - scans and exploit variants the WAF missed - stop at the edge. Signed-in traffic continues through Cloudflare Tunnel, which dials out from the data center, so the gateway has no inbound ports and accepts only Access-signed requests. WAF events and Access logs share Ray IDs, and threat intelligence keeps the rules current.
The Identity-Gated Edge: the WAF inspects first, Access checks identity, and the tunnel is the only way in.

Before you start

Run it

An appliance anyone can reach

DoSay
In a private window, open .Horizon Connect, the company's remote-access gateway. Its sign-in page is on the Internet, like every VPN portal's, so every scanner on the Internet can find it.
In the attacker console, Run the attack.This is a scripted stand-in for an agentic framework like ARTEX. It finds the gateway, asks its version, matches a pre-authentication flaw and sends the exploit. No password. Red means the request reached Horizon Inc's server.
Point at Compromised, then at the origin console.Remote code execution as root, then the session table. The origin console shows every one of those requests arriving, anonymous, from the Internet. The exploit is simulated - nothing ran - but the path it took is real.
Whybackground, if you are asked

This is the 2026 pattern: pre-authentication flaws in Internet-facing appliances, exploited before a patch exists. Researchers used AI to find Java4Shell and build a working exploit in three hours. The appliance's own sign-in page is the attack surface, so nothing behind it helps.

The WAF: a virtual patch in seconds

DoSay
In the Cloudflare dashboard, open the zone → Security → Security rules → Emergency: CVE-2026-114938 (Java4Shell) on Horizon Connect, and open its expression.This is the emergency rule a security team writes the day the CVE lands. The flaw is in how the gateway decodes its Base64 session token before anyone signs in, and what it decodes it then deserializes. The rule describes exactly that:
(http.host eq "connect.<zone>"
 and starts_with(http.request.uri.path, "/vpn/")
 and (any(http.request.cookies["hc_session"][*] contains "rO0AB")
      or any(http.request.uri.args["token"][*] contains "rO0AB")))
Read it out, one line at a time.This application only. Only the gateway's /vpn/ endpoints, where the token is decoded before sign-in. The two places that decoder reads a token from: the hc_session cookie and the token parameter. And rO0AB: the Base64 of AC ED 00 05, the first bytes of a Java serialized object, which no real session token ever starts with.
Switch the rule on, and Run the attack again.Amber: the exploit in the cookie is blocked at Cloudflare's edge, with a Ray ID. The agent moves it to the query string - amber again, because the rule covers every input the decoder reads. Then it hides a newline inside the signature, and the gateway's decoder strips it back out. Live across Cloudflare's network in seconds, with no change to the appliance - and the agent has already found a way around it.
Whybackground, if you are asked

A virtual patch is the fastest defense there is: written and deployed globally in the time it takes to read the advisory, protecting the appliance before the vendor ships a fix. This one matches the payload, so an agent that rewrites its payload on every attempt finds the variant it does not cover. The WAF has better tools than one signature, and the next step uses them.

The WAF, hardened

DoSay
In the same list, switch on Hardening: Horizon Connect session tokens are Base64 and nothing else and Hardening: likely code execution against Horizon Connect (WAF attack score). Then, under the zone's managed rules, Hardening: Cloudflare Managed Ruleset on Horizon Connect.Three more ways the WAF defends. The first matches the flaw itself rather than any one payload: a session token is Base64 and nothing else, so a token with any other character in it - a newline, whatever it hides - is blocked. The second is machine learning: WAF attack score rates every request for code execution, including variants nobody has written a rule for. The third is Cloudflare's own managed rules, maintained by Cloudflare's security team and updated as exploits appear across a fifth of the web.
Run the attack again.Every variant of Java4Shell is amber now - the cookie, the query string and the hidden newline. The WAF won this round. So the agent moves on: the gateway has a second flaw, one nobody has published yet. Its support diagnostics trust a header instead of a session. The request is perfectly ordinary - nothing for a signature, a validation rule or an attack score to find - and it is in.
Whybackground, if you are asked

This is the cat and mouse. The WAF is very good at it: signatures on the day, positive security for the class of flaw, machine learning for the variants, managed rules kept current by Cloudflare. Every one of those closed a door here. But each new flaw in an Internet-facing appliance is a new race, and the first anyone hears of some of them is the exploit. The answer to that is not a better rule.

Gate the whole product with identity

DoSay
Zero Trust → Access controls → Applications → Add an application → Self-hosted. Name it Horizon Connect, add the public hostname , and select the existing policies All Employees and Nightly export job (service token). Save.A couple of minutes, no change to the appliance and no new hardware. This is the step one of the world's largest banks took for its NetScaler gateways.
Run the attack again.Everything the WAF had not stopped is green: the probes, and the new flaw too. Every one of them stops at Cloudflare and is asked to sign in. The origin console shows nothing new: anonymous traffic no longer reaches Horizon Inc's network, whatever flaw it is aimed at - including the ones nobody has found yet.
Point at the exploit attempts that are still amber.The WAF is still working. It inspects first, then Access checks identity, so the exploits are stopped before Access is even asked. The two are layers, not alternatives.
In the private window, reload and sign in as .Alice signs in through FlareID and lands on the gateway, which greets her by name. Nothing changed for her.
Whybackground, if you are asked

Access gates the entire exposed product, every flaw in it at once, behind a verified identity. An attacker no longer needs a payload the WAF misses; they need a Horizon Inc identity that passes sign-in, MFA and a device check - far harder to get than an exploit for an appliance's login page. The attack surface shrinks from the whole Internet to Horizon Inc's own workforce.

Defense in depth: a stolen credential

DoSay
In the attacker console, Attack with a stolen service token.Suppose the agent finds the nightly job's service token in a leaked config file. Access lets it through - it is a valid credential. Then it sends every Java4Shell variant, and every one is amber: the WAF inspects signed-in traffic exactly as it inspects anonymous traffic.
Whybackground, if you are asked

Identity narrows who can reach the application; the WAF keeps checking what they send. A compromised account, a stolen token or an insider gets past the gate and still meets the WAF. And everything that token did is in the Access log under its name: revoke it, and it is gone.

Lock the origin, and let machines in too

DoSay
On the origin console, turn on Accept only requests signed by Access.Horizon Connect now refuses anything Access did not sign. It has no inbound port either: it is reached only through the tunnel, which dials out.
In the attacker console, Run the nightly export job.The nightly job presents its service token and gets its export. The same call without the token is stopped at Cloudflare.
Whybackground, if you are asked

This is the brief's third step. Once the apps are behind Access, make them accept only Cloudflare's traffic - through Tunnel or dedicated egress IPs - and check the token themselves. Service tokens put scripts and jobs through the same checks as people.

One audit trail

DoSay
In the zone, Security → Events: the blocked requests, found by the Ray IDs in the attacker console. Then Zero Trust → Insights → Logs → Access: the sign-ins for Horizon Connect, and the stolen token's requests under its name.Each WAF block names the layer that made it - the emergency rule, the Base64 rule, attack score or a managed rule - and each Access decision names the person or token. Every request was identified at Cloudflare before it reached the network. In production both logs stream to the SIEM, where the Ray ID ties them together.

What the audience should see

Where the evidence is

The zone's Security → Events for the WAF blocks, Zero Trust Insights → Logs for Access, and the origin console for what reached the server. The attacker console shows the Ray ID of every request, so each one can be found in either.

Known limitations

Part of: Replace the VPN · The full tour