<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ahmets.io Blog</title><link>https://ahmets.io/blog/</link><description>Articles on cloud security, container security, and DevSecOps by Ahmet Kulekci.</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 01 Dec 2026 15:21:51 +0300</lastBuildDate><atom:link href="https://ahmets.io/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>OWASP OT Top 10: Field Scenarios and IEC 62443 Mitigations (Part 1)</title><link>https://ahmets.io/blog/owasp-ot-top-10-part-1/</link><pubDate>Thu, 27 Aug 2026 00:00:00 +0300</pubDate><guid>https://ahmets.io/blog/owasp-ot-top-10-part-1/</guid><description>&lt;p>If you do not know what runs on an OT network or which systems need to communicate, how do you decide what to patch, monitor, or restrict? That is the question I bring to the &lt;a href="https://ot.owasp.org/v/2025/summary/">OWASP OT Top 10&lt;/a>. Asset inventory and zone and conduit design give me a starting point for understanding the other risks and deciding which controls to invest in first. That is a field judgment, not an implementation order prescribed by OWASP.&lt;/p>
&lt;p>The list is not a catalog of zero-days or exploits. It makes decisions about architecture, commissioning, maintenance, and contracts visible. In OT, a software flaw is not always the issue. Who can communicate with the device, and under what conditions, matters just as much.&lt;/p>
&lt;p>For this article, I drew on notes and experience from more than 30 power plants alongside the sources cited below. The plant scenarios illustrate risks you might encounter in the field; they do not describe the configuration of any particular site.&lt;/p>
&lt;h2 id="what-is-ot-and-why-cant-we-manage-it-like-it" tabindex="-1">What is OT, and why can&amp;rsquo;t we manage it like IT?&lt;a class="heading-anchor" href="#what-is-ot-and-why-cant-we-manage-it-like-it" aria-label="Permalink to What is OT, and why can’t we manage it like IT?">#&lt;/a>&lt;/h2>
&lt;p>Operational technology (OT) is the hardware and software used to monitor or control physical equipment and processes. A programmable logic controller (PLC) processes field inputs and controls outputs. A human-machine interface (HMI) lets operators see the process and issue commands. SCADA provides central supervision of distributed sites; a distributed control system (DCS) manages multiple control loops in a complex plant. A safety instrumented system (SIS) has a different job: to take the process to a safe state when needed.&lt;/p>
&lt;p>Confidentiality, integrity, and availability matter in OT too. When setting priorities, look at the physical consequences. Take a hydroelectric plant:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Confidentiality:&lt;/strong> A leaked turbine controller configuration exposes operating parameters and design details.&lt;/li>
&lt;li>&lt;strong>Availability:&lt;/strong> If the PLC that runs the turbine governor stops responding, the plant&amp;rsquo;s protection logic may take the turbine offline, causing an unplanned loss of generation. The response and its timing are site-specific.&lt;/li>
&lt;li>&lt;strong>Integrity and safety:&lt;/strong> If an incorrect setpoint causes the wicket gates to move at a rate the design does not account for, it can increase the risk of water hammer in the penstock. The consequence is not just a wrong value; it can mean equipment damage and a safety hazard for people at the site.&lt;/li>
&lt;/ul>
&lt;figure>&lt;img src="https://ahmets.io/images/owasp-ot-top-10/plant-safety.svg"
 alt="Hydroelectric plant schematic with a waterway and turbine above separate boxes for process control and the safety function." width="960" height="360">&lt;figcaption>
 &lt;p>Hydroelectric plant example: Process control keeps normal operations running. The safety function takes the process to a safe state when needed. This is not a network topology or a plant design.&lt;/p>
 &lt;/figcaption>
&lt;/figure>

