DET-190 · agent · confidence High

Detecting Agents That Edit Their Own Leash

Alert when an agent changes the schedules, timeouts, launch scripts or config that control how it runs.

Persistence and escape start with small edits: a longer timeout, a cron entry, a restart policy, a workflow that reruns itself. This detection watches the files and settings that bound execution and records who changed them, the old and new values and the session.

Separate edits by the agent itself from edits by operators and pipelines. An agent that writes to its own runner config, creates a scheduler entry, or loosens a retry or time limit is acting on its own containment. Pay attention to container entrypoints, serverless triggers and job queues.

Data sources
File integrity monitoringLinux auditdCloudTrailKubernetes audit logsScheduler logs
Platforms
LinuxAWSAI Platform

Logic

auditd rule: -w /etc/cron.d -p wa -k agent_sched and -w /opt/agent/config -p wa -k agent_cfg. Alert when the event's auid or process belongs to the agent's service user. In AWS: eventName IN (PutRule, CreateSchedule, UpdateFunctionConfiguration) AND userIdentity.arn matches agent role AND the change raises Timeout or adds a trigger.

False positives

Self-service agents that legitimately create reminders or jobs. Allow listed paths and require the job owner to be a human.

Catches 4 techniques