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 route | VM sensor | |
|---|---|---|
| Where it runs | On the computer, as the user | Inside the Cowork Linux VM: a root helper and an unprivileged gateway |
| What it sees | Each prompt and tool call, with its arguments, before it runs | Linux processes, files, network connections and DNS answers in the VM, as they happen |
| Can it stop something | Yes, in action mode: a policy hit blocks the call | No. It observes and reports |
| Where events go | The DefenseClaw gateway on the computer: audit log, alerts, TUI | Your own OTLP collector. Not the computer's gateway |
| Who sets it up | The user (open source) or the administrator (managed) | The administrator, on managed standalone macOS or Windows only |
| Needs | The Claude Code connector | Nothing 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.
| Source | What it observes | How |
|---|---|---|
| Plane A, inference heartbeat | Sustained CPU in a scriptable runtime, or memory large enough to hold model weights | /proc |
| Plane B, shadow egress | Which 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 actions | Process exec and exit with arguments, user and group changes, and file reads and writes on watched credential paths | Process connector (cn_proc) and fanotify, through the helper |
| AI Discovery inventory | AI agents, models, MCP servers and packages in the session homes (/home/*, /sessions/*) every 10 minutes; running processes every 30 seconds | Passive 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).
| Tactic | Technique | Example |
|---|---|---|
credential_access | T1552 | An agent's shell reads ~/.aws/credentials, ~/.ssh/id_rsa, .env or .npmrc |
identity_creation | T1136 | An agent creates an account or an access key |
privilege_escalation | T1548 | An agent runs sudo |
persistence | T1543 | An agent writes a place that runs again later |
exfiltration | T1567 | An agent uploads to a web service |
local_inference | T1059 | An 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:
| Attribute | Value |
|---|---|
service.name | defenseclaw-cowork-vm |
cowork.sensor_version | The package version, the DefenseClaw release |
cowork.tenant | tenant from your config |
cowork.device_id | device from your config, or this computer's own ID |
cowork.vm_arch | amd64 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 doctoror AI Discovery. Read them at your collector. - Grafana. The bundled
defenseclaw-ai-runtimeanddefenseclaw-ai-discoveryboards selectservice_name="defenseclaw". Use Explore withservice_name="defenseclaw-cowork-vm"for the sensor's events.
Where it works
| Computer | Supported | Package | How the two Claude Desktop settings arrive |
|---|---|---|---|
| macOS, managed standalone (pkg) | Yes | defenseclaw-cowork-arm64.tar.gz on Apple silicon, -amd64 on Intel. A translated Intel process on Apple silicon still gets arm64 | Your MDM deploys a profile. DefenseClaw never writes Claude Desktop's preferences. It only checks them |
| Windows, managed standalone (Setup) | Yes, x64 only | defenseclaw-cowork-amd64.tar.gz | DefenseClaw writes two REG_SZ values under HKLM\SOFTWARE\Policies\Claude |
| Linux, managed standalone | No | mode: on is refused with cowork_vm_sensor_unsupported. Claude Desktop for Linux is a beta | |
| Per-user open-source install | No | The 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
- A vendor ID from Anthropic. Claude Desktop runs a vendor package only for a vendor that Anthropic lists.
vendorin the config is the lowercase identifier Anthropic assigned. An unlisted vendor getsrefused_guest reason=vendor_unknownat each VM start. - 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 listsdefenseclaw-cowork-amd64.tar.gzanddefenseclaw-cowork-arm64.tar.gzwith their SHA-256 inchecksums.txt, but no.sigfile and no signing key. Without a signature,host_readystays false (signature_not_readyorpackage_or_signature_not_ready). Check the release's file list for.sigfiles before you plan a rollout. - A collector. An OTLP/HTTP endpoint, reachable from the VM over HTTPS, with a certificate the VM trusts.
- The managed standalone profile, with
deployment_mode: managed_enterpriseandenterprise.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.
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
-
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.
-
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.sigWithout the MDM wrapper,
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos ensure --config ... --cowork-package ... --cowork-signature ...does the same. The flags work withinstall,upgrade,repairandensure, and needsource_dirset to the lifecycle cache,/opt/cisco/defenseclaw/share/cowork. Without the flags, put the files insource_diryourself asdefenseclaw-cowork-<arch>.tar.gzand.sig. The flags cannot be combined with a signed policy bundle. -
DefenseClaw writes the package,
<package>.sigand<package>.args(tenant=...,device=...,collector=..., one ASCII line of at most 256 bytes) to/Library/Application Support/Cisco/DefenseClaw/Cowork/,root:wheel, mode 0644. -
In your MDM, deploy
cowork-vm-sensor.mobileconfig.tmplfrom the MDM kit, with__ARCH__set toamd64orarm64and__VENDOR_ID__to your vendor ID. It sets two keys in thecom.anthropic.claudefordesktopdomain:Key Value coworkEDRIntegration/Library/Application Support/Cisco/DefenseClaw/Cowork/defenseclaw-cowork-<arch>.tar.gzcoworkEDRIntegrationVendorYour vendor ID A per-user profile can override the machine profile for a key; DefenseClaw reads those too.
-
Run
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos verify. The row readshost_ready=true settings_ready=true. -
Restart Claude Desktop, start a Cowork task, and read the diagnostic report.
Windows
-
Put the package and signature in a local folder that standard users cannot write. DefenseClaw refuses a source folder that
Authenticated Userscan write.source_diris a local drive path with backslashes, such asC:\ProgramData\Example\edr. -
Read
HKLM\SOFTWARE\Policies\Claudefirst. Any value in that key makes Claude Desktop ignore every account'sHKCUpolicy and local third-party configuration. DefenseClaw therefore refuses (machine_settings_not_ready) when the key holds no machine policy, unless you setenterprise.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 valuedisableWslSessions(Agent sessions in WSL). -
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.sigCOWORKPACKAGE=andCOWORKSIGNATURE=work with/ensure,/install,/upgradeand/repair, not withBUNDLE=. With them,source_dirmust be the cache foldercowork-cache, next tocowork-host.jsonin the lifecycle folder underC:\ProgramData\Cisco\DefenseClaw\install. -
DefenseClaw writes
defenseclaw-cowork-amd64.tar.gz, its.sigandinstall.argstoC:\Program Files\Claude\edr-integration(readable by users, writable by administrators only), and setscoworkEDRIntegrationandcoworkEDRIntegrationVendorasREG_SZinHKLM\SOFTWARE\Policies\Claude. -
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.
| Key | Default | Allowed values | Notes |
|---|---|---|---|
mode | off | off, on | off or an absent block does no delivery. With off, the --cowork-package and --cowork-signature inputs are refused |
tenant | none; required when on | Up to 128 characters of A-Z a-z 0-9 . _ -, starting with a letter or digit | Goes to the VM as tenant= and into cowork.tenant. An identifier, never a secret |
device | unset; each computer derives its own | Same characters and limit as tenant | Unset: 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 |
collector | none; required when on | host:port of at most 253 characters in all, the host made of A-Z a-z 0-9 . -, the port 1 to 65535 | No 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 |
vendor | none; required when on | Lowercase letters, digits, _ and -, starting with a letter, up to 64 | The identifier Anthropic assigned. Sets coworkEDRIntegrationVendor |
source_dir | none; required when on | An absolute path, up to 4,096 characters, no spaces at either end | macOS: a canonical / path. Windows: a local drive path with backslashes. With explicit inputs: the lifecycle cache |
package_sha256 | none; required when on | 64 lowercase hexadecimal characters | SHA-256 of the package for this computer's architecture |
signature_sha256 | unset | 64 lowercase hexadecimal characters | SHA-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
| Task | What to do and what happens |
|---|---|
| Upgrade | Download 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 |
| Repair | ensure 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 off | Set 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 |
| Uninstall | uninstall 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.
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.


In order, on the stand-in VM:
- The loader installs the package. The sensor starts with the device and tenant from the arguments file.

- 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). - 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.


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
- Claude Cowork, the hook route
- AI Discovery, the planes the sensor runs
- Enterprise on macOS and on Windows
- Enterprise configuration
Claude Cowork
Inspect Claude Cowork prompts and tool calls with DefenseClaw through the Claude Code hooks, set up for one user or a managed computer, and see its limits.
Codex
Connect DefenseClaw to Codex with hooks in config.toml that block prompts and tool calls. Hook contracts vary by version, and Codex has no native ask.