agentleFS
Bizaza-devsBizaza-devs/Claude-PurpleTeam/skills/defender-mindset/SKILL.md

defender-mindset

Skill0 starsChanged 3 days agoMITView on GitHub

Analytic discipline for SOC analysts, incident responders and threat hunters. Covers hypothesis-driven investigation, Analysis of Competing Hypotheses (ACH, Heuer), the Pyramid of Pain (hashes to TTPs), the Diamond Model (adversary, capability, infrastructure, victim), Lockheed Martin Cyber Kill Chain vs MITRE ATT&CK, cognitive biases in triage (anchoring, confirmation, availability, automation bias), calibrated confidence language (high/moderate/low, ICD 203 style), rules for "absence of evidence", and writing notes for the next analyst. Use when an investigation stalls, when two explanations both fit, when writing a verdict or assessment, when reviewing another analyst's conclusion, or when asked "how confident are we", "are we sure it's not X", "what else could explain this".

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing any verdict, assessment or executive statement.

    line 13
  2. Distinctive:

    When two or more explanations fit the evidence.

    line 14
  3. Distinctive:

    When a case has stalled or the team is "sure" without being able to say why.

    line 15
  4. Distinctive:

    When peer-reviewing another analyst's triage or report.

    line 16
  5. Distinctive:

    When choosing what to detect or hunt (Pyramid of Pain, ATT&CK).

    line 17
  6. Distinctive:

    Ask which evidence is diagnostic (differs across hypotheses).

    line 72
  7. Very specific:

    Use hashes and IPs to scope a known incident fast.

    line 100
  8. Distinctive:

    Never write "confirmed" unless confidence is high.

    line 168
  9. Distinctive:

    Never write "no evidence of compromise" without stating what was examined and for which period.

    line 169
  10. Distinctive:

    Put the confidence next to the claim, not in a footnote.

    line 172
  11. Distinctive:

    Before writing "not observed" or using absence in ACH, check:

    line 176
  12. Very specific:

    If any check fails, report a gap, not an absence.

    line 187

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Defender mindset

How to think so that verdicts survive review. The tools change; the failure modes of analysts do not.

When to use

  • Before writing any verdict, assessment or executive statement.
  • When two or more explanations fit the evidence.
  • When a case has stalled or the team is "sure" without being able to say why.
  • When peer-reviewing another analyst's triage or report.
  • When choosing what to detect or hunt (Pyramid of Pain, ATT&CK).

Ground rules

  1. Every conclusion names its evidence and its confidence. "Malicious (moderate confidence): parent process is Outlook, child is a signed LOLBin fetching from a 2-day-old domain; no admin ticket explains it."
  2. At least one alternative hypothesis is written down and actively tested before a TP or FP verdict on anything SEV3 or above.
  3. Absence of evidence is only evidence of absence when you have proven the telemetry would have recorded it (source enabled, covering that host, retained for that period, and your query returns known-good positives).
  4. Facts, inferences and assumptions are labelled separately in notes and reports.

Workflow

  1. State the question precisely: "Did account X authenticate to host Y between T1 and T2, and was it the legitimate user?"
  2. Generate hypotheses (at least three for anything non-trivial), including a benign one and a "worse than it looks" one.
  3. List evidence you have and evidence you could get, with cost to get it.
  4. Seek disconfirming evidence first. The test that could kill your favourite hypothesis is the most valuable query.
  5. Score with ACH (below) when hypotheses are close.
  6. State the conclusion with confidence and what would change it.
  7. Write it for the next analyst (template at the end).

Hypothesis-driven investigation

A good hypothesis is testable and names the data that would confirm or refute it.

WeakStrong
"The host might be compromised.""If svc_backup was used for lateral movement, we expect 4624 Type 3 logons from WS-114 to servers outside the backup subnet between 02:00 and 04:00 UTC."
"Looks like phishing.""If the user entered credentials on the page, we expect a successful sign-in from a non-corporate ASN within ~1 h of the URL click, likely with a different user agent."

For each hypothesis write: expected observables, where to look, what result would refute it. This is the same structure hunt-dispatch uses for hunts.

Analysis of Competing Hypotheses (ACH)

