The traditional offensive security engagement runs in a straight line: test, find, exploit, report, wait for the owners to fix, retest. This post is for security leaders and senior practitioners who fund or run that line. We argue that offensive security is worth more to the enterprise when the order is turned around, so the work starts from threat intelligence, meaning what is known about attackers' current behavior, and its product is hardening instead of a report: the detections, controls and defaults it leaves in place.
A periodic test reports too late to steer remediation
NIST's SP 800-115, published in 2008, says of the penetration test: "Because of its high cost and potential impact, penetration testing of an organization’s network and systems on an annual basis may be sufficient." Reports from 2026 show what an annual test faces:
- Exploitation of vulnerabilities is the most common way into a breach, at 31% of the breaches in the initial-access analysis of Verizon's 2026 Data Breach Investigations Report executive summary.
- Fixing is getting slower: the same summary puts the median time for full resolution at 43 days, up from 32 the year before.
- Exploitation can come before the patch: Mandiant's M-Trends 2026, built on its own 2025 investigations, estimates the mean time to exploit at -7 days, "meaning exploitation is routinely occurring before a patch is even released."
Turn the order around: five steps that keep running
None of the five steps is new, and three established practices show in them:
- Purple teaming, which the UK National Cyber Security Centre defines as exercises where the attacking team also works with the security operations center "to iteratively improve your capability as any gaps are discovered".
- Breach and attack simulation, meaning tools that automate attack tests, which Gartner's market pages now file under adversarial exposure validation.
- Detection as code, in which detections pass tests and quality checks before release to production, as the vendor Datadog describes for its own pipeline.
The closest published description of the whole is threat-informed defense, which MITRE's Center for Threat-Informed Defense defines as "the systematic application of a deep understanding of adversary tradecraft and technology to improve defenses". What changes is that the steps run as one loop, in this order, with one owner for each output:
- Gather threat intelligence continuously, and let it decide what gets tested next.
- Test the techniques, meaning the attacker behaviors, that the intelligence names, and generate variants of each one: different implementations built around its core primitive, the operation that every implementation has to perform whatever tool carries it out.
- Use the telemetry the variants produce, meaning the logs and alerts each one leaves behind, for three things.
- detection content, the rules that raise an alert on a logged behavior
- continuous validation, which reruns the tests on a schedule to confirm that the detections still fire
- prevention at the points of highest leverage against attackers
- Run penetration tests continuously, on a schedule and on events such as a deployment.
- Close the loop in three ways.
- turn successful exploits and behaviors that raised no alert into detection content
- track the gap, and a risk record to remediate it, where no telemetry was produced
- stand up compensating controls, which cover a gap from another layer while it stays open
The loop is where three kinds of work meet: a frontier model, one of the most capable current AI models, that generates and runs variants and change-triggered tests, the countermeasures that come out of each pass, and offensive security choosing what to attack next. We call it a virtuous cycle because each pass leaves tests, detections, records and defaults in place, so the next pass starts from them instead of from a blank scope.
What the enterprise buys, and who owns each part
The straight line buys a list of findings that starts to age on the day it is delivered. The loop buys four things that keep working, each with the owner we argue for:
- A test that reruns, owned by offensive security along with the technique corpus and the variant generator behind it. The corpus is the list of techniques under test, named in the vocabulary of MITRE ATT&CK.
- A detection that ships with its own test, owned by detection engineering, which decides what reaches production.
- A risk record wherever a technique left no telemetry, owned by the risk function.
- A default that every new system inherits, such as a template or a pipeline, owned by the platform team. In a large portfolio of systems the defaults matter most, because they protect each new system before anyone tests it.
The threat intelligence function, or whoever supplies intelligence, owns the queue of techniques to test, and offensive security owns turning each one into a test. Every output must land in a named team's queue, because a suggestion that nobody owns is a report by another name. An organization that lacks one of these functions should name a person for that output before starting. Offensive security then stops being the last check before an audit and becomes the source of the defensive backlog.
Vary each technique, because a detection for one tool can miss the others
A detection written against one tool can miss every other implementation of the same technique, so the unit to test is the core primitive. A researcher at the security firm SpecterOps, working from his own function call graphs, counted "39,333 total variations of the OS Credential Dumping: LSASS Memory sub-technique at the functional level", which "can be represented abstractly as only four unique variations at the operational level." Writing and running variants in those numbers by hand is not practical, so this is the first of two places where we would put a frontier model: to generate variants around the few operations and run each one for its telemetry. Model-generated variants at that scale are our bet, and we know of no published measurement of them. The next intelligence report on a known technique then needs only its new variants tested.
A detection broad enough to cover the variants has a cost: SpecterOps warns of "a higher likelihood of false positives", alerts raised by activity that is not an attack.
Give every outcome an owner and a next action
Before any telemetry is sorted, we would have each run record whether the variant performed the primitive and whether the attempt succeeded or was blocked. A variant that did not execute is a failed test and is rerun, not counted. A blocked attempt is prevention working. An attempt that succeeded ends one of three ways.
- Executed and alerted as expected. The alert counts as detection coverage only when it is the alert expected for that behavior and is tied to that run, and the variant then joins continuous validation. Red Canary's Atomic Red Team, a library of tests mapped to ATT&CK, shows the form such a test takes.
- Executed and logged with no alert. The log becomes a detection: Palantir's Alerting and Detection Strategy Framework asks every detection for a validation section that "lists the steps required to generate a representative true positive event which triggers this alert", and the variant is that test.
- Executed and nothing recorded. That opens a risk record, which stays open until the gap is fixed or accepted.
We would have the risk function accept a gap only when the record holds three things:
- a named owner
- a compensating control that is already in place
- a date to look again
Prevention comes from asking where one fix stops the most attacks. SpecterOps, which sells an attack path product, calls choke points "the optimal location to block the largest number of pathways". We would use choke points to rank fixes, confirm each fix by rerunning the variants, and prefer a fix that becomes a default.
These results give the one measure we would report upward: the share of variants in each outcome, with blocked attempts apart. We would take it on a fixed set of variants, so passes can be compared, and report variants added since separately.
Start a penetration test from each change, with context and a reviewer
A deployment can open new ways in on any day, so we would have it start its own scoped test alongside the scheduled ones. CA-8, the penetration testing control of NIST SP 800-53 Rev. 5, leaves room for it by making both the frequency and the systems organization-defined. This is the second place where we would put a frontier model, as an agent that plans and runs the test itself and starts with four kinds of context:
- the source code and the change to it
- the identity and access management (IAM) policy, which says what the changed service is allowed to do
- the cloud configuration it deploys into
- the defensive layers, meaning the detections and controls that already cover it
The closest public pattern is narrower: an AWS how-to for its own service, AWS Continuum, with no outcome data, in which "each run tests only the change since the last passing gate rather than the whole application" and the target is staging, the pre-production copy. No published account that we know of covers all four kinds of context with outcome data, so the combination is a design we argue for.
More context does not guarantee more findings. One preprint on finding vulnerabilities in source code, a narrower task than a penetration test, reports that once its prompt was engineered, adding context about the code derived from CodeQL, a static analysis tool, "improves yield only for the smallest model." We would still hand over the context, because a finding tied to a line of source and a policy statement is one a reviewer can check.
Three rules we would set for the agent each answer a documented risk:
- It runs in staging by default, and production testing stays human-led. NIST SP 800-115 warns that penetration testing "uses real exploits and attacks against production systems and data". A detection proved in staging is not yet coverage, because production can log differently: we would count it only after its variant is rerun in production by the people who own production testing.
- Its scope is enforced by the credentials and network paths it is given, never by instructions alone. Anthropic's report on its own cybersecurity evaluations describes a model that "gained unauthorized access to the production infrastructure of three different organizations".
- A human reviews every finding before it becomes a ticket. A study of an agent on one university network reports that agents "exhibit higher false-positive rates".
A system with no staging copy, or one that a third party operates, stays on the periodic test.
One change through the loop: an illustration
Everything in this illustration is invented, the intelligence report and the systems alike, and it reports no test that was run.
- Intelligence names a technique. An intelligence report describes a group that collects secrets through workload identities, the identities that services run as. Offensive security adds the technique to its corpus, with the primitive stated as a workload identity reading a secret outside its own scope.
- The technique is varied.
A generator writes three variants of the primitive.
- a direct read
- a listing followed by reads
- a read through a second service's identity
- A change starts a test. A developer ships a new integration, a small service that forwards events to a third-party API and reads its credential from the secret store when it starts. Its deployment to staging triggers a scoped test, and the agent receives the four kinds of context.
- The agent finds one problem. The service's identity has a policy that came from a template and can read every secret under a shared path, when the service needs one. A human reviewer confirms the finding, and the three variants run from the service's identity.
- The runs are recorded and sorted. All three performed the primitive and succeeded. The direct read of a second secret raised the expected alert, so offensive security adds that variant to continuous validation. The listing was logged and raised no alert, so detection engineering reviews and ships a detection with the variant as its validation step. The read through the second identity happened where the secret store's audit log is not collected, so nothing was recorded.
- The finding is fixed. The service's owner narrows its identity's policy to the one secret it needs.
- The gap gets a record. NIST SP 800-53 control RA-7, on responding to risk, gives the general rule: "if the risk response is to mitigate the risk, and the mitigation cannot be completed immediately, a plan of action and milestones entry is generated." The risk function opens that record with an owner and a date to look again. The compensating control works without the missing log: the secret store's own policy lets each secret be read only by the identities named for it, so the read through the second identity is refused whether or not it is logged. Collecting the audit log closes the record.
- The default is fixed. The template is narrowed so every new service starts scoped to its own secret, and the platform team finds the existing services built from the old template, which is the choke point here.
- The fix is confirmed. The variants are rerun against the affected service: the two reads are refused, and the listing now raises the new detection.
Four objections to answer before funding the loop
The loop adds costs and risks that the straight line does not have.
- Generated detections will bury the analysts who triage alerts. A USENIX Security 2024 study of one security operations center found 24,000 to 134,000 network alerts a day, of which 0.01% were associated with true attacks. We would have detection engineering run each generated detection against normal activity first, and ship only the quiet ones.
- An attestation may still require a periodic test. The loop does not replace it. The periodic test becomes the independent check that the loop's own tests and detections hold, and the place for the novel attack chains that a generator does not produce.
- The loop needs engineers who build generators, pipelines and tests, not only testers. We would fund them from the hours the straight line spends on writing reports and repeating manual retests, and say so in the budget.
- The AI evidence in this post is two vendors describing their own systems and two preprints. The case for the loop does not rest on it, because none of the figures in the first section is about AI. We also know of no published measurement showing that running the loop reduces breaches, so we would judge it by the measure above.
Start with one technique and no model
Pick one technique that current intelligence names and write a few variants of it by hand. Whatever raises no alert, or leaves no record at all, is the first backlog.