&lt;p>Safety is an engineering discipline in its own right, not a subset of cybersecurity. &lt;a href="https://webstore.iec.ch/en/publication/60766">IEC 61511&lt;/a> addresses safety instrumented systems in the process industries. Before introducing a cybersecurity control, verify that the safety function can still operate within its required response time and with the necessary independence. Network hardening alone does not address the need for independence between the SIS and the basic process control system (BPCS). The &lt;a href="https://www.cisa.gov/sites/default/files/publications/AA22-083A_TTPs_of_Indicted_State-Sponsored_Russian_Cyber_Actors_Targeting_the_Energy_Sector.pdf">TRITON/TRISIS incident&lt;/a>, in which safety controllers were themselves the target, shows why that distinction matters.&lt;/p>
&lt;p>OWASP&amp;rsquo;s 2025 list gives us a vocabulary for risks that directly affect OT operations. I cover the first three entries with field scenarios and controls. The &lt;a href="https://www.isa.org/standards-and-publications/isa-standards/isa-iec-62443-series-of-standards">ISA/IEC 62443 series&lt;/a>, the Purdue Model, and &lt;a href="https://csrc.nist.gov/pubs/sp/800/82/r3/final">NIST SP 800-82 Rev. 3&lt;/a> provide context for the controls below; the controls are not a ready-made compliance checklist.&lt;/p>
&lt;figure>&lt;img src="https://ahmets.io/images/owasp-ot-top-10/first-three.svg"
 alt="Three cards: A01 asset inventory, A02 vulnerability management, and A03 supplier access and components." width="960" height="350">&lt;figcaption>
 &lt;p>Three questions for Part 1: What is in the field? Which assets need attention first? Who supplies the components and provides service access?&lt;/p>
 &lt;/figcaption>
&lt;/figure>