From Richards J. Heuer Jr., Psychology of Intelligence Analysis. Its key move: judge hypotheses by inconsistency, not by how much evidence agrees.

  1. List hypotheses (columns): H1 malicious actor, H2 authorised admin, H3 misconfigured software, H4 red team...
  2. List significant evidence and arguments (rows), including absences you have verified.
  3. Mark each cell: CC very consistent, C consistent, N neutral/not applicable, I inconsistent, II very inconsistent.
  4. Weight evidence by credibility and relevance (a single log line from a source that can be spoofed is weaker than an EDR process tree).
  5. Discard / deprioritise the hypothesis with the most inconsistencies; do not crown the one with the most "C" marks.
  6. Ask which evidence is diagnostic (differs across hypotheses). Evidence consistent with everything does not help; go and get diagnostic evidence.
  7. Report the conclusion with the remaining uncertainty and the milestones that would change it.
| Evidence                                   | H1 attacker | H2 IT admin | H3 software |
|--------------------------------------------|-------------|-------------|-------------|
| PsExec service PSEXESVC created (7045)     | C           | C           | I           |
| Source host is a user workstation          | C           | I           | N           |
| No change ticket for that window           | C           | I           | N           |
| Executed `nltest /domain_trusts` first     | CC          | I           | II          |
| Inconsistency score                        | 0           | 3 (I)       | 3 (I, II)   |

Pyramid of Pain (David Bianco, 2013)

How much it costs the adversary when you detect or deny each indicator type:

LevelIndicatorAdversary cost to changeDefender takeaway
6 (top)TTPsToughBehavioural detections; most durable
5ToolsChallengingDetect tool behaviour, not the binary
4Network / host artifactsAnnoyingURI patterns, JA3/JA4, named pipes, registry keys
3Domain namesSimpleUseful short-term, block + hunt
2IP addressesEasyExpires quickly; cloud/CDN IPs are shared
1 (bottom)Hash valuesTrivialGood for scoping a known sample, poor for detection

Use hashes and IPs to scope a known incident fast; invest detection engineering time at the top (detection-engineering, sigma-rules).

Diamond Model of Intrusion Analysis

Caltagirone, Pendergast and Betz (2013). Every event has four vertices:

            Adversary
              /   \
   Infrastructure -- Capability
              \   /
             Victim
  • Pivoting: from one known vertex find the others. A C2 domain (infrastructure) -> passive DNS -> other domains on the same IP -> other victims; a malware sample (capability) -> config -> more infrastructure.
  • Meta-features: timestamp, phase, result, direction, methodology, resources. Socio-political and technology axes connect adversary/victim and infrastructure/capability.
  • Activity threads chain events into a campaign view; useful for threat-intel-ioc and for grouping cases that look separate.

Kill chain vs ATT&CK

Lockheed Martin Cyber Kill ChainMITRE ATT&CK
Structure7 linear phases: Reconnaissance, Weaponization, Delivery, Exploitation, Installation, Command & Control, Actions on ObjectivesMatrix of tactics (the "why") x techniques/sub-techniques (the "how"), per platform (Enterprise, Mobile, ICS)
StrengthExecutive communication; "break the chain early"Granular, shared vocabulary for detections, hunts and coverage
WeaknessPerimeter- and malware-centric; weak on insider, cloud, identity abuseLarge; easy to "colour the matrix" without measuring detection quality
Use it forNarrative in reports, phase of an incidentMapping detections (/coverage), hunts, intel, purple tests

Map observed behaviour to the most specific technique ID you can defend (e.g. T1003.001 LSASS Memory, not just T1003). One event can map to more than one technique; do not force a single label.

Cognitive biases in triage

BiasHow it shows up in a SOCCountermeasure
AnchoringFirst alert title ("Mimikatz") frames everything afterWrite your own one-line description of the raw evidence before reading the vendor title
ConfirmationOnly running queries that can confirm the favoured storyRun the disconfirming query first; record it
AvailabilityLast week's incident type is seen everywhereCheck base rates: how often has this rule been TP in 90 days?
Automation bias"The EDR said benign" / "the sandbox found nothing"Tools are evidence, not verdicts; know their blind spots (sandbox evasion, sleep, geofencing)
Premature closureStopping at the first plausible explanationRequire one alternative hypothesis for SEV3+
Satisficing under queue pressureClosing as FP because the queue is longTimebox and escalate as "Needs-data" instead of guessing
Sunk costContinuing a dead-end theory after hours of workRe-score hypotheses at each timebox
Groupthink / authorityJunior analyst defers to senior's early callAsk the newest analyst for their view first in case reviews
HindsightPost-incident review judges decisions with later knowledgeUse the decision log: what was known at that time

Confidence language

Separate likelihood (how probable the judgement is) from confidence (how good the evidence base is). Pattern follows the US ODNI Intelligence Community Directive (ICD) 203 analytic standards.

