All posts

Protecting Self-Hosted Models from Lateral Movement

Lateral movement across a network of self‑hosted AI models can let an attacker pivot from a compromised service to the core inference engine and exfiltrate proprietary weights. Why the current approach leaves models exposed Most teams spin up a model server on a VM or container, expose a REST endpoint, and give engineers a shared SSH key or static service account token to reach it. The credential is stored in a configuration file, copied between developers, and often checked into version cont

Free White Paper

Self-Service Access Portals: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Lateral movement across a network of self‑hosted AI models can let an attacker pivot from a compromised service to the core inference engine and exfiltrate proprietary weights.

Why the current approach leaves models exposed

Most teams spin up a model server on a VM or container, expose a REST endpoint, and give engineers a shared SSH key or static service account token to reach it. The credential is stored in a configuration file, copied between developers, and often checked into version control. Network policies are coarse – the model port is open to the entire internal subnet, and no one records which command or query triggered a response. When a breach occurs, the only evidence is a handful of system logs that do not show who queried the model, what payload was sent, or whether the response contained sensitive data. The result is a blind spot that enables lateral movement without detection.

What needs to change before we can claim safety

We must enforce identity‑aware access at the point where traffic reaches the model, but the request still travels directly to the model process. In other words, we need a gate that can verify the caller, apply just‑in‑time approvals, mask sensitive fields in the model’s output, and record the entire session. The gate must sit in the data path; otherwise the model itself remains the only place enforcement could happen, and an attacker who compromises the model process could simply bypass any local checks.

Setting up OIDC or SAML authentication, assigning least‑privilege service accounts, and configuring network segmentation are necessary steps. They decide who may start a connection, but they do not provide the runtime enforcement required to stop lateral movement. Without a dedicated data‑path component, the connection still reaches the model unfiltered, and no audit trail is generated.

How hoop.dev provides the missing control layer

hoop.dev is a layer‑7 gateway that sits between identities and the model server. It proxies the HTTP or gRPC traffic, inspects each request, and applies policy before the payload reaches the model. Because hoop.dev is the only point that can see the full request and response, it can enforce three critical outcomes:

  • Session recording: hoop.dev captures every query and response, creating a replay that auditors can review to trace lateral movement attempts.
  • Inline masking: Sensitive fields such as personally identifiable information or proprietary token strings are redacted in real time, preventing accidental leakage to downstream services.
  • Just‑in‑time approval: High‑risk operations – for example, requests that trigger model fine‑tuning or export of weights – are routed to a human approver before execution.

All of these outcomes exist only because hoop.dev occupies the data path. If the gateway were removed, the model would again receive raw traffic without any of the above safeguards.

Setup: identity and least‑privilege grants

Engineers authenticate through an OIDC provider such as Okta or Azure AD. hoop.dev validates the token, extracts group membership, and maps it to fine‑grained policies that define which model endpoints a user may call. Service accounts receive narrowly scoped roles that allow only inference, not model management. This setup ensures that the request is properly identified before it reaches the gateway.

Continue reading? Get the full guide.

Self-Service Access Portals: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

The data path: where enforcement lives

All traffic to the model passes through hoop.dev’s proxy agent, which runs inside the same network segment as the model server. Because the agent terminates the client connection, it can inspect the wire‑level protocol, apply masking rules, and enforce approval workflows before forwarding the request. The model never sees the original credentials or the unmasked payload.

Enforcement outcomes: stopping lateral movement

When an attacker compromises a low‑privilege service and tries to query the model, hoop.dev checks the caller’s identity, matches the request against policy, and either blocks it or requires an approval step. The session is logged, and any attempt to extract model weights is automatically redacted. This combination of identity verification, real‑time policy enforcement, and comprehensive audit trails makes lateral movement significantly harder.

Getting started with hoop.dev

To protect your self‑hosted models, deploy the gateway using the official getting‑started guide. The documentation explains how to register a model endpoint, configure OIDC authentication, and define masking rules. Once the gateway is running, all model traffic will be funneled through hoop.dev, giving you the visibility and control needed to stop lateral movement.

For deeper details on masking, approval workflows, and policy configuration, consult the learn documentation.

Frequently asked questions

Does hoop.dev change the model’s performance?

hoop.dev operates at the protocol layer and adds minimal latency. Because it runs close to the model server, network round‑trip time is negligible for most inference workloads.

Can I use hoop.dev with any self‑hosted model framework?

hoop.dev supports HTTP, gRPC, and other common transport protocols, so it works with TensorFlow Serving, PyTorch Serve, and custom Flask or FastAPI wrappers.

Is the audit data stored securely?

All session logs are written to a backend storage configured by the operator. hoop.dev does not expose raw credentials, and the logs are retained according to the organization’s retention policy.

Explore the source code and contribute on GitHub. By placing a gateway in the data path, hoop.dev gives you the enforcement layer needed to prevent lateral movement against self‑hosted AI models.

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts