Full Guide
Executive Summary
Offensive work collapses into anecdote the moment "it worked on my machine" replaces a hypothesis. A hypothesis is a commitment made before the experiment — a precise, falsifiable claim with measurable variables and pre-declared success thresholds. It is the difference between "I think EDRs can be bypassed" (a vibe) and "Userland unhooking achieves a higher evasion rate than direct syscalls against kernel-callback EDRs" (a claim you can be wrong about).
This module converts the gap statement from Module 03 into a formal hypothesis pair (H0/H1), defines your variables with operational precision, sets effect sizes and thresholds in advance, and pre-registers the whole thing to immunize you against HARKing and p-hacking — the two integrity failures that most often sink offensive-security papers in review.
Mental model: A hypothesis is a bet you place before seeing the cards. If you can adjust the bet after seeing the result, you are not doing science — you are telling a story.
Learning Outcomes
By the end of this module you will be able to:
- Translate an attack idea into a null/alternative hypothesis pair with operational definitions.
- Classify every variable as independent, dependent, or confounding — and plan to control each.
- Set effect sizes and success thresholds before collecting data.
- Pre-register your design to prevent HARKing (Hypothesizing After Results are Known) and p-hacking.
1. From Gap to H0/H1
A gap asks a question; a hypothesis answers it in a form that can be refuted. Every quantitative study needs a null hypothesis (H0) — the boring "no effect" default — and an alternative (H1) — the effect you actually predict.
flowchart TD
GAP["Gap statement (Module 03)<br/>'No study measures evasion of<br/>direct syscalls vs userland<br/>unhooking against callback EDRs'"] --> RQ["Research question<br/>'Does evasion technique affect<br/>detection rate on callback EDRs?'"]
RQ --> H0["H0 (null)<br/>Evasion technique has NO effect<br/>on detection rate"]
RQ --> H1["H1 (alternative)<br/>Direct syscalls yield a LOWER<br/>detection rate than userland unhooking"]
H0 --> TEST["Experiment + statistical test"]
H1 --> TEST
TEST --> DEC{"Reject H0?"}
DEC -->|p < alpha, effect real| SUP["Evidence supports H1"]
DEC -->|cannot reject| NUL["Null result<br/>(see Module 18)"]
style H1 fill:#0c2a22,stroke:#10e793,color:#d1fae5
style H0 fill:#1a230c,stroke:#fca311,color:#fef3c7
style NUL fill:#2a0c14,stroke:#ef233c,color:#fee2e2Note the discipline: you can never prove H1 directly. You can only reject H0 with some confidence, and report the effect size. "We failed to reject H0" is a legitimate, publishable outcome (Module 18) — not a failure of the project.
Operational definitions
A hypothesis is only testable if every term is operationalized — defined as a concrete, measurable procedure. Vague nouns are where rigor dies.
| Vague term | Operational definition (testable) |
|---|---|
| "Evasion" | No EDR-generated blocking alert within 60s of payload execution, per the EDR's own console |
| "Detected" | A telemetry event of severity ≥ Medium attributable to the technique |
| "Bypass success" | Beacon check-in established AND no kill action within the 5-min observation window |
| "EDR" | The specific product + version + policy profile, enumerated in a config table |
| "Attack works" | (Too vague — forbid this phrase entirely) |
2. Variables: Independent, Dependent, Confounding
Every experiment manipulates something (independent), measures something (dependent), and is threatened by things it did not control (confounding). Naming all three up front is experimental design.
flowchart LR
IV["INDEPENDENT VARIABLE<br/>what you deliberately change<br/>e.g. evasion technique:<br/>{userland, direct-syscall, indirect}"] --> EXP["EXPERIMENT"]
EXP --> DV["DEPENDENT VARIABLE<br/>what you measure<br/>e.g. detection rate,<br/>time-to-detect"]
CONF["CONFOUNDERS<br/>EDR version, host noise,<br/>network jitter, payload size,<br/>time of day"] -.threatens.-> EXP
style IV fill:#0c1f2a,stroke:#08d9d6,color:#cffafe
style DV fill:#0c2a22,stroke:#10e793,color:#d1fae5
style CONF fill:#2a0c14,stroke:#ef233c,color:#fee2e2| Variable type | Question | EDR-evasion example | Control strategy |
|---|---|---|---|
| Independent | What do I change? | Evasion technique (3 levels) | Test each level identically |
| Dependent | What do I measure? | Detection rate, time-to-detect | Pre-define measurement procedure |
| Controlled | What do I hold fixed? | EDR version, host image, payload | Pin via IaC + snapshots (Module 14) |
| Confounding | What might leak in? | Background process noise, SOC tuning | Randomize trial order; document config |
The deadliest confounder in offensive research is the uncontrolled environment: a "bypass" that actually succeeded because the EDR was in audit-only mode, or because the test host had no realistic background noise. Module 11 (lab design) and Module 13 (instrumentation) exist to crush confounders like these.
3. Effect Sizes and Thresholds — Set Them First
The cardinal sin is choosing your success threshold after seeing the data. Decide, before any experiment runs: what counts as success, what alpha you will use, and what effect size is practically meaningful (not just statistically significant).
PRE-COMMIT THESE NUMBERS BEFORE TRIAL 1 Significance level (alpha) ........ 0.05 Statistical power (1 - beta) ...... 0.80 (=> required n via power analysis) Minimum meaningful effect ......... e.g. >= 20 percentage-point difference in detection rate Trials per condition (n) .......... 30 (from the power analysis) Primary metric .................... detection rate Secondary metric .................. median time-to-detect Decision rule ..................... reject H0 if p < 0.05 AND effect >= 20 ppWhy pre-commit? Because the human brain is a pattern-matching engine that will, without restraint, find a "result" in noise. Two named failure modes:
- p-hacking: running many variants and reporting only the one with
p < 0.05. With 20 comparisons at alpha = 0.05, you expect one false positive by chance alone. - HARKing: observing a pattern, then writing the hypothesis as if you predicted it. This converts an exploratory observation into a fake confirmation.
Pre-registration defeats both by timestamping your hypothesis, variables, and analysis plan before data exists.
4. Pre-Registration
Pre-registration is a public, timestamped record of your plan. It is increasingly expected at top venues for empirical work, and it is your strongest defense against the accusation that you tuned your story to your data.
flowchart LR
A["Write hypothesis + variables<br/>+ analysis plan"] --> B["Timestamp it<br/>(OSF, git tag, lab notebook,<br/>signed commit)"]
B --> C["Run the experiment<br/>exactly as planned"]
C --> D{"Did reality<br/>force a change?"}
D -->|no| E["Confirmatory result"]
D -->|yes| F["Disclose deviation<br/>+ label as exploratory"]
E --> G["Report honestly"]
F --> G
style E fill:#0c2a22,stroke:#10e793,color:#d1fae5
style F fill:#1a230c,stroke:#fca311,color:#fef3c7A minimal pre-registration record:
PREREGISTRATION (commit a96f2e1, 2026-06-09)RQ: Does evasion technique affect detection rate on callback EDRs?H0: No difference in detection rate across techniques.H1: Direct syscalls < userland unhooking in detection rate.IV: technique in {userland, direct-syscall, indirect-syscall}DV: detection rate (primary), time-to-detect (secondary)CONTROLS: EDR=ProductX v2.4 default policy; host=Win11-23H2 golden image; payload=fixed 64KB beacon; n=30 per cell; trial order randomizedANALYSIS: chi-square on detection counts; alpha=0.05; report Cramer's VDECISION: reject H0 if p<0.05 AND effect >= 20ppDeviations are not forbidden — reality intervenes — but they must be disclosed and labeled. A pre-registered confirmatory result carries far more weight than the same number arrived at by undisclosed exploration.
Step-by-Step Practical Exercise
Goal: Turn your Module 03 gap statement into a fully specified, pre-registered hypothesis you could hand to a collaborator and have them run without asking a single clarifying question.
Time: ~70 minutes. You need: your gap statement from Module 03 and a power-analysis tool (G*Power, orstatsmodels/pwrin R).
Step 1 — Write H0 and H1 (10 min). From your gap, state the null and alternative. H0 is always "no effect / no difference." H1 states the direction you predict. Keep both to one sentence each.
Step 2 — Operationalize every term (15 min). List every noun in your hypothesis that a stranger could misinterpret ("evasion", "success", "detected"). Give each a concrete, measurable operational definition, as in the §1 table. Ban the phrase "it works".
Step 3 — Tabulate variables (15 min). Build the §2 four-row table for your study: independent (with its levels), dependent (with measurement procedure), controlled, and confounding. For each confounder, write your control strategy.
Step 4 — Power analysis and thresholds (15 min). Pick alpha (0.05 is standard), power (0.80), and a minimum meaningful effect. Run a power analysis to get the required n per condition. Write down the §3 pre-commit block with real numbers.
Step 5 — Pre-register (15 min). Fill in the §4 pre-registration template and timestamp it — at minimum, commit it to a private git repo with a signed tag, or post to OSF. This file is now immutable evidence of what you predicted before you knew the answer.
Deliverable: one timestamped pre-registration file containing H0/H1, operational definitions, the variable table, and pre-committed thresholds. This is a required input to Module 05's proposal and Module 15's methodology section.
Where to go next
- Module 05 — Developing a Feasible Research Proposal wraps this hypothesis in a timeline, budget, and ethics plan.
- Module 12 — Robust Baselines and Metrics and Module 19 — Quantifying Evasion Efficacy turn your thresholds into a real measurement and statistical analysis.
Related reading on the blog: "Pre-Registration for Hackers" and "Operationalizing 'It Works': Measurable Definitions in OffSec".