Skip to content
All posts

· 8 min read

AI for Incident Response: Log Triage and IR Timelines

Use an LLM to triage auth.log and EVTX exports, explain attacker commands, build an IR timeline and draft the summary, with a 1M-token context for big logs.

An incident rarely starts with a clean alert. It starts with a vague signal and a pile of logs: auth.log from a Linux jump host, an EVTX export from a Windows server, thousands of lines nobody has read yet. That first pass is where AI for incident response pays off. It explains what an event ID or an attacker command means, and drafts the timeline and summary you would otherwise type at 3 a.m. It does not replace the responder: you decide what is true, and only verified findings go in the report. This walkthrough uses Odin v1 on a synthetic two-host incident, from raw logs to handoff note.

Before you paste anything

Logs are evidence and they are full of personal data, so settle three things first:

  • Authority. Work on systems you are responsible for. Client logs go to a third-party service only if your IR contract or NDA allows it.
  • Evidence handling. Keep the originals untouched and work on copies. Hash the exports yourself with sha256sum or Get-FileHash.
  • Redaction. Strip passwords typed into command lines, tokens, cookies and keys. Replace usernames, internal hostnames and addresses you do not need with consistent placeholders (user1, host-a), and keep the mapping locally so you can translate the findings back.

API prompts and completions are not stored; InterOdin keeps only metadata such as token counts, latency and status. In the web chat, use an incognito chat, because normal chats are saved until you delete them. Redact anyway.

odin-v1 reads text only, so export logs to text, CSV or JSON. odin-flash also reads images, such as a screenshot of an EDR console.

The synthetic incident

All entries were written for this article. 198.51.100.10 stands in for the jump host's internal address.

bastion-01, an internet-facing Linux jump host, filtered from /var/log/auth.log:

text
Nov 12 02:11:04 bastion-01 sshd[4121]: Failed password for invalid user admin from 203.0.113.58 port 51122 ssh2Nov 12 02:11:06 bastion-01 sshd[4123]: Failed password for invalid user oracle from 203.0.113.58 port 51130 ssh2Nov 12 02:11:09 bastion-01 sshd[4125]: Failed password for svc-backup from 203.0.113.58 port 51144 ssh2[... 611 similar lines removed ...]Nov 12 02:14:37 bastion-01 sshd[5980]: Accepted password for svc-backup from 203.0.113.58 port 52310 ssh2Nov 12 02:15:02 bastion-01 sudo: svc-backup : TTY=pts/1 ; PWD=/home/svc-backup ; USER=root ; COMMAND=/usr/bin/cat /etc/shadowNov 12 02:16:45 bastion-01 sudo: svc-backup : TTY=pts/1 ; PWD=/tmp ; USER=root ; COMMAND=/usr/bin/crontab -eNov 12 02:21:13 bastion-01 sshd[6102]: Accepted publickey for svc-backup from 203.0.113.58 port 52388 ssh2: ED25519 SHA256:<removed>

FIN-APP-02, a Windows application server, exported from Security.evtx and System.evtx and flattened to one line per event:

text
2026-11-12T02:29:51Z FIN-APP-02 4624 LogonType=10 Account=svc-backup Source=198.51.100.102026-11-12T02:31:08Z FIN-APP-02 4688 Account=svc-backup Parent=cmd.exe Process=powershell.exe CommandLine="powershell -nop -w hidden -enc <base64 removed, 1,804 chars>"2026-11-12T02:31:40Z FIN-APP-02 4688 Account=svc-backup Parent=cmd.exe Process=reg.exe CommandLine="reg save HKLM\SAM C:\Users\Public\s.hiv"2026-11-12T02:33:02Z FIN-APP-02 7045 ServiceName=WinSyncSvc ImagePath=C:\ProgramData\winsync\wsvc.exe StartType=auto

Step 1: triage auth.log

Do the counting yourself. A model reading 600 near-identical lines can miscount, and awk cannot:

