<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ynprgrmmr</title>
    <description>The latest articles on DEV Community by ynprgrmmr (@ynprgrmmr).</description>
    <link>https://dev.to/ynprgrmmr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271638%2Fec66368d-e35a-4dad-a2dd-bade3befb558.png</url>
      <title>DEV Community: ynprgrmmr</title>
      <link>https://dev.to/ynprgrmmr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ynprgrmmr"/>
    <language>en</language>
    <item>
      <title>Wazuh rules for three high-severity CVEs (Squid, NGINX, Apache httpd): what a log-replay lab can and cannot prove</title>
      <dc:creator>ynprgrmmr</dc:creator>
      <pubDate>Fri, 04 Dec 2026 03:02:32 +0000</pubDate>
      <link>https://dev.to/ynprgrmmr/wazuh-rules-for-three-high-severity-cves-squid-nginx-apache-httpd-what-a-log-replay-lab-can-3l60</link>
      <guid>https://dev.to/ynprgrmmr/wazuh-rules-for-three-high-severity-cves-squid-nginx-apache-httpd-what-a-log-replay-lab-can-3l60</guid>
      <description>&lt;p&gt;When a high-severity CVE lands in software you run, the first job is to patch. The second job, for the hours or&lt;br&gt;
days in between (and for the hosts you cannot reach quickly), is to &lt;em&gt;see&lt;/em&gt; whether anything is happening. This post is&lt;br&gt;
about that second job: custom Wazuh rules for three high-severity CVEs, and a small lab that verifies them by&lt;br&gt;
replaying logs, with every number measured and every limit stated.&lt;/p&gt;

