Skip to main content
skill CX Codex

dfir — Claude Code skill: incident investigation and forensic analysis

dfir — a skill for analyzing Windows event logs, network captures, and filesystem artifacts during security incident investigations. Reconstructs Active Directory attack chains and builds timelines across multiple evidence sources.

MIT 202 installs ★ 632 updated 2026-07-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add transilienceai/communitytools --skill dfir -a claude-code
Open on GitHub

What dfir does

dfir provides workflows for five forensic disciplines: EVTX parsing with Event ID correlation, PCAP analysis to detect NTLM relay and LLMNR poisoning, MFT and Prefetch artifact recovery, Kerberoast and AS-REP roast detection, and memory analysis via Volatility3.

It bundles python-evtx, tshark, analyzeMFT, windowsprefetch, hashcat, and volatility3. The skill accepts evidence files (EVTX, pcap, MFT, memory dumps), parses structured data, calculates compromise indicators, and correlates events by timestamp, IP address, and session ID.

Requires Python and command-line utilities (installed via brew on macOS). The skill outputs a reconstructed attack timeline with UTC timestamps and mapping of findings to specific investigation questions.

What it helps with

  • Parse Windows event logs to identify unauthorized access and privileged operations
  • Reconstruct command chains from PCAP, memory dumps, and filesystem artifacts
  • Detect Active Directory attacks: Kerberoasting, NTLM relay, credential theft
  • Build incident timeline by correlating events across multiple evidence sources
  • Decrypt and recover malicious code from memory and encrypted archives

Example prompts for the agent

  • Analyze these EVTX logs for unusual logon attempts and elevated privilege operations
  • Reconstruct the attack chain from network capture capture.pcap and process dump
  • Find evidence of Kerberoasting and NTLM relay attacks in these artifacts

How to install dfir

1Skills CLI (Vercel)

npx skills add transilienceai/communitytools --skill dfir -a claude-code

2Manually: put the files in place

~/.claude/skills/dfir/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dfir/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dfir

How do I install dfir in Claude Code?

Run npx skills add transilienceai/communitytools --skill dfir -a claude-code, then open ~/.claude/skills/dfir/SKILL.md to verify.

What does the dfir skill do?

Analyzes Windows event logs, network captures, filesystem artifacts, and memory dumps for security incident investigation. Reconstructs attack chains, identifies AD compromise, and builds event timelines.

What tools are included in dfir?

The skill uses python-evtx for log parsing, tshark for PCAP analysis, analyzeMFT for filesystem artifact recovery, volatility3 for memory analysis, and hashcat for hash validation.

Source text

SKILL.md · MIT
---
name: dfir
description: Digital forensics and incident response - Windows event log analysis, PCAP forensics, filesystem artifact analysis, AD attack detection, and timeline correlation. Use when investigating security incidents, analyzing Sherlocks, or performing threat hunting on provided evidence files.
---

# DFIR

Investigate security incidents by analyzing event logs, network captures, and filesystem artifacts. Detect and reconstruct AD attack chains.

## Techniques

| Domain | Key Capabilities |
|--------|-----------------|
| **Windows Event Logs** | EVTX parsing, Event ID correlation, logon tracking, privilege enumeration |
| **Network Forensics** | PCAP analysis, NTLM extraction, LLMNR/NBT-NS poisoning detection, relay identification |
| **Filesystem Forensics** | MFT parsing, Prefetch analysis, VSS artifact recovery, Linux persistence, timeline reconstruction |
| **AD Attack Detection** | Kerberoasting, AS-REP roasting, NTDS dump, NTLM relay, credential theft |
| **Memory Forensics** | Volatility3 analysis: process trees, file extraction, SID resolution, command lines |
| **Hash Analysis** | NTLMv2 hash construction from pcap, offline cracking validation |

## Workflow

1. **Inventory evidence** — List all artifacts (EVTX, pcap, MFT, prefetch, registry)
2. **Parse structured data** — EVTX with `python-evtx`, pcap with `tshark`, MFT with `analyzeMFT`
3. **Identify attack indicators** — Key Event IDs, suspicious traffic patterns, anomalous files
4. **Correlate across sources** — Match timestamps, IPs, LogonIDs, and process IDs across artifacts
5. **Reconstruct timeline** — Build chronological attack chain with UTC timestamps
6. **Answer investigative questions** — Map findings to specific incident response queries

## Tools

```bash
pip install python-evtx windowsprefetch analyzeMFT
brew install wireshark p7zip hashcat
```

| Tool | Purpose |
|------|---------|
| `python-evtx` | Parse Windows .evtx files |
| `tshark` | CLI pcap analysis (NTLM, LLMNR, SMB filters) |
| `analyzeMFT` | Parse NTFS Master File Table |
| `windowsprefetch` | Parse Windows prefetch files (Windows host only) |
| `hashcat` | Hash cracking (NTLMv2 mode 5600, Kerberos mode 13100/18200) |
| `volatility3` | Memory dump analysis (pstree, filescan, dumpfiles, getsid, cmdline) |
| `7z` | Extract AES-encrypted evidence ZIPs |

## Quick Reference: Key Event IDs

| Event ID | Log | Indicates |
|----------|-----|-----------|
| 4624 | Security | Successful logon (check Type + IP mismatch) |
| 4768 | Security | TGT request (PreAuthType=0 → AS-REP roast) |
| 4769 | Security | TGS request (EncType=0x17 → Kerberoast) |
| 4799 | Security | Group membership enumerated (VSS/ntdsutil) |
| 5140 | Security | Network share accessed |
| 7036 | System | Service state change (VSS start → NTDS dump) |
| 325/326/327 | Application | ESENT database create/detach/close |
| 330 | Application | ESENT database file info |
| 3006/3008 | DNS Client Events | DNS query sent/response received (malicious domain lookups) |
| 106/200 | Task Scheduler | Scheduled task created/executed (persistence via schtasks) |

## Reference

- [windows-event-analysis.md](reference/windows-event-analysis.md) — EVTX parsing patterns and AD attack detection
- [network-forensics.md](reference/network-forensics.md) — PCAP analysis for NTLM, LLMNR, relay detection
- [filesystem-forensics.md](reference/filesystem-forensics.md) — MFT, Prefetch, VSS artifact analysis

## Critical Rules

- **Answer formatting**: When forensics questions ask for "the value" of a code variable (e.g., PHP `$shell`), include language-specific string delimiters and terminators (e.g., `'value';` not just `value`). Check placeholder hints for format clues.
- For malicious Office OOXML, inspect more than VBA streams: attackers may split staged Base64 or script content across drawing/object descriptors, shared strings, named cells, and hidden UserForm control captions/values.
- When a VBA byte array starts with an `fnstenv`/`pop` decoder stub, convert signed integers to raw bytes and test a Shikata-style rolling XOR decode before treating the shellcode as corrupt.
- For legacy Excel BIFF/XLS malware, inspect `BOUNDSHEET` records for `hidden` or `very hidden` worksheets and specifically check for Excel 4.0 macro sheets; changing the hidden-state byte or parsing the sheet directly can expose staged strings and flag fragments that never appear in normal workbook views.
- For webshell traffic in PCAPs, recover static keys from the uploaded server-side code first, then decrypt operator tasking before chasing later payloads; if a dropped XOR key file is referenced by a shellcode stage, verify where the encoded region actually starts instead of XORing the whole blob from offset zero.
- **PowerShell stager pattern** (in-place reverse + base64 + IEX): when a stage-1 PS script does `[array]::Reverse($charArr)` followed by `FromBase64String("$charArr")`, the `-join` line is often a red herring — string interpolation of a char array uses `$OFS=' '` and `FromBase64String` tolerates whitespace. Reverse the original base64 string (not the joined-with-spaces version) and decode to get stage 2.
- **Multi-fragment flag exfil**: forensic challenges may split a flag across (a) a hardcoded `$partN` in the malware that is *defined but never referenced* (often base64'd), and (b) a field of the captured C2 POST body. Decrypt the body with the static AES key from the leaked stage-2 source (PowerShell `Encrypt-String` puts `IV‖ciphertext` then base64-wraps); inspect every JSON field for further base64.
- All timestamps in **UTC** — convert from local time zones in pcap/logs. **AM/PM trap**: 12:XX AM = 00:XX (midnight), 12:XX PM = 12:XX (noon). 12 AM ≠ 01:00.
- Parse EVTX with `python-evtx` (XML namespace: `http://schemas.microsoft.com/win/2004/08/events/event`)
- Use `tshark` for pcap (not scapy for large files) — filter with `-Y` display filters
- Decompress Win10 prefetch (MAM\x04 header) with `dissect.util.compression.lzxpress_huffman`
- For AES-encrypted ZIPs (compression method 99), use `7z` not `unzip`

© transilienceai · MIT · transilienceai/communitytools

Similar skills

All skills for Security →
competition-forensic-timeline zhaoxuya520 competition-forensic-timeline is a Claude Code skill that correlates EVTX, PCAP, registry, and memory artifacts into incident timelines. It runs during DFIR challenges and attack-chain reconstruction. CX Codex +1 109installs competition-identity-windows zhaoxuya520 competition-identity-windows — a skill for Claude Code and Codex that examines Active Directory attacks, Windows host artifacts, and CTF pivot chains. It runs after routing by $ctf-sandbox-orchestrator. CX Codex +1 109installs windows-artifact-forensics-file-system-artifacts W4L33Dx windows-artifact-forensics-file-system-artifacts is a Claude Code skill that inspects Windows NTFS structures. It triggers during forensic analysis of timestomping, metadata shifts, and deletions. CX Codex +1 ★ 73repo stars windows-artifact-forensics-registry-artifacts W4L33Dx windows-artifact-forensics-registry-artifacts is a Claude Code skill for Windows registry analysis. It tracks persistence mechanisms, GUI program runs, and USB device connection history. CX Codex +1 ★ 73repo stars ctf-forensics ljagiello ctf-forensics is a Claude Code skill with digital forensics and signal analysis techniques for CTF challenges, from disk images and memory dumps to steganography. CX Codex +1 9,900installs traffic-analysis-pcap yaklang traffic-analysis-pcap is a Claude Code skill that adds a PCAP forensics playbook for analyzing network captures, with Wireshark filters, protocol analysis, DNS tunneling detection, and TLS decryption. CX Codex +1 4,100installs

From the same set42

The whole set →
ai-threat-testing ai-threat-testing is a Claude Code skill that tests LLM applications for OWASP Top 10 vulnerabilities with 10 specialized agents. CX Codex +1 210installs injection A skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that tests SQL, NoSQL, OS Command, SSTI, XXE, and LDAP/XPath injection vulnerabilities. Runs from input discovery through exploitation to PoC capture. CX Codex +1 210installs client-side The client-side skill tests web apps and SPAs for XSS, CSRF, CORS errors, clickjacking, DOM attacks, and Prototype Pollution. CX Codex +1 209installs reverse-engineering reverse-engineering guides disassembly and decompilation of ELF, PE, and Mach-O files to recover logic, emulate custom bytecode, and defeat binary obfuscation. CX Codex +1 203installs essential-tools essential-tools — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that loads pentesting methodology, Burp Suite, Playwright, Nuclei, and reporting standards into the agent context. CX Codex +1 202installs coordination coordination — a skill for coordinating agents in security testing workflows. Manages executor and validator spawning, holds engagement state in a single context, and avoids delegating thinking to sub-subagents. CX Codex +1 198installs cloud-containers The cloud-containers skill checks AWS, Azure, GCP, Docker, and Kubernetes for security flaws. Use it to test a cloud target or review configuration with read-only credentials. CX Codex +1 197installs github-workflow The github-workflow skill brings GitHub operations to your AI assistant: branches, commits, pushes, pull requests, issues, and code review. Handy when you ask your agent to commit changes, push code, create a PR, or manage branches. CX Codex +1 195installs

Project sponsors

Companies that keep this analytics open