&lt;h2 id="a01-unknown-assets-and-undocumented-services" tabindex="-1">A01: Unknown assets and undocumented services&lt;a class="heading-anchor" href="#a01-unknown-assets-and-undocumented-services" aria-label="Permalink to A01: Unknown assets and undocumented services">#&lt;/a>&lt;/h2>
&lt;p>&lt;a href="https://ot.owasp.org/v/2025/the-top-10/unknown-assets-and-admin-access/">OWASP A01&lt;/a> addresses assets and services the site has not recorded. If a device is missing from the inventory, it cannot reliably be included in patching, backups, or network monitoring. Services left open at commissioning can also be missed when the system goes into production.&lt;/p>
&lt;p>&lt;strong>Field scenario.&lt;/strong> A maintenance team adds an unrecorded switch and wireless access point to a control cabinet to make remote support easier. The connection is missing from the network diagram and sits outside the site&amp;rsquo;s approved access path. Maintenance that would normally be monitored can now take place without a record.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Keep the inventory current.&lt;/strong> Reconcile passive network discovery with cabinet inspections, procurement records, and commissioning documents. Assets that rarely generate network traffic may not show up in passive monitoring alone.&lt;/li>
&lt;li>&lt;strong>Verify the configuration at commissioning.&lt;/strong> Review unnecessary services, ports, and default accounts. Test any change or shutdown with vendor support and through the site&amp;rsquo;s change process.&lt;/li>
&lt;li>&lt;strong>Document connections.&lt;/strong> Define approved connections across Purdue levels. Give temporary maintenance connections an owner and an expiry date too.&lt;/li>
&lt;/ul>
&lt;h2 id="a02-devices-with-known-vulnerabilities" tabindex="-1">A02: Devices with known vulnerabilities&lt;a class="heading-anchor" href="#a02-devices-with-known-vulnerabilities" aria-label="Permalink to A02: Devices with known vulnerabilities">#&lt;/a>&lt;/h2>
&lt;p>&lt;a href="https://ot.owasp.org/v/2025/the-top-10/accessible-devices-with-known-vulnerabilities/">OWASP A02&lt;/a> asks not only whether a device has a known weakness, but also whether it is reachable. Vendor validation, warranty terms, and scheduled outages can all delay patching. &lt;a href="https://storage.ghost.io/c/ea/a0/eaa014ba-c39c-4d9a-a133-41045822028c/content/files/resources/ot-icefall-report.pdf">Forescout&amp;rsquo;s OT:ICEFALL research&lt;/a> also shows that expected product behavior can rest on insecure design assumptions. A CVSS score alone is not enough to set patch priorities in OT.&lt;/p>
&lt;p>&lt;strong>Field example.&lt;/strong> A Unitronics PLC/HMI at the Aliquippa water utility in Pennsylvania was affected in one of the 2023 incidents. The &lt;a href="https://www.cisa.gov/sites/default/files/2024-12/aa23-335a-irgc-affiliated-cyber-actors-exploit-plcs-in-multiple-sectors.pdf">CISA advisory&lt;/a> highlights internet exposure and default credentials. The vendor tracks the default administrative password under &lt;a href="https://downloads.unitronicsplc.com/Sites/plc/Technical_Library/Unitronics-Cybersecurity-Advisory-2023-001-CVE-2023-6448.pdf">CVE-2023-6448&lt;/a>.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Prioritize by process risk.&lt;/strong> Evaluate network exposure together with process criticality and the conditions that make a weakness exploitable. Use IEC 62443-2-3 as a reference for patch planning.&lt;/li>
&lt;li>&lt;strong>Reduce exposure while waiting for a patch.&lt;/strong> Permit only necessary communications across zone boundaries. A passive sensor fed by a SPAN port or TAP provides visibility; it does not block traffic.&lt;/li>
&lt;li>&lt;strong>Treat virtual patching as a separate decision.&lt;/strong> If active blocking is needed, enforce the rule at an appropriate security boundary. Assess latency, failure behavior, and rollback before deployment.&lt;/li>
&lt;/ul>
&lt;h2 id="a03-inadequate-supply-chain-management" tabindex="-1">A03: Inadequate supply chain management&lt;a class="heading-anchor" href="#a03-inadequate-supply-chain-management" aria-label="Permalink to A03: Inadequate supply chain management">#&lt;/a>&lt;/h2>
&lt;p>When you buy a PLC, you also buy the communications stacks and third-party components inside it. The &lt;a href="https://docs.forescout.com/modules-plugins/plugin-misc/security-policy-template-plugin/security-policy-template-plugin/vr-ripple20-r20-0-7.htm">Ripple20 vulnerabilities&lt;/a> in the Treck TCP/IP stack show how devices from different vendors can be affected by the same underlying component. &lt;a href="https://ot.owasp.org/v/2025/the-top-10/inadequate_supply_chain_management/">OWASP A03&lt;/a> also covers supplier dependencies and third-party processes.&lt;/p>
&lt;p>&lt;strong>Field scenario.&lt;/strong> An engineering, procurement, and construction (EPC) contractor or turbine vendor leaves a remote connection in place for warranty support. If the connection is missing from the approved access inventory, the plant team cannot tell when a session starts, who approved it, or whether it was closed when the work ended. &lt;a href="https://www.dragos.com/threat/azurite">Dragos&amp;rsquo;s AZURITE profile&lt;/a> shows that third-party and supply chain relationships can themselves be targets.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Set requirements before awarding the contract.&lt;/strong> Reflect IEC 62443-4-1 secure development processes in acceptance criteria for manufacturers and IEC 62443-2-4 service requirements in criteria for integrators and service providers.&lt;/li>
&lt;li>&lt;strong>Ask for component visibility at handover.&lt;/strong> Check the software bill of materials (SBOM), the vulnerability reporting process, and end-of-support dates against the acceptance criteria.&lt;/li>
&lt;li>&lt;strong>Verify incoming media separately.&lt;/strong> Inspect removable media and firmware packages in an isolated environment before bringing them onto the production network. Verify the vendor&amp;rsquo;s digital signature where available.&lt;/li>
&lt;li>&lt;strong>Tie remote access to a work order.&lt;/strong> Use an approved access broker or privileged access management (PAM) system, with only the privileges and time needed for the job. Include session recording and closure in the site&amp;rsquo;s access process.&lt;/li>
&lt;/ul>
&lt;h2 id="in-part-2" tabindex="-1">In Part 2&lt;a class="heading-anchor" href="#in-part-2" aria-label="Permalink to In Part 2">#&lt;/a>&lt;/h2>
&lt;p>In Part 2, I will look at insufficient authentication (A04), poor network segmentation (A05), unmanaged remote access, and how an OT security operations center can detect these risks.&lt;/p></description></item><item><title>Container Security Red Team Notes - II</title><link>https://ahmets.io/blog/container-security-red-team-notes-2/</link><pubDate>Wed, 19 Nov 2025 01:00:00 +0300</pubDate><guid>https://ahmets.io/blog/container-security-red-team-notes-2/</guid><description>&lt;p>This is the second part of the Container Security Red Team Notes series. In this post, we will focus on privilege escalation, lateral movement, and persistence within a Kubernetes cluster.&lt;/p>
&lt;h2 id="3-privilege-escalation--lateral-movement" tabindex="-1">3. Privilege Escalation &amp;amp; Lateral Movement&lt;a class="heading-anchor" href="#3-privilege-escalation--lateral-movement" aria-label="Permalink to 3. Privilege Escalation &amp;amp; Lateral Movement">#&lt;/a>&lt;/h2>
&lt;h3 id="service-accounts" tabindex="-1">Service Accounts&lt;a class="heading-anchor" href="#service-accounts" aria-label="Permalink to Service Accounts">#&lt;/a>&lt;/h3>
&lt;p>Kubernetes mounts a service account token at &lt;code>/var/run/secrets/kubernetes.io/serviceaccount/token&lt;/code>. If this account has excessive permissions (like &lt;code>cluster-admin&lt;/code>), it can be used to take over the cluster.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Check permissions with kubectl (if installed)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">kubectl auth can-i --list&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;h3 id="cloud-metadata-services" tabindex="-1">Cloud Metadata Services&lt;a class="heading-anchor" href="#cloud-metadata-services" aria-label="Permalink to Cloud Metadata Services">#&lt;/a>&lt;/h3>
&lt;p>If the cluster is running on a cloud provider (AWS, Azure, GCP), the instance metadata service might be accessible from the pod.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># AWS Metadata&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">curl http://169.254.169.254/latest/meta-data/iam/security-credentials/&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;h2 id="4-persistence" tabindex="-1">4. Persistence&lt;a class="heading-anchor" href="#4-persistence" aria-label="Permalink to 4. Persistence">#&lt;/a>&lt;/h2>
&lt;p>Persistence can be achieved by deploying malicious pods, creating backdoored images, or modifying cluster configurations (e.g., ValidatingAdmissionWebhooks).&lt;/p>
&lt;h3 id="malicious-admission-controllers" tabindex="-1">Malicious Admission Controllers&lt;a class="heading-anchor" href="#malicious-admission-controllers" aria-label="Permalink to Malicious Admission Controllers">#&lt;/a>&lt;/h3>
&lt;p>An attacker with sufficient privileges can deploy a MutatingAdmissionWebhook that injects a sidecar container into every new pod, allowing them to intercept traffic or execute commands.&lt;/p>
&lt;h3 id="shadow-api-server" tabindex="-1">Shadow API Server&lt;a class="heading-anchor" href="#shadow-api-server" aria-label="Permalink to Shadow API Server">#&lt;/a>&lt;/h3>
&lt;p>Creating a static pod manifest on a control plane node can launch a rogue API server or a privileged pod that persists even after the original entry point is closed.&lt;/p>
&lt;h2 id="conclusion" tabindex="-1">Conclusion&lt;a class="heading-anchor" href="#conclusion" aria-label="Permalink to Conclusion">#&lt;/a>&lt;/h2>
&lt;p>Container security requires a defense-in-depth approach. Securing the supply chain, hardening the runtime environment, and monitoring for anomalous behavior are key to preventing these attacks.&lt;/p></description></item><item><title>Container Security Red Team Notes - I</title><link>https://ahmets.io/blog/container-security-red-team-notes/</link><pubDate>Wed, 19 Nov 2025 00:00:00 +0300</pubDate><guid>https://ahmets.io/blog/container-security-red-team-notes/</guid><description>&lt;p>Container security is a critical aspect of modern cloud-native environments. As a Red Teamer, understanding how to exploit containerized applications and the underlying orchestration platforms (like Kubernetes) is essential for identifying vulnerabilities and improving security posture.&lt;/p>
&lt;p>This post serves as the first part of a collection of notes and techniques for assessing container security, focusing on initial access and container breakout.&lt;/p>
&lt;h2 id="1-initial-access" tabindex="-1">1. Initial Access&lt;a class="heading-anchor" href="#1-initial-access" aria-label="Permalink to 1. Initial Access">#&lt;/a>&lt;/h2>
&lt;p>Initial access to a containerized environment often starts with compromising a running container or gaining access to the cluster API.&lt;/p>
&lt;h3 id="vulnerable-applications" tabindex="-1">Vulnerable Applications&lt;a class="heading-anchor" href="#vulnerable-applications" aria-label="Permalink to Vulnerable Applications">#&lt;/a>&lt;/h3>
&lt;p>Web applications running inside containers are susceptible to the same vulnerabilities as traditional applications (SQLi, RCE, SSRF). However, successful exploitation lands the attacker inside a container, which is a restricted environment.&lt;/p>
&lt;h3 id="misconfigured-kubelet" tabindex="-1">Misconfigured Kubelet&lt;a class="heading-anchor" href="#misconfigured-kubelet" aria-label="Permalink to Misconfigured Kubelet">#&lt;/a>&lt;/h3>
&lt;p>If the Kubelet API is exposed (port 10250) and allows anonymous access, an attacker can run commands inside containers.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Check if Kubelet allows anonymous access&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">curl -k https://&amp;lt;node-ip&amp;gt;:10250/pods&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;h2 id="2-container-breakout" tabindex="-1">2. Container Breakout&lt;a class="heading-anchor" href="#2-container-breakout" aria-label="Permalink to 2. Container Breakout">#&lt;/a>&lt;/h2>
&lt;p>Once inside a container, the goal is often to escape to the host node.&lt;/p>
&lt;h3 id="privileged-containers" tabindex="-1">Privileged Containers&lt;a class="heading-anchor" href="#privileged-containers" aria-label="Permalink to Privileged Containers">#&lt;/a>&lt;/h3>
&lt;p>Privileged containers have access to all devices on the host and bypass many security restrictions.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Check if running as privileged&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">capsh --print&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;p>If you see &lt;code>cap_sys_admin&lt;/code>, you are likely in a privileged container. You can mount the host filesystem and access sensitive files.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Mount host root filesystem&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mkdir /host
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mount /dev/sda1 /host
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">chroot /host&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure>
&lt;h3 id="docker-socket-mounting" tabindex="-1">Docker Socket Mounting&lt;a class="heading-anchor" href="#docker-socket-mounting" aria-label="Permalink to Docker Socket Mounting">#&lt;/a>&lt;/h3>
&lt;p>If the Docker socket (&lt;code>/var/run/docker.sock&lt;/code>) is mounted inside the container, you can communicate with the Docker daemon to create new privileged containers or execute commands on the host.&lt;/p>
&lt;figure class="code-block">
 &lt;figcaption class="code-lang">bash&lt;/figcaption>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># List containers using the mounted socket&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">curl --unix-socket /var/run/docker.sock http://localhost/containers/json&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/figure></description></item></channel></rss>