DEV Community

Bala Paranj
Bala Paranj

Posted on

You Reduced Detection Time from 30 Days to 30 Seconds. The Attacker Needed 3 Milliseconds. You Still Lost.

✓ Human-authored analysis; AI used for formatting and proofreading.

The cloud security industry's proudest achievement of the last decade: reducing detection time.

2015:  Average detection time: 206 days
2020:  Average detection time: 56 days  
2025:  Average detection time: minutes to hours (best-in-class)
Enter fullscreen mode Exit fullscreen mode

Detection got DRAMATICALLY faster. Billions in investment.

The breach rate didn't change.

Here's why: detection is ALWAYS post-violation. No matter how fast you detect, the unsafe state EXISTED before the alert fired. The attacker was already inside. The data was already accessible. The permissions were already escalated. Detection speed determines how long the attacker has AFTER the breach begins not whether the breach happens.

Reducing detection from 206 days to 30 seconds is a 600,000x improvement. The attacker needed 3 milliseconds. At 30-second detection, the attacker had 10,000x more time than needed.

Faster detection doesn't create safety. State constraints create safety.

The asymmetry

Attacker:    ████████████████████████████████████████████
             Always probing. Always ready. No schedule. No business hours.

Defender:    █░░░░░░░░░░░░░░░█░░░░░░░░░░░░░░░█░░░░░░░░░
             Audit          Scan           Review

             ◄── unguarded windows (exploitable) ──►
Enter fullscreen mode Exit fullscreen mode

Attackers operate continuously. Automated scanners sweep the internet for new vulnerabilities within minutes of public disclosure. No business hours, audit seasons or quarterly cycles.

Defenders operate periodically. Annual audits. Monthly scans. Quarterly reviews. Alert-driven responses. Even continuous monitoring tools sample at intervals and the breaches live in the intervals.

Between two defensive checks: configurations drift, credentials leak, permissions expand, systems change. The attacker lives in those windows. The windows exist because defense is PERIODIC and attack is CONTINUOUS.

Why the mismatch persists

Three forces trap the defenders:

Compliance culture. Regulations (HIPAA, PCI-DSS, SOC2) historically required periodic assessments. Teams optimize for passing the audit, not resisting the attack. We're compliant and we're safe are different things and cannot be treated the same.

Resource exhaustion. Continuous defense at the monitoring level requires 24/7 SOC staffing, high-end automation, and massive tooling investment. Most organizations can't sustain it.

The alert fatigue paradox. Moving to continuous monitoring floods defenders with thousands of alerts. Operators tune out the noise, effectively returning to periodic behavior where they only review a subset. The tool is continuous. The human attention is periodic. The bottleneck is the human.

The industry's response and its hidden assumption

The industry shifted from compliance-driven security to continuous security monitoring:

Property Periodic defense Continuous defense
Visibility Snapshot / retrospective Real-time telemetry
Tools Manual audits, scanners EDR, XDR, SIEM, AI automation
Goal Compliance ("are we legal?") Resilience ("are we breached?")
Speed Weeks to months Seconds to minutes

The modern column improves three things: more data (real-time telemetry), faster awareness (seconds instead of weeks), better detection (more signals, correlations, context).

These are improvements. They do NOT change the failure mode.

What the modern column does NOT fix

1. Visibility is not authority. Real-time telemetry answers: "what is happening?" It does NOT answer: "is this allowed?" or "stop this now." Seeing a fire earlier does not stop the fire.

2. Speed is still post-violation. Even at seconds to minutes:

Unsafe state exists → telemetry emitted → alert generated → response triggered
       ↑
       The system was ALREADY unsafe at this point.
       Attackers need milliseconds.
Enter fullscreen mode Exit fullscreen mode

The detection happens AFTER the unsafe state exists. The attacker's window opens BEFORE the alert fires. Faster detection shrinks the window. It doesn't close it.

3. Tools are still observers. EDR, XDR, SIEM, AI systems: watch, correlate, classify, suggest. They do not OWN the system's allowed states. They advise humans or downstream automation. That is observation, not control.

4. Resilience is framed after failure. The goal column reveals the assumption: "are we breached?" That question is already too late. A safety system asks: "can this state exist at all?"

5. Automation ≠ enforcement. AI automation means faster triage, faster tickets, faster playbooks. Playbooks still trigger AFTER detection, execute bounded actions, require trust in heuristics. They are EVENT-DRIVEN, not STATE-GOVERNED.

The hidden assumption

The continuous monitoring paradigm assumes:

If we detect fast enough, we are safe.

This assumption is false. Safety does not come from detection speed. It comes from STATE CONSTRAINTS.

Detection speed:     1 week → 1 day → 1 hour → 1 minute → 1 second
Safety?:               ✗        ✗        ✗         ✗          ✗

Why: The unsafe state already existed. Damage already done.

State constraint:    "Public buckets must be declared"
Attempt:             Create undeclared public bucket
Result:              BLOCKED — invariant violation prevented
Detection time:      N/A (nothing to detect — unsafe state never existed)
Dwell time:          0
Enter fullscreen mode Exit fullscreen mode

Detection speed improves RESPONSE TIME. State constraints eliminate the NEED for response. The difference is categorical: one minimizes damage; the other prevents it.

