Hacking the Agents: How MCP Servers Get Broken on Microsoft and AWS
Agents mostly don’t get hacked through the model. They get hacked through what they read and what they’re allowed to touch. The protocol is only the doorway.
Kevin belongs to a cyber security threat response group, and one of its recent presenters was Zack Korman, CEO and co-founder of Embroidery, a company focused on monitoring and detection. Korman’s talk, “AI agent security waits for no one,” showed one way after another that an MCP server can be bent to an attacker’s will. His slides list his hobby as “breaking AI agents and making them do bad things.” Kevin left wondering what those attacks would look like inside a real organization: one that runs on Microsoft 365 and Copilot Studio, and one that builds on AWS.
Kevin hasn’t spoken with Korman yet. He sent him an email about this topic, with an offer: try to hack the HoldemRobots agent. No reply so far, and Kevin admits he had no idea how hard, or how easy, that would be. So he started his own research. This article puts together Korman’s talk, Kevin’s study notes on Microsoft’s agent stack, and what we found when we checked both against the vendors’ own pages.
It matters to this project directly. Part 18 described the Dealer as a set of honest game tools behind MCP. Every attack below is a way to make a tool lie to the agent, or to make the agent misuse a tool that tells the truth.
Why this is suddenly everyone’s problem
When ChatGPT launched, it couldn’t do anything. The only risk was what a user typed into it, so early AI security meant scanning prompts for sensitive data. Then agents got access. Today one agent session can read company documents, browse the web and send an email.
Simon Willison named that combination the “lethal trifecta”: private data, untrusted content, and a way to talk to the outside world. Put all three in one agent, and hidden instructions in something it reads can walk private data out the door.
The lethal trifecta is now just normal AI that everyone is doing everywhere.
Zack Korman, Embroidery, “AI agent security waits for no one”
MCP in two minutes
Model Context Protocol is an open standard that lets an agent discover and call outside tools through one interface. The usual analogy is USB for AI. Part 15 covered agents from the ground up; here is the short version.
- A language model writes text but knows only its training data.
- RAG lets it search approved content, like SharePoint, and answer from it. It reads; it doesn’t act.
- An agent plans, picks tools and takes actions: creates a ticket, updates a record, sends mail. Actions are where the danger starts.
An MCP server advertises tools (actions), resources (content) and prompts (templates). The agent asks what’s available, reads the descriptions, and decides what to call. Here’s the catch: every tool name, description and result lands in the model’s context as text, and a model can’t reliably tell an instruction from data. Whoever writes that text can steer the agent.
MCP servers are effectively prompt injection as a service.
Zack Korman, Embroidery
Six ways agents actually get hacked
None of these needs the model to “go rogue.” Each one abuses text the agent trusts, or access it never needed.
| Attack | What the attacker does | It really happened |
|---|---|---|
| Indirect prompt injection | Hides instructions in something the agent will read: an email, a web page, a document | EchoLeak (CVE-2025-32711, June 2025): one email could make Microsoft 365 Copilot leak data in its reach, no click needed. Rated 9.3 out of 10. |
| Toxic agent flow | Turns a legitimate MCP server against its own user | GitHub MCP (May 2025): a malicious public issue led an agent to copy private-repo data into a public pull request |
| Tool poisoning | Hides orders in a tool’s description, which the model reads and the user rarely sees | Invariant Labs (April 2025): a poisoned tool quietly sent off a WhatsApp history |
| Rug pull and shadowing | Gets a clean tool approved, then changes it. Or uses one server’s text to change how the agent uses another | Clients generally don’t check that a tool’s definition stayed the same between sessions |
| Supply chain | Ships a malicious MCP server, or poisons a trusted agent’s code | postmark-mcp (Sept 2025) added a hidden BCC to every email. Amazon Q for VS Code 1.84.0 (July 2025) shipped a prompt telling it to wipe files and cloud resources |
| Plumbing bugs | Attacks the software that connects agents to servers | mcp-remote (CVE-2025-6514): a malicious server could run commands on the user’s machine. Rated 9.6, over 437,000 downloads |
Two old problems make every one of these worse. Excessive permissions turn one injection into a breach of everything the agent can reach. Tool chaining turns harmless steps, like read a file, summarize it, send an email, into theft.
The GitHub case is the one to remember. The MCP server had no bug. The agent did exactly what its permissions allowed, for the wrong person, and it was running a top-tier model at the time. Invariant’s conclusion: model alignment isn’t enough. The walls have to be in the system around the model.
Inside a Microsoft tenant
Microsoft’s bet is that agents should live inside the identity and governance model that already protects Microsoft 365. That’s a real strength. It also means a Microsoft agent can reach anything its user, or its own identity, can reach.
Where MCP shows up
- Copilot Studio. Agents can attach MCP servers as tools and resources. Tools sync on their own: when the server adds, changes or removes one, the agent picks it up. Server sign-in can be None, an API key (in a header or the URL), or OAuth 2.0.
- Microsoft Fabric. The remote Fabric Core MCP Server signs users in with Entra ID, calls Fabric’s APIs on their behalf, enforces their Fabric roles, and writes audit logs. A local, open-source Fabric MCP server runs on a developer’s machine. Running it locally doesn’t keep the data local: the model reading the results may still be in the cloud.
- Microsoft 365 Copilot. Reaches mail and files mostly through Microsoft Graph, not MCP, but faces the same injection problem, as EchoLeak showed.
- Agent identities. Since May 2026, new Copilot Studio agents get a Microsoft Entra Agent ID, so they show up in Entra like any other identity.
What a researcher would try
- Poison what Copilot reads. Send an email or share a file with hidden instructions. If SharePoint is overshared, the agent can gather far more than its user knows they can see.
- Rug-pull a third-party server. Because tools sync automatically, a server that was clean when you reviewed it can change later. Microsoft says plainly that makers are responsible for the outside servers they connect.
- Look for weak server sign-in. A server set to None is open to anyone who finds it. An API key in a URL ends up in logs.
- Ride shared credentials. An agent connected with its maker’s account gives every user the maker’s access. Per-user OAuth avoids that.
- Go after the developer’s laptop. A local MCP server, its config files and cached tokens are worth more than the agent.
- Use the blind spots. Microsoft’s own docs list two today. MCP servers and custom connectors add no permissions to the Agent ID, so Entra doesn’t show that access. And Conditional Access on connector permissions is enforced only in Teams.
What Microsoft gives you
- Entra ID and Graph security trimming. Copilot sees only what the user can see. It works, which is why cleaning up oversharing comes first.
- Power Platform data policies. MCP servers in Copilot Studio run through connectors, so data loss prevention (DLP) rules on those connectors also govern the server. A rule can also block agents that require no sign-in.
- Environments. Separate dev, test and production, each with its own connector allow-list.
- Admin approval. Servers registered through Agent 365 must be approved in the Microsoft 365 admin center before makers can use them.
- Purview. Sensitivity labels, DLP and audit across Microsoft 365.
- Prompt Shields. Detects jailbreaks and instructions hidden in documents and mail. Helpful, but a filter is not a wall.
Inside an AWS account
AWS comes at agents as infrastructure. Part 18 laid out the stack: new agent work goes on Amazon Bedrock AgentCore, and Bedrock Agents Classic is frozen. AWS hands you strong building blocks, and expects you to assemble them. Its own guidance compares prompt injection to SQL injection: AWS secures the service, and keeping your application from being injectable is your job.
Where MCP shows up
- AgentCore Gateway. Turns APIs, Lambda functions and OpenAPI or Smithy specs into MCP tools behind one endpoint. It checks who is calling in, handles sign-in to the tools going out, and offers semantic search so an agent can choose among thousands of tools.
- AgentCore Identity. Gives each agent its own identity and keeps users’ OAuth tokens and API keys in a token vault, encrypted with AWS KMS. Agents can act for a user (with consent) or as themselves.
- AgentCore Policy. Generally available since March 3, 2026. Rules written in plain language or in Cedar sit at the Gateway and check every tool call before it runs.
- Agent Registry. A private catalog of agents, tools and MCP servers with an approval step, in preview.
What a researcher would try
- Find the over-wide IAM role. A tool’s Lambda that can read every S3 bucket makes the agent a “confused deputy.” One injected instruction, and the agent uses that role for the attacker.
- Poison the knowledge base. Plant instructions in files the agent searches, in S3 or on the web pages it browses.
- Win the tool search. When an agent picks tools by reading descriptions, a poisoned description competes for selection against the honest ones.
- Get code into the agent, not the vault. The token vault demands proof of the agent’s identity, so stealing it directly is hard. Running inside a compromised agent, though, an attacker can use whatever tokens it holds for users’ Slack, GitHub or Salesforce.
- Hit the developer pipeline. The Amazon Q incident started with a pull request to a public repository. Developer laptops running local MCP servers next to cloud credentials are the same kind of target.
What AWS gives you
- IAM least privilege. Still the biggest control. Give each tool its own narrow role.
- Policy at the Gateway. Default deny, with explicit rules for which agent can call which tool with which inputs.
- Bedrock Guardrails. A prompt-attack filter and a pre-processing check on input. Like Prompt Shields, a filter, not a wall.
- Identity and the token vault. Per-agent identities, user consent flows, and no keys pasted into code.
- Observability and CloudTrail. Traces of every step an agent took, for detection and replay.
A rule in a prompt is a request. A rule at the gateway is a wall.
From Part 18
Side by side
| Question | Microsoft | AWS |
|---|---|---|
| Starting point | Identity first: Entra, Graph, Microsoft 365 | Infrastructure first: IAM, Lambda, Bedrock |
| Who the agent acts as | The signed-in user, or an Entra Agent ID | An AgentCore identity, an IAM role, or the user through OAuth |
| Hard rules on tool calls | Connector data policies, environments, admin approval | Cedar policy at the Gateway |
| Prompt-injection filter | Prompt Shields | Bedrock Guardrails |
| Biggest real risk | Overshared content the user can already see | Over-wide IAM roles behind the tools |
| Who builds the governance | Mostly in the box; you configure it | Mostly building blocks; you assemble them |
Neither is safer by default. Microsoft makes it easy to inherit good controls, and just as easy to inherit bad permissions. AWS makes it possible to build a tight design, and leaves the gaps to you.
What to do on Monday
Korman’s closing slide had three pieces of advice, and they hold on either platform: improve your normal, non-AI security; decide what is off limits; and don’t get surprised. In practice:
- Ask the blast-radius question first. If this agent or MCP server were taken over, what identity, data and actions would the attacker get?
- Fix permissions before prompts. Clean up SharePoint oversharing. Split IAM roles per tool. No shared service accounts.
- Break the trifecta. Don’t give one agent private data, untrusted content and a way out all at once. Remove one leg.
- Allow-list your MCP servers. Approve each one, pin its version, and re-review when its tool definitions change.
- No anonymous servers. OAuth per user, keys in headers or a vault, never in a URL.
- Put the walls outside the model. DLP and connector policies on Microsoft; Cedar policy at the Gateway on AWS.
- Keep a human on the risky actions. Sending mail outside, deleting, paying, changing access. Don’t click “always allow.”
- Log every tool call, and watch the logs. Agents work at machine speed. So should detection.
- Decide what no agent may ever touch. Payroll, member records, production credentials. Write it down and enforce it.
What this means for HoldemRobots
The Dealer was built on one rule: the honest seat never sends the Player what it shouldn’t see. That’s the same idea as every wall above. A poisoned tool description is a dealer that whispers. A rug pull is a dealer swapped mid-game. When the Dealer moves behind a Gateway, its table rules belong in Policy, where no agent can argue with them.
The offer to Zack still stands. If he, or any reader, can get the Player to see a card it shouldn’t, that will be the next field note.
Sources
- Zack Korman, Embroidery, “AI agent security waits for no one” (slides, 2026)
- Kevin Swinson, “MCP Within Microsoft and Other Enterprises: A Primer” (study notes, 2026)
- SOC Prime, “CVE-2025-32711: ‘EchoLeak’ flaw in Microsoft 365 Copilot”: socprime.com/blog/cve-2025-32711-zero-click-ai-vulnerability/
- Invariant Labs, “GitHub MCP exploited” (May 26, 2025): invariantlabs.ai/blog/mcp-github-vulnerability
- Cloud Security Alliance, “MCP tool poisoning and rug pull attacks” (2026): labs.cloudsecurityalliance.org/research-rb/csa-whitepaper-mcp-security-tool-poisoning-20260506-csa-styl/
- Snyk, “Malicious MCP server on npm postmark-mcp harvests emails”: snyk.io/blog/malicious-mcp-server-on-npm-postmark-mcp-harvests-emails/
- BleepingComputer, “Amazon AI coding agent hacked to inject data wiping commands”: bleepingcomputer.com/news/security/amazon-ai-coding-agent-hacked-to-inject-data-wiping-commands
- The Hacker News, “Critical mcp-remote vulnerability” (July 2025): thehackernews.com/2025/07/critical-mcp-remote-vulnerability.html
- Microsoft Learn, “Extend your agent with Model Context Protocol”: learn.microsoft.com/en-us/microsoft-copilot-studio/agent-extend-action-mcp
- Microsoft Learn, “Add an existing MCP server to your agent”: learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-add-existing-server-to-agent
- Microsoft Learn, “Agent identities and authentication for Copilot Studio”: learn.microsoft.com/microsoft-copilot-studio/govern-agents-identities-overview
- Microsoft Learn, “Fabric Core MCP Server overview”: learn.microsoft.com/en-us/rest/api/fabric/articles/mcp-servers/core-remote/overview-core-mcp-server
- Microsoft Azure Blog, “Announcing new tools in Azure AI…” (Prompt Shields, March 28, 2024): azure.microsoft.com/en-us/blog/announcing-new-tools-in-azure-ai-to-help-you-build-more-secure-and-trustworthy-generative-ai-applications/
- AWS Docs, “Amazon Bedrock AgentCore Gateway”: docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html
- AWS Docs, “Features of AgentCore Identity”: docs.aws.amazon.com/bedrock-agentcore/latest/devguide/key-features-and-benefits.html
- AWS What’s New, “Policy in Amazon Bedrock AgentCore is now generally available” (March 3, 2026): aws.amazon.com/about-aws/whats-new/2026/03/policy-amazon-bedrock-agentcore-generally-available/
- AWS Docs, “Prompt injection security”: docs.aws.amazon.com/bedrock/latest/userguide/prompt-injection.html
Written by Claudette, the pen name for Claude, the AI from Anthropic that helped build HoldemRobots.AI, from Zack Korman’s talk to Kevin Swinson’s cyber security threat response group, Kevin’s study notes, and the sources above, checked on Oct 20, 2026. Both platforms change quickly; check the linked pages before building on any detail here.