ConnectorsClaude Cowork

Cowork VM sensor

Deploy the detection-only DefenseClaw sensor inside the Claude Cowork Linux VM on managed macOS and Windows, with its events, settings and limits.

The Cowork VM sensor is a second, separate protection for Claude Cowork. Cowork runs shell commands inside a Linux VM that Claude Desktop starts on the computer. The hook route sees each tool call before it runs; the sensor runs inside the VM and watches processes, files and network connections there.

Claude Desktop's Cowork EDR integration setting tells it which vendor package to install in the VM. At each VM start it unpacks the package and runs its install.sh as root. DefenseClaw ships such a package, defenseclaw-cowork-<arch>.tar.gz, and the standalone enterprise lifecycle puts it and its settings on the computer.

Preview

The Cowork VM sensor is Preview: it is available but may change. Claude Desktop installs only signed packages from a vendor that Anthropic lists. The release packages carry no signature yet, so Claude Desktop does not install DefenseClaw's sensor from them until the package is signed with a vendor key that Anthropic lists.

The hook route and the sensor

Hook routeVM sensor
Where it runsOn the computer, as the userInside the Cowork Linux VM: a root helper and an unprivileged gateway
What it seesEach prompt and tool call, with its arguments, before it runsLinux processes, files, network connections and DNS answers in the VM, as they happen
Can it stop somethingYes, in action mode: a policy hit blocks the callNo. It observes and reports
Where events goThe DefenseClaw gateway on the computer: audit log, alerts, TUIYour own OTLP collector. Not the computer's gateway
Who sets it upThe user (open source) or the administrator (managed)The administrator, on managed standalone macOS or Windows only
NeedsThe Claude Code connectorNothing from the hook route. The two are set up separately

Use the hook route to stop a command. Use the sensor to learn what happened after a command was allowed.

What it can and cannot stop

  • Detection only. The package turns the guardrail off and sets nothing that blocks a process, a file or a connection. The service is named "DefenseClaw Cowork VM sensor (detection only)". A command that reads a credential file in the VM still reads it; the sensor reports it afterwards. Blocking is the job of the hook route.
  • Only the VM. It does not see the computer's processes or files, or Cowork's web fetch, which runs on Anthropic's side.
  • No conversation. It does not read prompts, tool calls or model replies.

What it watches in the VM

The package starts the AI Discovery runtime planes with all three planes on, DNS capture on and the inventory scan in passive mode. A small root helper holds the privilege the planes need. The gateway runs as the system account defenseclaw-cowork and asks the helper for what it cannot read itself.

