← Back to SOC feed Coverage →

Detects refusal magic string that cause Claude sessions to be terminated. This might indicate that a file tries to preve

yara HIGH signature-base
florian-roth
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at signature-base →
Retrieved: 2026-08-07T11:00:00Z · Confidence: medium

Hunt Hypothesis

This hunt hypothesis targets adversaries embedding specific refusal magic strings in files to disrupt Large Language Model (LLM) analysis and evade automated security scanning. Proactively hunting for this behavior in Azure Sentinel is critical because it reveals sophisticated evasion tactics where malicious artifacts actively terminate Claude sessions, potentially allowing threats to bypass AI-driven detection mechanisms.

YARA Rule

rule SUSP_Claude_Refusal_Magic_String_Jan26 {
   meta:
      description = "Detects refusal 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 = "https://x.com/williballenthin/status/2014687699165135150"
      hash = "ffa48ed4b7b48897f6756c4222b2606399de0bca627cedfddf61e69986580430"
      score = 75
      id = "7a164817-9e90-52f6-a3cb-e6965ee1cc54"
   strings:
      $x1 = "ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_" ascii wide nocase
   condition:
      $x1
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 1 string patterns in its detection logic.

References

False Positive Guidance

Here are 3-5 specific false positive scenarios for the “Detects refusal magic string that cause Claude sessions to be terminated” rule, including suggested filters and exclusions:

Original source: https://github.com/Neo23x0/signature-base/blob/main/yara/susp_claude_magic_strings.yar