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 nothing can go around the gate. 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. Like most, it already signs people in with the company identity provider - that Sign in with Horizon Inc SSO button goes to FlareID. But its sign-in page is on the Internet, like every VPN portal's, so every scanner on the Internet can find it - and a pre-authentication flaw does not care what the sign-in is.
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 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. Under Custom rules, click Emergency: CVE-2026-114938 (Java4Shell) on Horizon Connect to open it, and switch the rule builder to Edit expression so the whole expression shows.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 rule expression is matching traffic that is for this application only, by the hostname. 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.
Set the rule to Active and Save. Back in the attacker console, Run the attack again.Now we see it's amber when the exploit in the cookie is blocked at Cloudflare's edge, with a Ray ID. The AI attacking agent moves the payload to the query string - amber again, because the rule covers every input the decoder reads. Then the AI agent 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
Back on Security → Security rules, three more rules are waiting, all inactive:
  • Under Custom rules, open Hardening: Horizon Connect session tokens are Base64 and nothing else. Show its expression - matches "[^A-Za-z0-9+/=_-]" on the same two inputs - then set it Active and Save.
  • Under Custom rules, open Hardening: likely code execution against Horizon Connect (WAF attack score). Show cf.waf.score.rce le 20, set it Active and Save.
  • Under Managed rules, find Cloudflare Managed Ruleset with the description Hostname equals , status Disabled - Cloudflare's own ruleset, deployed for the gateway's hostname only. Enable it from its ... menu.
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
Back in the Cloudflare dashboard, go to Zero Trust → Access controls → Applications → and click on + Create new application → Self-hosted and private. Enter connect as the subdomain and choose the sxplab.com domain. In Access policies, from the Add current policies dropdown select All Employees and Nightly export job (service token). Scroll to the bottom of the page and name it Horizon Connect and hit Create.A couple of minutes work, no change to the appliance and no new hardware. This is how one of the world's largest banks deployed Cloudflare for its NetScaler gateways.
Run the attack again. Say: 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 flaws exist, 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 . Access sends Alice to FlareID: sign in as . She lands on the gateway's own sign-in page - click Sign in with Horizon Inc SSO.Straight in, with no second password. Access did not tell the gateway who she is: the gateway asked FlareID, as it always has, and FlareID already knew her from the sign-in at Access a moment ago. Access and the gateway never integrate with each other - they both trust the same identity provider, which is why this works on day one with any gateway that already uses SSO.
Point at the two lines on the gateway's page.Signed in with Horizon Inc SSO - that is the gateway's own sign-in. And, separately, arrived through Cloudflare Access - the gate in front of it, checking every request. Two layers, neither aware of the other.
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 attacker and their AI 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. The exploits it blocked are in Security Events, and what the token did get through is in the Access log under its name: revoke it, and it is gone.

Let the sync job in, and leave no way around the gate

DoSay
In the attacker console, Run the nightly export job.Blue: the nightly sync job presents its service token, Access checks it the way it checks a person's identity, and the job gets its export - the session table is right there in the card. The same call without the token is stopped at Cloudflare, green.
Point at the origin console: the job's request, named by its service token.Every request that reaches the gateway now arrives with an identity - a person's or a job's - and the stolen token from a moment ago is the one to revoke.
Point at the tunnel in the architecture diagram above, or Networks → Tunnels in Zero Trust.And there is no way around the gate. The gateway has no inbound port: it is reached only through the tunnel, which dials out to Cloudflare. An attacker who finds its address finds nothing listening.
Whybackground, if you are asked

This is the brief's third step: once the apps are behind Access, make sure they accept only Cloudflare's traffic, so nobody can skip the gate by going straight to the origin - the direct-to-origin attack Chainalysis saw. For an appliance that is a network control, not a change to the appliance: Cloudflare Tunnel, as here, or in a data center a firewall rule that admits only Cloudflare's IPs or dedicated egress IPs, with mTLS between Cloudflare and the origin. Applications you build yourself can go one step further and verify the Access token on every request. Service tokens put scripts and jobs through the same checks as people.

One audit trail

DoSay
Back in the Cloudflare dashboard, in the zone , Security → Analytics → Events: the blocked requests, found by the Ray IDs in the attacker console. Click on any of the Block's and you can see all the data. Then back to the main dashboard and navigate to Zero Trust → Insights & Logs → Logs → Access authentication logs. Click on the X in the filters to clear the filter for service auth logs. You can now see Alice's sign-in to Horizon Connect (and to Attacker console, the console itself), and the service-token authentications for Horizon Connect under the token's name, Horizon nightly export job - the real job's export and the stolen token's probe.Each WAF block names the layer that made it - the emergency rule, the Base64 rule, attack score or a managed rule. Each Access decision names the person or token. The WAF runs first, so the exploits it blocked never reached Access and are only in Security Events; the stolen token's one request that got through is in the Access log under the token's name. Together they account for every request, and in production both stream to the SIEM, where the Ray ID ties them together.

What the audience should see

Where the evidence is

The zone 's Security → Analytics → 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