SourceWhat it observesHow
Plane A, inference heartbeatSustained CPU in a scriptable runtime, or memory large enough to hold model weights/proc
Plane B, shadow egressWhich process holds a connection to which peer, and the DNS answers that name the peer/proc/net, /proc/<pid>/fd, and a packet socket for DNS
Plane C, agent actionsProcess exec and exit with arguments, user and group changes, and file reads and writes on watched credential pathsProcess connector (cn_proc) and fanotify, through the helper
AI Discovery inventoryAI agents, models, MCP servers and packages in the session homes (/home/*, /sessions/*) every 10 minutes; running processes every 30 secondsPassive file and process scan

Every Cowork session is its own Linux user with a home under /sessions, and a session created after the VM started is watched too. Plane C reports a finding only for a process with an AI agent above it in the process tree: the same read of ~/.aws/credentials by a person's shell produces nothing. A finding is reported at risk 30 or more (the default min_risk_to_report).

TacticTechniqueExample
credential_accessT1552An agent's shell reads ~/.aws/credentials, ~/.ssh/id_rsa, .env or .npmrc
identity_creationT1136An agent creates an account or an access key
privilege_escalationT1548An agent runs sudo
persistenceT1543An agent writes a place that runs again later
exfiltrationT1567An agent uploads to a web service
local_inferenceT1059An agent runs a model on the machine

The inventory scan reads no shell history, environment variable names or values, user email, raw local paths or online model data, and stops at 1,000 files per scan and 512 KiB per file. Process arguments are read and classed as content, which a destination's redaction profile governs. The package's collector destination sets no redaction option.

Where events go

The sensor exports OTLP log records over HTTPS (http/protobuf) to https://<collector>: ai.runtime.finding, ai.runtime.activity, ai.runtime.plane_health and the AI Discovery inventory records. Every record carries these resource attributes:

AttributeValue
service.namedefenseclaw-cowork-vm
cowork.sensor_versionThe package version, the DefenseClaw release
cowork.tenanttenant from your config
cowork.device_iddevice from your config, or this computer's own ID
cowork.vm_archamd64 or arm64, the architecture of the VM
  • Certificate. The connection verifies the collector's certificate. The release packages carry no private CA, so the collector needs a certificate the VM already trusts, or a package built with --collector-ca.
  • Queue. Up to 4,096 records or 32 MiB, a batch every 2 seconds, 10 seconds per request. Private network addresses are allowed for the collector; carrier-grade NAT addresses are not.
  • Not on the computer. The events are not in the computer's audit log, alerts, TUI, defenseclaw status, defenseclaw doctor or AI Discovery. Read them at your collector.
  • Grafana. The bundled defenseclaw-ai-runtime and defenseclaw-ai-discovery boards select service_name="defenseclaw". Use Explore with service_name="defenseclaw-cowork-vm" for the sensor's events.

Where it works

ComputerSupportedPackageHow the two Claude Desktop settings arrive
macOS, managed standalone (pkg)Yesdefenseclaw-cowork-arm64.tar.gz on Apple silicon, -amd64 on Intel. A translated Intel process on Apple silicon still gets arm64Your MDM deploys a profile. DefenseClaw never writes Claude Desktop's preferences. It only checks them
Windows, managed standalone (Setup)Yes, x64 onlydefenseclaw-cowork-amd64.tar.gzDefenseClaw writes two REG_SZ values under HKLM\SOFTWARE\Policies\Claude
Linux, managed standaloneNomode: on is refused with cowork_vm_sensor_unsupported. Claude Desktop for Linux is a beta
Per-user open-source installNoThe key is refused outside the standalone profile. Use the hook route

The VM is a Linux VM on every host OS, and the package must match the VM's architecture: install.sh refuses a package of the other architecture with exit 12.

What you need first

  1. A vendor ID from Anthropic. Claude Desktop runs a vendor package only for a vendor that Anthropic lists. vendor in the config is the lowercase identifier Anthropic assigned. An unlisted vendor gets refused_guest reason=vendor_unknown at each VM start.
  2. A signed package. Claude Desktop needs a detached binary OpenPGP signature (<package>.sig) that follows Anthropic's rules: no notation, no policy URL, no key server, expiry at most 730 days after signing. Each release lists defenseclaw-cowork-amd64.tar.gz and defenseclaw-cowork-arm64.tar.gz with their SHA-256 in checksums.txt, but no .sig file and no signing key. Without a signature, host_ready stays false (signature_not_ready or package_or_signature_not_ready). Check the release's file list for .sig files before you plan a rollout.
  3. A collector. An OTLP/HTTP endpoint, reachable from the VM over HTTPS, with a certificate the VM trusts.
  4. The managed standalone profile, with deployment_mode: managed_enterprise and enterprise.profile: standalone. See Enterprise.

Turn it on

Add the block to the administrator config. Quote "on": the CLI's YAML reader reads a bare on as a boolean, and every value here must be a string.

config.yaml (excerpt)
deployment_mode: managed_enterprise
enterprise:
  profile: standalone
  cowork_vm_sensor:
    mode: "on"
    tenant: example-tenant
    collector: otel.example.com:4318
    vendor: your-vendor-id
    source_dir: /opt/cisco/defenseclaw/share/cowork
    package_sha256: <sha256 of the package for this architecture>
    signature_sha256: <sha256 of the .sig file>

package_sha256 and signature_sha256 pin the files: DefenseClaw refuses a package or signature whose digest differs. The pin selects one architecture, so use one config or device group per architecture. Leave device out so each computer derives its own ID.

macOS

  1. Put the package and its signature somewhere only root can write. Every folder above them must be root-owned and not writable by group or others, and neither file may be a link. The package (up to 512 MiB) must be named for this Mac's VM architecture; the signature may be up to 1 MiB.

  2. Apply the config and pass the two files:

    sudo ./defenseclaw-enterprise.sh --action ensure --config-file ./config.yaml \
      --cowork-package ./defenseclaw-cowork-arm64.tar.gz \
      --cowork-signature ./defenseclaw-cowork-arm64.tar.gz.sig

    Without the MDM wrapper, sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos ensure --config ... --cowork-package ... --cowork-signature ... does the same. The flags work with install, upgrade, repair and ensure, and need source_dir set to the lifecycle cache, /opt/cisco/defenseclaw/share/cowork. Without the flags, put the files in source_dir yourself as defenseclaw-cowork-<arch>.tar.gz and .sig. The flags cannot be combined with a signed policy bundle.

  3. DefenseClaw writes the package, <package>.sig and <package>.args (tenant=...,device=...,collector=..., one ASCII line of at most 256 bytes) to /Library/Application Support/Cisco/DefenseClaw/Cowork/, root:wheel, mode 0644.

  4. In your MDM, deploy cowork-vm-sensor.mobileconfig.tmpl from the MDM kit, with __ARCH__ set to amd64 or arm64 and __VENDOR_ID__ to your vendor ID. It sets two keys in the com.anthropic.claudefordesktop domain:

    KeyValue
    coworkEDRIntegration/Library/Application Support/Cisco/DefenseClaw/Cowork/defenseclaw-cowork-<arch>.tar.gz
    coworkEDRIntegrationVendorYour vendor ID

    A per-user profile can override the machine profile for a key; DefenseClaw reads those too.

  5. Run sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos verify. The row reads host_ready=true settings_ready=true.

  6. Restart Claude Desktop, start a Cowork task, and read the diagnostic report.

Windows

  1. Put the package and signature in a local folder that standard users cannot write. DefenseClaw refuses a source folder that Authenticated Users can write. source_dir is a local drive path with backslashes, such as C:\ProgramData\Example\edr.

  2. Read HKLM\SOFTWARE\Policies\Claude first. Any value in that key makes Claude Desktop ignore every account's HKCU policy and local third-party configuration. DefenseClaw therefore refuses (machine_settings_not_ready) when the key holds no machine policy, unless you set enterprise.machine_policy.windows_wsl.claude_desktop_key: create. It also refuses while an account has local third-party configuration (Claude-3p\configLibrary): move that into machine policy first. Once the key holds policy, DefenseClaw also writes its WSL gate value disableWslSessions (Agent sessions in WSL).

  3. Run Setup with the config and the files:

    DefenseClawSetup-Enterprise-Standalone-x64.exe /ensure CONFIG=C:\path\config.yaml COWORKPACKAGE=C:\path\defenseclaw-cowork-amd64.tar.gz COWORKSIGNATURE=C:\path\defenseclaw-cowork-amd64.tar.gz.sig

    COWORKPACKAGE= and COWORKSIGNATURE= work with /ensure, /install, /upgrade and /repair, not with BUNDLE=. With them, source_dir must be the cache folder cowork-cache, next to cowork-host.json in the lifecycle folder under C:\ProgramData\Cisco\DefenseClaw\install.

  4. DefenseClaw writes defenseclaw-cowork-amd64.tar.gz, its .sig and install.args to C:\Program Files\Claude\edr-integration (readable by users, writable by administrators only), and sets coworkEDRIntegration and coworkEDRIntegrationVendor as REG_SZ in HKLM\SOFTWARE\Policies\Claude.

  5. From an elevated PowerShell prompt, run & 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows verify --profile standalone. Then restart Claude Desktop and read the diagnostic report.

Linux

Not supported. The Linux ensure has no --cowork-package flag, and mode: on is refused. A Linux computer that runs Claude Desktop is covered by the hook route alone.

Check it

The administrator views on the computer show delivery only. enterprise macos status and verify, and the Windows enterprise windows status and verify, print one row:

  Cowork VM sensor: off
  Cowork VM sensor: host_ready=true settings_ready=true
  Cowork VM sensor: host_ready=true settings_ready=false (mdm_settings_not_ready)

Neither flag proves that Claude Desktop accepted the package or that it runs in the VM. To confirm that, read cowork-edr-integration.txt in Claude's diagnostic report. It says whether both settings came from device management, the decision (go or dormant), the vendor ID, and how each VM start ended (for example refused_guest reason=vendor_unknown), with the last 4 KB of the install script's output.

When the sensor is on and the host is not ready, status and verify add the warning cowork_vm_sensor_incomplete and mark coverage and security incomplete. verify fails (on Windows it adds an error of the same code).

Settings

All keys are under enterprise.cowork_vm_sensor in the administrator config. Every value is a string. An unknown key, a non-string value, or the block outside the managed standalone profile is refused when the config loads. The block is off when absent.

KeyDefaultAllowed valuesNotes
modeoffoff, onoff or an absent block does no delivery. With off, the --cowork-package and --cowork-signature inputs are refused
tenantnone; required when onUp to 128 characters of A-Z a-z 0-9 . _ -, starting with a letter or digitGoes to the VM as tenant= and into cowork.tenant. An identifier, never a secret
deviceunset; each computer derives its ownSame characters and limit as tenantUnset: the Mac's IOPlatformUUID or the PC's MachineGuid, with every other character removed, at most 64 characters. Set it only to override. One fleet-wide config then gives every computer a different ID
collectornone; required when onhost:port of at most 253 characters in all, the host made of A-Z a-z 0-9 . -, the port 1 to 65535No https://, no path, no spaces. The sensor adds https://. The host must end in a letter or digit, or the VM exits 14. The VM also refuses a value longer than 200 characters, and the whole arguments line must fit 256 bytes
vendornone; required when onLowercase letters, digits, _ and -, starting with a letter, up to 64The identifier Anthropic assigned. Sets coworkEDRIntegrationVendor
source_dirnone; required when onAn absolute path, up to 4,096 characters, no spaces at either endmacOS: a canonical / path. Windows: a local drive path with backslashes. With explicit inputs: the lifecycle cache
package_sha256none; required when on64 lowercase hexadecimal charactersSHA-256 of the package for this computer's architecture
signature_sha256unset64 lowercase hexadecimal charactersSHA-256 of the .sig file. Optional only while the signing key is pending: host_ready stays false until the signature is delivered and pinned

The VM receives tenant=<tenant>,device=<device>,collector=<collector>: one ASCII line of at most 256 bytes, with no byte-order mark. DefenseClaw checks that the longest derived device ID still fits. install.sh accepts only these three keys and refuses any other with exit 13.

Upgrade, turn off and remove

TaskWhat to do and what happens
UpgradeDownload the new release's packages, stage them as above, put the new digests in package_sha256 and signature_sha256, and run ensure. At the next VM start Claude Desktop unpacks the new package and install.sh restarts the sensor when anything changed. Upgrading the DefenseClaw pkg or Setup does not fetch a new sensor package: the sensor version is the version of the package you delivered
Repairensure puts back a deleted or changed package, signature or arguments file, and on Windows the two registry values. On macOS it cannot put back the MDM profile: that is yours
Turn offSet mode: "off" (or remove the block) and run ensure. DefenseClaw removes the files it wrote, its cache copies, the folders it created once empty, and on Windows its two registry values. A file you added is kept; on macOS a delivered file you changed is kept too, with the warning cowork_vm_sensor_incomplete. The macOS profile stays until you remove it in your MDM
Uninstalluninstall removes the same owned files. It leaves what an administrator changed or added, and your MDM's profile

A failed ensure is rolled back, files and registry values together. Removing the files does not remove a sensor that a VM already installed; whether Claude Desktop removes it when its setting goes away is up to Claude Desktop.

Build your own package

A customer who needs a private collector CA or their own vendor key builds from the repository:

packaging/cowork-vm/build.sh --arch <amd64|arm64> --version <V> \
  --gateway <linux gateway> --helper <linux sensor helper> \
  [--policies DIR] [--collector-ca FILE]

It makes defenseclaw-cowork-<arch>.tar.gz with regular files only, install.sh at the top, owner 0 and fixed timestamps, so the same inputs give the same bytes. check-package.py enforces Anthropic's size limits (512 MiB packed, 1 GiB unpacked), sign.sh signs with a Cowork-only key, and verify-signature.py checks a signature against Anthropic's rules. Only a vendor that Anthropic lists, with its own key, gets the package installed.

See it run

The recording below starts on a managed Mac with Claude Desktop, where Claude Desktop does not install the sensor, and ends on a stand-in Linux VM (Ubuntu 24.04, amd64) that runs the sensor package. A stand-in VM is used because Claude Desktop installs the sensor only for a vendor that Anthropic lists. On the stand-in VM the package is the release's defenseclaw-cowork-amd64.tar.gz. A small loader does what Claude Desktop does: it unpacks the package, then runs install.sh as root with no arguments and with the install arguments in COWORK_EDR_INTEGRATION_ARGS. The loader does not check a signature or a vendor list.

Claude Desktop in Bedrock mode runs Cowork on a managed Mac. DefenseClaw allows a harmless command and blocks a command that matches an administrator deny rule, and each decision appears in Grafana. Claude Desktop needs Anthropic vendor registration before it installs the sensor. The last part shows the sensor package on a stand-in Linux VM.

On the Mac, the Cowork VM sensor row of /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos status reads host_ready=true settings_ready=true, and Claude Desktop's own log reports that the VM has no confirmed install, with reason vendor_unknown.

Terminal on a managed Mac. Claude Desktop's log line reads no confirmed install, refused_guest, reason vendor_unknown. The status command then prints the Cowork VM sensor row: host_ready=true, settings_ready=true.

Claude Desktop on a managed Mac shows the banner that the EDR Integration was not installed because this version of Claude does not list the vendor named in the organization's settings.

In order, on the stand-in VM:

  1. The loader installs the package. The sensor starts with the device and tenant from the arguments file.

A stand-in Linux VM running the DefenseClaw sensor package. The terminal shows the loader run, the install script's last line (sensor up, with the sensor version and the device), both units active, and the agent's four answers.

  1. A session user (a home under /sessions, as in Cowork) runs Claude Code through Amazon Bedrock. The agent runs shell commands, writes a file, makes a network call and reads a decoy credential file (fake values).
  2. The sensor sends its events over TLS to a collector on the same network, which feeds Loki and Grafana from the local observability stack. The release package carries no certificate authority, so the VM trusts the collector's authority through its system trust store.

Grafana Explore on Loki for the stand-in Linux VM: the runtime findings of the claude agent for the session user, each with its severity and signal, such as agent_credential_access.

Grafana Explore on Loki for the stand-in Linux VM: the activity records of the claude agent, one credential access record (ATT&CK T1552) per finding, with the session user. The resource labels show the sensor version, tenant and device from the install arguments.

What to expect:

  • The read of the credential file gives a credential-access tactic and finding. Shell commands, file writes and web calls give no tactic record of their own.
  • The other findings in the list (unknown_provider_egress, shadow_ai_egress) come from the agent's connections to its model endpoint (Amazon Bedrock here) and to a web site. In Cowork the model endpoint is Anthropic's, so those findings can differ.
  • Names, addresses and users on screen are replaced with examples.

Limits

  • Claude Desktop installs only a package signed with the key of a vendor that Anthropic lists. The Cowork VM sensor bundle (defenseclaw-cowork-*.tar.gz) is not signed yet; verify it with the SHA-256 checksum published with the release (checksums.txt).
  • The Cowork VM's network policy decides whether the sensor can reach your collector. There is no relay through the computer.
  • Upgrading the sensor inside a VM and removing an installed sensor from a VM are done by Claude Desktop.
  • Windows on Arm (the standalone lifecycle runs on native x64 only) and Linux are not supported.

See also