Join our Newsletter — 33% off our NHI Course
Home› Guides› Detecting OpenClaw and Personal AI Agents on Corporate…
Guide Identity Visibility, Posture & Threat Detection

Detecting OpenClaw and Personal AI Agents on Corporate Endpoints: Signals, Hunts and Governance Steps

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 18 November 2026 13 min read
On this page

Self-hosted personal AI agents such as OpenClaw install in minutes with a package manager, run as a background service that survives reboots, and hold the user's chat, mail and model credentials, so most security teams learn about them only after one is exposed or misused. This guide answers a narrower question than our Self-Hosted Personal AI Agent Security Guide: how do you find unsanctioned always-on agents on managed laptops, servers and cloud hosts, confirm what each one can reach, and bring it under a decision? It covers the endpoint, network, identity and external signals that reveal an install, the hunting logic EDR and XDR platforms now document, triage, and the governance loop that follows. It is written for endpoint, detection engineering and identity teams. It describes detection logic in words rather than scripts, and it does not cover hardening an approved instance, which the linked guide does.

Key takeaways

  • Look for the install, the service and the listener together. A package in a global npm path, a state directory such as ~/.openclaw, a launchd, systemd or Windows service, and a listener on TCP 18789 are strong in combination; any one alone is weaker.
  • Behaviour matters more than presence. An agent runtime spawning shells, download tools or package installs, or touching credential stores, is the signal to triage first, as Microsoft's published hunting guidance stresses.
  • The agent is an identity problem as well as a software one. Each install holds bot tokens, OAuth grants and model API keys; finding the host is half the job, finding and revoking what it holds is the other half.
  • Some installs will never reach your EDR. Personal devices, home servers and cloud VMs need identity-side and external-exposure detection: unfamiliar OAuth clients, model keys used from unexpected networks, and your own address ranges serving an agent control interface.
  • Detection must end in a decision. Every find goes to an owner with an allow, contain or remove outcome and credential rotation, or the inventory just grows.

Why always-on agents are hard to see

Traditional shadow IT discovery looks for SaaS traffic through a proxy or a CASB. A self-hosted agent breaks that model in four ways:

  • It installs like a developer tool: OpenClaw is a TypeScript application on Node.js, installed from npm or as a desktop app, so software inventory may list only "node" or a generic package.
  • It runs as a service: it keeps running after the user logs off, answers chat messages, and runs scheduled tasks, often under the user's own account rather than a dedicated one.
  • Its control traffic is local: the Gateway multiplexes WebSocket and HTTP on one port, default 18789, and binds to loopback on regular hosts, so there is often nothing for a perimeter sensor to see.
  • Its outbound traffic looks like other AI use: calls go to whichever model providers and chat platforms the owner connects, which your proxy may already allow.

The vendor's own trust model assumes one trust boundary per gateway and states that OpenClaw is not a hostile multi-tenant boundary, which is why an unmanaged install on a shared or corporate host is a governance issue even when it is configured carefully. For the product facts behind these signals, see OpenClaw (Clawdbot, Moltbot).

Detection signals by layer

The table lists signals documented by the OpenClaw project and by EDR vendors' published guidance. Paths, ports and names change between releases, so treat them as starting points and confirm them against the version you find.

LayerSignalSource of the indicatorStrength and caveats
File systemState directory ~/.openclaw/ (or $OPENCLAW_STATE_DIR), including openclaw.json, credentials/, state/openclaw.sqlite and per-agent SQLite stores; .clawdbot and .clawhub config directoriesOpenClaw secrets and storage docs; CrowdStrike's removal checksHigh: few other tools use these names. Legacy names catch installs from before the January 2026 rename
PackagesGlobal npm installs and binaries in paths such as /usr/local/lib/node_modules, /opt and Program FilesCrowdStrikeHigh for presence; does not show whether it runs
Persistencelaunchd LaunchAgents on macOS, systemd units on Linux, Windows servicesCrowdStrikeHigh when the unit or plist names the runtime; shows always-on intent
Network listenerProcess listening on TCP 18789 (configurable with gateway.port, --port or OPENCLAW_GATEWAY_PORT)OpenClaw network exposure docs; Microsoft's listening-port huntMedium: port is configurable. A bind beyond loopback (lan, tailnet, custom, or auto in containers, which resolves to 0.0.0.0) raises severity
Local discoverymDNS adverts for _openclaw-gw._tcp on UDP 5353 when the bundled Bonjour plugin is on (it auto-starts on macOS)OpenClaw network exposure docsHigh where you collect mDNS; finds unmanaged hosts on office networks
DNS and egressRequests to openclaw.ai and the daily update check to telemetry.openclaw.aiCrowdStrike (DNS); OpenClaw telemetry docsMedium: update checks can be turned off or redirected with OPENCLAW_TELEMETRY_ENDPOINT
Process behaviourAgent runtime spawning shells or download tools such as curl or wget; skill installs from ClawHubMicrosoftHighest value for triage: shows the agent acting, not just existing
IdentityNew high-privilege OAuth apps and consent drift; model API keys and bot tokens used from unfamiliar networksMicrosoft (OAuth app inventory)Catches installs on devices you do not manage
ExternalYour internet-facing ranges serving the agent Control UICrowdStrike (external attack surface)Critical when found: treat as an exposed remote administration interface

