This hunt targets adversaries who inject specific “redacted thinking” magic strings into files to trigger premature termination of Claude LLM sessions, thereby evading automated analysis and obscuring malicious content. A proactive search is essential in Azure Sentinel because this behavior suggests a sophisticated file-based evasion tactic that could allow attackers to bypass standard AI-driven threat detection pipelines undetected.
rule SUSP_Claude_Redacted_Thinking_Magic_String_Jan26_1 {
meta:
description = "Detects redacted thinking magic string that cause Claude sessions to be terminated. This might indicate that a file tries to prevent being analyzed by LLM agents."
author = "Marius Benthin"
date = "2026-01-29"
reference = "Internal Research"
hash = "ffa48ed4b7b48897f6756c4222b2606399de0bca627cedfddf61e69986580430"
score = 65
id = "623de3f9-ea03-5b6a-bb24-14b4a6d4a7c9"
strings:
$x1 = "ANTHROPIC_MAGIC_STRING_TRIGGER_REDACTED_THINKING_" ascii wide nocase
condition:
$x1
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule detecting redacted thinking magic strings in an enterprise environment, along with suggested filters or exclusions:
Scenario: Scheduled Backup of LLM Agent Logs
/var/log/claude-agent directory. During the archiving process, the backup agent reads the thinking_magic_string file headers to verify integrity before compression, triggering a session termination event that mimics an evasion attempt.svc-veeam-backup and specifically target file paths matching *.log or *.tar.gz extensions within the backup directory.Scenario: Automated Compliance Scanning by Microsoft Defender
MsMpEng.exe (Microsoft Defender Antivirus) when it accesses files within the \\EnterpriseShare\LLMContext network path during business hours (08:00–18:00).Scenario: CI/CD Pipeline Artifact Processing
java process) triggers the detection logic as if an external entity is preventing analysis.jenkins-build-node-* and restrict