bash
grep "Failed password" auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head

Then give the model the filtered log, your counts and a precise job:

You are assisting an incident responder on a host we own. Below is a filtered auth.log from an internet-facing jump host, plus failure counts per source IP. Identify the attack pattern, the first successful login and what the account did next. Mark each finding CONFIRMED (a log line shows it, quote it) or INFERRED (needs another source).

Expect a password-guessing run from 203.0.113.58 that ends in a successful login for svc-backup at 02:14:37, the compromise point. Then a sudo read of /etc/shadow (credential access) and a crontab -e as root (likely persistence). The public-key login at 02:21:13 is the interesting one: the address that just guessed a password now has a key, so a key was probably added to ~svc-backup/.ssh/authorized_keys. That stays INFERRED until you check the file. The CONFIRMED/INFERRED split is what makes parts of the answer safe to put in a report.

Step 2: read the Windows events (EVTX)

Export only the event IDs you need. Get-WinEvent reads .evtx files directly:

powershell
Get-WinEvent -FilterHashtable @{ Path = 'C:\IR\Security.evtx'; Id = 4624, 4625, 4688 } |  Select-Object TimeCreated, Id, @{ n = 'Message'; e = { $_.Message -replace '\s+', ' ' } } |  Export-Csv .\security_filtered.csv -NoTypeInformation

Run it again on System.evtx with Id = 7045, because service installs are logged there. Event 4688 only carries the command line if command-line auditing for process creation is enabled; if yours is empty, tell the model, so it does not guess.

Explain each event below for an incident timeline: what the event ID records, what this instance shows, the matching MITRE ATT&CK technique, and what to collect next on the host. The encoded command is redacted; tell me how to decode it safely.

Mainstream assistants sometimes hesitate here, because the request contains encoded PowerShell and credential dumping. Odin v1 explains them directly. Expect: the 4624 type 10 is an RDP logon from the jump host, so the attacker pivoted with the same account. Then a hidden, encoded PowerShell launch (T1059.001, T1027). reg save HKLM\SAM copies the SAM hive, which holds local account password hashes (T1003.002). Event 7045 installs an auto-start service (T1543.003). Decode the base64 locally (CyberChef "From Base64", then UTF-16LE). If wsvc.exe turns out to be a dropper, malware analysis with Odin walks through that triage.

Step 3: build the IR timeline

Syslog-format auth.log has no year and no time zone, so confirm each host's time zone before you merge, and tell the model:

Merge both logs into one timeline in UTC. Both hosts log in UTC; I checked. One row per event: time, host, what happened, the source line, and CONFIRMED or INFERRED. Do not add events that are not in the logs. List the gaps where evidence is missing.

A good result looks like this:

Time (UTC)HostEventStatus
02:11:04 to 02:14:37bastion-01Password guessing from 203.0.113.58CONFIRMED
02:14:37bastion-01Password login as svc-backupCONFIRMED
02:15:02bastion-01sudo cat /etc/shadowCONFIRMED
02:16:45bastion-01Root crontab editedCONFIRMED (content unknown)
02:21:13bastion-01Key login as svc-backupCONFIRMED; key added INFERRED
02:29:51FIN-APP-02RDP logon as svc-backup from the jump hostCONFIRMED
02:31:08FIN-APP-02Hidden encoded PowerShellCONFIRMED
02:31:40FIN-APP-02SAM hive saved to C:\Users\PublicCONFIRMED
02:33:02FIN-APP-02Service WinSyncSvc installedCONFIRMED

The gaps list matters as much as the rows: why svc-backup could RDP to a Windows server at all, what the cron entry runs, whether s.hiv left the host. Those questions drive the next round of collection and the containment decisions. As in NIST SP 800-61, the timeline informs those decisions and the response team makes them.

Big logs and the 1M-token context

