threatdeck
Live 13:45 UTC ·

Detection library

SigmaHunting query: tune before alertingMCP servers and agent configuration

AI tool MCP configuration file modified by an unexpected process (Sigma, macOS/Linux)

Sigma version of the MCP configuration tampering hunt for EDRs that emit file_event telemetry on macOS and Linux. It matches the user-level MCP config files of Claude Code, Claude Desktop, Cursor, Continue, Windsurf, Gemini CLI and Codex, and filters out the tools' own binaries. npm-installed Claude Code and Gemini CLI run as node and are not filtered here; add a command-line filter if your EDR provides one.

Log source
File events on macOS / Linux (EDR file_event)
Techniques
AML.T0081 Modify AI Agent Configuration · ASI04 Agentic Supply Chain Vulnerabilities · AML.T0110 AI Agent Tool Poisoning
MITRE ATT&CK
T1546Event Triggered Execution
Reviewed
2026-11-10

Query

title: AI Tool MCP Configuration Modified By Unexpected Process
id: 33344c56-0b85-49d9-8701-ee372a7f5773
status: experimental
description: Detects writes to AI coding tool MCP configuration files by processes other than the tools themselves, as used by the SANDWORM_MODE npm worm to inject a rogue MCP server.
references:
    - https://socket.dev/blog/sandworm-mode-npm-worm-ai-toolchain-poisoning
    - https://code.claude.com/docs/en/mcp
    - https://cursor.com/docs/context/mcp
    - https://modelcontextprotocol.io/docs/develop/connect-local-servers
author: ThreatDeck
date: 2026-11-09
modified: 2026-11-10
tags:
    - attack.persistence
    - attack.t1546
    - detection.threat-hunting
logsource:
    category: file_event
detection:
    selection:
        TargetFilename|endswith:
            - '/.claude.json'
            - '/.mcp.json'
            - '/.claude/settings.json'
            - '/.cursor/mcp.json'
            - '/Claude/claude_desktop_config.json'
            - '/.continue/config.json'
            - '/.windsurf/mcp.json'
            - '/mcp_config.json'
            - '/.gemini/settings.json'
            - '/.codex/config.toml'
    filter_main_tools:
        - Image|endswith:
              - '/claude'
              - '/codex'
              - '/gemini'
              - '/cursor-agent'
        - Image|contains:
              - '/.local/share/claude/versions/'
              - '/Claude.app/'
              - '/Cursor.app/'
              - '/Windsurf.app/'
              - '/Visual Studio Code.app/'
    condition: selection and not filter_main_tools
falsepositives:
    - git checkouts of repositories that contain .mcp.json or .claude/settings.json
    - Configuration management or dotfile tooling deploying approved MCP servers
level: medium

Expected false positives

  • git checkouts of repositories that ship .mcp.json or .claude/settings.json
  • npm-installed agent CLIs writing their own config (they run as node)

Sources

Reviewed against vendor documentation, not tested in your environment. Defensive use only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.