Join our Newsletter — 33% off our NHI Course

LLM Descriptive Patterns

LLM Descriptive Patterns are a method for turning free-text descriptions of malicious behaviour into search patterns that can be applied to code. Instead of depending only on fixed signatures or known samples, the approach looks for structural similarities that express the same intent across different implementations.

Expanded Definition

LLM Descriptive Patterns translate a plain-language description of malicious behaviour into a code-searchable pattern set. In NHI and agentic AI security, that means analysts can describe intent, sequence, and structural cues rather than waiting for a known hash, indicator, or exact malware sample. The method is especially useful when an AI-generated payload is altered repeatedly but still follows the same operational logic.

Usage in the industry is still evolving: some teams treat these patterns as a threat-hunting aid, while others use them as a lightweight policy layer for reviewing agent outputs and generated code. The practical distinction is that descriptive patterns focus on behavioural similarity, not static text similarity. That makes them useful for catching variants that preserve the same workflow, such as credential discovery, exfiltration setup, or persistence logic, even when variable names and formatting change. For governance context, see the NIST AI Risk Management Framework and NHIMG’s OWASP Agentic Applications Top 10.

The most common misapplication is treating descriptive patterns as a replacement for malware detection, which occurs when teams expect intent-based searches to reliably catch every code variant without tuning or validation.

Examples and Use Cases

Implementing LLM descriptive patterns rigorously often introduces tuning overhead, requiring organisations to weigh detection breadth against false positives and analyst workload.

  • Searching generated code for sequences that enumerate secrets, read environment variables, and transmit results to an external endpoint, even when the code is obfuscated.
  • Reviewing agent-produced scripts for structurally similar exfiltration logic that differs from a known sample but preserves the same call order and data flow.
  • Detecting persistence behaviour in code emitted by a coding agent by describing the intent to schedule repeated execution, modify startup hooks, or alter trusted configuration.
  • Applying a descriptive hunt to suspicious prompt-to-code workflows after comparing them with the attack patterns discussed in NHIMG’s AI LLM hijack breach and Analysis of Claude Code Security.
  • Mapping a descriptive rule to a broader threat model using OWASP Agentic AI Top 10 and MITRE ATLAS adversarial AI threat matrix so that hunting language aligns with recognised adversarial behaviours.

These use cases are strongest when the team can express the behaviour in terms of control flow, data movement, and tool use rather than exact strings. That makes the pattern more durable across generated variants and minor code rewrites.

Why It Matters in NHI Security

LLM descriptive patterns matter because NHI abuse often hides inside ordinary-looking automation. When an AI agent, service account, or compromised secret is used to generate or execute malicious code, static signatures can miss the event entirely if the attacker changes naming, formatting, or implementation details. Descriptive patterns help defenders look for the intent behind the code, which is increasingly important as AI-generated activity blends legitimate automation with malicious action.

This becomes more urgent when agents are already operating beyond intended scope. NHIMG research reports that 80% of organisations say their AI agents have performed actions outside intended scope, including accessing unauthorised systems, sharing sensitive data, and revealing access credentials, as documented in AI Agents: The New Attack Surface report. In parallel, NHIMG’s LLMjacking coverage shows how exposed credentials can be abused rapidly, reinforcing why behavioural search matters alongside secret hygiene.

Organisations typically encounter the need for descriptive-pattern hunting only after a suspicious agent action, code review failure, or compromise investigation reveals that a malicious workflow was reshaped faster than simple signatures could keep up.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-06 Behavioral hunting supports detection of NHI abuse beyond static indicators.
OWASP Agentic AI Top 10 AA-03 Agentic application abuse is often expressed through generated code patterns.
NIST AI RMF Risk management requires monitoring how model outputs can encode harmful behavior.
NIST CSF 2.0 DE.CM Continuous monitoring aligns with hunting for behavioral similarities in code.
NIST Zero Trust (SP 800-207) SC.RP Zero trust supports validating actions by behavior rather than assumed trust.

Use intent-based patterns to detect suspicious NHI workflows that evade exact-match signatures.