Generalising beyond OpenClaw: the same layers apply to any self-hosted agent. Build a per-product profile with its package names, state directory, default port, service names and update endpoint from the project's own documentation, and keep one detection rule per layer per product, so a rename or a fork is a profile change rather than a new detection programme. Hosted personal agents that run in the provider's cloud leave no endpoint footprint; detect them through identity and network controls, covered in Blocking Personal ChatGPT, Claude and Gemini Accounts at Work.

What EDR and XDR vendors document

Several endpoint vendors published OpenClaw-specific guidance in 2026. Two examples are summarised below from the vendors' own posts, listed alphabetically; the order is not a ranking, and similar capabilities may exist in other platforms. Confirm current feature names in each vendor's documentation.

CrowdStrike

CrowdStrike describes visibility at several layers: an AI Service Usage Monitor dashboard in Falcon Next-Gen SIEM built from DNS requests to openclaw.ai, which also shows third-party models in use; package inventory, including npm installs, through Falcon Exposure Management with Falcon for IT; full process trees for OpenClaw running system tools; external discovery of internet-reachable instances through its EASM capability; a Falcon for IT content pack that checks processes, global npm installs, binary paths, services, LaunchAgents and the .openclaw, .clawdbot and .clawhub directories; and Falcon Fusion SOAR workflows to alert or respond on detection. See the EDR Platform Configuration Guide.

Microsoft

Microsoft's February 2026 guidance states that OpenClaw "should be treated as untrusted code execution with persistent credentials" and that it is not appropriate for a standard personal or enterprise workstation; evaluation belongs on a dedicated VM or separate system with dedicated, non-privileged credentials. Its Defender XDR hunts use DeviceProcessEvents for agent runtimes, ClawHub skill installs and agents spawning shells or download tools; CloudProcessEvents for containers and Kubernetes onboarded through Defender for Cloud; DeviceNetworkEvents for listening ports opened by agent processes; DeviceFileEvents for extension churn on developer endpoints; and OAuthAppInfo, with App Governance, for high-privilege OAuth apps. See the Microsoft Defender for Endpoint Guide.

Where your platform has no packaged content: the signals table translates to any EDR with process, file, network and service telemetry, plus an MDM or osquery-style inventory for file paths. Write the rules as behavioural detections first (runtime spawning shells, new listener) and presence detections second.

How to run a discovery programme

  1. Agree the policy first. Decide and publish whether self-hosted agents are blocked, allowed only in an approved contained pattern, or allowed on personal devices without corporate accounts. Detection without a policy produces arguments, not outcomes. See Block vs Sanction vs Coach.
  2. Build the product profile. Record each agent's package names, state directories (current and legacy), default port, service names, mDNS service type and update endpoint from its documentation, with the version checked.
  3. Run a retrospective hunt. Search 30 days of EDR and DNS telemetry for the profile, as Microsoft's guidance does, before you turn on alerting. This gives a baseline and shows where installs cluster.
  4. Deploy presence rules in report-only mode. Route matches to a dashboard, not the SOC queue, for two to four weeks; tune out approved pilot devices by device group or tag.
  5. Deploy behaviour rules as alerts. Runtime spawning shells, package installs or credential-store access; a listener bound beyond loopback; mDNS adverts on corporate networks. These go to the SOC with a playbook.
  6. Add identity and external coverage. Review OAuth consent and app inventories for new agent-style clients, set alerts for model API keys used from unexpected networks, and add the Control UI to external attack surface scans of your ranges and cloud accounts.
  7. Close the loop. Each find gets an owner, a decision and a ticket. Removal uses the MDM or EDR remediation path and includes the credential steps below; rollback for a false positive is removing the device from the rule scope and recording the approval.

Triage: from a hit to a decision

Microsoft's triage advice is to confirm whether the device is part of an approved pilot, validate that any control interface exposure is restricted, separate expected automation from opportunistic execution, and, for an unexpected listener reachable beyond its intended boundary, isolate the host and rotate the agent's identities. A practical order:

QuestionWhere to lookIf yes
Is the Control UI reachable from outside the host?Listener bind address, firewall, external scan results, tunnelling services on the hostCritical: isolate, close exposure, rotate gateway auth and all connected credentials
Has the runtime spawned shells, installed packages or touched credential stores?EDR process tree from the agent runtimeHigh: treat as possible compromise; follow the Compromised Developer Workstation Playbook
Are third-party skills installed?Skills directories, ClawHub install eventsReview against an allowlist; the ClawHub Malicious Skills 2026 campaign used fake prerequisite steps to install information stealers
Which corporate accounts are connected?Channel credentials and OAuth stores under the state directory (metadata only), OAuth app inventory, user interviewRevoke grants to corporate mail, chat and drives unless the instance is approved
Is it an approved instance drifting from baseline?Device group, the vendor's security audit output if collectedFix through configuration management; no incident

