<?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 Gaurav Sharma on Medium]]></title>
        <description><![CDATA[Stories by Gaurav Sharma on Medium]]></description>
        <link>https://medium.com/@gaurav_garv4u?source=rss-991bfc1c49b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lm6S1VymKUTE7scNIWB-5w.jpeg</url>
            <title>Stories by Gaurav Sharma on Medium</title>
            <link>https://medium.com/@gaurav_garv4u?source=rss-991bfc1c49b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:33:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gaurav_garv4u/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[Two Shields, One Estate: Microsoft Defender + Sentinel vs CrowdStrike Falcon]]></title>
            <link>https://medium.com/@gaurav_garv4u/two-shields-one-estate-microsoft-defender-sentinel-vs-crowdstrike-falcon-3aa635cbf31d?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3aa635cbf31d</guid>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 08:55:49 GMT</pubDate>
            <atom:updated>2026-11-17T08:55:49.589Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NqNI9wjG8C41KUOccUpCQ.jpeg" /></figure><p>Your home turf can be any public cloud platform , But once multi cloud vendors come in and datacenter servers join the party, the question gets more interesting. Here is how the two platforms compare as services, and when each one earns its keep.</p><h3>The contenders</h3><p><strong>Microsoft Defender + Sentinel</strong> is a suite: Defender XDR (endpoint, identity, email, apps), Defender for Cloud (CSPM and workload protection), and Sentinel as the cloud-native SIEM and SOAR, with Content Hub solutions, analytics rules, workbooks, hunting queries and Logic Apps playbooks. Everything speaks KQL.</p><p><strong>CrowdStrike Falcon</strong> is a single-agent, single-console platform: EDR/XDR, identity protection, cloud security (CNAPP), exposure management, and Next-Gen SIEM (built on LogScale heritage, queried with CQL) with Falcon Fusion for automation, Charlotte AI for triage, and OverWatch/Falcon Complete for human-led hunting and MDR.</p><h3>Governance: the part people forget</h3><p>Security tooling is only half the story. Azure Arc extends Azure’s governance layer to AWS and on-prem machines, and that layer has no one-to-one CrowdStrike twin. CrowdStrike secures and observes; it does not manage configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r2W7JByvYkakhdsKn2FNiw.png" /></figure><p><strong>Takeaway:</strong> even if you adopt CrowdStrike, Arc often stays for governance and patching. CrowdStrike replaces the <em>security</em> functions, not the <em>management</em> ones.</p><h3>Head to head</h3><ul><li><strong>Azure, Entra and M365 depth:</strong> Microsoft wins. First-party connectors, often free ingestion, and one portal for XDR and SIEM.</li><li><strong>Endpoint, Linux and macOS depth:</strong> CrowdStrike is widely regarded as best-of-breed, with strong prevention and rich telemetry.</li><li><strong>Multi-cloud and on-prem consistency:</strong> CrowdStrike gives one agent, one console and identical response actions everywhere. Microsoft needs Arc or per-cloud connectors, though it works well once set up.</li><li><strong>Content ecosystem:</strong> Sentinel’s Content Hub is larger. CrowdStrike’s library is growing but expect some rule rebuilding in CQL.</li><li><strong>Search and retention:</strong> Index-free architecture makes CrowdStrike fast and economical for high-volume, long-retention logs.</li><li><strong>Human help:</strong> OverWatch and Falcon Complete are a big plus for thin SOC teams. Microsoft offers Defender Experts, but CrowdStrike’s managed services are more established.</li><li><strong>Cost:</strong> If you already own M365 E5, much of Defender is effectively paid for. Running both means paying twice for EDR and identity.</li></ul><h3>When to choose what</h3><p><strong>Choose Microsoft Defender + Sentinel when:</strong></p><ul><li>Azure and M365 produce most of your telemetry.</li><li>You hold E5 or Defender suite licences.</li><li>Your team is KQL-fluent and values Azure Policy, Update Manager and Arc in one governance story.</li></ul><p><strong>Choose CrowdStrike Falcon + NG SIEM when:</strong></p><ul><li>AWS, on-prem and Linux are a large or growing share of the estate.</li><li>You want one agent and one response workflow everywhere, with minimal Azure dependency.</li><li>You need cost-effective long retention, or managed hunting and MDR.</li></ul><p><strong>Go hybrid when (very common):</strong></p><ul><li>CrowdStrike sensor on every server and endpoint, Defender for Cloud for Azure posture, Arc kept for governance and patching, and one SIEM as the primary with detections forwarded from the other during any transition.</li></ul><h3>The bottom line</h3><p>There is no universal winner, only a better fit. Follow your <strong>log volume</strong>, your <strong>licences</strong>, and your <strong>SOC’s skills</strong>. And remember: security detection and estate governance are different jobs. Pick the best tool for each, and avoid paying twice for the same one.</p><p><em>Pricing and features change quickly, so validate with both vendors before deciding.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aa635cbf31d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Threat-Driven Defense Pipeline (OSINT)]]></title>
            <link>https://medium.com/@gaurav_garv4u/threat-driven-defense-pipeline-osint-755121db7f39?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/755121db7f39</guid>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 20:12:53 GMT</pubDate>
            <atom:updated>2026-11-07T20:12:53.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_-Sq-XS3tyGVaWMVt_eSg.jpeg" /></figure><h3><strong>What is a Threat-Driven OSINT Pipeline</strong></h3><p>A <strong>proactive cybersecurity and security operations strategy</strong> in which defensive design, monitoring, and resource allocation are directly shaped by the <strong>specific adversaries, motivations, and tactics, techniques, and procedures (TTPs)</strong> targeting an organization. OSINT supplies the external, zero-license data feed; the pipeline converts it into prioritized, ATT&amp;CK-mapped risk output.</p><ul><li><strong>Who</strong> wants to attack us: state-sponsored groups, hacktivists, organized crime, insiders.</li><li><strong>Why</strong> they target us: intellectual property, financial gain, geopolitical disruption.</li><li><strong>How</strong> they operate: tools, infrastructure, entry points (mapped to MITRE ATT&amp;CK techniques and IOCs).</li></ul><h3>OSINT Integration: Techniques and Tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*grd96Gwzdr1Rcb3QlyFDdw.png" /></figure><p>Correlation: stage 3 exposures are joined to stage 1 TTPs and stage 2 IOCs, then ranked into osint_risk_report.json. Scan only assets you own or are authorized to assess.</p><h3>GitHub Actions Pipeline (ephemeral, zero cost)</h3><p>Runner is destroyed after each run; public repos get free hosted minutes. Outputs persist as workflow artifacts (default retention 90 days, configurable).</p><ol><li><strong>Trigger:</strong> schedule (cron, daily) + workflow_dispatch.</li><li><strong>Checkout + setup:</strong> actions/checkout, Python 3.x; pip-install spiderfoot; org targets from repo variables.</li><li><strong>Stage 1:</strong> start TRAM container, ingest CTI report URLs/text, export ttp_map.json.</li><li><strong>Stage 2:</strong> start YETI containers, pull OSINT feeds via API, export ioc_feed.json.</li><li><strong>Stage 3:</strong> run SpiderFoot CLI, passive modules, export exposure.json.</li><li><strong>Correlate:</strong> script joins exposures to TTPs/IOCs, scores risk, writes osint_risk_report.json.</li><li><strong>Persist:</strong> actions/upload-artifact stores all four JSON files; docker compose down and runner teardown follow.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yvEiRZxO8hlBBOVXYwHTOA.png" /></figure><h3>Guardrails</h3><p>Store API keys in encrypted secrets; keep the repo public for free minutes, but artifacts of a public repo are readable by anyone with access, so use a private repo (limited free minutes) if the report is sensitive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=755121db7f39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Threat Model (STRIDE)]]></title>
            <link>https://medium.com/@gaurav_garv4u/kubernetes-threat-model-stride-e0ffa8162e61?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0ffa8162e61</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[threat-modeling]]></category>
            <category><![CDATA[stride]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 10:44:08 GMT</pubDate>
            <atom:updated>2026-10-30T11:01:46.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tn5jow0Ea2X9sGHXvL2M9w.jpeg" /></figure><h3>Scope and method</h3><p>This model applies STRIDE to each Kubernetes component, maps the threats to MITRE ATT&amp;CK for Containers and the Microsoft Kubernetes threat matrix, and ranks them by exposure and impact.</p><ul><li><strong>In scope:</strong> control plane (API server, etcd, scheduler, controller manager), nodes (kubelet, runtime, CNI), workloads (pods, RBAC, secrets), ingress and networking, supply chain (images, CI/CD, admission), and the cloud identity layer.</li><li><strong>Method:</strong> STRIDE per component across trust boundaries, then tactic mapping, then priority by likelihood (internet exposure, known exploitation) times impact (cluster-wide or single pod).</li><li><strong>Specification:</strong> The model rests on the published frameworks and recent CVEs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XstKId-83NWCsRHCUsLZhQ.png" /></figure><p>The API server is the highest-privilege entry point; the dashed borders mark where authentication, network policy and credential scoping must hold.</p><h3>STRIDE by component</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*PPmerFgyLE4zpE6L974P8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*vftoTRsFVDrnE6Q4T5eNEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*CVm-BMg97tczrvdQVMorcg.png" /></figure><h3>Threat intelligence mapping</h3><p>The strongest recent signal is ingress-nginx: several 2026 flaws let anyone who can edit Ingress objects run code in a controller that can read cluster secrets, and the project is now archived. Framework entries give the technique vocabulary; CVEs give the current exposure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*JqXOFBcz8q-CCxwLH3X8DA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*V8bSyFNHAeGBdtQ8n4B1aQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*5PWbvO9MH77q8j5mK6ksFw.png" /></figure><p>The Tech Insider report states there were no confirmed exploits for CVE-2026–4342 as of August 2026; treat that as a snapshot, not an all-clear.</p><h3>Top risks and attack paths</h3><p>Most realistic compromises chain a workload foothold, a stolen service account token, secret access, then node and cloud pivot; breaking the chain early with RBAC and Pod Security matters more than any single patch. Ranking is a judgement from exposure, known exploitation class and blast radius, and should be recalibrated against your own environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*uSI091P57Bxh9k-2NgGybA.png" /></figure><h3>Mitigation priorities and detection</h3><p>Fix identity and admission first, because they close ranks 1, 2 and 4; detection then covers what prevention misses.</p><ol><li><strong>RBAC and tokens:</strong> remove wildcard and cluster-admin bindings, disable token automounting by default, use bound short-lived tokens.</li><li><strong>Admission control:</strong> enforce Pod Security Standards at restricted and block hostPath, privileged and runtime socket mounts; restrict who can create Ingress and webhook objects.</li><li><strong>Exposure:</strong> keep the API server, kubelet and dashboards off the public internet; turn off anonymous authentication.</li><li><strong>Ingress:</strong> inventory ingress-nginx, then migrate to a maintained controller; scope the controller’s secret access to what it needs.</li><li><strong>Network and egress:</strong> default-deny NetworkPolicy, egress allow-lists, metadata service hardening.</li><li><strong>Supply chain:</strong> signed images verified at admission, pinned digests, scanned base images.</li><li><strong>Secrets:</strong> encrypt etcd at rest, move secrets to an external store.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*Q-hTWJoSL7Uav4-802a3GA.png" /></figure><p><strong>Sources:</strong></p><p><a href="https://microsoft.com/en-us/security/blog/2022/12/07/mitigate-threats-with-the-new-threat-matrix-for-kubernetes">Microsoft threat matrix v3</a></p><p>· <a href="https://attack.mitre.org/matrices/enterprise/containers/">MITRE ATT&amp;CK Containers</a></p><p>· <a href="https://www.microsoft.com/security/blog/2021/07/21/the-evolution-of-a-matrix-how-attck-for-containers-was-built/">ATT&amp;CK for Containers history</a></p><p>· <a href="https://www.esecurityplanet.com/threats/ingress-nginx-vulnerability-enables-code-execution-in-kubernetes/">eSecurity Planet on CVE-2026–24512</a></p><p>· <a href="https://www.csoonline.com/article/4128439/four-new-vulnerabilities-found-in-ingress-nginx.html">CSO on ingress-nginx CVEs</a></p><p>· <a href="https://x.com/kubernetesio/status/2041698295647453575">Kubernetes post on CVE-2026–4342</a></p><p>· <a href="https://cert.europa.eu/publications/security-advisories/2025-012/">CERT-EU advisory 2025–012</a></p><p>· <a href="https://tech-insider.org/au/ingress-nginx-eol-cve-2026-4342-2026/">Tech Insider on ingress-nginx EOL</a></p><p>· <a href="https://shattered.io/kubernetes-aks-cve-wave-2026/">Shattered.io on 2026 AKS CVEs</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0ffa8162e61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking a Kubernetes Cluster (A defensive approach to prepare for the worst)]]></title>
            <link>https://medium.com/@gaurav_garv4u/hacking-a-kubernetes-cluster-a-defensive-approach-to-prepare-for-the-worst-5e470518a0a3?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e470518a0a3</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 09:11:38 GMT</pubDate>
            <atom:updated>2026-10-19T09:12:45.951Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NirVkRM94vGJrpbpt0Cb9A.jpeg" /></figure><p>The idea presented in this paper comes from the phrase “If you want peace, prepare for war” from the classical Latin adage <em>Si vis pacem, para bellum.</em></p><h4>1. The Attacker’s Perspective, Threat Intelligence and Defences:</h4><p>The paper describes attacker goals, techniques and publicly reported incidents at a conceptual level. It contains no working exploit steps. The idea goes technically towards “how the attacker thinks and the cluster kill chain”. Attackers follow a familiar path, mapped in the MITRE ATT&amp;CK for Containers matrix and the Microsoft Threat Matrix for Kubernetes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*OadVmVAeg_klJzVIJvioHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*MSHol7sLzmrdvND1WH0E7w.png" /></figure><h4>2. Breaking down per component:</h4><p>Giving an per architectural component breakdown attacker view, threat intelligence and built-in defences.</p><h4>2.1 kube-apiserver: the front door</h4><p><strong>Role</strong></p><p>Central REST gateway. Every user, controller and kubelet talks to it. It authenticates, authorises, runs admission checks and persists state to etcd.</p><p><strong>Attacker’s view</strong></p><p>Highest-value target: control of the API means control of the cluster.</p><ul><li>Look for anonymous access, broad RBAC bindings (e.g. to system:anonymous or large groups), stolen kubeconfigs and service-account tokens.</li><li>Enumerate permissions, list Secrets, then create privileged workloads or new RBAC bindings.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>CVE-2018–1002105:</strong> flaw in upgraded-connection handling let low-privileged users escalate against backend servers (critical).</li><li><strong>Tesla (2018, RedLock):</strong> Kubernetes console without authentication led to cryptomining and exposed cloud credentials.</li><li><strong>Exposure scans:</strong> Shadowserver (~380,000 of ~450,000 identified API servers answered 200 OK); Cyble (900,000+ exposures).</li><li><strong>RBAC Buster (Aqua Nautilus, 2023):</strong> attackers abused weak API configuration to create persistence through RBAC objects and run miners.</li><li><strong>Unit 42 (April 2026):</strong> a Lazarus/TraderTraitor-linked intrusion used a stolen pod token to authenticate to the API, list secrets, backdoor a production pod and move to cloud services.</li></ul><p><strong>Built-in defences</strong></p><ul><li>TLS everywhere; authentication via client certificates, OIDC, short-lived bound service-account tokens.</li><li>RBAC and the Node authorizer; webhook authorization.</li><li>Admission control: Pod Security Admission, ValidatingAdmissionPolicy, NodeRestriction.</li><li>Audit logging (opt-in), API Priority and Fairness (rate limiting), anonymous-auth switch, secrets encryption at rest.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Audit-log alerts: anonymous requests, secret list/get by unusual identities, new ClusterRoleBindings, pods/exec, privileged pod creation.</li><li>Tools: Falco (k8saudit), cloud audit-log analytics, SIEM rules. Keep the API private or IP-allow-listed.</li></ul><h3>2.2 Kubelet: the node agent</h3><p><strong>Role</strong></p><p>Runs on every node, starts and stops pods through the container runtime, reports node status. Serves an HTTPS API on port 10250 (and an optional read-only port).</p><p><strong>Attacker’s view</strong></p><ul><li>If anonymous access or permissive authorization is enabled, list pods and run commands inside containers on that node. This can bypass API-server audit trails.</li><li>Steal the node’s kubelet credentials to read secrets of pods scheduled there.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>TeamTNT (Trend Micro, 2021):</strong> scanned nearly 50,000 IPs for open kubelet port 10250 and deployed cryptominers.</li><li><strong>Hildegard (Unit 42, 2021):</strong> abused kubelet access, used tmate and IRC for command-and-control, and stole cloud credentials.</li><li><strong>Aqua Nautilus honeypot:</strong> recorded real exploitation of unauthenticated kubelets, including internal mapping and download-and-run campaigns.</li><li>Trend Micro found about 600 kubelets completely open without authentication or authorization.</li></ul><p><strong>Built-in defences</strong></p><ul><li>anonymous-auth=false; authorization mode Webhook; client CA verification.</li><li>Disable the read-only port; enable certificate rotation and serving-cert bootstrap.</li><li><strong>Node authorizer and NodeRestriction:</strong> a compromised kubelet can only read objects tied to its own node and cannot freely edit other nodes.</li><li>Default seccomp profile (opt-in), protect-kernel-defaults.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Network alerts for port 10250 traffic from anything but control-plane IPs.</li><li>Falco/Tetragon rules for unexpected shells or downloads inside containers.</li><li>Regularly scan your own node IP ranges for open 10250/10255.</li></ul><h3>2.3 Master (control-plane) nodes</h3><p><strong>Role</strong></p><p>Hosts the API server, scheduler, controller manager and (in stacked setups) etcd. Holds the cluster PKI, admin kubeconfig and static pod manifests.</p><p><strong>Attacker’s view</strong></p><p>Root on a control-plane node is effectively cluster compromise.</p><ul><li>Reach it through exposed SSH or management ports, workloads that tolerate the control-plane taint, hostPath mounts, or theft of admin kubeconfig and CA keys.</li><li>Steal the node’s cloud instance-role credentials from the metadata service.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>TeamTNT and Hildegard:</strong> harvested cloud credentials through instance metadata after landing in containers.</li><li><strong>SCARLETEEL (Sysdig, 2023):</strong> moved from compromised containers into AWS environments, including EKS, using stolen credentials.</li><li><strong>Azurescape (Unit 42, 2021):</strong> cross-tenant escape in a managed container service via an outdated runc, showing the shared-responsibility risk of managed control planes.</li></ul><p><strong>Built-in defences</strong></p><ul><li>Default NoSchedule taint on control-plane nodes; kubeadm sets strict permissions on PKI and manifests.</li><li>Short-lived certificates with renewal; static-pod isolation.</li><li>Admission policies that block privileged, hostPath and hostNetwork pods.</li><li>Managed services (EKS, AKS, GKE) hide the control plane. In cloud, enforce IMDSv2 and low hop limits.</li></ul><p><strong>Detect and respond</strong></p><ul><li>File-integrity monitoring (auditd, osquery, Wazuh) on /etc/kubernetes and etcd data.</li><li>Alert on SSH logins; watch cloud audit logs (CloudTrail, Activity Log) for node-role credentials used from unfamiliar IPs.</li></ul><h3>2.4 etcd: the cluster’s memory</h3><p><strong>Role</strong></p><p>Distributed key-value store holding all cluster state: Secrets, ConfigMaps, RBAC, workload definitions. Listens on 2379 (clients) and 2380 (peers).</p><p><strong>Attacker’s view</strong></p><p>Direct read access exposes every Secret and bypasses RBAC and API audit logs. Direct write access allows forging objects such as a new cluster-admin binding.</p><ul><li>Targets: etcd ports without client-certificate authentication, unencrypted backups and snapshots, weak file permissions on the data directory.</li></ul><p><strong>Threat intelligence</strong></p><ul><li>Researchers using Shodan found well over two thousand etcd servers reachable from the internet in 2020, many leaking credentials and keys.</li><li>Kubernetes Secrets are only base64-encoded in etcd unless encryption at rest is configured, so any etcd read is a full secrets breach.</li><li>Several etcd CVEs (mostly denial of service) show it needs patching like any other service.</li></ul><p><strong>Built-in defences</strong></p><ul><li>Mutual TLS with client-cert-auth, separate peer TLS, optional etcd RBAC; only the API server should hold a client certificate.</li><li><strong>Encryption at rest</strong> via the API server EncryptionConfiguration, ideally with a KMS provider (KMS v2) so etcd stores ciphertext.</li><li>Encrypted, access-controlled backups; network isolation of etcd nodes.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Alert on connections to 2379/2380 from any host except the API servers and etcd peers.</li><li>Alert on etcdctl execution on nodes and on access to snapshot storage.</li><li>Use Kubescape or kube-bench to confirm encryption at rest and TLS settings.</li></ul><h3>2.5 kube-scheduler</h3><p><strong>Role</strong></p><p>Decides which node each new pod runs on, based on resources, affinity, taints and tolerations.</p><p><strong>Attacker’s view</strong></p><p>The scheduler itself is rarely exploited. Attackers abuse <strong>scheduling inputs</strong> instead.</p><ul><li>Set nodeName, nodeSelector, affinity or tolerations to land pods on control-plane or high-value nodes (with secrets or GPUs).</li><li>Request huge resources to starve other workloads (denial of service).</li><li>Compromised scheduler credentials give broad read access to pods and nodes.</li></ul><p><strong>Threat intelligence</strong></p><ul><li>No widely reported in-the-wild exploit of the scheduler component itself; reporting focuses on workload placement abuse.</li><li>Cryptojacking campaigns frequently use DaemonSets and tolerations to occupy every node (for example the 2023 Dero campaign documented by CrowdStrike, which used a benign-looking DaemonSet name).</li></ul><p><strong>Built-in defences</strong></p><ul><li>Secure serving port 10259 with authn/authz (insecure port removed in v1.24); dedicated RBAC role and leader election.</li><li>ResourceQuota, LimitRange and PriorityClass restrictions.</li><li>Admission policies (Kyverno, Gatekeeper, ValidatingAdmissionPolicy) can forbid nodeName and control-plane tolerations in tenant namespaces.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Audit alerts for pods created with nodeName or control-plane tolerations, and sudden resource-request spikes.</li><li>Expose scheduler metrics to Prometheus and alert on abnormal pending-pod or preemption counts.</li></ul><h3>2.6 kube-proxy and node networking</h3><p><strong>Role</strong></p><p>Programs iptables, IPVS or nftables rules on each node so Service virtual IPs reach the right pods.</p><p><strong>Attacker’s view</strong></p><ul><li>From a compromised node, or a hostNetwork pod with NET_ADMIN or NET_RAW, tamper with rules or spoof traffic to intercept or redirect service traffic.</li><li>Exploit routing flaws to reach services bound to node-local addresses.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>CVE-2020–8558:</strong> kube-proxy route settings let adjacent hosts or containers reach node-local services that were assumed to be private.</li><li><strong>CVE-2020–10749:</strong> container networking plugins were open to man-in-the-middle through rogue IPv6 router advertisements.</li><li><strong>CVE-2021–25737:</strong> EndpointSlice validation allowed endpoints pointing at loopback or link-local addresses.</li></ul><p><strong>Built-in defences</strong></p><ul><li>kube-proxy is not a security boundary: use <strong>NetworkPolicy</strong> (needs an enforcing CNI such as Cilium or Calico), default-deny policies and mTLS service meshes.</li><li>Pod Security Standards drop NET_RAW and block hostNetwork in the Baseline and Restricted profiles.</li><li>Restricted RBAC role for kube-proxy; node firewalls; timely patching.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Alert on iptables or IPVS changes made by non-kube-proxy processes (Falco, auditd).</li><li>Use Cilium Hubble flow logs to spot unexpected east-west traffic; alert on new hostNetwork pods.</li></ul><h3>2.7 Node and replication controllers (workload controllers)</h3><p><strong>Role</strong></p><p>The node controller tracks node health and taints unreachable nodes. The ReplicaSet, Deployment, DaemonSet and Job controllers keep the desired number of pods running and re-create any that disappear.</p><p><strong>Attacker’s view</strong></p><ul><li><strong>Resilient persistence:</strong> delete a malicious pod and its controller re-creates it. Defenders who remove pods but not the owning Deployment, DaemonSet or CronJob get re-infected.</li><li>With create rights on workload objects, spread miners or backdoors to every node at once.</li><li>With stolen kubelet credentials, tamper with Node labels and taints to attract sensitive pods.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>Microsoft (2020):</strong> attackers used exposed Kubeflow dashboards to deploy cryptominer containers.</li><li><strong>Dero campaign (CrowdStrike, 2023):</strong> a DaemonSet with an innocuous name ran miners on every node.</li><li><strong>RBAC Buster (Aqua, 2023):</strong> persistence built with RBAC objects and workload controllers.</li></ul><p><strong>Built-in defences</strong></p><ul><li>RBAC limits who can create or patch Deployments, DaemonSets and CronJobs.</li><li><strong>NodeRestriction</strong> stops a kubelet from changing labels it should not control.</li><li>ResourceQuota and LimitRange cap blast radius; namespaces and admission policies enforce standards.</li></ul><p><strong>Detect and respond</strong></p><ul><li>Alert on any workload object created outside the CI/CD or GitOps path. GitOps drift detection (Argo CD, Flux) flags objects that are not in Git.</li><li>Alert on Node label and taint changes and on new CronJobs.</li><li>During incident response, delete the owning controller first, then the pods.</li></ul><h3>2.8 kube-controller-manager (and cloud-controller-manager)</h3><p><strong>Role</strong></p><p>Runs the core control loops. Holds the service-account token signing key and cluster CA signing key. The cloud-controller-manager also holds cloud-provider credentials.</p><p><strong>Attacker’s view</strong></p><ul><li>Steal the signing keys to forge service-account tokens or certificates for any identity.</li><li>Abuse its trusted network position (SSRF-style) to reach internal endpoints.</li><li>Use cloud credentials to create, read or destroy cloud resources.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>CVE-2020–8555:</strong> half-blind SSRF in kube-controller-manager through certain volume types, letting a user reach internal services from the control plane.</li><li>Cloud-credential theft from control-plane hosts has been the standard pivot in campaigns such as SCARLETEEL.</li></ul><p><strong>Built-in defences</strong></p><ul><li>Per-controller service accounts ( — use-service-account-credentials), secure serving port 10257 with authn/authz, dedicated RBAC role.</li><li>Bound, expiring service-account tokens; restricted signer scope for certificate signing requests.</li><li>Leader election; key files readable only by the component.</li></ul><p><strong>Detect and respond</strong></p><ul><li>File-integrity monitoring for key files; alert on certificate signing request approvals.</li><li>Egress policy for control-plane hosts and alerts on unusual outbound connections.</li><li>Use cloud audit logs to catch controller or node-role credentials used off-platform.</li></ul><h3>2.9 Container runtime engine (containerd, CRI-O, Docker Engine)</h3><p><strong>Role</strong></p><p>Pulls images and creates containers using Linux namespaces, cgroups and runc. The kubelet talks to it through the CRI. Dockershim was removed in v1.24, so containerd and CRI-O are the norm.</p><p><strong>Attacker’s view</strong></p><p>The runtime is the last wall between a container and the node.</p><ul><li>Escape to the host via runtime or kernel bugs, privileged containers, excess capabilities, hostPath mounts, or a mounted runtime socket (docker.sock, containerd.sock).</li><li>Abuse an exposed Docker API (2375) directly, or deliver malicious images.</li></ul><p><strong>Threat intelligence</strong></p><ul><li><strong>CVE-2019–5736 (runc), CVE-2024–21626 (runc “Leaky Vessels”):</strong> container-to-host escapes.</li><li><strong>CVE-2020–15257 (containerd-shim), CVE-2022–0492 (cgroups), CVE-2022–0811 (CRI-O “cr8escape”):</strong> further escape paths.</li><li><strong>NVIDIAScape, CVE-2025–23266 (Wiz, 2025):</strong> escape through the NVIDIA container toolkit in GPU clusters.</li><li><strong>Siloscape (Unit 42, 2021):</strong> malware escaping Windows containers to reach the node and Kubernetes credentials.</li><li><strong>TeamTNT and Kinsing:</strong> abused exposed Docker APIs to run miners.</li></ul><p><strong>Built-in defences</strong></p><ul><li>Namespaces, cgroups, seccomp (RuntimeDefault), AppArmor or SELinux, capability dropping, no-new-privileges.</li><li>Pod Security Standards (Privileged, Baseline, Restricted); read-only root filesystem; run as non-root; user namespaces (hostUsers: false).</li><li><strong>RuntimeClass</strong> for sandboxed runtimes (gVisor, Kata Containers).</li><li>Image signature verification (Cosign with an admission controller).</li></ul><p><strong>Detect and respond</strong></p><ul><li>Falco, Tetragon or Tracee for sensitive mounts, runtime-socket access, release_agent writes and unexpected shells.</li><li>Patch runtimes and kernels quickly; scan images with Trivy; never expose the Docker API.</li></ul><h3>Sources:</h3><ul><li>Palo Alto Unit 42, “Understanding Current Threats to Kubernetes Environments” (6 April 2026)</li><li>Trend Micro Research, “TeamTNT Targets Kubernetes, Nearly 50,000 IPs Compromised” (2021)</li><li>Aqua Nautilus, “Kubernetes Exposed: Exploiting the Kubelet API” (honeypot research)</li><li>Cyble Research Labs, “Exposed Kubernetes Clusters”; SecurityWeek, “Over 380,000 Kubernetes API Servers Exposed” (Shadowserver)</li><li>Dark Reading, “Exposed Kubernetes Clusters, Kubelet Ports Can Be Abused in Cyberattacks”</li><li>MITRE ATT&amp;CK for Containers; Microsoft Threat Matrix for Kubernetes</li><li>Kubernetes documentation: Securing a Cluster, Pod Security Standards, Encrypting Confidential Data at Rest</li><li>NSA/CISA Kubernetes Hardening Guide; CIS Kubernetes Benchmark</li><li>Verify all CVE details and feature maturity against current vendor advisories and your Kubernetes version before acting.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e470518a0a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Agentic AI SOC with Azure AI, Sentinel,Defender & LangGraph]]></title>
            <link>https://medium.com/@gaurav_garv4u/building-an-agentic-ai-soc-with-azure-ai-sentinel-defender-langgrpah-bc110f714578?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc110f714578</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-operation-center]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 12:25:12 GMT</pubDate>
            <atom:updated>2026-10-05T12:27:32.812Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97jgQvK9JKJcCO5rNvv4xA.jpeg" /></figure><h3>1. Introduction</h3><p>An Agentic SOC replaces fixed playbooks with goal-driven AI agents. Each agent is a Large Language Model (LLM) wrapped with a role, a set of tools (for example KQL queries against Sentinel, Defender for Cloud APIs, threat-intelligence lookups) and memory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*yrKhEcfoNq6iXP1i1wSywg.png" /></figure><h3>2. Why Human in the Loop (HITL) Matters</h3><p>Checks that HITL adds</p><ul><li><strong>Blast-radius control: </strong>a human confirms that the target asset (for example a domain controller or payment server) can safely be isolated.</li><li><strong>Context the model lacks: </strong>maintenance windows, business criticality, VIP users and ongoing investigations.</li><li><strong>Defence against prompt injection: </strong>attacker-controlled strings in logs cannot directly trigger actions without review.</li><li><strong>Accountability: </strong>a named approver is recorded for each high-risk action (non-repudiation).</li><li><strong>Segregation of duties: </strong>the agent proposes, the human approves, the system executes under a separate identity.</li><li><strong>Quality feedback loop: </strong>analyst edits and rejections become labelled data to tune prompts and thresholds.</li><li><strong>Tiered autonomy: </strong>low-risk actions (enrich, tag, comment) auto-run; medium and high-risk actions require approval.</li></ul><h4>2.1 Compliance Overview:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*nEX7wzPwUu2znTue3e854A.png" /></figure><h3>3. Architectural BluePrint</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TfzUx8IwlmmwEFam2G14wg.png" /></figure><h4>3.1 Technology Stack</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUQB_F-N5APJwh_KzSULog.png" /></figure><h4>3.2 Explanation of each step</h4><ol><li><strong>Telemetry collection. </strong>Azure resources, Entra ID, endpoints and Microsoft 365 send logs to a Log Analytics workspace through data connectors and Azure Monitor Agent. Defender for Cloud is connected so its alerts and recommendations flow into the same workspace.</li><li><strong>Detection in Sentinel. </strong>Analytics rules (scheduled, NRT and Microsoft-incident-creation rules) generate alerts and group them into incidents. Entity mapping (account, host, IP) is enabled so agents can pivot.</li><li><strong>Automation rule trigger. </strong>A Sentinel automation rule fires when an incident is created or updated. It runs a Logic App playbook (or Azure Function) with the incident ARM ID.</li><li><strong>Enqueue. </strong>The playbook publishes a small message (incident ID, severity, timestamp) to the Kafka topic (or SQS queue). Messages hold references, not sensitive payloads. Failed messages go to a dead-letter queue.</li><li><strong>Consume. </strong>The LangGraph worker (consumer group) reads a message, uses the incident ID as thread_id and starts or resumes a graph run. Offsets are committed only after the graph reaches a checkpoint, giving at-least-once processing.</li><li><strong>Triage agent. </strong>Fetches the incident, de-duplicates against open incidents, checks known false-positive patterns and assigns a risk score. False positives are closed with an explanation.</li><li><strong>Enrichment agent. </strong>Adds threat intelligence, asset criticality, user risk (Entra ID Protection) and Defender for Cloud recommendations for the affected resource.</li><li><strong>Investigation agent. </strong>Generates and runs KQL through a read-only tool, expands entities, builds a timeline and produces hypotheses and evidence. Queries are validated against an allow-list before execution.</li><li><strong>Approval gate. </strong>The supervisor proposes response actions with a risk tier. T0/T1 actions continue; T2/T3 call interrupt(), the state is checkpointed and the run pauses without holding compute.</li><li><strong>Notification and decision. </strong>A Teams Adaptive Card shows the evidence and proposed action. The analyst approves, rejects or edits.</li><li><strong>Resume. </strong>The callback reaches the resume API which invokes the graph with Command(resume=decision) on the same thread_id. State is reloaded from PostgreSQL and execution continues.</li><li><strong>Response agent. </strong>Executes approved actions through Defender and Microsoft Graph APIs using a managed identity with only the permissions needed, then verifies the outcome.</li><li><strong>Close and audit. </strong>The incident is updated with a summary, tags and comments. The full decision trail is written to Log Analytics for dashboards and compliance evidence.</li></ol><h4>3.3 Error-handling design</h4><ul><li><strong>Throttling and timeouts: </strong>retry with exponential back-off on Azure OpenAI (429) and Sentinel API calls.</li><li><strong>Poison messages: </strong>after N failed attempts the message goes to the DLQ and raises an alert for engineering.</li><li><strong>Model errors: </strong>structured output validation (Pydantic); on failure, retry once, then route to human review.</li><li><strong>Idempotency: </strong>response actions use an idempotency key (incident ID + action ID) so replays do not duplicate effects.</li><li><strong>Fail safe: </strong>on unrecoverable error the incident is flagged for manual handling; the agent never defaults to a destructive action.</li></ul><h3>4. Human in Loop: Azure Flow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*-pmZmQzWP8zJmBl1y0xoJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*1wRKpfNyy658K0B8QdwsvQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc110f714578" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Threat Modeling in CI/CD pipelines]]></title>
            <link>https://medium.com/@gaurav_garv4u/threat-modeling-in-ci-cd-pipelines-c790318529b2?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c790318529b2</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[threat-modeling]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 08:49:27 GMT</pubDate>
            <atom:updated>2026-09-18T17:05:31.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQPS7Pyx0lqzmQJklzc63g.jpeg" /></figure><p><strong>Introduction</strong><br>The blog here focus on threat-modeling the CI/CD pipeline end to end using STRIDE<strong> </strong>and maps every control that can be deployed against the OWASP Top 10 CI/CD Security Risks, to show where coverage is strong and where it depends on configuration discipline rather than a missing tool. Which means these are technical controls which can be a software tool or a system configuration. The choice between using a tool or a configuration is entirely at the user’s (or organization’s) discretion.</p><p><strong>Pipeline components</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*CXL7DFSQ5ehS3y7SHtOTSg.png" /></figure><h3>OWASP Top 10 CI/CD Security Risks — Coverage Map</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*7J_Z2U6l3YppKGlC5NcJjw.png" /></figure><h3>STRIDE Threat Model by Pipeline Stage</h3><p>Each stage below lists the STRIDE categories in play, a concrete threat scenario, the control currently in place, and any residual gap worth auditing.</p><h3>Source Control</h3><p>STRIDE: Spoofing, Tampering, Repudiation</p><p>A stolen personal access token or compromised developer account commits or force-pushes as a trusted identity. Without tag protection specifically, a release tag can be silently repointed to a different commit, the exact mechanism used in the March 2026 Trivy ecosystem compromise.</p><p>Controls</p><p>· Branch and merge governance is configured, reducing unreviewed changes to protected branches</p><p>· Confirm tag protection rules extend to release tags specifically, not only branches, since that was the exact gap exploited in the <a href="https://www.paloaltonetworks.com/blog/cloud-security/trivy-supply-chain-attack/">Trivy </a>incident.</p><h3>Secret Scanning</h3><p>STRIDE: Information Disclosure</p><p>A developer accidentally commits an API key, cloud credential, or database connection string. Without pre-merge scanning it persists in Git history indefinitely, even after a later commit removes it from the current file.</p><p>Controls</p><p>· Credentials scans for exposed secrets in repositories for credential patterns</p><p>· Confirm scanning covers full commit history, not only new commits, and that findings block merge rather than only alert</p><h3>CI Orchestration</h3><p>STRIDE: Tampering, Elevation of Privilege, Information Disclosure, Denial of Service</p><p>Poisoned Pipeline Execution: an unreviewed pull request modifies workflow behavior, or a pull_request_target-triggered workflow grants a fork access to base-repository secrets and write permissions.</p><p>Controls</p><p>· Third-party Actions are pinned to commit SHAs following the Trivy incident lesson, closing CICD-SEC-8</p><p>· Audit workflow triggers for pull_request_target usage and confirm each workflow’s GITHUB_TOKEN is scoped to least privilege (CICD-SEC-4)</p><h3>Static Application Security Testing(SAST) &amp; Infrstructure as Code Scanning(IAC)</h3><p>STRIDE: Tampering, Repudiation</p><p>Vulnerable code or an insecure infrastructure-as-code template, such as an overly permissive IAM policy in Terraform, merges because a finding was suppressed with no accountable owner.</p><p>Control</p><p>· IAC scanning runs in CI against source code and IaC templates</p><p>· Confirm the IAC Scanner status check is a blocking, required check rather than advisory-only</p><h3>Software Compostion Analysis(SCA)</h3><p>STRIDE: Tampering, Elevation of Privilege</p><p>A transitive open-source dependency carries a known vulnerability, or is hijacked outright through maintainer account takeover or dependency confusion, patterns seen repeatedly across the open-source ecosystem.</p><p>Control in place</p><p>· SCA Tool scans dependencies for known vulnerabilities and license risk, covering CICD-SEC-3 alongside Trivy’s container-layer coverage</p><h3>Container Scanning</h3><p>STRIDE: Tampering, Information Disclosure, Spoofing</p><p>The scanner itself becomes the compromised link: attackers used stolen maintainer credentials to force-push malicious code into a mutable release tag, so the CI step that trusted that tag silently pulled credential-stealing code disguised as a routine scan.</p><p>Control Deployed</p><p>· Tag and provenance controls were adopted directly as a lesson from this incident: dependencies are pinned by commit SHA or digest, not a mutable tag</p><h3>Signing &amp; Provenance — cosign + Suplier chain Level for Software Artifect(SLSA)</h3><p>STRIDE: Tampering, Repudiation</p><p>Without verifiable provenance, a downstream consumer has no way to distinguish a legitimately built artifact from a substituted one, the gap that would have let a poisoned image progress silently.</p><p>Control in place</p><p>· cosign signing and SLSA provenance attestation are in place, covering CICD-SEC-9</p><p>· Signing only helps if it is verified downstream; confirm the Deployment stage actually enforces it rather than only generating it</p><h3>Deployment — CD</h3><p>STRIDE: Spoofing, Tampering, Elevation of Privilege</p><p>CD reconciles whatever is present at the designated Git path. If source control access is compromised, or signature verification is not enforced at admission time, a poisoned image or manifest deploys automatically with no separate approval step.</p><p>Controls deployed</p><p>· Confirm image signature verification is enforced as an admission gate, not only generated at build time, and that Flux’s service account is scoped to only the namespaces it manages (CICD-SEC-5)</p><h3>Runtime — Container orchestration</h3><p>STRIDE: Elevation of Privilege, Denial of Service, Information Disclosure</p><p>A privileged pod or hostPath mount enables container escape; a compromised pod without network policy reaches unrelated services; secrets mounted as plaintext environment variables are readable by any process in a compromised container.</p><p>Controls</p><p>· Confirm Pod Security Admission is set to the restricted profile, default-deny network policies are applied, and secrets are delivered through a vault or CSI driver rather than raw environment variables</p><h3>Cloud &amp; DevOps Posture</h3><p>STRIDE: Repudiation</p><p>Without correlated visibility across the source-control and runtime layers, an attack that starts in CI, as in the Trivy case, could progress toward runtime resources undetected until damage is already done.</p><p>Control</p><p>· Cloud Posture scanner covers source-control and CI posture; scanner should covers the runtime layer; both correlate through the SIEM, covering CICD-SEC-10</p><h3>SIEM &amp; Incident Response</h3><p>STRIDE: Repudiation</p><p>Reconstructing a multi-hour exposure window, exactly what posture scanner had to do in the real Trivy incident to identify which workflow runs executed during the compromise, requires centralized, retained logs across the GitHub audit log, Actions run metadata, and Kubernetes audit log.</p><p>Controls</p><p>Incident reponse tools correlates Git-side and runtime event logs to flag suspicious actor behavior across both</p><p>· Confirm the source control audit log itself, not only scanner findings, is ingested, and that retention covers at least a multi-day window</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c790318529b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Continuous Threat Exposure Management (CTEM) Program — Open Source, Cloud-Agnostic, and…]]></title>
            <link>https://medium.com/@gaurav_garv4u/building-a-continuous-threat-exposure-management-ctem-program-open-source-cloud-agnostic-and-f7c7622b053c?source=rss-991bfc1c49b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7c7622b053c</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[threat-exposure]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Gaurav Sharma]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 07:27:13 GMT</pubDate>
            <atom:updated>2026-09-16T09:54:43.033Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Continuous Threat Exposure Management (CTEM) Program — Open Source, Cloud-Agnostic, and Zero Hidden Cost</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L1g3Hk8fkt9UtjC4.jpg" /></figure><h3>What the CTEM program does</h3><p>Most security teams find out they’re exposed the same way an attacker does — by scanning. The difference is who gets there first. This CTEM program flips that timeline: instead of waiting for a pentest, a bug bounty report, or an incident to reveal what’s exposed, it runs the <em>same</em><br> reconnaissance an attacker would run — continuously, against your own footprint — and turns the output into tracked, owned remediation work before it becomes an incident.</p><p>The pipeline mirrors an actual attack chain, stage by stage:</p><ol><li><strong>Discover</strong> what exists (OSINT, subdomains, assets you may not even know are yours)</li><li><strong>Confirm</strong> what’s alive and what it’s running</li><li><strong>Assess</strong> what’s vulnerable or misconfigured</li><li><strong>Correlate</strong> exposure back to identity — because a vulnerable host is a problem, but a vulnerable host with a path to Domain Admin or a cloud admin role is an incident waiting to happen</li></ol><h3>Why cloud-agnostic and ephemeral matters (and why “hidden cost” is the real enemy)</h3><p>Every major cloud provider now ships a native posture-management or “well-architected” tool -<br> and on paper, that’s convenient. In practice, a lot of these tools quietly meter you into<br> consumption-based pricing for the AI/analysis layer underneath. AWS’s Well-Architected Tool review itself is free, but plug it into Bedrock-backed recommendations or continuous AI-assisted analysis, and the bill scales with usage in a way that’s hard to forecast and easy to lose track of — a classic hidden-cost trap for a program that’s supposed to be about reducing risk, not opening a new unpredictable line item.</p><p>This toolchain takes the opposite approach on purpose:</p><ul><li><strong>Cloud-agnostic</strong> — none of these tools care whether your footprint is AWS, Azure, GCP, or on-prem. The same pipeline that maps your Azure attack paths (AzureHound) maps AWS ones (AWSHound) with the same BloodHound backend. You’re not locked into a single vendor’s visibility model.</li><li><strong>Ephemeral by design</strong> — every tool here is a CLI binary or a short-lived container. Spin it up, run the scan, tear it down. No standing infrastructure, no idle compute burning budget between scan windows, no persistent SaaS subscription cost creeping upward as your asset count grows.</li><li><strong>Open source, self-hosted</strong> — the cost is your compute time, not a per-asset or per-scan metered fee. A weekly CTEM run against a mid-size external footprint costs you a few dollars of transient VM time, full stop — no surprise invoice at the end of the month.</li></ul><h3>Tools in the pipeline</h3><p>A word of caution before you run any of this: verify what you trust</p><p>In March 2026, Aqua Security’s Trivy — one of the most widely used open-source scanners in the cloud-native ecosystem — was itself compromised. A threat actor tracked as TeamPCP force-pushed malicious tags across the trivy, trivy-action, and setup-trivy GitHub repos and published tampered Docker Hub images, turning a trusted security tool into a credential-harvesting weapon inside thousands of CI/CD pipelines. It’s a sharp reminder that a CTEM pipeline built entirely on open-source tooling is only as trustworthy as your verification discipline. Ten lessons worth carrying into how you run this stack:</p><p>A “security vendor” label is not a trust guarantee — even scanners get compromised</p><p>Version tags (<a href="https://dev.to/v1">@v1</a>, @latest) are mutable and can be force-pushed by anyone with write access</p><p>Pin every GitHub Action and container image to an immutable full commit SHA or digest, never a tag</p><p>Credential rotation must be atomic — revoke first, then reissue; a staggered rotation window is an open door<br> Avoid pull_request_target in any workflow that touches forked PR code — it runs with base-repo secrets against untrusted input<br> Any CI/CD runner that executed a since-compromised action should have every exposed secret treated as burned, not just rotated<br> Don’t trust an artifact because the filename or registry looks official — verify cryptographically, every time<br> Use short-lived OIDC tokens for cloud access instead of long-lived static credentials in CI/CD<br> Watch for anomalous tag movement or force-pushes on the dependencies you consume — it’s a detectable signal, not just hindsight<br> Build a culture where your own tooling gets the same scrutiny you’d apply to a stranger’s code — trust is earned per-run, not once<br> Verify before you run: cosign + SLSA provenance</p><p>Before any of the binaries or container images in this pipeline touch your infrastructure, verify both the signature and the build provenance:</p><pre># Verify the image was signed by the expected publisher via Sigstore/cosign keyless signing<br>cosign verify --certificate-identity-regexp &quot;https://github.com/&lt;org&gt;/&lt;repo&gt;&quot; \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ ghcr.io/&lt;org&gt;/&lt;tool&gt;:&lt;version&gt;<br># Verify SLSA provenance attestation matches this exact artifact, not just any release<br>slsa-verifier verify-image ghcr.io/&lt;org&gt;/&lt;tool&gt;:&lt;version&gt; \ --source-uri github.com/&lt;org&gt;/&lt;repo&gt; --source-tag v&lt;version&gt;</pre><p>If either check fails, stop — don’t run it “just this once.” That two-command habit, run before every tool in this pipeline gets pulled, is the actual signature of a security engineer who double-checks everything rather than trusting the label on the box.</p><h3>Deployment steps</h3><pre>git clone &lt;your-repo-link-here&gt;<br>cd ctem-pipeline</pre><p><em>(Repo link to be added — this is a placeholder for your actual GitHub URL.)</em></p><ol><li><strong>Install prerequisites</strong></li></ol><ul><li>Go 1.21+ (Amass, Subfinder, Naabu, httpx, Nuclei are Go-based)</li><li>Python 3.10+ (theHarvester, TruffleHog wrapper scripts, ScoutSuite)</li><li>Neo4j (for BloodHound’s graph backend)</li></ul><p><strong>2. Set up the Python virtual environment</strong> (see caveat below before you skip this step) and <strong>Install the Go-based tools</strong></p><pre>python3 -m venv ctem-venv<br>source ctem-venv/bin/activate # Windows: ctem-venv\Scripts\activate<br>pip install -r requirements.txt</pre><pre>go install -v github.com/owasp-amass/amass/v4/...@master<br>go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest<br>go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest<br>go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest <br>go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest  </pre><h4>3. Run the pipeline (order matters — each stage feeds the next)</h4><pre>./run_ctem.sh -d yourdomain.com</pre><p>This chains: theHarvester → Amass/Subfinder → Naabu → httpx → Nuclei, writing results into a/results directory as structured JSON for downstream ingestion into your SIEM or a watchlist/dashboard.</p><p><strong>4. Run cloud posture and identity modules separately</strong> (these need cloud credentials scoped read-only, not the external-recon flow above)</p><pre>scout aws --profile readonly-audit azurehound list --tenant &lt;tenant-id&gt; -o azurehound-output.json</pre><p>Import outputs into your BloodHound Neo4j instance to visualize attack paths.</p><h3>Important caveat: the Python virtual environment isn’t optional</h3><p>If you run pip install against your system Python directly, you will very likely hit dependency<br> conflicts - theHarvester, ScoutSuite, and TruffleHog&#39;s Python wrapper each pin different versions<br> of shared libraries ( requests, boto3, PyYAML are common collision points). The symptom is<br> usually a cryptic ImportError or version-resolution failure that looks like it&#39;s about one tool,<br> but is actually a transitive dependency clash between two unrelated tools.</p><p><strong>Fix:</strong> always use an isolated venv per the steps above, and if you still hit an error:</p><pre>pip install --upgrade pip setuptools wheel pip install -r requirements.txt --no-cache-dir</pre><p>If a specific tool’s install still fails, isolate it into its <strong>own</strong> venv rather than fighting version pins in a shared environment — it costs a few extra seconds of setup and saves hours of dependency debugging.</p><p><em>This pipeline is designed to be run by anyone with basic CLI familiarity — no dedicated infrastructure, no recurring SaaS bill, and no cloud-vendor lock-in. The goal isn’t a fancy dashboard; it’s finding what an attacker would find, before they do.</em></p><p><em>Originally published at </em><a href="https://dev.to/gauravgarv4u/building-a-continuous-threat-exposure-management-ctem-program-open-source-cloud-agnostic-and-3keg"><em>https://dev.to</em></a><em> on September 2, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7c7622b053c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>