AI and network security

How do I protect my company from AI agents?

Protect your company from AI agents on two fronts. Against agents used by attackers, shrink what the internet can reach, patch exposed systems within days and use phishing-resistant sign-in. For the agents you run yourself, give each one its own identity, only the tools and data its task needs, credentials that expire, human approval for irreversible actions and no general route to the internet.

TL;DR

Treat AI agents as two problems, the ones attackers point at you and the ones you deploy, and give both less to reach. Shrink and patch what the internet can see, and use phishing-resistant MFA for admins. Give your agents their own identities, minimal tools and expiring credentials, and run operational ones on local networks behind one narrow gateway.

Learning objectives

After reading this article you will be able to:

  • Reduce exposure to attacker-run agents by shrinking attack surface, patching quickly and hardening sign-in
  • Govern your own agents with an inventory, per-agent identity, scoped short-lived credentials and approval gates
  • Contain agents by network design, so a fooled agent has nothing to reach and nowhere to send data

Attacker agents and your own agents

Protecting a company from AI agents has two sides: the agents attackers point at you, and the agents you run yourself. The first group uses AI to find and exploit weaknesses faster and at greater scale. The second group is software you have given access to your data and tools, which anyone who can put instructions in front of it may be able to steer. Both do damage through the same thing: whatever they can reach.

Defence against attacker-run AI agents

Defending against attacker-run agents means shrinking what they can find and fixing what they find before they do.

  1. Inventory and cut internet exposure. List every public IP address, domain, login page and API. Take off anything that does not need to be public, and put admin tools behind your identity provider.
  2. Patch exposed systems within days. Google’s analysis put the average time from disclosure to exploitation at five days in 2023, before AI tools made scanning cheaper still.
  3. Use phishing-resistant MFA for every admin and every email account. CISA calls FIDO and WebAuthn authenticators the gold standard.
  4. Retire long-lived shared secrets. Every API key in a repository, a CI log or an app binary is something an automated scanner can find and use. What happens when an API key leaks? covers the clean-up.
  5. Watch for automation in your logs. Bursts of requests, odd paths and sign-in attempts at machine speed are the signature of automated attackers.

Can AI hack my website? goes deeper on the public web side.

AI agent governance

Govern each AI agent your company runs like a contractor with a badge, not like a feature.

  • Keep an inventory. Every agent, what it is for, who owns it, which tool servers it uses and what data it touches. Shadow agents connected by individual employees are the ones nobody revokes.
  • Give every agent its own identity. A named service identity per agent, so its actions are attributable and it can be cut off on its own.
  • Grant the narrowest tools. OWASP’s guidance on excessive agency is to limit the extensions an agent can call to the minimum necessary and avoid open-ended ones such as a general command line.
  • Use credentials that expire. AWS recommends temporary credentials for workloads instead of long-lived keys; the same applies to agents. Scope them to one task.
  • Gate irreversible actions. OWASP recommends requiring a human to approve high-impact actions. Payments, deletions, permission changes and messages leaving the company qualify.
  • Vet tool servers before installing them. The Model Context Protocol security guidance says clients must show the exact command and get explicit approval before running a new local server, and should sandbox servers with minimal default privileges.
  • Log everything an agent does, with the identity that did it.

Network design for agent containment

Network design decides what a fooled agent can reach and where it can send things. Permissions limit what an agent is allowed to do; the network limits what it is able to do, which still holds when a permission was set too broadly.

Keep agents that work with operational systems, such as warehouse handhelds, field devices, kiosks, vehicles and machines, on a local network where they coordinate with the devices around them. Give that network one narrow gateway to the internet, carrying only the messages the work needs. An agent that is manipulated by something it read cannot reach systems that are not on its network and cannot send your data to an outside address it has no route to.

Safe agent coordination with Offline Protocol

Offline Protocol is the coordination layer for that design. Agents and apps on phones, computers and gateways advertise what they can do, discover each other up to 8 hops away and call each other request and response over Bluetooth LE, Wi-Fi and local IP, with no broker, no registry server and no internet. Every agent’s device carries an Ed25519 identity it generated itself, verified device to device, and request and response bodies are sealed in an MLS session once one is confirmed. The provider decides which requesters it serves, and the requester keeps a list of approved providers, so authorisation stays in your hands.

When the site needs the wider network, it reaches it through a gateway provisioned against a defined contract, not through whichever device happens to have a signal. Your agents get the speed of coordinating with the machines next to them, and your company keeps a short, known list of doors.

Frequently asked questions

Should each AI agent have its own credentials?

Yes. A named identity per agent means its actions show up in logs as that agent, its permissions can be scoped to its task, and it can be cut off without affecting anything else. Shared credentials make all three impossible.

How do I stop an agent from leaking company data?

Remove its ways out. An agent that reads untrusted content should not also be able to send email, fetch arbitrary URLs or post to outside services, and an agent on a local network with no general internet route has nowhere to send data even if it is tricked.

Do I need a policy before employees use AI agents?

Yes. At minimum, list which agents and tool servers are approved, which data they may touch, who approves new ones, and that agents never get personal or shared admin credentials.

Can I block AI agents from my website?

You can rate-limit, filter and challenge automated traffic, but you cannot stop an attacker's agent from trying. Assume it will, and make sure anything it finds is patched, authenticated and not more exposed than it needs to be.

What should require human approval?

Anything that is hard to undo or that moves value or access, such as payments, deletions, permission changes, messages sent outside the company and changes to production systems. OWASP recommends human-in-the-loop control for high-impact actions.

Sources

Build it with Offline Protocol

The service guide shows how agents on nearby devices advertise, discover and call each other's capabilities over the mesh, and how a provider filters requests to the requesters it has approved.

Read the service guide