Skip to main content

Reconstructing AI Agent Activity: Two New Scripts for Forensic Review, (Thu, Oct 8th)

0
Low
News
Published: 10/08/2026 (10/08/2026, 16:52:53 UTC)
Source: SANS ISC Handlers Diary

Description

This report describes two new Python scripts designed for forensic analysis of AI coding assistants OpenCode and Hermes. These scripts reconstruct AI agent activity from stored session data and logs, enabling investigators to review chat histories, tool usage, API requests, and related evidence. The tools focus on making recorded AI interactions accessible for incident response investigations rather than running or replaying AI agents. They require Python 3.10+ and operate on local data extracted from user systems or forensic images.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/08/2026, 17:05:11 UTC

Technical Analysis

Two Python scripts, opencode-chat-replay.py and hermes_forensic_extract.py, have been developed to facilitate forensic review of AI coding assistants OpenCode and Hermes. The opencode script reconstructs chat transcripts from SQLite databases, supporting multiple storage formats and exporting in Markdown, JSON, or JSONL formats. The Hermes script extracts a broader set of forensic artifacts including session data, API request dumps, and application logs, outputting newline-delimited JSON records. Both scripts operate on local copies of evidence and do not modify original data. They support filtering by time range, session ID, and source files to narrow investigations. These tools assist incident responders in understanding user interactions with AI assistants by exposing detailed session metadata, conversation content, tool calls, errors, and usage metrics.

Potential Impact

These scripts provide forensic investigators with enhanced visibility into AI agent usage on compromised or investigated systems. They enable reconstruction of user queries, AI responses, tool invocations, and associated metadata, which can be critical for understanding the role of AI assistants in security incidents. The tools themselves do not introduce vulnerabilities or exploits but improve incident response capabilities by making AI activity auditable and transparent.

Defensive Guidance

No remediation or patching is required as these are forensic analysis tools, not vulnerabilities or exploits. Organizations should consider integrating these scripts into their incident response workflows to improve investigation of AI agent usage. Use of these tools requires access to local system data or forensic images containing AI assistant artifacts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Classification
{"confidence":0.3,"severitySource":"default","classifier":"rss-v2"}
Article Source
{"url":"https://isc.sans.edu/diary/rss/33410","fetched":true,"fetchedAt":"2026-10-08T17:04:56.942Z","wordCount":1639}

Threat ID: 6ac7cd382cdf04f6562b642c

Added to database: 10/08/2026, 17:04:56 UTC

Last enriched: 10/08/2026, 17:05:11 UTC

Last updated: 10/08/2026, 23:03:29 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses