agentleFS
transilienceaitransilienceai/communitytools/skills/dfir/SKILL.md

dfir

Skill555 starsChanged 8 months agoMITView on GitHub

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.

  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Answer formatting: When forensics questions ask for "the value" of a code variable (e.g., PHP $shell), include language-specific string …

    line 70
  2. Very specific:

    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 …

    line 72
  3. Distinctive:

    All timestamps in UTC — convert from local time zones in pcap/logs.

    line 77
  4. Very specific:

    Use tshark for pcap (not scapy for large files) — filter with -Y display filters

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DFIR

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

Techniques

DomainKey Capabilities
Windows Event LogsEVTX parsing, Event ID correlation, logon tracking, privilege enumeration
Network ForensicsPCAP analysis, NTLM extraction, LLMNR/NBT-NS poisoning detection, relay identification
Filesystem ForensicsMFT parsing, Prefetch analysis, VSS artifact recovery, Linux persistence, timeline reconstruction
AD Attack DetectionKerberoasting, AS-REP roasting, NTDS dump, NTLM relay, credential theft
Memory ForensicsVolatility3 analysis: process trees, file extraction, SID resolution, command lines
Hash AnalysisNTLMv2 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

pip install python-evtx windowsprefetch analyzeMFT
brew install wireshark p7zip hashcat
ToolPurpose
python-evtxParse Windows .evtx files
tsharkCLI pcap analysis (NTLM, LLMNR, SMB filters)
analyzeMFTParse NTFS Master File Table
windowsprefetchParse Windows prefetch files (Windows host only)
hashcatHash cracking (NTLMv2 mode 5600, Kerberos mode 13100/18200)
volatility3Memory dump analysis (pstree, filescan, dumpfiles, getsid, cmdline)
7zExtract AES-encrypted evidence ZIPs

Quick Reference: Key Event IDs

Event IDLogIndicates
4624SecuritySuccessful logon (check Type + IP mismatch)
4768SecurityTGT request (PreAuthType=0 → AS-REP roast)
4769SecurityTGS request (EncType=0x17 → Kerberoast)
4799SecurityGroup membership enumerated (VSS/ntdsutil)
5140SecurityNetwork share accessed
7036SystemService state change (VSS start → NTDS dump)
325/326/327ApplicationESENT database create/detach/close
330ApplicationESENT database file info
3006/3008DNS Client EventsDNS query sent/response received (malicious domain lookups)
106/200Task SchedulerScheduled task created/executed (persistence via schtasks)

Reference

  • windows-event-analysis.md — EVTX parsing patterns and AD attack detection
  • network-forensics.md — PCAP analysis for NTLM, LLMNR, relay detection
  • 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.