How GitDoor and GraphDoor turned trusted cloud services into espionage infrastructure—and what security engineers should learn before attackers apply the same model to AI agents, MCP servers, and enterprise connectors.
Tags: cybersecurity threatintelligence cloudsecurity ai devsecops
1. Introduction: The Cloud Is Becoming the Control Plane
Traditional malware command-and-control (C2) infrastructure often relies on dedicated attacker-owned servers, suspicious domains, unusual network protocols, or compromised websites.
Those indicators remain useful, but they are no longer sufficient.
Operation ShadowCloud demonstrates a more difficult detection problem: attackers can use legitimate cloud services as components of their command-and-control infrastructure.
The campaign, documented by Kaspersky in November 2026, used GitHub, Microsoft SharePoint, Ably, and MeshCentral in an espionage operation targeting organizations across multiple regions. Two backdoors, GitDoor and GraphDoor, supported remote control and data collection while blending activity into services that organizations routinely use.
A subsequent investigation by Apiiro exposed a much larger operational picture. By examining public GitHub repository history, researchers decoded 80,409 commands associated with the campaign, identified 104 repositories, and connected the activity to victims in 23 countries.
The important engineering lesson is not simply that GitHub can be abused.
It is that a trusted service can become an attacker-controlled communications channel when an endpoint, identity, application, or integration is already compromised.
This model has implications beyond conventional malware. Enterprise AI agents increasingly use the same categories of infrastructure:
- GitHub repositories and software dependencies
- Microsoft SharePoint and OneDrive
- Cloud storage and SaaS APIs
- MCP servers and external tools
- Agent Skills and workflow definitions
- Service accounts, OAuth tokens, and delegated permissions
The attack surface is expanding from applications and endpoints into the systems that coordinate automated work.
This article examines the technical mechanics of ShadowCloud, then explores how the same trust relationships could be abused in AI-agent environments.
Important scope distinction: The AI-agent scenarios in this article are forward-looking security analysis. Public reporting on Operation ShadowCloud does not establish that the operators used MCP servers, AI Skills, or autonomous AI agents.
2. Operation ShadowCloud: Architecture and Attack Model
Kaspersky described an intrusion chain involving legitimate remote-management software, DLL sideloading, encrypted payloads, and cloud-based communications.
At a high level, the architecture can be understood as several connected layers.
Layer 1: Initial access and remote management
Kaspersky reported that attackers potentially reused existing infections to gain access to victim systems. MeshCentral, a legitimate remote-management platform, was then used to interact with compromised Windows computers.
MeshCentral is not inherently malicious. It is a legitimate tool with remote desktop, command-line, and file-management capabilities.
The security problem arises when an attacker controls the management infrastructure or abuses an authorized deployment.
This distinction matters for detection engineering.
A security team that simply blocks MeshCentral may disrupt legitimate administration while missing an attacker using another remote-management platform.
A better approach is to establish:
- Which management servers are approved?
- Which identities can administer endpoints?
- Which devices are expected to receive remote-management software?
- Which processes can deploy or update management agents?
- Which network destinations should those agents contact?
- Are remote sessions associated with an authorized ticket or administrator?
The question should not be whether a tool is legitimate. It should be whether its use is consistent with the organization's approved operational context.
Layer 2: DLL sideloading
The reported campaign used a legitimate executable alongside a malicious DLL and an encrypted payload.
This is a form of DLL sideloading.
Windows applications frequently load libraries dynamically. When an application searches for a required DLL in an unsafe or attacker-controlled location, a malicious library may be loaded instead of the expected one.
A simplified conceptual chain looks like this:
Compromised endpoint
|
v
Legitimate Windows executable
|
v
Unexpected DLL loaded
|
v
Malicious DLL executes
|
v
Encrypted payload decoded
|
v
Backdoor runs
|
v
Cloud-based command channel
The executable may be signed and legitimate. That does not make the complete execution chain trustworthy.
This is why signature-based detection alone is insufficient.
Security tools need to evaluate the relationship between:
- Executable identity and signer
- Executable location
- Loaded DLL path
- DLL signature and hash
- Parent and child process behavior
- File creation sequence
- Network connections following execution
- Memory activity and payload characteristics
A signed executable loading an unsigned DLL from an unexpected writable directory should receive more scrutiny than the executable's signature alone would suggest.
Engineering lesson: Trust the execution chain, not just the binary
A useful detection model should correlate executable identity, module loading, and subsequent behavior.
For example, a defensive event record might look like this:
{
"event_type": "module_load",
"process": {
"name": "approved-app.exe",
"signed": true,
"signer": "Expected Publisher"
},
"module": {
"name": "unexpected.dll",
"signed": false,
"path": "user-writable-directory"
},
"context": {
"parent_process": "remote-management-agent",
"network_activity_after_load": true
},
"risk_indicators": [
"unexpected_module_location",
"unsigned_module",
"remote_management_context"
]
}
This is an illustrative detection schema, not an indicator of compromise from the campaign.
The purpose is to preserve context so that endpoint detection can evaluate the entire sequence rather than generate isolated alerts.
3. GitDoor: GitHub as a Command-and-Control Channel
GitDoor is particularly interesting because it demonstrates how a developer platform can be repurposed as an operational communications system.
According to Kaspersky, GitDoor used GitHub repositories to exchange commands and results.
The reported architecture involved separate repositories for receiving commands and reporting information.
Conceptually:
Operator
|
v
GitHub repository
Command channel
|
v
GitDoor implant
|
Execute authorized-
looking tasking
|
v
Collected results
|
v
GitHub repository
Result channel
The GitHub API provides a structured interface for interacting with repository contents. This creates a challenge for defenders: network traffic to GitHub is not inherently suspicious.
Developers, CI/CD pipelines, automation platforms, and security products all communicate with GitHub.
The relevant question is therefore not:
"Did this endpoint connect to GitHub?"
It is:
"Was this endpoint expected to access this repository, through this identity, using this access pattern, for this purpose?"
3.1 Repository access is a security event
An enterprise should maintain an inventory of expected repository access.
For example:
| Endpoint or identity | Expected GitHub activity |
|---|---|
| Developer workstation | Approved source repositories |
| CI/CD runner | Repositories associated with assigned pipelines |
| Production application server | Usually none, unless explicitly required |
| Database server | Normally none |
| Security automation | Approved repositories and documented API scopes |
| AI agent | Only explicitly approved repositories and operations |
A production server polling an unfamiliar public repository repeatedly should be investigated, even if GitHub itself is an approved destination.
3.2 Git history as an unintended forensic record
One of the most consequential findings in Apiiro's investigation was that deleting commands did not erase their historical presence.
Git is a version-control system. A repository's history can preserve prior versions of files and commit metadata even after files are removed from the current working tree.
This is a normal feature, not a security vulnerability.
The operational mistake was treating deletion from the current repository state as if it erased the underlying history.
Apiiro decoded 80,409 commands from public repository history. Researchers identified 104 repositories associated with the operation, 92 of which were connected to victim machines.
This illustrates a critical distinction:
The current state of a repository is not the complete record of its activity.
For incident responders, the lesson is to preserve and examine:
- Commit history
- Commit timestamps
- Author and committer metadata
- Deleted files
- Repository creation and modification events
- Access logs
- Associated identities and tokens
- Related cloud audit events
Git history can expose attacker tasking, but it must be interpreted carefully.
A command appearing in a repository does not prove that an implant received it. A command being received does not prove successful execution. A deletion does not establish that the command ran or that the requested information was exfiltrated.
Apiiro also noted that much of the implant response data was held in private repositories that researchers did not access.
Forensic analysis must distinguish operator intent from confirmed endpoint activity.
3.3 Why GitHub abuse is difficult to detect
A traditional network detection strategy may focus on suspicious destination IP addresses, unusual ports, or newly registered domains.
That approach has limitations when communications occur through a major cloud platform.
More useful signals include:
- A server accessing repositories unrelated to its business function
- Repeated API polling inconsistent with normal developer workflows
- Repository access by identities that do not normally use GitHub
- Unexpected outbound connections following DLL loading
- Unusual access from service accounts
- Repeated small data transfers at regular intervals
- New GitHub credentials appearing on production systems
- Repository activity correlated with suspicious endpoint processes
The strongest signal is often a combination of otherwise ordinary events.
4. GraphDoor: Microsoft SharePoint and Cloud-Based Communications
GraphDoor demonstrates another important aspect of the campaign: the abuse of enterprise cloud infrastructure.
Kaspersky reported that the operation used Microsoft SharePoint and Microsoft Graph-related functionality as part of its communications and data-handling activity.
Microsoft Graph is an API platform that provides access to Microsoft 365 services and organizational data, subject to the permissions granted to the application or user.
SharePoint and OneDrive can contain highly sensitive information:
- Government documents
- Internal correspondence
- Contracts
- Financial records
- Technical specifications
- Personnel information
- Project files
- Operational plans
This makes cloud storage an attractive target.
It also makes malicious activity harder to distinguish from legitimate business operations.
4.1 The identity problem
A cloud API request may be technically valid while still being unauthorized in context.
For example, an application may possess permission to read files from a SharePoint site. That does not mean every request to retrieve every document is appropriate.
Authorization must consider more than whether a token is valid.
A useful model is:
Authenticated identity
|
v
Application permission
|
v
Requested resource
|
v
Operation being performed
|
v
Business and security context
|
v
Authorization decision
The most important engineering distinction is between authentication and authorization.
- Authentication: Which identity is making the request?
- Authorization: Is that identity permitted to perform this specific action on this specific resource under these conditions?
A valid OAuth token proves neither that a particular file access is appropriate nor that the application should be allowed to export an entire document library.
4.2 Application permissions versus delegated permissions
Microsoft 365 environments commonly use both delegated and application permissions.
Delegated permissions operate in the context of a signed-in user. Application permissions allow an application to act independently, within its granted permissions.
Application permissions can be especially important for automation because services may run without a human user present.
Security teams should review:
- Application registrations
- Service principals
- OAuth consent grants
- Application permission grants
- Delegated permission grants
- SharePoint site-level access
- Credential and certificate changes
- Token issuance and usage
- Unusual resource access patterns
Where possible, use narrowly scoped access rather than broad tenant-wide permissions.
For example, an automation service that needs access to one project site should not automatically receive unrestricted access to every SharePoint site.
4.3 Detecting anomalous cloud access
A useful cloud monitoring system should correlate identity, application, resource, and behavior.
An illustrative event:
{
"identity": {
"type": "service_principal",
"id": "application-identity"
},
"resource": {
"type": "sharepoint_site",
"id": "project-site"
},
"operation": "file_download",
"context": {
"expected_site": false,
"access_volume_anomaly": true,
"new_credential_observed": true
},
"decision": "investigate"
}
The values are illustrative, not campaign indicators.
The objective is to detect a change in application behavior rather than simply flag every API request.
A service principal that normally reads a small set of operational documents but suddenly accesses unrelated sites and downloads large volumes of files deserves investigation.
5. Ably and the Problem of Legitimate Messaging Infrastructure
Kaspersky also identified Ably, a legitimate real-time messaging service, among the cloud services abused by the campaign.
Messaging platforms are useful for distributed applications because they provide mechanisms for exchanging information between components without requiring every component to maintain a direct connection to every other component.
That same architectural convenience can create an attractive communications channel for malware.
The general security problem is not unique to Ably.
Any legitimate service that provides messaging, event delivery, file transfer, or API-based communication can potentially be abused when an attacker controls an endpoint or credential.
This includes:
- Cloud messaging platforms
- Webhook systems
- SaaS automation services
- Cloud storage APIs
- Developer collaboration platforms
- Remote-management services
Detection engineering implications
Network allowlisting alone is not enough.
Organizations should combine network telemetry with application-level context.
Useful signals include:
- Which process initiated the connection?
- Which identity or credential was used?
- Is the destination expected for that application?
- Is the communication volume consistent with normal behavior?
- Did the process recently load an unexpected module?
- Is the endpoint expected to use this messaging service?
- Does the connection correlate with unusual file access or process execution?
The combination of endpoint and cloud telemetry is especially valuable.
A connection to a legitimate messaging provider may appear normal in isolation. The same connection immediately after an unexpected DLL load and credential-access event is a different risk.
6. Regional Operations and the Scale of the Campaign
Apiiro's investigation found 104 repositories associated with the operation, including 92 connected to victim machines.
The repositories were organized into regional operational groupings covering Taiwan, the Philippines, Vietnam and Southeast Asia, Zambia and Uganda, South and Central Asia, Latin America, and Italy.
The investigation decoded more than 80,000 commands and identified 2,902 distinct requested files.
The activity was associated with organizations across 23 countries.
Reported targets included government, diplomatic, military, political, infrastructure, and technology-related organizations.
The campaign also involved a substantial collection of Windows tooling:
- 494 Windows programs were identified.
- 170 DLL sideloading libraries were reported.
- At least 87 GitDoor versions were identified.
These figures demonstrate a degree of operational specialization and iteration.
However, repository organization and command volume should not be confused with confirmed compromise counts.
The evidence establishes a large body of tasking and infrastructure. It does not establish that every command executed successfully or that every requested file was collected.
Attribution requires caution
Sophos tracks activity under the name BRONZE SANDCASTLE and describes a cluster associated with modified Meterpreter-based payloads and DLL sideloading.
Kaspersky discussed possible links to Chinese-speaking threat groups, including FamousSparrow and CopperTurtle.
These assessments should not be collapsed into a claim that every activity cluster represents one definitively identified organization or a proven state-controlled operation.
Threat-intelligence labels represent analytical tracking decisions. They are not equivalent to confirmed operator identities.
For defenders, the practical priority is to detect the techniques and infrastructure patterns, regardless of attribution.
7. Post-Disclosure Activity: Public Reporting Does Not Automatically End an Operation
Apiiro reported that activity continued after Kaspersky's November 17 disclosure.
The investigation described further activity involving political targets in Taiwan and additional tooling.
This is an important reminder for incident responders.
Public exposure of infrastructure does not automatically mean:
- Every compromised endpoint has been cleaned.
- Every credential has been revoked.
- Every implant has been removed.
- Every alternative communications channel has been identified.
- Every affected cloud application has been secured.
Infrastructure takedowns can disrupt one communications path without eliminating access already established inside victim environments.
A mature response must therefore focus on the compromised trust relationships, not merely the public indicators.
For example, blocking a GitHub repository does not remove a malicious DLL already installed on an endpoint. Removing an OAuth application does not automatically prove that previously accessed information was not copied. Disabling one service account does not establish that no alternative credential exists.
Incident response should cover the endpoint, identity, cloud application, and data layers together.
Part II: Applying the ShadowCloud Model to AI Agent Security
8. Why AI Agents Expand the Same Trust Problem
Enterprise AI agents are increasingly connected to the same systems that made ShadowCloud operationally interesting.
A business agent may have access to:
- GitHub repositories
- SharePoint and OneDrive
- Google Drive
- Slack and Microsoft Teams
- CRM platforms
- Internal databases
- Cloud storage
- Ticketing systems
- MCP servers
- Third-party Skills
- Custom APIs and automation tools
An agent may also possess permission to read documents, create files, send messages, open tickets, modify records, or trigger workflows.
This changes the security problem.
A traditional malware implant attempts to execute instructions on a compromised machine.
An AI agent already has an execution framework, access to tools, and potentially legitimate credentials.
If an attacker can influence the agent's instructions, tool definitions, dependencies, or connected identity, the agent's existing capabilities may become part of the attack path.
The risk is not that every agent will become malware.
The risk is that an attacker may manipulate a trusted automation system into performing actions that the organization never intended to authorize.
9. AI Skills as a Supply-Chain Attack Surface
AI Skills are reusable instruction sets, procedures, or packaged capabilities that extend an agent's behavior.
Depending on the platform, a Skill may include:
- Instructions
- Reference documents
- Scripts
- Configuration files
- Tool definitions
- External dependencies
- API references
- Workflow logic
This creates a supply-chain security problem.
Consider an enterprise that installs a third-party Skill to automate software repository reviews.
The Skill is trusted because it comes from an approved source. It is updated later, or one of its dependencies changes. The new version introduces behavior that was not part of the original security review.
If the agent has broad repository, cloud-storage, or messaging permissions, the modified Skill may influence what information it retrieves or what operations it requests.
The risk can be represented as:
Third-party Skill
|
v
Publisher or repository compromise
|
v
Modified instructions or dependencies
|
v
Enterprise agent loads Skill
|
v
Agent interprets requested workflow
|
v
Agent requests access to tools and data
|
v
Sensitive operation may be attempted
This is a conceptual threat model, not a description of an observed ShadowCloud technique.
9.1 Skill integrity controls
A secure Skill management system should implement controls similar to software dependency management.
| Control | Security purpose |
|---|---|
| Publisher verification | Establishes who provides the Skill |
| Version pinning | Prevents unexpected version changes |
| Artifact hashing | Detects modification |
| Signature verification | Establishes artifact integrity and provenance |
| Dependency inventory | Identifies external components |
| Review and approval | Establishes permission to deploy |
| Runtime monitoring | Detects unexpected behavior |
| Revocation | Allows rapid removal of a compromised Skill |
A Skill should not receive broad access simply because it has been approved for installation.
Its permissions should be based on the actual business function it performs.
10. MCP Servers: The New Integration Trust Boundary
The Model Context Protocol (MCP) provides a standardized way for AI applications to connect to external tools and context sources.
An MCP server may expose tools that allow an agent to interact with:
- Filesystems
- Databases
- GitHub
- Cloud platforms
- Internal APIs
- Business applications
- Search services
- Enterprise knowledge repositories
This makes MCP useful, but it also creates a new trust boundary.
An agent may interpret information from a connected tool as relevant context for completing a task.
What happens if that tool is compromised, returns manipulated information, or has more permissions than the workflow requires?
The problem is not limited to malicious code.
An MCP server can return data that influences the agent's subsequent decisions. A malicious or compromised integration may attempt to steer the agent toward unauthorized actions.
For example:
- An employee asks an agent to summarize a project repository.
- The agent calls an approved MCP server.
- The server returns repository content containing malicious or misleading instructions.
- The agent interprets those instructions as part of its context.
- The agent attempts to use another connected tool.
- The second tool has access to sensitive files or external communication capabilities.
This is a form of cross-tool trust abuse.
The key engineering principle is:
Tool output is data. It must not automatically become authority.
A document, repository, webpage, or MCP response should not be allowed to override the agent's security policy simply because it appears in the agent's context window.
10.1 Separate tool output from policy
A secure agent architecture should distinguish at least four categories:
- System-level policy
- User-authorized task instructions
- External data and retrieved content
- Tool execution requests
Retrieved content may inform the agent, but it should not be able to grant new permissions.
For example, a document might contain an instruction asking an agent to export an entire SharePoint library.
The agent may understand the request, but an independent authorization layer should reject the operation if the user, workflow, or agent identity lacks permission.
11. Cloud Connectors: When Legitimate Access Becomes a Collection Channel
ShadowCloud demonstrates how attackers can exploit legitimate cloud services as part of an espionage operation.
AI agents introduce another potential path: authorized cloud connectors.
Imagine an enterprise agent with permission to read SharePoint documents, search OneDrive, and access a GitHub organization.
The agent's access is legitimate. The connected applications are legitimate. The API calls are authenticated.
But an attacker may still attempt to influence the agent into collecting information outside the scope of its original task.
Potential attack paths include:
- Manipulating retrieved documents to influence agent behavior
- Compromising a connector or its configuration
- Abusing an overprivileged service identity
- Modifying a repository-based Skill or workflow
- Exploiting excessive permissions on an MCP server
- Inducing the agent to transfer information to an unauthorized destination
The security challenge is to prevent an agent from turning broad permissions into unrestricted authority.
11.1 A practical authorization example
Suppose an agent is asked:
"Summarize the latest engineering project documents."
The agent requests access to a SharePoint document.
A weak architecture may check only whether the service principal has permission to read the document.
A stronger architecture evaluates the complete request:
{
"agent": "engineering-assistant",
"user": "employee-123",
"workflow": "project-summary",
"tool": "sharepoint.read",
"resource": "engineering/project-alpha",
"operation": "read",
"data_classification": "internal",
"destination": "agent-context",
"approval": {
"required": false
}
}
The runtime authorization layer then evaluates:
- Is this agent approved for the workflow?
- Is the user authorized to access the project?
- Is the requested resource within the workflow scope?
- Is the data classification permitted?
- Is the requested operation read-only?
- Is the destination allowed?
- Does the action require additional approval?
This is more meaningful than simply checking whether a valid API token exists.
12. The Most Important AI Security Principle: Model Capability Is Not Authority
An AI model may be capable of generating an instruction to retrieve, modify, upload, or transmit information.
That capability does not mean the model should be allowed to perform the action.
The distinction is central to secure agent architecture.
A model should reason about what needs to be done. A separate enforcement layer should determine whether the requested action is authorized.
A recommended architecture:
User request
|
v
AI agent
|
v
Tool/action request
|
v
Independent runtime gateway
|
+----------+----------+
| | |
v v v
Identity Resource Operation
| | |
+----------+----------+
|
v
Policy evaluation
|
+---------+---------+
| |
v v
DENY ALLOW
|
v
Execute approved tool
|
v
Audit and monitor
The runtime gateway should evaluate the action using context that the model cannot independently rewrite.
This is particularly important for:
- File access
- Database queries
- External uploads
- Email and messaging
- Repository modifications
- Cloud administration
- Financial operations
- Identity and permission changes
- Agent-to-agent delegation
13. Engineering a Runtime Authorization Layer
A production-grade agent security gateway should evaluate each meaningful tool invocation.
At minimum, the authorization decision should consider:
- Agent identity: Which agent is making the request?
- Human identity: Which user initiated or approved the workflow?
- Workflow: What task is the agent supposed to perform?
- Tool: Which integration is being invoked?
- Operation: What action is requested?
- Resource: Which file, database, repository, or service is affected?
- Data classification: What sensitivity level applies?
- Destination: Where will the data or result go?
- Approval: Is additional human authorization required?
- Risk: Does the action violate behavioral or policy constraints?
A simple policy structure might look like this:
policy:
name: engineering-project-read
agent: engineering-assistant
workflow:
allowed:
- project-summary
tools:
allowed:
- sharepoint.read
resources:
allowed:
- engineering/project-alpha
operations:
allowed:
- read
data_classification:
maximum: internal
external_transfer:
allowed: false
approval:
required_for:
- bulk_download
- external_upload
- permission_change
This is an illustrative policy format, not a vendor-specific configuration.
The important idea is that the gateway evaluates the actual requested operation rather than trusting the agent's natural-language explanation.
13.1 Why allowlists alone are insufficient
An organization may approve SharePoint, GitHub, and Slack as integrations.
That does not mean every agent should be allowed to perform every operation on those services.
A useful permission model should be granular:
| Integration | Agent | Permitted action | Scope |
|---|---|---|---|
| SharePoint | HR assistant | Read | Approved HR documents |
| GitHub | Engineering assistant | Read | Assigned repositories |
| Slack | Support assistant | Search | Approved support channels |
| CRM | Sales assistant | Read and update | Assigned accounts |
| Cloud storage | Reporting agent | Write | Approved report folder |
A tool should not inherit the full permissions of the human who installed it unless that is explicitly required and appropriately controlled.
13.2 Human approval for high-impact actions
Not every action requires human approval.
Excessive approval requirements make agents difficult to use and encourage workarounds.
Instead, use risk-based authorization.
Examples of actions that may require stronger approval:
- Bulk export of sensitive documents
- External transmission of confidential information
- Changes to access permissions
- Creation of new service credentials
- Modification of production infrastructure
- Financial transactions
- Deletion of important records
- Changes to security policies
Approval should be bound to the specific action, resource, and context. A general approval to use an agent should not authorize unrelated high-impact actions.
14. Monitoring AI Agent Behavior Like Endpoint Behavior
ShadowCloud demonstrates the value of correlating endpoint activity with cloud communications.
The equivalent AI-agent monitoring strategy should correlate:
- Agent identity
- User identity
- Skill version
- MCP server identity
- Tool invocation
- Requested resource
- API permission
- Data volume
- Destination
- Workflow context
- Authorization decision
An illustrative event:
{
"event_type": "agent_tool_invocation",
"agent": {
"id": "engineering-assistant",
"skill_version": "2.4.1"
},
"user": {
"id": "employee-123"
},
"tool": {
"name": "sharepoint.read",
"server": "approved-mcp-server"
},
"request": {
"resource": "finance/board-reports",
"operation": "bulk_read"
},
"workflow": {
"id": "project-summary"
},
"authorization": {
"decision": "deny",
"reason": "resource_outside_workflow_scope"
}
}
This record makes it possible to investigate not only what the model said, but what the agent attempted to do and what the security layer permitted.
Behavioral indicators worth monitoring
- A Skill suddenly invoking new tools
- An agent accessing repositories outside its normal scope
- A connector retrieving significantly more data than usual
- New MCP servers appearing without approval
- An agent attempting to transfer retrieved content externally
- An unexpected change in Skill version or publisher
- A service identity being used by a new agent
- Repeated authorization denials followed by altered requests
- Tool invocation patterns inconsistent with the assigned workflow
A security team should monitor both successful and denied actions.
Denied requests can reveal attempted abuse even when the gateway successfully prevents the operation.
15. Incident Response: A Unified Playbook for Cloud and Agent Compromise
When a campaign abuses legitimate cloud services, blocking a destination is only one part of the response.
A coordinated investigation should examine endpoints, identities, applications, repositories, and data access.
The same principle applies to AI-agent incidents.
Phase 1: Establish the scope
Identify affected:
- Endpoints
- User identities
- Service principals
- OAuth applications
- GitHub repositories
- SharePoint sites
- Cloud connectors
- MCP servers
- Skills and versions
- Agent workflows
Preserve relevant audit logs and repository history before making changes that could destroy evidence.
Phase 2: Contain compromised trust relationships
Depending on the evidence and incident scope:
- Isolate affected endpoints.
- Disable compromised credentials.
- Revoke suspicious application grants.
- Remove unauthorized service principals.
- Disable affected connectors.
- Revoke compromised Skills.
- Block unapproved MCP servers.
- Restrict affected repository access.
- Suspend workflows that may be performing unauthorized operations.
Containment should be targeted. Blocking an entire cloud platform may disrupt legitimate business operations without addressing the compromised identity or endpoint.
Phase 3: Investigate access and execution
For conventional endpoint compromise, investigate:
- Unexpected DLL loads
- Remote-management activity
- Suspicious process execution
- Credential access
- Persistence mechanisms
- Network connections
- File access and transfer activity
For cloud compromise, investigate:
- OAuth grants
- Token issuance
- Application permission changes
- SharePoint and OneDrive access
- Repository access
- Unusual API calls
- External sharing events
For AI-agent compromise, investigate:
- Skill changes
- MCP server changes
- Tool invocation logs
- Agent identity usage
- Prompt and retrieved-content provenance
- Unauthorized resource requests
- Data transfer attempts
- Runtime authorization decisions
Phase 4: Recover and verify
Before restoring an agent or application:
- Rebuild affected endpoints where appropriate.
- Rotate compromised credentials.
- Revalidate application permissions.
- Review all connected integrations.
- Pin approved Skill versions.
- Verify MCP server integrity.
- Re-test runtime policies.
- Confirm that unauthorized workflows cannot execute.
- Monitor for renewed access attempts.
Recovery should be based on evidence that the compromised trust path has been addressed—not merely that the original alert has disappeared.
16. What Security Engineers Should Build Now
The ShadowCloud campaign highlights several defensive priorities that apply to both traditional enterprise infrastructure and emerging agentic systems.
| Security layer | Recommended engineering control |
|---|---|
| Endpoint | Monitor process ancestry, DLL loading, and memory execution |
| Identity | Enforce least privilege and monitor credential changes |
| GitHub | Audit repository access and unexpected API polling |
| Microsoft 365 | Monitor service principals and application permissions |
| Cloud storage | Detect unusual file access and external transfers |
| Messaging APIs | Correlate network activity with process and identity context |
| AI Skills | Verify publisher, integrity, dependencies, and versions |
| MCP | Approve servers, restrict tools, and validate outputs |
| Agent runtime | Enforce resource- and operation-level authorization |
| Governance | Maintain audit trails, approval policies, and emergency revocation |
Three principles should guide implementation.
Principle 1: Legitimate services are not automatically trusted
A legitimate cloud platform can be used for malicious communications.
A legitimate executable can load a malicious library.
A legitimate service principal can be overprivileged.
A legitimate MCP server can return untrusted information.
Security decisions must evaluate context and behavior.
Principle 2: Permissions must be narrower than capabilities
An agent may be technically capable of reading thousands of documents.
That does not mean it should have permission to do so.
The same applies to service accounts, applications, and automation systems.
Principle 3: Enforcement must exist outside the component being controlled
An AI model should not be the sole authority deciding whether its own requested action is safe.
A compromised endpoint should not be trusted to validate its own behavior.
A cloud application should not be allowed to expand its permissions simply because it requests them.
Independent enforcement is essential.
17. Final Assessment: The Next Cloud C2 Problem May Be an Agent Authorization Problem
Operation ShadowCloud is a useful case study in how espionage operations can hide inside ordinary enterprise infrastructure.
GitHub became a command channel. SharePoint and Microsoft Graph provided cloud-based access and communications capabilities. Ably supplied another legitimate messaging pathway. MeshCentral provided remote-management functionality. DLL sideloading helped execute malicious payloads through legitimate applications.
The campaign also demonstrated how repository history can preserve evidence that operators believed they had removed.
The broader lesson is that enterprise trust relationships are increasingly interconnected.
AI agents make this more consequential.
An agent may have access to the same repositories, cloud documents, APIs, and collaboration platforms that traditional attackers already target. It may also possess the ability to coordinate multiple tools and perform actions at machine speed.
That creates a new security requirement.
Organizations must move beyond asking whether an agent is authenticated or whether its connected tools are approved.
They must determine whether each requested action is authorized for that agent, that user, that workflow, that resource, and that moment in time.
The next generation of enterprise security will require more than model-level safeguards and API authentication. It will require independent runtime enforcement, continuous behavioral monitoring, and the ability to stop unauthorized actions before they reach sensitive systems.
The central principle is simple:
An AI agent may be able to perform an action. That does not mean it has the authority to perform it.
About AIZA-HexTyx
AIZA-HexTyx approaches AI security from the attacker’s perspective: test the full attack path, expose the blind spot, and validate what happens before a real attacker discovers it. ([https://www.HexTyx.com)](https://www.HexTyx.com))
References and Further Technical Reading
- Apiiro — GitDoor and Operation ShadowCloud investigation\ https://apiiro.com/blog/gitdoor
- Kaspersky — Operation ShadowCloud: GitDoor\ https://securelist.com/operation-shadowcloud-gitdoor/122004/
- Kaspersky — Operation ShadowCloud: GraphDoor\ https://securelist.com/operation-shadowcloud-graphdoor/122005/
- Kaspersky — Operation ShadowCloud campaign announcement, November 17, 2026\ https://www.kaspersky.com/about/press-releases/kaspersky-operation-shadowcloud-targets-government-networks-across-asia-and-africa
- Sophos — BRONZE SANDCASTLE deploys modified Meterpreter shells\ https://www.sophos.com/en-us/blog/bronze-sandcastle-deploys-modified-meterpreter-shells
- SecurityWeek — GitHub History Exposes Two Years of Chinese Espionage Orders\ https://www.securityweek.com/github-history-exposes-two-years-of-chinese-espionage-orders/
- Microsoft Graph documentation\ https://learn.microsoft.com/en-us/graph/overview
- Model Context Protocol documentation\ https://modelcontextprotocol.io/
Further Reading: AI Runtime Security
For organizations building AI agents that connect to enterprise data, APIs, Skills, and MCP services, the next security priority is independent runtime authorization and tool-level enforcement.
- AI Runtime Security Immune System: https://www.hextyx.com/ai-runtime-security-immune-system.html
- AI Agent Tool Security and MCP: https://www.hextyx.com/ai-agent-tool-security-mcp.html
Top comments (0)