Proportionality: collect file and directory metadata, process and network events, not transcript content. Session transcripts can hold pasted secrets and personal messages; access them only under an incident with the approvals your privacy and HR processes require. See Network vs Browser vs Endpoint Shadow AI Discovery for the privacy trade-offs between discovery methods.

Where identity fits

Removing the software does not remove what it was given. The OpenClaw documentation lists what lands on disk: channel credentials such as WhatsApp creds.json, model auth profiles in per-agent SQLite stores, MCP OAuth sessions and pairing allowlists, with ~/.openclaw expected at mode 700 and openclaw.json at 600. Each of those is a non-human credential that keeps working after uninstall until it is revoked.

  • Revoke before removal: revoke OAuth grants and bot tokens, and rotate model API keys from the provider's console, then remove the software, so a copy of the state directory is worthless.
  • Record approved instances as NHIs: owner, purpose, connected accounts, key IDs and rotation date in the NHI inventory, with dedicated, non-privileged identities as Microsoft recommends.
  • Watch for reuse: the same model key or bot token appearing from a new host after remediation means a copy survived.

See MITRE ATLAS AML.T0083 Credentials from AI Agent Configuration and How to give MCP servers and local agents secrets without plain-text config files.

Detection and measurement

  • Coverage: share of managed endpoints (by OS) where file, process, service and listener telemetry for the agent profile is collected; target 100% of corporate macOS, Windows and Linux fleets.
  • Discovery source: installs found by detection versus self-declared; a falling detection share over time shows the policy and approved pattern are working.
  • Exposure: agent control interfaces reachable from the internet or the corporate LAN; target zero.
  • Time to decision: median days from first detection to an allow, contain or remove outcome.
  • Credential closure: percentage of removed installs with all connected OAuth grants, bot tokens and model keys revoked within 24 hours.
  • Behaviour alerts: count of runtime-spawns-shell and new-listener alerts per month, with the false positive rate after tuning.

Common failure patterns

  • Hunting one name: rules match only "openclaw" and miss installs from the Clawdbot and Moltbot period, renamed forks, or a changed port.
  • Uninstalling without revoking: the binary goes, the WhatsApp session, Slack bot token and model keys stay valid.
  • Endpoint-only coverage: the install moves to a home server or cloud VM and keeps using corporate OAuth grants that no EDR sees.
  • Alerting on presence for everyone: approved pilots and developers flood the SOC, rules are switched off, and real behavioural alerts are lost.
  • Reading transcripts by default: collecting agent conversation stores for "visibility" creates a privacy problem larger than the agent.
  • Ignoring skills: the agent is approved, but third-party skills are not reviewed, which is how the ClawHub campaign delivered stealers.

Framework mapping

FrameworkReferenceApplication
NIST SP 800-53 Rev. 5CM-8 System Component Inventory; CM-7 Least FunctionalityAgent profile in inventory; block or contain unapproved runtimes
NIST SP 800-53 Rev. 5SI-4 System MonitoringPresence and behaviour detections on endpoints and networks
NIST SP 800-53 Rev. 5SC-7 Boundary Protection; AC-6 Least PrivilegeLoopback-only control interfaces; dedicated, scoped agent identities
NIST CSF 2.0ID.AM-02; DE.CM-09; DE.CM-01Software inventory; endpoint and runtime monitoring; network monitoring
MITRE ATT&CKT1543.001 Launch Agent; T1543.002 Systemd Service; T1543.003 Windows ServicePersistence mechanisms an always-on agent uses, legitimately or after compromise
MITRE ATT&CKT1552.001 Credentials In FilesCredentials in the agent state directory
MITRE ATLASAML.T0083 Credentials from AI Agent Configuration; AML.T0081 Modify AI Agent Configuration; case study AML.CS0050Credential theft and configuration tampering on agent hosts

Practitioner checklist

  • Publish the block, contain or allow decision for self-hosted agents before turning on alerts.
  • Build a profile per agent: packages, current and legacy state directories, port, services, mDNS type and update endpoint.
  • Run a 30-day retrospective hunt across EDR and DNS telemetry to baseline installs.
  • Alert on behaviour (runtime spawning shells, installs, credential access, non-loopback listeners); keep presence rules in reporting.
  • Add OAuth app inventory, model key usage and external Control UI scanning for devices you do not manage.
  • Revoke OAuth grants, bot tokens and model keys before removing software; confirm no reuse afterwards.
  • Record approved instances as NHIs with an owner, connected accounts and rotation date.
  • Collect metadata, not transcripts, and route any content review through incident and privacy approvals.

Standards and references

Related NHI Mgmt Group resources: Self-Hosted Personal AI Agent Security Guide · OpenClaw (Clawdbot, Moltbot) · Shadow AI Discovery Guide · How to audit MCP servers on developer laptops · Agent Skills Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.