ConfidenceMeaningTypical evidence base
HighJudgement based on high-quality, corroborated evidence from independent sources; alternative explanations tested and rejectedEDR process tree + network logs + host artifact agree; no plausible benign explanation
ModerateCredibly sourced and plausible, but not corroborated enough for high, or one alternative remains openTwo consistent sources, a gap in telemetry or one untested alternative
LowFragmentary, single-source, or significant gaps; plausible but could be wrongOne alert, missing logs, inference from absence

Likelihood words (use consistently, define them in the report appendix): almost certainly, very likely, likely, roughly even chance, unlikely, very unlikely, almost no chance.

Rules:

  • Never write "confirmed" unless confidence is high.
  • Never write "no evidence of compromise" without stating what was examined and for which period. Prefer: "In the 30 days of EDR and sign-in data reviewed, we found no evidence of ...".
  • Put the confidence next to the claim, not in a footnote.

Absence of evidence

Before writing "not observed" or using absence in ACH, check:

CheckQuestion
CollectionWas the source enabled for that host/user/tenant (e.g. Sysmon installed, Audit Process Creation on, M365 audit enabled, CloudTrail data events on)?
CoverageDid the agent report during the window (heartbeat, last-seen)? Was the host offline?
RetentionDoes the data still exist for that date range?
FidelityDoes the source record that field (command line in 4688 requires the separate "Include command line in process creation events" policy)?
Query validityDoes the query return a known-good positive when pointed at a test case?
TamperingAny log clear (Security 1102, System 104), agent stop, StopLogging, audit policy change (4719)? Tampering is itself evidence.

If any check fails, report a gap, not an absence. Gaps go to logging-coverage.

Writing for the next analyst

Your notes will be read at 03:00 by someone who was not in the room.

## Analyst note - <case id> - <UTC time> - <name>
Question: <what I was trying to establish>
Done: <queries/artifacts examined, time ranges, ref to queries/ files>
Found (facts): <bullets, each with source + UTC time>
Assessment: <judgement> (<likelihood>, <confidence> confidence)
Alternatives considered: <H2/H3 and why rejected or still open>
Gaps: <data not available or not yet checked>
Next steps: <ordered, with owner if known>
Do not: <anything that would destroy evidence or tip off the actor>

Style: short sentences, entities in backticks, defanged indicators (hxxps://evil[.]example), UTC everywhere, no unexplained acronyms in customer-facing text.

False positives & benign look-alikes

The mindset version of a false positive is a wrong frame:

  • Treating "unusual" as "malicious". New admin tooling, a migration or a user travelling produce anomalies; an anomaly is a lead, not a verdict.
  • Treating "signed by Microsoft" or "known tool" as "benign". LOLBins and RMM tools are signed (see hunt-lolbins).
  • Treating a matching IOC as proof. Shared hosting, CDN and VPN IPs and sinkholed domains produce matches with no compromise.

Pitfalls

  • Hypotheses that cannot be refuted ("an APT could be hiding anywhere").
  • Counting supporting evidence instead of seeking inconsistent evidence.
  • Over-precision: "the attacker entered at 09:14:07" when the source has minute-level timestamps or clock skew.
  • Mixing confidence and severity ("high confidence" is not "high severity").
  • Notes that record conclusions but not the queries that produced them.

Output

  • Written hypotheses with expected observables.
  • ACH matrix for contested cases, stored in the case folder.
  • Verdicts and assessments with likelihood + confidence + alternatives.
  • Gap list handed to logging-coverage.
  • Hand-offs: alert-triage, hunt-dispatch (/hunt), threat-intel-ioc (Diamond pivots), ir-report-writing (confidence language), post-incident-review (bias review).

References

  • Richards J. Heuer Jr., Psychology of Intelligence Analysis (CIA Center for the Study of Intelligence, 1999) - ACH and cognitive bias.
  • David J. Bianco, "The Pyramid of Pain" (2013).
  • Caltagirone, Pendergast, Betz, "The Diamond Model of Intrusion Analysis" (2013).
  • Lockheed Martin, "Intelligence-Driven Computer Network Defense Informed by Analysis of Adversary Campaigns and Intrusion Kill Chains" (Hutchins, Cloppert, Amin, 2011).
  • US ODNI Intelligence Community Directive 203, Analytic Standards.
  • Sherman Kent, "Words of Estimative Probability" (1964).
  • MITRE ATT&CK: https://attack.mitre.org/

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.