The control-loop gap

This is a CONTROL-LOOP gap.

Attacker loop (continuous):
    Scan → Detect change → Exploit → Adapt → Scan
    Tight feedback loop: seconds

Defender loop (batch):
    Audit → Report → Approve → Fix
    Loose batch cycle: weeks to months
Enter fullscreen mode Exit fullscreen mode

Different clocks and outcomes. The attacker's loop runs continuously with tight feedback. The defender's loop runs in batches with loose coupling. The attacker completes dozens of loops while the defender completes one.

This is the same asymmetry Ashby's Law identifies: the attacker's variety (continuous probing, automated adaptation) exceeds the defender's variety (periodic checking, manual response). The defender cannot match the attacker's operational tempo with periodic tools regardless of the sophistication of those tools.

What continuous monitoring monitors

What happens between quarterly audits in an organization:

Day 1:   Audit passes. "All compliant." ✅
Day 3:   Config drift begins (console change during incident response)
Day 15:  Credential leaked in CI logs (not rotated — nobody noticed)
Day 30:  Permission escalated (legitimate request, no expiration set)
Day 45:  Attacker gains access using leaked credential
Day 60:  Data exfiltrated using escalated permissions  
Day 75:  Lateral movement to second account via trust chain
Day 89:  Still undetected — everything looks "normal" technically
Day 90:  Next audit. Finding: "credential rotation policy violated" ← 87 days too late
Enter fullscreen mode Exit fullscreen mode

87 days of attacker dwell time. The organization was compliant the entire time. The previous audit passed. The tools were running. The dashboards were green. The breach happened in the gap between what compliance CHECKS and what MATTERS.

Continuous monitoring with CSPM would have shortened it. Maybe detection at day 15 instead of day 90. But the unsafe state still EXISTED at day 3. The credential was still LEAKED at day 15. The permissions were still ESCALATED at day 30. Detection at any of these points is AFTER the unsafe state exists. The attacker's window is shorter but not zero.

The two models

TODAY: REACTIVE                          NEEDED: GOVERNING

Any state allowed until detected         Only declared states can exist
    ↓                                        ↓
Detect bad (after it exists)             Prevent bad (before it exists)
    ↓                                        ↓
Respond (recover from damage)            No breach window
    ↓                                    No recovery needed
Forensics (understand what happened)     No forensics

Time model: event-driven                 Time model: state-constrained
Outcome: minimize damage                 Outcome: prevent damage
Enter fullscreen mode Exit fullscreen mode

The reactive model accepts that unsafe states will exist and optimizes for detecting them quickly. The governing model prevents unsafe states from existing and eliminates the need for detection.

The reactive model will ALWAYS have a breach window. The time between the unsafe state existing and the detection firing. No matter how fast the detection, the window is non-zero. The attacker lives in that window.

The governing model has NO breach window for invariant-covered states. The unsafe state CANNOT EXIST because the constraint prevents it. There's nothing to detect because there's nothing to find. The dwell time is zero because the unsafe state was never reachable.

Observer vs controller

Property Observer (current tools) Controller (what's needed)
Action Watch, correlate, classify, alert Evaluate state, enforce constraint, block violation
Timing After unsafe state exists Before unsafe state can exist
Output Alert (requires human decision) Verdict (pipeline acts mechanically)
Authority Advisory (suggests action) Binding (blocks deployment)
Failure mode Missed alert → breach continues Missed invariant → gap in coverage (but no false sense of security)
Scaling More alerts → alert fatigue More invariants → broader coverage

Observers WATCH the system and NOTIFY humans. Controllers EVALUATE the system and ENFORCE constraints. The industry has spent fifteen years building better observers. The problem requires controllers.

Shift in defense

Defense must become:

Continuous — not periodic checks or event-driven responses. Evaluation at every deployment and periodically against live state.

State-based — evaluating the state of THE SYSTEM, not what events the system produced. State evaluation catches opaque drift that produces no events.

Invariant-driven — declaring what must ALWAYS hold, not what to look for. Invariants catch the class of failure. Detection rules catch the instance.

Enforced, not observed — producing verdicts that BLOCK unsafe transitions, not alerts that ADVISE humans. The pipeline acts on exit codes, not on dashboards.

Until defense makes this shift, the asymmetry persists. Attackers act continuously. Defenders verify periodically. Detection gets faster. Breaches continue. The illusion of continuous monitoring: "we see everything in real time, therefore we're safe" remains an illusion. Seeing everything is not the same as preventing anything.

You reduced detection time from 30 days to 30 seconds. The attacker needed 3 milliseconds. The gap didn't close. It changed from 30 days to 30 seconds. But the attacker only ever needed 3 milliseconds. The fix isn't faster detection. It's making the unsafe state unreachable in the first place.


Transition from monitoring to governing. CEL predicates evaluated against air-gapped snapshots before deployment. Unsafe states prevented, not detected. Dwell time: zero (nothing to detect because nothing unsafe exists). Standardized facts (JSONL, SMT-LIB) exported for external reasoning engines. Stave, an open-source risk reasoning engine. Not faster detection. State constraints. Try it: bash examples/demo-ai-security/run.sh

Top comments (0)