Microsoft Details Security Risks and Defenses for Self-Hosted OpenClaw Agents

Summary
Microsoft warns that OpenClaw can run untrusted skills and instructions with host credentials, risking data exposure, persistent state changes, and host compromise. It recommends isolation, dedicated low-privilege credentials, monitoring, and rebuild plans.
Key points
- OpenClaw can execute third-party skills and act with the credentials and permissions available on its host.
- A malicious skill or instructions in shared feeds could influence agents; the article describes a plausible chain involving access to agent state, credential reuse, and persistence.
- Microsoft recommends running evaluations only in isolated, disposable environments with dedicated non-privileged credentials and non-sensitive data.
- The guidance calls for reviewing persistent agent state, backing up carefully, and rebuilding promptly if anomalous behavior appears.
- Microsoft provides Defender hunting queries for agent runtimes, skill installs, extension changes, high-privilege OAuth apps, listening services, and unexpected child processes.
- Suggested controls include restricting install sources and outbound access, reviewing identity permissions and consent, and monitoring agent activity.
Article Details
- Defense Focus
- Contain self-hosted agent runtimes as untrusted code execution with persistent credentials by isolating their environment, limiting identity and data access, and monitoring for changes and suspicious execution.
- Detection Methods
- Inventory agent runtimes and related processes using process names and command lines; verify deployments, identities, and control-interface exposure.
- Identify ClawHub skill installations and rare skill slugs; compare them with an approved list and inspect installed skill contents.
- Detect newly created or modified developer extension folders and investigate their publishers, installation sources, and spawned processes.
- Review high-privilege OAuth apps and investigate changes to permissions, publishers, or consent.
- Detect listening ports opened by agent processes and check whether listeners are restricted to the intended boundary.
- Look for agent processes spawning shells or download tools; correlate with credential-store access, package installation, and unusual outbound connections.
- Review saved agent instructions and state for unexpected persistent rules, newly trusted sources, or behavioral changes across runs.
- Data Sources
- DeviceProcessEvents: process names, command lines, parent processes, account names, and file paths.
- CloudProcessEvents: process telemetry and workload, Kubernetes namespace, pod, and container metadata.
- DeviceFileEvents: file and folder creation or modification events, including extension-folder activity.
- OAuthAppInfo: app privilege level, publisher, origin, consent status, user count, status, and permissions.
- DeviceNetworkEvents: listening-connection events, local ports, and initiating-process details.
- Agent state, workspace files, configuration, saved instructions, and skill-folder contents.
- Identity, consent, and cloud activity logs for correlating agent use of credentials and APIs.
- Rule Types
- Kusto Query Language (KQL) hunting queries for Microsoft Defender XDR Advanced Hunting.
- Platforms
- Windows developer endpoints
- Dedicated virtual machines or separate physical systems
- Container and Kubernetes workloads onboarded for cloud process telemetry
- Defensive Actions
- Avoid running the runtime with primary work or personal accounts or on devices containing sensitive data; if evaluation is necessary, use an isolated, disposable environment.
- Use dedicated non-privileged identities, short-lived tokens, least-privilege permissions, controlled consent, and non-sensitive data; rotate credentials regularly.
- Restrict skill and extension sources, approve publishers, pin approved versions, and review updates.
- Restrict outbound access to destinations required for business and monitor egress.
- Use sensitivity labeling and endpoint data-loss controls to audit or block movement of sensitive data.
- Back up the workspace without credentials where possible; treat backups containing tokens or credentials as sensitive.
- Prepare to isolate the host, revoke or rotate credentials, review consent, preserve workspace evidence, and rebuild promptly when anomalous behavior is found.
- Inventory deployments, verify their identities and permissions, and identify which inputs can influence tool execution.
MITRE ATT&CK
T1053 · Scheduled Task/JobThe article describes scheduled executions as one possible persistence mechanism in its representative scenario.T1059 · Command and Scripting InterpreterThe article recommends detecting agent runtimes spawning shells such as cmd.exe, PowerShell, bash, or sh.T1078 · Valid AccountsIn the representative scenario, an attacker with access to valid identity material can use the agent's credentials to act through standard APIs and tooling.T1105 · Ingress Tool TransferOpenClaw can download and execute skills from external sources; the article also recommends hunting for agent processes spawning download tools.T1195 · Supply Chain CompromiseThe article's representative compromise scenario describes an attacker publishing a malicious skill to ClawHub, creating a code supply-chain path into the runtime.
People
Vendors
Products
ClawHubAttack chains commonly start with a malicious skill published to ClawHub, proceed through installation and state access, and achieve persistence via configuration changes or scheduled actions.Microsoft Defender for CloudMicrosoft controls (Defender for Endpoint, Defender XDR, Defender for Cloud Apps, Microsoft Purview, Entra ID) can help contain, monitor, and respond to agent-related risks when applied to identity, host, supply chain,Microsoft Defender for Cloud Appsprivilege, Conditional Access, and Admin consent workflows for sensitive OAuth scopes. Microsoft Defender for Cloud Apps (App Governance): inventory of OAuth apps, monitor consent drift, and alert on riskyMicrosoft Defender for EndpointMicrosoft Defender for Endpoint: Onboard agent hosts and use device groups for stricter policies. Microsoft Defender XDR: correlate endpoint activity with identity and cloud events for fast triage and containment. Microsoft Defender XDRdeployment, monitoring, and hunting guidance aligned to Microsoft Security controls, including Microsoft Defender XDR.Microsoft Entra IDMicrosoft Entra ID: Enforce least privilege, Conditional Access, and Admin consent workflows for sensitive OAuth scopes. Microsoft Defender for Cloud Apps (App Governance): inventory of OAuth apps, monitor consentMicrosoft PurviewMicrosoft controls (Defender for Endpoint, Defender XDR, Defender for Cloud Apps, Microsoft Purview, Entra ID) can help contain, monitor, and respond to agent-related risks when applied to identity, host, supply chain,Microsoft SentinelMicrosoft Defender XDR: Use hunting and incident correlation. Microsoft Sentinel: Use it when deeper retention, enrichment, and automation are needed. Operational playbooks: build playbooks around isolation, credentialMoltbook#OpenClaw #MoltbookOpenClawSelf-hosted agent runtimes like OpenClaw significantly widen the execution boundary by ingesting untrusted text, downloading and executing external skills, and acting with the credentials of the host, creating risks of