&lt;p&gt;Everything here (rules, synthetic samples, corpus generators, lab scripts and results) is open in&lt;br&gt;
&lt;a href="https://github.com/ynprgrmmr/wazuh-cve-detection-lab" rel="noopener noreferrer"&gt;ynprgrmmr/wazuh-cve-detection-lab&lt;/a&gt; (code and rules MIT;&lt;br&gt;
samples, results and documents CC BY 4.0).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Patch first.&lt;/strong&gt; Detection rules let you notice attempts and their effects while you upgrade or apply the vendor's&lt;br&gt;
workaround. They do not fix anything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  The three CVEs
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CVE&lt;/th&gt;
&lt;th&gt;Product (affected)&lt;/th&gt;
&lt;th&gt;CVSS 3.1&lt;/th&gt;
&lt;th&gt;CISA KEV (checked 2026-12-04)&lt;/th&gt;
&lt;th&gt;Rules&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2023-46848&lt;/td&gt;
&lt;td&gt;Squid &amp;gt;= 5.0.3, &amp;lt; 6.4 (ftp:// URL handling; denial of service)&lt;/td&gt;
&lt;td&gt;7.5&lt;/td&gt;
&lt;td&gt;not listed&lt;/td&gt;
&lt;td&gt;100100-100104&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2026-123007&lt;/td&gt;
&lt;td&gt;NGINX Open Source 1.9.5 up to, not including, 1.30.7 and 1.31.0 up to, not including, 1.31.9; NGINX Plus per the F5 advisory; only with HTTP/2&lt;/td&gt;
&lt;td&gt;8.1&lt;/td&gt;
&lt;td&gt;not listed&lt;/td&gt;
&lt;td&gt;100500-100505&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2026-119618&lt;/td&gt;
&lt;td&gt;Apache HTTP Server 2.4.55-2.4.70 with mod_http2 active (h2/h2c, an MPM other than prefork)&lt;/td&gt;
&lt;td&gt;8.1&lt;/td&gt;
&lt;td&gt;not listed&lt;/td&gt;
&lt;td&gt;100600-100605&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;CVE-2023-46848 is not new; it is in the set because its EPSS score was high (0.30 on 2026-11-28) and unpatched&lt;br&gt;
proxies are still common. The two 2026 CVEs are HTTP/2 memory-safety flaws in the two most common web servers.&lt;/p&gt;
&lt;h2&gt;
  
  
  The design problem: the dangerous request is not in the logs
&lt;/h2&gt;

&lt;p&gt;For both HTTP/2 flaws the traffic that triggers the condition is &lt;strong&gt;not logged&lt;/strong&gt;. The request usually never&lt;br&gt;
completes, so it never reaches the access log, and its content would not make a useful signature anyway. A rule&lt;br&gt;
that waits for "the bad request" would wait forever.&lt;/p&gt;

&lt;p&gt;So the rules look at what &lt;em&gt;is&lt;/em&gt; written down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The effect:&lt;/strong&gt; a worker or child process ending on a fatal signal. NGINX writes &lt;code&gt;worker process N exited on
signal 11&lt;/code&gt; at the &lt;code&gt;alert&lt;/code&gt; level; httpd writes &lt;code&gt;AH00051&lt;/code&gt;/&lt;code&gt;AH00052 ... exit signal ...&lt;/code&gt; at &lt;code&gt;notice&lt;/code&gt;, which is logged
regardless of &lt;code&gt;LogLevel&lt;/code&gt;. The kernel adds a &lt;code&gt;segfault at ...&lt;/code&gt; line for the same process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The outcome:&lt;/strong&gt; a shell, interpreter or network tool started by the web server's own account. NGINX, and an
httpd without CGI, never do that themselves, so an auditd &lt;code&gt;execve&lt;/code&gt; rule on that account is a strong signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The combination:&lt;/strong&gt; the outcome within 5 minutes after a crash.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For NGINX this becomes six rules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Fires on&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;100500&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;worker exited on signal 4/6/7/8/11 (the standard rule 31300 leaves these &lt;code&gt;[alert]&lt;/code&gt; lines at level 0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100501&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;kernel &lt;code&gt;nginx[pid]: segfault at ...&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100502&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;3 or more 100500 within 120 s from the same log location&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100503&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;shell, interpreter or network tool started by the worker account (auditd key &lt;code&gt;nginx_exec&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100504&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;100503 within 5 min after 100500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100505&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;100503 within 5 min after 100501&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The httpd set (100600-100605) has the same shape. One difference matters: the standard Wazuh rule 30304 already&lt;br&gt;
alerts at level 12 on &lt;code&gt;exit signal Segmentation fault&lt;/code&gt;, but SIGABRT, SIGBUS, SIGILL and SIGFPE stay at level 0.&lt;br&gt;
100600 covers all five fatal signals and keeps level 12, so SIGSEGV crashes are not downgraded.&lt;/p&gt;

&lt;p&gt;Just as important is what the rules deliberately &lt;strong&gt;ignore&lt;/strong&gt;: &lt;code&gt;exited on signal 9&lt;/code&gt; (the out-of-memory killer),&lt;br&gt;
&lt;code&gt;exited with code 0&lt;/code&gt; (reloads), &lt;code&gt;exit signal Broken pipe (13)&lt;/code&gt; and &lt;code&gt;CPU time limit exceeded (24)&lt;/code&gt;. Normal servers&lt;br&gt;
produce these every day.&lt;/p&gt;

&lt;p&gt;The Squid rules (100100-100104) follow the same idea for a denial of service: ftp:// requests in &lt;code&gt;access.log&lt;/code&gt; as&lt;br&gt;
context (level 5), &lt;code&gt;assertion failed&lt;/code&gt; / &lt;code&gt;FATAL:&lt;/code&gt; and abnormal worker exits in &lt;code&gt;cache.log&lt;/code&gt;, a failure within 60 s&lt;br&gt;
after FTP activity, and three internal errors within 10 minutes.&lt;/p&gt;
&lt;h2&gt;
  
  
  The lab: Level 1, log replay in a box without a network
&lt;/h2&gt;

&lt;p&gt;Each CVE has a &lt;code&gt;run_level1.sh&lt;/code&gt; that uses shared steps in &lt;code&gt;tools/lab/&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate the synthetic corpora with a fixed seed (deterministic, 20,000 events each).&lt;/li&gt;
&lt;li&gt;Start &lt;code&gt;wazuh/wazuh-manager:4.14.10&lt;/code&gt; with &lt;code&gt;--network none&lt;/code&gt; and &lt;code&gt;--pull never&lt;/code&gt;, then run an &lt;strong&gt;egress probe&lt;/strong&gt;
(DNS and TCP to a public address). If anything gets out, the run aborts.&lt;/li&gt;
&lt;li&gt;Load the rule file, check it with &lt;code&gt;wazuh-analysisd -t&lt;/code&gt;, and replay through &lt;code&gt;wazuh-logtest&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;positive samples&lt;/strong&gt;: synthetic lines, each with the rule it must fire;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;negative controls&lt;/strong&gt;: lines that must &lt;em&gt;not&lt;/em&gt; fire the new rules;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;timed boundary tests&lt;/strong&gt;: event pairs just inside and just outside each correlation window, replayed in
real time;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;normal corpora&lt;/strong&gt;: 20,000 events of ordinary server life, with restarts, reloads, out-of-memory kills, benign
warnings and segfaults of &lt;em&gt;other&lt;/em&gt; programs mixed in.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Write &lt;code&gt;results/level1.json&lt;/code&gt;, &lt;code&gt;test-report.json&lt;/code&gt; and a readable &lt;code&gt;summary.md&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fast replay compresses hours of logs into seconds, and Wazuh correlates on analysis time. That makes fast replay a&lt;br&gt;
worst case for false positives of the correlation rules, but it says nothing about their timing. For NGINX and httpd&lt;br&gt;
the crash events of the crash corpus are therefore also replayed with their real gaps (gaps over 300 s capped at&lt;br&gt;
302 s), which takes about 15 minutes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Results (measured)
&lt;/h2&gt;

&lt;p&gt;Wazuh manager 4.14.10 (arm64 image), all runs with status &lt;strong&gt;passed&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CVE (run)&lt;/th&gt;
&lt;th&gt;Positive samples&lt;/th&gt;
&lt;th&gt;Negative controls&lt;/th&gt;
&lt;th&gt;Timed boundary tests&lt;/th&gt;
&lt;th&gt;Normal corpus, 20,000 events&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2023-46848 (&lt;code&gt;20261129T064454Z&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;14 of 14&lt;/td&gt;
&lt;td&gt;6 of 6&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;0 alerts from 100100-100104&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2026-123007 (&lt;code&gt;20261203T045816Z&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;35 of 35&lt;/td&gt;
&lt;td&gt;9 of 9&lt;/td&gt;
&lt;td&gt;6 of 6&lt;/td&gt;
&lt;td&gt;0 alerts from 100500-100505&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CVE-2026-119618 (&lt;code&gt;20261203T041604Z&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;35 of 35&lt;/td&gt;
&lt;td&gt;12 of 12&lt;/td&gt;
&lt;td&gt;6 of 6&lt;/td&gt;
&lt;td&gt;0 alerts from 100600-100605&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Across the three CVEs, 84 of 84 synthetic positive samples fired their expected rule.&lt;/p&gt;

&lt;p&gt;A second corpus per CVE checks what legitimate activity looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Squid, 201 legitimate ftp:// requests:&lt;/strong&gt; 100100 fired 201 times, by design (it is context, level 5);
100101-100104 fired 0 times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NGINX and httpd, 4 legitimate crashes each (3 with a kernel line):&lt;/strong&gt; in the timed replay every crash raised the
crash rule (4 of 4), the kernel rule fired for the 3 kernel lines, and the burst and crash-then-execution rules
(100502/100504/100505 and 100602/100604/100605) fired 0 times. In fast replay one of the four crashes is reported
as a burst instead, which is the time-compression effect described above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;httpd, standard rule 30304:&lt;/strong&gt; 0 on both corpora; with these rules loaded, SIGSEGV crashes are reported by 100600.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The raw results (&lt;code&gt;level1.json&lt;/code&gt;, &lt;code&gt;test-report.json&lt;/code&gt;) are in each CVE's &lt;code&gt;results/&lt;/code&gt; directory. Failed runs are kept:&lt;br&gt;
for NGINX, &lt;code&gt;metadata.json&lt;/code&gt; records two earlier runs, one of which failed the first definition of a pass criterion.&lt;/p&gt;
&lt;h2&gt;
  
  
  Verification boundary: what this does and does not prove
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Level 1 proves&lt;/strong&gt; that the rules load on Wazuh 4.14.10, that they match the log formats they were written for, that&lt;br&gt;
the correlation windows open and close where intended, and that these particular normal corpora produce no&lt;br&gt;
alerts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 1 does not prove&lt;/strong&gt; that a real attack is detected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No real software was run.&lt;/strong&gt; Levels 2-3 (a vulnerable instance, and real attack traffic) were not run. The
Squid flaw is a denial of service, and for the two HTTP/2 flaws the only harmless-looking trigger is a crash
while a successful attempt is a real compromise. Neither belongs in this lab.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All logs are synthetic.&lt;/strong&gt; They follow the real log formats, but the exact Squid &lt;code&gt;cache.log&lt;/code&gt; text of this
failure is unconfirmed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"0 false positives" holds for these corpora only.&lt;/strong&gt; Known sources of false positives are listed per CVE:
crashes from unrelated causes (third-party modules, njs/Lua code, other bugs) fire the crash rules; CGI scripts,
and PHP-FPM or NGINX sharing the web server account, fire the execution rules; legitimate FTP fires 100100.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A successful attempt without a preceding crash&lt;/strong&gt; is only visible through the execution rules, which need the
auditd rule for the web server account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version numbers alone do not show exposure:&lt;/strong&gt; only HTTP/2 configurations are affected by the two 2026 CVEs, and
distributions backport fixes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you use these rules, read the known limitations in each CVE's &lt;code&gt;metadata.json&lt;/code&gt; first, and treat an alert as a&lt;br&gt;
reason to look, not as proof.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Clone &lt;a href="https://github.com/ynprgrmmr/wazuh-cve-detection-lab" rel="noopener noreferrer"&gt;ynprgrmmr/wazuh-cve-detection-lab&lt;/a&gt;, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cves/CVE-2026-123007/public/lab/run_level1.sh   &lt;span class="c"&gt;# needs Docker and the wazuh/wazuh-manager:4.14.10 image&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule XML files in &lt;code&gt;cves/&amp;lt;CVE&amp;gt;/public/rules/&lt;/code&gt; can be installed as custom rules on a Wazuh manager. They build on&lt;br&gt;
Wazuh's standard decoders and rules, which are not included. For the execution rules, add the auditd rule from the&lt;br&gt;
CVE's README for your worker or httpd account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optional: the ready-to-deploy version
&lt;/h2&gt;

&lt;p&gt;Everything above is free, and you can reproduce every number from the public repository. If you would rather not&lt;br&gt;
assemble the deployment yourself, I also packaged the three CVEs as &lt;strong&gt;&lt;a href="https://buy.polar.sh/polar_cl_Aif2iQsFDO0d48ThrLHwQTp9HSiXXv5psqaaK2sI1oD" rel="noopener noreferrer"&gt;Monthly Verification Digest — December&lt;br&gt;
2026&lt;/a&gt;&lt;/strong&gt; (39 USD on Polar.sh). Per CVE it&lt;br&gt;
adds Wazuh agent and manager configuration, tuned rule editions, exposure check scripts, mitigation helpers and an&lt;br&gt;
incident response runbook. It is verified to the same Level 1 boundary described above, no further.&lt;/p&gt;

&lt;p&gt;The packages are licensed for use on your own (or your organization's) systems and sold as is, without individual&lt;br&gt;
support. All sales are final: due to the digital nature of the product, no refunds or returns are offered after&lt;br&gt;
purchase. Clear defects may be addressed with a revised release; reports go to &lt;a href="mailto:support@ynprgrmmr.online"&gt;support@ynprgrmmr.online&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Nothing in this post depends on it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>wazuh</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
    <item>
      <title>Blocking is the easy part: bursts, release races and re-detection in an open-source SOAR pipeline (Wazuh, Shuffle, MikroTik CHR on OCI)</title>
      <dc:creator>ynprgrmmr</dc:creator>
      <pubDate>Sun, 29 Nov 2026 04:03:52 +0000</pubDate>
      <link>https://dev.to/ynprgrmmr/blocking-is-the-easy-part-bursts-release-races-and-re-detection-in-an-open-source-soar-pipeline-5gm1</link>
      <guid>https://dev.to/ynprgrmmr/blocking-is-the-easy-part-bursts-release-races-and-re-detection-in-an-open-source-soar-pipeline-5gm1</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/ynprgrmmr/how-fast-can-open-source-soar-block-an-attacker-measuring-wazuh-shuffle-mikrotik-end-to-end-on-5elb"&gt;part 1&lt;/a&gt; I measured how long an open-source SOAR stack takes to stop&lt;br&gt;
an attacker: a median of &lt;strong&gt;5.30 s&lt;/strong&gt; from an SSH brute-force event to dropped packets through Wazuh → Shuffle → MikroTik CHR,&lt;br&gt;
and &lt;strong&gt;1.66 s&lt;/strong&gt; when Wazuh's Active Response calls the router directly.&lt;/p&gt;

&lt;p&gt;That number answers "how fast is the first block". It says nothing about what a blocking pipeline has to do &lt;em&gt;afterwards&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;release the block when its TTL expires — on time, without leaving entries behind&lt;/li&gt;
&lt;li&gt;survive a burst of alerts when nothing deduplicates them&lt;/li&gt;
&lt;li&gt;decide what to do when the same attacker is detected again — while blocked, while the block is being removed, or right
after it was removed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This post covers three experiments on exactly that (B1–B3, 87 measured trials). It is not a product comparison. The question&lt;br&gt;
is: &lt;strong&gt;in this architecture and this processing path, where is the bottleneck, and which control changes what?&lt;/strong&gt; Every number&lt;br&gt;
below comes from the lab; the one formula that explains most of them is a plain queueing estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lab
&lt;/h2&gt;

&lt;p&gt;Same lab as part 1, on Oracle Cloud Infrastructure Always Free:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Version / size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Wazuh manager / indexer / dashboard&lt;/td&gt;
&lt;td&gt;4.14.10, on one A1.Flex VM (3 OCPU / 18 GB) together with Shuffle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shuffle&lt;/td&gt;
&lt;td&gt;2.3.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MikroTik CHR&lt;/td&gt;
&lt;td&gt;7.25.1 arm64 (A1.Flex 1 OCPU / 6 GB), address list + &lt;code&gt;raw/prerouting&lt;/code&gt; drop, REST API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attacker / protected workload&lt;/td&gt;
&lt;td&gt;E2.1.Micro VMs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two response paths were measured side by side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;P-AR&lt;/strong&gt;: Wazuh rule → Active Response script → CHR&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;P-SH&lt;/strong&gt;: Wazuh rule → integration (&lt;code&gt;integratord&lt;/code&gt;) → Shuffle workflow (one Python action) → CHR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both call the same small blocking service (&lt;code&gt;blocklife&lt;/code&gt;): a SQLite state store with one row per &lt;em&gt;lifecycle&lt;/em&gt;&lt;br&gt;
(&lt;code&gt;PENDING → ACTIVE → RELEASING → RELEASED&lt;/code&gt;), compare-and-set transitions, and a separate &lt;strong&gt;reaper&lt;/strong&gt; that is the only component&lt;br&gt;
allowed to remove entries. The router entry itself only carries a backstop timeout (TTL + 600 s), so a crashed reaper cannot&lt;br&gt;
leave an attacker blocked forever — and if the backstop ever fires, it shows up in the data.&lt;/p&gt;

&lt;p&gt;Measurement: all VMs NTP-synced (offset &amp;lt; 51 µs), UDP probes every 10 ms to see when traffic actually stops and resumes, and&lt;br&gt;
"canary" detections every 5 ± 1 s from unique documentation addresses to measure block latency &lt;em&gt;during&lt;/em&gt; a burst. Bursts use&lt;br&gt;
synthetic sshd log lines from the RFC 2544 benchmarking range (198.18.0.0/15), written to the protected VM's syslog — the same&lt;br&gt;
path real events take, but no traffic to anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  B1 — one block, one release (n = 30)
&lt;/h2&gt;

&lt;p&gt;The baseline lifecycle on P-AR with a 30 s TTL:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;p50&lt;/th&gt;
&lt;th&gt;p95&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Attack → traffic stops&lt;/td&gt;
&lt;td&gt;1.43 s&lt;/td&gt;
&lt;td&gt;2.52 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Block actually held&lt;/td&gt;
&lt;td&gt;29.897 s (TTL − 103 ms, stdev 2.6 ms)&lt;/td&gt;
&lt;td&gt;29.900 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Release starts → traffic resumes&lt;/td&gt;
&lt;td&gt;128 ms&lt;/td&gt;
&lt;td&gt;375 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reaper lag behind the scheduled expiry&lt;/td&gt;
&lt;td&gt;0.2 ms&lt;/td&gt;
&lt;td&gt;0.3 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;30 of 30 lifecycles completed. Two details worth knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From the router's API response to packets actually stopping took &lt;strong&gt;~100 ms, in both directions&lt;/strong&gt; (103.5 ms to block,
104.2 ms to unblock, ±5 ms). The block is held ~103 ms &lt;em&gt;less&lt;/em&gt; than the TTL because the expiry is counted from the API
response, not from the moment the data plane applied it.&lt;/li&gt;
&lt;li&gt;The first two trials after a VM start had slow SQLite writes (up to 1.2 s). A warm-up and &lt;code&gt;synchronous=NORMAL&lt;/code&gt; (safe in WAL
mode) removed that for the later experiments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  B2 — bursts without deduplication
&lt;/h2&gt;

&lt;p&gt;Next I removed every safety net: a &lt;em&gt;naive&lt;/em&gt; pipeline that sends one router add per alert, as a simple playbook would.&lt;br&gt;
Duplicate adds for an address already on the list are refused by RouterOS (HTTP 400) — I count those as conflicts.&lt;/p&gt;

&lt;p&gt;Bursts, 60 s each: &lt;strong&gt;G2-low&lt;/strong&gt; 10 lines/s, &lt;strong&gt;G2-high&lt;/strong&gt; 50 lines/s, &lt;strong&gt;G2-sat&lt;/strong&gt; 200 lines/s (3 lines per synthetic source), and&lt;br&gt;
&lt;strong&gt;G1&lt;/strong&gt;: real SSH logins from the attacker VM at 20/s.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2i5oojpce3blk41l0o05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2i5oojpce3blk41l0o05.png" alt="Canary latency during and after a burst" width="798" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Burst&lt;/th&gt;
&lt;th&gt;P-AR worst canary&lt;/th&gt;
&lt;th&gt;P-AR queue recovery&lt;/th&gt;
&lt;th&gt;P-SH worst canary&lt;/th&gt;
&lt;th&gt;P-SH queue recovery&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;L0 (no burst, p50 / p95)&lt;/td&gt;
&lt;td&gt;1.19 / 2.05 s&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;11.3 / 18.2 s&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G2-low (10/s, 600 lines)&lt;/td&gt;
&lt;td&gt;3.7 s&lt;/td&gt;
&lt;td&gt;3.7 s&lt;/td&gt;
&lt;td&gt;415 s&lt;/td&gt;
&lt;td&gt;416 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G2-high (50/s, 3,000 lines)&lt;/td&gt;
&lt;td&gt;246 s&lt;/td&gt;
&lt;td&gt;247 s&lt;/td&gt;
&lt;td&gt;2,224 s&lt;/td&gt;
&lt;td&gt;2,225 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G2-sat (200/s, 12,000 lines)&lt;/td&gt;
&lt;td&gt;1,186 s&lt;/td&gt;
&lt;td&gt;1,188 s&lt;/td&gt;
&lt;td&gt;not run&lt;/td&gt;
&lt;td&gt;≈ 8,960 s (projected)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The bottleneck is one serial process in each path
&lt;/h3&gt;

&lt;p&gt;Nothing in this table is limited by CPU, memory or the router:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;P-AR&lt;/strong&gt;: &lt;code&gt;wazuh-execd&lt;/code&gt; runs Active Responses &lt;strong&gt;one at a time&lt;/strong&gt; — never more than one concurrently in any trial. Each run
takes ~63 ms of real work; with process start-up the path sustains &lt;strong&gt;~9.7 runs/s&lt;/strong&gt;, constant across loads. Upstream,
analysisd dropped 0 events and its queue stayed at 0 %.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;P-SH&lt;/strong&gt;: &lt;code&gt;wazuh-integratord&lt;/code&gt; hands alerts to Shuffle &lt;strong&gt;one at a time&lt;/strong&gt;, ~0.75 s each (a Python integration script per alert):
&lt;strong&gt;~1.33 runs/s&lt;/strong&gt;. The queue builds up &lt;em&gt;before&lt;/em&gt; Shuffle; Shuffle itself takes 3–15 s per execution but runs them in parallel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With a burst of rate λ for 60 s and a serial stage of capacity μ, the last line is processed after roughly&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;recovery ≈ (λ − μ) × 60 s ÷ μ&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Predicted&lt;/th&gt;
&lt;th&gt;Measured&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;P-AR G2-low / G2-high / G2-sat&lt;/td&gt;
&lt;td&gt;2 s / 250 s / 1,180 s&lt;/td&gt;
&lt;td&gt;3.7 s / 247 s / 1,188 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P-SH G2-low / G2-high / G2-sat&lt;/td&gt;
&lt;td&gt;391 s / 2,196 s / 8,960 s&lt;/td&gt;
&lt;td&gt;416 s / 2,225 s / not run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That is why P-SH G2-sat was not run: the formula predicted 2.5 hours of backlog for a one-minute burst.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F614n641fns7fuoyo9cvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F614n641fns7fuoyo9cvg.png" alt="Recovery time per trial" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  "CPU is back to normal" is not "recovered"
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftk20uv9it76u2xnfqgyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftk20uv9it76u2xnfqgyv.png" alt="SOAR VM resources" width="799" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On P-AR the SOAR VM never exceeded 64 % CPU in G2-high, and after G2-sat the CPU was back to baseline in &lt;strong&gt;94 s&lt;/strong&gt; — while&lt;br&gt;
block latency stayed elevated for &lt;strong&gt;about 20 minutes&lt;/strong&gt;. A serial queue drains at a fixed rate with almost no CPU. On P-SH it is&lt;br&gt;
the other way round: Shuffle's containers keep the CPU busy for the whole backlog, so CPU and queue recover together&lt;br&gt;
(2,270 s vs 2,225 s). Watching resource graphs alone gets one of the two pipelines badly wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrity: parallel + naive = unmanaged blocks
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F20jk7v0o25b78mzus9vr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F20jk7v0o25b78mzus9vr.png" alt="Router outcomes of repeated block requests" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On P-AR, conflicts matched &lt;em&gt;lines − sources&lt;/em&gt; exactly (400 / 2,000 / 8,000), and nothing else went wrong: the serial executor&lt;br&gt;
never ran two adds at once.&lt;/p&gt;

&lt;p&gt;On P-SH, Shuffle runs executions in parallel. Sometimes the &lt;em&gt;duplicate&lt;/em&gt; add for an address reached the router before the&lt;br&gt;
original one. RouterOS accepted it, the original then failed with 400, and the result was an entry &lt;strong&gt;no lifecycle owns&lt;/strong&gt; — it&lt;br&gt;
only carries the 600 s backstop, so the address stays blocked &lt;strong&gt;~20× longer than the TTL&lt;/strong&gt; and the reaper never releases it.&lt;br&gt;
That happened &lt;strong&gt;15 times&lt;/strong&gt; in the G2 bursts; 5 entries were still on the router after the backlog drained, and 4 of 14 P-SH&lt;br&gt;
trials failed the integrity check (P-AR: 17/17 passed).&lt;/p&gt;

&lt;h3&gt;
  
  
  Two more effects
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;G1 throttles itself.&lt;/strong&gt; Real SSH at 20/s produced only 3–8 alerts per trial on P-AR: the first block cuts the attacker off,
and before that sshd's &lt;code&gt;MaxStartups 10:30:100&lt;/code&gt; drops most connections. On P-SH (blocking takes 10+ s) the same attack
produced 29–51 alerts — slower blocking means more duplicates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-detection after release.&lt;/strong&gt; Connections caught by the block were retransmitted after the TTL expired, re-detected tens
of seconds later and blocked again: block → release → block flapping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;B2 left four problems: &lt;strong&gt;P1&lt;/strong&gt; duplicate races that create unmanaged entries, &lt;strong&gt;P2&lt;/strong&gt; re-detection after release, &lt;strong&gt;P3&lt;/strong&gt; a&lt;br&gt;
detection arriving &lt;em&gt;while&lt;/em&gt; the entry is being removed (not observed yet, but possible), and &lt;strong&gt;P4&lt;/strong&gt; stale alerts processed&lt;br&gt;
minutes late.&lt;/p&gt;

&lt;h2&gt;
  
  
  B3 — controls for those problems
&lt;/h2&gt;

&lt;p&gt;Six controls, all in the blocking service, all off by default so B1/B2 behaviour stays reproducible:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;Targets&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;C1&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Dedup at the state store&lt;/strong&gt;: while an address has an open lifecycle, further detections never call the router (a unique index makes this hold under concurrency)&lt;/td&gt;
&lt;td&gt;P1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C2&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Adopt on conflict&lt;/strong&gt;: if the router answers 400 for a new lifecycle, look the entry up and take it over instead of failing&lt;/td&gt;
&lt;td&gt;P1 cascade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C3&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Reconciliation&lt;/strong&gt; every 30 s: router entries vs. state store; adopt untracked lab entries&lt;/td&gt;
&lt;td&gt;P1 leftovers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C4&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Escalating TTL&lt;/strong&gt; (×2 per release within 10 min, cap 600 s) and &lt;strong&gt;extension while blocked&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;P2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C5&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Release-race control&lt;/strong&gt;: a detection before the DELETE cancels the release; one during the DELETE triggers an immediate re-block&lt;/td&gt;
&lt;td&gt;P3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C6&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Alert age&lt;/strong&gt; recorded (alert time → processing), measured only&lt;/td&gt;
&lt;td&gt;P4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three targeted scenarios, each compared against the B1/B2 behaviour. Every B3 trial started from an empty state store.&lt;/p&gt;

&lt;h3&gt;
  
  
  R1 — duplicate bursts (P-SH)
&lt;/h3&gt;

&lt;p&gt;Ten lines per source within one second, 30 sources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Friygcyvxlxlfhlf3agk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Friygcyvxlxlfhlf3agk0.png" alt="Duplicate race" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Router adds per source&lt;/th&gt;
&lt;th&gt;Conflicts per trial&lt;/th&gt;
&lt;th&gt;Untracked&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;naive&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;270&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dedup&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Dedup turned the duplicates into extensions of the active block. Honest note: in these 900 lines the naive race did &lt;strong&gt;not&lt;/strong&gt;&lt;br&gt;
occur — integratord spaces same-source alerts ~0.75 s apart, so they rarely reach the router together. In B2 the 15 races came from&lt;br&gt;
12,000 burst lines. Dedup removes the race structurally (exactly one router add per source); that property is&lt;br&gt;
verified on the lab (3 trials) and by deterministic and randomized concurrency tests offline. The adopt and reconcile paths had&lt;br&gt;
nothing to do on the lab and are verified offline only. Queue clearance did not change (≈ 190 s either way): dedup fixes load&lt;br&gt;
and integrity, not latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  R2 — a persistent attacker
&lt;/h3&gt;

&lt;p&gt;Real SSH from the attacker VM at 2/s for 300 s, with a probe timeline recording when the attacker could actually reach the&lt;br&gt;
target:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft51u2iumqsuives5a7s8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft51u2iumqsuives5a7s8.png" alt="Block / release cycles" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pipeline / policy&lt;/th&gt;
&lt;th&gt;Attacker could reach the target&lt;/th&gt;
&lt;th&gt;Blocks&lt;/th&gt;
&lt;th&gt;TTL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;P-AR, fixed TTL&lt;/td&gt;
&lt;td&gt;4.5–4.8 % of the attack&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;30 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P-AR, escalating + extend&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.2–1.6 %&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;30 → 60 → 120 → 240 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P-SH, fixed TTL&lt;/td&gt;
&lt;td&gt;23–27 %&lt;/td&gt;
&lt;td&gt;7–8&lt;/td&gt;
&lt;td&gt;30 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P-SH, escalating + extend&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;9–14 %&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;30 → 60 → 120 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each release gives the attacker a window until it is re-detected and re-blocked (≈ 2 s on P-AR, 10+ s on P-SH). Fewer releases&lt;br&gt;
means fewer windows — the effect is largest on the slow pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  R3 — a detection racing with the release (P-AR)
&lt;/h3&gt;

&lt;p&gt;A second detection aimed at the TTL expiry (±2 s), 50 sources × 3 trials per policy. The removal itself (the DELETE round&lt;br&gt;
trip) takes about 20 ms, so only 5 of 300 detections landed exactly inside it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9iqxi18tqpd00jd8vpko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9iqxi18tqpd00jd8vpko.png" alt="Release race" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Arrived while blocked&lt;/th&gt;
&lt;th&gt;After release&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;During the release&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;count-only (B1/B2 behaviour)&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;td&gt;117&lt;/td&gt;
&lt;td&gt;2 → &lt;strong&gt;both lost&lt;/strong&gt; — the attacker stayed unblocked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dedup&lt;/td&gt;
&lt;td&gt;30 (extended)&lt;/td&gt;
&lt;td&gt;117&lt;/td&gt;
&lt;td&gt;3 → &lt;strong&gt;all re-blocked within 17.8–18.2 ms&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A detection that arrives after the release is re-blocked once it is processed (median 1.9 s later here) under either policy. The&lt;br&gt;
case the control is for — a detection that would otherwise be silently dropped — went from 2 lost to 0. The "cancel before the&lt;br&gt;
DELETE" path never triggered on the lab (its window is a few ms) and is covered by offline tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nothing got slower
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Baseline (L0) p50 / p95&lt;/th&gt;
&lt;th&gt;B2 (no controls)&lt;/th&gt;
&lt;th&gt;B3 (dedup)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;P-AR&lt;/td&gt;
&lt;td&gt;1.19 / 2.05 s&lt;/td&gt;
&lt;td&gt;1.16 / 1.87 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P-SH&lt;/td&gt;
&lt;td&gt;11.3 / 18.2 s&lt;/td&gt;
&lt;td&gt;11.5 / 19.2 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All 26 B3 trials passed the integrity check (no open lifecycle after the trial, no router leftovers, no unmanaged entries).&lt;br&gt;
Alert age, measured only: ~72 ms on P-AR, but on P-SH already 11 s at the median without any burst and up to ~3 minutes behind&lt;br&gt;
an R1 backlog — stale evidence is the next thing to deal with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find the serial stage.&lt;/strong&gt; Both paths were limited by one single-threaded Wazuh daemon (execd for Active Response,
integratord for integrations), not by CPU, memory or the router. Measure its rate μ once and
&lt;code&gt;(λ − μ) × burst ÷ μ&lt;/code&gt; tells you how long a burst of rate λ will hurt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't read recovery off a CPU graph.&lt;/strong&gt; A serial queue drains at low CPU; measure latency with canaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deduplicate where the state lives&lt;/strong&gt;, not in the playbook. Without it, parallel execution turns duplicate alerts into router
entries nobody manages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make re-detection a first-class case.&lt;/strong&gt; Escalating TTLs and extension while blocked cut a persistent attacker's exposure to
about 1/2–1/4; handling the release race keeps a detection from being dropped in a 20 ms window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep release separate from blocking.&lt;/strong&gt; A reaper with a state store releases on time (0.2 ms lag) and makes every one of
these behaviours measurable.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One lab, one set of versions, small numbers of trials per condition (3–5; L0 and P-AR G2-sat once). P-SH G2-sat was not run;
its value is a projection from the measured capacity.&lt;/li&gt;
&lt;li&gt;The three P-AR R2 runs with escalation were repeated from an empty state store after the first runs inherited the attacker's
escalation history from the preceding trial; the first runs are kept separately and not used.&lt;/li&gt;
&lt;li&gt;R1 did not reproduce the naive race on the lab; the B2 race figures come from the larger G2 bursts.&lt;/li&gt;
&lt;li&gt;P-SH's baseline (11.3 s) is about twice part 1's Shuffle baseline (5.3 s). The extra time is inside Shuffle; the cause was not
isolated.&lt;/li&gt;
&lt;li&gt;OS security updates (krb5, libexpat, python3-jwt and others) were applied between test days; Wazuh and Shuffle versions did not
change.&lt;/li&gt;
&lt;li&gt;Shuffle 2.3.0's execution listing returned at most 200 entries and no cursor; executions were sampled every 2 s instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;

&lt;p&gt;Everything is open in &lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency" rel="noopener noreferrer"&gt;ynprgrmmr/oss-soar-e2e-latency&lt;/a&gt; (code MIT, data and write-ups CC BY 4.0):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency/tree/main/experiments/02-block-lifecycle" rel="noopener noreferrer"&gt;&lt;code&gt;experiments/02-block-lifecycle&lt;/code&gt;&lt;/a&gt; — designs, trial orchestration, samplers, raw data of every trial
(including rehearsals and the superseded runs) and the result write-ups with all figures&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency/tree/main/infra/02-block-lifecycle" rel="noopener noreferrer"&gt;&lt;code&gt;infra/02-block-lifecycle&lt;/code&gt;&lt;/a&gt; — the blocking service (state store, reaper, policies, reconciliation, API for Shuffle)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency/blob/main/experiments/02-block-lifecycle/results/B3-P-SH.md" rel="noopener noreferrer"&gt;B3 results and comparison&lt;/a&gt; — the numbers behind the B3 section of this post&lt;/li&gt;
&lt;li&gt;the lab's Terraform and part 1's measurement code are in the same repository; the offline tests run with
&lt;code&gt;python3 -m unittest discover -s tests/b1&lt;/code&gt; (and &lt;code&gt;b2&lt;/code&gt;, &lt;code&gt;b3&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All bursts were synthetic log lines from non-routable ranges or SSH logins against a VM I own. Only point these tools at systems&lt;br&gt;
you are authorized to test.&lt;/p&gt;




&lt;h3&gt;
  
  
  Want to run this setup without building it from scratch?
&lt;/h3&gt;

&lt;p&gt;The code, measurement scripts and raw data behind this post are free and open in&lt;br&gt;
&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency" rel="noopener noreferrer"&gt;ynprgrmmr/oss-soar-e2e-latency&lt;/a&gt; (code MIT, data CC BY 4.0).&lt;/p&gt;

&lt;p&gt;If you would rather skip the assembly, I also packaged a turnkey version:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://buy.polar.sh/polar_cl_C3ZRDnWa40mKHDSjUpn2WszNtHRLFRabBDee80SzjBO" rel="noopener noreferrer"&gt;Wazuh × Shuffle × MikroTik CHR SOAR Starter Kit on OCI (v1.0.0)&lt;/a&gt;&lt;/strong&gt; — $29.&lt;br&gt;
It contains OCI Terraform modules, an allowlist-aware CHR blocking connector, the Wazuh and Shuffle configuration,&lt;br&gt;
and step-by-step deployment, validation and cleanup guides. It is optional; nothing in this post depends on it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>opensource</category>
      <category>networking</category>
    </item>
    <item>
      <title>How fast can open-source SOAR block an attacker? Measuring Wazuh Shuffle MikroTik end to end on OCI</title>
      <dc:creator>ynprgrmmr</dc:creator>
      <pubDate>Sun, 29 Nov 2026 03:39:57 +0000</pubDate>
      <link>https://dev.to/ynprgrmmr/how-fast-can-open-source-soar-block-an-attacker-measuring-wazuh-shuffle-mikrotik-end-to-end-on-5elb</link>
      <guid>https://dev.to/ynprgrmmr/how-fast-can-open-source-soar-block-an-attacker-measuring-wazuh-shuffle-mikrotik-end-to-end-on-5elb</guid>
      <description>&lt;p&gt;"Automated response" sounds instant. But when a SIEM detects an attack and a SOAR playbook tells a router to&lt;br&gt;
block the source, how long does it take until the attacker's packets &lt;strong&gt;actually stop&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;I measured it for a fully open-source stack on Oracle Cloud Infrastructure (OCI) Always Free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wazuh 4.14.10&lt;/strong&gt; detects an SSH brute-force attempt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shuffle 2.3.0&lt;/strong&gt; (SOAR) receives the alert and runs a one-action workflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MikroTik CHR 7.25.1&lt;/strong&gt; (a router controlled through its REST API) adds the source IP to an address list that is
dropped in &lt;code&gt;raw/prerouting&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result: 30 out of 30 attacks were blocked, with a median of 5.30 s from the attack event to the last packet that got&lt;br&gt;
through (p95 7.75 s).&lt;/strong&gt; The more interesting finding is &lt;em&gt;where&lt;/em&gt; those five seconds go.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lab
&lt;/h2&gt;

&lt;p&gt;Four VMs in one VCN, all within the Always Free allowance:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;VM&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CHR (A1.Flex, 1 OCPU / 6 GB, arm64)&lt;/td&gt;
&lt;td&gt;Router between the internet-facing subnet and the protected subnet; enforcement point&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SOAR (A1.Flex, 3 OCPU / 18 GB)&lt;/td&gt;
&lt;td&gt;Wazuh manager / indexer / dashboard and Shuffle on the same VM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Target (E2.1.Micro)&lt;/td&gt;
&lt;td&gt;Protected workload with the Wazuh agent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attacker (E2.1.Micro)&lt;/td&gt;
&lt;td&gt;Generates the SSH failures and probes connectivity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All traffic to the protected subnet is routed through the CHR (source/destination checks disabled on its VNICs).&lt;br&gt;
Blocking is a single REST call that adds the IP to the &lt;code&gt;soar-blocklist&lt;/code&gt; address list; a &lt;code&gt;raw/prerouting&lt;/code&gt; rule drops&lt;br&gt;
everything from that list, including established connections.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "end to end" means here
&lt;/h2&gt;

&lt;p&gt;Each trial records four timestamps, with all VMs synchronized to OCI's NTP (offset below 35 µs):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;T0&lt;/strong&gt; — the attacker triggers the SSH failures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T1&lt;/strong&gt; — Wazuh raises the alert&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T2&lt;/strong&gt; — the Shuffle action starts and calls the CHR API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T3&lt;/strong&gt; — the last probe packet from the attacker that still gets through (probes every 10 ms)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gives four segments: &lt;code&gt;D_detect&lt;/code&gt; (T0→T1), &lt;code&gt;D_dispatch&lt;/code&gt; (T1→T2), &lt;code&gt;D_api&lt;/code&gt; (the REST call) and &lt;code&gt;D_enforce&lt;/code&gt;&lt;br&gt;
(API response → packets stop). &lt;code&gt;D_e2e&lt;/code&gt; is T0→T3.&lt;/p&gt;

&lt;h2&gt;
  
  
  Baseline result (n = 30)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Segment&lt;/th&gt;
&lt;th&gt;p50&lt;/th&gt;
&lt;th&gt;p95&lt;/th&gt;
&lt;th&gt;Share of E2E&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;D_detect (attack → Wazuh alert)&lt;/td&gt;
&lt;td&gt;0.93 s&lt;/td&gt;
&lt;td&gt;2.26 s&lt;/td&gt;
&lt;td&gt;22%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;D_dispatch (Wazuh → Shuffle action starts)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.81 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5.16 s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;75%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D_api (CHR REST call)&lt;/td&gt;
&lt;td&gt;0.02 s&lt;/td&gt;
&lt;td&gt;0.28 s&lt;/td&gt;
&lt;td&gt;1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D_enforce (API response → packets stop)&lt;/td&gt;
&lt;td&gt;0.10 s&lt;/td&gt;
&lt;td&gt;0.11 s&lt;/td&gt;
&lt;td&gt;2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;D_e2e&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.30 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;7.75 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every trial was blocked, the CHR answered HTTP 201 every time, and there were no missing timestamps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The router is not the bottleneck.&lt;/strong&gt; Once the API call arrives, the CHR stops the traffic in about 100 ms with almost&lt;br&gt;
no variance. Three quarters of the time is the hand-off from the SIEM to the SOAR: Wazuh's integration daemon passing&lt;br&gt;
the alert on, and Shuffle queuing the execution and starting the app container.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes the number
&lt;/h2&gt;

&lt;p&gt;I ran four more conditions with 30 trials each:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;E2E median&lt;/th&gt;
&lt;th&gt;E2E p95&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;C1 baseline (above)&lt;/td&gt;
&lt;td&gt;5.30 s&lt;/td&gt;
&lt;td&gt;7.75 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C2 drop in &lt;code&gt;filter/forward&lt;/code&gt; instead of &lt;code&gt;raw&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;5.06 s&lt;/td&gt;
&lt;td&gt;6.38 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C3 Shuffle workflow with 2 actions&lt;/td&gt;
&lt;td&gt;6.54 s&lt;/td&gt;
&lt;td&gt;8.40 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C4 Wazuh Active Response → CHR directly, no SOAR&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.66 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.42 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C5 baseline + 20 unrelated alerts per second&lt;/td&gt;
&lt;td&gt;4.64 s&lt;/td&gt;
&lt;td&gt;6.00 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Takeaways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Each extra Shuffle action costs about 1.1 s&lt;/strong&gt; of scheduling wait. Keep everything up to the block in a single
action, and put notifications or ticketing after it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skipping the SOAR is about 3× faster.&lt;/strong&gt; Wazuh Active Response calling the router directly blocked in a median of
1.66 s. If speed matters more than workflow flexibility, block directly and let the SOAR handle enrichment and
notification in parallel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;raw&lt;/code&gt; vs &lt;code&gt;filter&lt;/code&gt; hardly matters&lt;/strong&gt; for blocking latency here. Caveat: this filter chain had no "accept
established" rule in front; with one (the usual production setup), a filter drop cannot cut existing connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background alerts made it faster, not slower.&lt;/strong&gt; With 20 unrelated alerts per second the median dropped by 0.66 s
(p = 0.018). Only the Wazuh → webhook part got shorter: when alerts keep arriving, the integration daemon never
sits waiting for a new one. This load is far from saturation, so read it as "this level of load does not hurt".&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A measurement trap: phase locking
&lt;/h2&gt;

&lt;p&gt;In my first run of C4, detection time lined up neatly at about 2 s, although the same detection path varied widely&lt;br&gt;
in the baseline. The cause: the Wazuh agent reads journald every 2 seconds, and the short C4 trials started at an&lt;br&gt;
almost fixed interval, so they kept landing at the same point of that cycle — every time the worst case.&lt;/p&gt;

&lt;p&gt;A circular statistics check made it obvious: the phase concentration of trial start times was R = 0.86&lt;br&gt;
(Rayleigh test p = 3.4 × 10⁻¹³). Adding a random 0–4 s wait before each trial brought it down to R = 0.11 (p = 0.71),&lt;br&gt;
and the C4 numbers above come from that rerun.&lt;/p&gt;

&lt;p&gt;If you benchmark anything that polls — log shippers, schedulers, queues — randomize your start times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical recommendations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Measure the hand-off, not just the playbook.&lt;/strong&gt; The playbook's own run time hid most of the latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the blocking path short:&lt;/strong&gt; one SOAR action, or a direct Active Response path for the block itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use an allowlist at the enforcement point.&lt;/strong&gt; Automated blocking will eventually see your own management IP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin versions and record them.&lt;/strong&gt; Wazuh rule IDs changed behavior across versions: on 4.14.10, repeated
"Failed password" goes 5760 → 5763, not 5720, so a rule keyed only on 5720 never fires.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;

&lt;p&gt;The Terraform, RouterOS bootstrap, Wazuh rule, Shuffle workflow, measurement scripts, all raw data and a longer&lt;br&gt;
write-up are open (MIT for code, CC BY 4.0 for data and text):&lt;br&gt;
&lt;strong&gt;&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency" rel="noopener noreferrer"&gt;github.com/ynprgrmmr/oss-soar-e2e-latency&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The attack used is a handful of failed SSH logins against a lab VM I own. Only point these tools at systems you are&lt;br&gt;
authorized to test.&lt;/p&gt;




&lt;h3&gt;
  
  
  Want to run this setup without building it from scratch?
&lt;/h3&gt;

&lt;p&gt;The code, measurement scripts and raw data behind this post are free and open in&lt;br&gt;
&lt;a href="https://github.com/ynprgrmmr/oss-soar-e2e-latency" rel="noopener noreferrer"&gt;ynprgrmmr/oss-soar-e2e-latency&lt;/a&gt; (code MIT, data CC BY 4.0).&lt;/p&gt;

&lt;p&gt;If you would rather skip the assembly, I also packaged a turnkey version:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://buy.polar.sh/polar_cl_C3ZRDnWa40mKHDSjUpn2WszNtHRLFRabBDee80SzjBO" rel="noopener noreferrer"&gt;Wazuh × Shuffle × MikroTik CHR SOAR Starter Kit on OCI (v1.0.0)&lt;/a&gt;&lt;/strong&gt; — $29.&lt;br&gt;
It contains OCI Terraform modules, an allowlist-aware CHR blocking connector, the Wazuh and Shuffle configuration,&lt;br&gt;
and step-by-step deployment, validation and cleanup guides. It is optional; nothing in this post depends on it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>opensource</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