Most guides tell you to chunk logs. odin-v1 has a 1,000,000-token context window, so a mid-size incident often fits in one request: a day of filtered auth.log from several hosts plus the relevant EVTX exports. The model then sees the whole sequence and correlates across hosts, without you stitching chunk summaries together.

Lines full of IP addresses, hashes and GUIDs use more tokens per character than prose, so measure instead of guessing. Token counting is free:

bash
jq -Rs '{model: "odin-v1", messages: [{role: "user", content: .}]}' timeline_input.log > count.jsoncurl https://api.interodin.com/v1/messages/count_tokens \  -H "x-api-key: $INTERODIN_API_KEY" \  -H "anthropic-version: 2023-06-01" \  -H "Content-Type: application/json" \  -d @count.json

Multiply the count by the input rate on the pricing page to get the cost of one pass. Follow-up questions usually cost less because prompt caching is automatic: keep the system prompt and the log at the start and append each new question at the end, so the repeated prefix can be read from the cache at the cached input rate. The prompt caching guide explains what breaks a cache match.

Three limits still apply:

  • Still filter first. The model answers better about the relevant time window and event IDs than about everything the SIEM holds.
  • Exact numbers come from tools. Counts, first and last seen, and unique values are grep, jq or SIEM queries. The model interprets them.
  • Volume work goes to odin-flash. Summarizing hundreds of per-host exports is a pattern task. Keep odin-v1, with thinking on by default, for correlation.

To script the export and filter step, see Claude Code for security tooling, which builds a log parser.

Step 4: write the summary and the handoff

Give the model the verified timeline and your notes, and ask for the summary in your team's format:

text
Incident summary: IR-2026-1112 (draft, pending responder review)Scope: bastion-01 (Linux jump host), FIN-APP-02 (Windows application server)Entry: password guessing over SSH from 203.0.113.58, success as svc-backup at 02:14:37 UTCImpact: /etc/shadow read on bastion-01; SAM hive saved on FIN-APP-02, treat as exfiltratedPersistence: root crontab edit, probable SSH key, service WinSyncSvc (wsvc.exe)Actions taken: bastion-01 isolated, svc-backup disabledOpen questions: cron content, SSH key origin, s.hiv exfiltration, wsvc.exe behaviorNext steps: reset svc-backup and local admin passwords, remove the cron entry, key and  service, block 203.0.113.58, hunt for WinSyncSvc and 4624 type 10 from bastion-01

The responder reviews, corrects and signs the draft. Then write detections that catch the next attempt earlier: see Sigma and YARA rules with AI.

Get started

Create an API key in the console, give it a monthly spend limit, and follow the quickstart for your first request. Analyze logs only from systems you are responsible for or authorized to investigate, and keep your work within the Acceptable Use Policy.

Comparing Odin with the assistant you use today? See uncensored AI for security research for a side-by-side comparison with mainstream assistants.

FAQ

Can an LLM analyze security logs?

Yes, as a first-pass reader. It explains event IDs and attacker commands, spots patterns such as password guessing followed by a successful login, and correlates events across hosts. Counting belongs to your tools, and a responder verifies every finding.

How much log data can an LLM handle at once?

It depends on the context window. Odin v1 accepts up to 1,000,000 tokens per request, which often covers a filtered mid-size incident in one pass. Measure your export with the free token counting endpoint, and filter first.

Should I redact logs before sending them to an AI?

Yes. Remove passwords, tokens, cookies and keys, and replace personal data you do not need with consistent placeholders. InterOdin does not store API prompts or completions, but redaction keeps unnecessary data inside your network.

Can AI build an incident timeline from logs?

It can draft one, merging sources into a single UTC timeline and marking each row as confirmed or inferred. Check the time zones first, and have a responder review the timeline before anyone acts on it.

What are good prompts for SOC log analysis?

Give a role, the context and the exact output format. Ask for each finding marked confirmed or inferred, with the log line quoted. Compute counts locally and pass them in.