<?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 Luis Toro (aka @LobuhiSec) on Medium]]></title>
        <description><![CDATA[Stories by Luis Toro (aka @LobuhiSec) on Medium]]></description>
        <link>https://medium.com/@lobuhisec?source=rss-28e384ca5f9f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sl2PXtu9vzw-R2-Pb75L2w.jpeg</url>
            <title>Stories by Luis Toro (aka @LobuhiSec) on Medium</title>
            <link>https://medium.com/@lobuhisec?source=rss-28e384ca5f9f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:32:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lobuhisec/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[Ingress-NGINX Is Not NGINX Ingress]]></title>
            <link>https://lobuhisec.medium.com/ingress-nginx-is-not-nginx-ingress-ed424bd30964?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed424bd30964</guid>
            <category><![CDATA[nginx-ingress]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 15 May 2026 07:45:15 GMT</pubDate>
            <atom:updated>2026-05-15T07:45:15.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding the Kubernetes Ingress Retirement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*70iLR7x-P6XU2XRC.jpeg" /></figure><p>In late 2025, the Kubernetes project announced that ingress-nginx would be retired in March 2026. Almost immediately, confusion spread across the cloud native ecosystem.</p><p>Some people interpreted the announcement as “NGINX Ingress is dead.” Others believed Kubernetes was deprecating Ingress itself. Neither statement is correct. The reality is more nuanced.</p><p>The project being retired is specifically the community-maintained kubernetes/ingress-nginx controller, not the broader concept of Kubernetes Ingress, and not the NGINX Ingress Controller maintained by F5/NGINX. (<a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><p>This distinction matters because Kubernetes networking has historically used the word “Ingress” to refer to several different things at once:</p><ul><li>The Kubernetes Ingress API resource</li><li>The community ingress-nginx controller</li><li>The NGINX Inc/F5 ingress controller</li><li>The broader ingress-controller ecosystem</li></ul><p>Many discussions online blur these together, which is why the retirement announcement generated so much confusion.</p><p>This article explains what is actually being retired, what is not, and what it means for the future of Kubernetes networking.</p><h3>The Source of the Confusion</h3><p>Much of the confusion comes from two repositories with nearly identical names:</p><ul><li>kubernetes/ingress-nginx</li><li>nginx/kubernetes-ingress</li></ul><p>At first glance, they appear interchangeable, but they are not. Both implement Kubernetes ingress functionality using NGINX. Both route HTTP traffic into Kubernetes clusters. Both support Kubernetes Ingress resources.</p><p>But they are entirely separate projects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xG77fChj2x1iQh6KHUo2Pg.png" /></figure><p>The retirement only affects the first one.</p><h3>What Exactly Is Being Retired?</h3><p>The project being retired is:</p><p><a href="https://github.com/kubernetes/ingress-nginx?utm_source=chatgpt.com">kubernetes/ingress-nginx</a></p><p>This is the controller most Kubernetes users informally referred to as “NGINX Ingress.”</p><p>It became the de facto default ingress controller across tutorials, Helm charts, examples, managed Kubernetes guides, homelabs, and production environments.</p><p>According to the Kubernetes project:</p><ul><li>Maintenance ended in March 2026</li><li>No more releases will be published</li><li>No further bug fixes or security patches will be provided</li><li>The repository will become read-only</li></ul><p>Existing deployments will continue functioning, but they will no longer receive upstream maintenance. (<a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><p>The Kubernetes Steering Committee later stated that the controller had been used by “roughly half of cloud native environments.” (<a href="https://kubernetes.io/blog/2026/01/29/ingress-nginx-statement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><p>This is therefore not a small ecosystem package quietly reaching end-of-life. It is one of the most widely deployed Kubernetes networking components ever built.</p><h3>Kubernetes Is Not Removing Ingress</h3><p>Another common misunderstanding is the belief that Kubernetes is removing the Ingress API itself.</p><p>That is also incorrect. The Kubernetes Ingress resource still exists and remains supported. However, the Kubernetes documentation now explicitly states:</p><blockquote><em>“The Ingress API has been frozen.”</em></blockquote><p><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/?utm_source=chatgpt.com">Kubernetes Ingress documentation</a></p><p>This means:</p><ul><li>The API remains available</li><li>Existing functionality continues to work</li><li>Kubernetes is not planning further feature development for Ingress itself</li></ul><p>Instead, the Kubernetes ecosystem is directing future networking evolution toward Gateway API. This distinction is important.</p><p>Ingress is not deprecated in the sense of being removed from Kubernetes. But it is now effectively considered a stable, completed API, while newer capabilities are expected to evolve elsewhere.</p><h3>Why Is ingress-nginx Being Retired?</h3><p>According to the Kubernetes project, the central issue was sustainability.</p><p>The official retirement announcement explains that SIG Network and the Security Response Committee were unable to secure sufficient long-term support to keep the project sustainable. The project had reportedly been operating under “best-effort maintenance” for years before the retirement decision was made. (<a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><p>The Kubernetes Steering Committee later added:</p><blockquote><em>“For the last several years, it has been maintained solely by one or two people working in their free time.”</em></blockquote><p>(<a href="https://kubernetes.io/blog/2026/01/29/ingress-nginx-statement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><p>The official announcements frame the retirement primarily as a sustainability and maintenance problem, not as Kubernetes abandoning ingress controllers altogether.</p><p>At the same time, the ecosystem itself has evolved significantly since Ingress was originally introduced.</p><h3>The Other NGINX Ingress Controller Still Exists</h3><p>The retirement announcement does not affect the NGINX-maintained controller: <a href="https://github.com/nginx/kubernetes-ingress?utm_source=chatgpt.com">nginx/kubernetes-ingress</a></p><p>This project is maintained independently by F5/NGINX and continues to be actively developed. Following the retirement announcement, F5 explicitly positioned its controller as a long-term maintained alternative for organizations currently running ingress-nginx. (<a href="https://community.f5.com/kb/technicalarticles/the-ingress-nginx-alternative-f5-nginx-ingress-controller-for-the-long-term/345041?utm_source=chatgpt.com">community.f5.com</a>)</p><p>The distinction matters because many organizations were evaluating migration strategies, and these migrations may involve entirely different products, architectures, support models, and operational approaches.</p><h3>The Shift Toward Gateway API</h3><p>The broader context behind this transition is the Kubernetes ecosystem’s gradual move toward Gateway API.</p><p>Gateway API is not simply “Ingress v2.” It is a more structured and extensible networking model intended to address limitations that emerged as Ingress became overloaded with annotations, controller-specific behavior, and custom extensions over the years.</p><p>The official Kubernetes documentation describes Gateway API as an evolution beyond the original Ingress model.</p><p><a href="https://kubernetes.io/docs/concepts/services-networking/gateway/?utm_source=chatgpt.com">Kubernetes Gateway API documentation</a></p><p>Gateway API introduces resources such as:</p><ul><li>GatewayClass</li><li>Gateway</li><li>HTTPRoute</li><li>TCPRoute</li><li>ReferenceGrant</li></ul><p>These resources separate infrastructure ownership from application routing concerns more explicitly than the original Ingress abstraction.</p><p>For many platform teams, this is the more important long-term story.</p><p>The retirement of ingress-nginx is happening at the same time Kubernetes networking is shifting toward newer traffic-management models and APIs.</p><h3>What Should Organizations Do Now?</h3><p>There is no single migration path for every environment.</p><p>Organizations currently using ingress-nginx broadly have several options.</p><h4>1. Continue Running ingress-nginx Temporarily</h4><p>Existing deployments will continue to function after March 2026.</p><p>However, organizations remaining on the controller will assume responsibility for future maintenance, security exposure, and vulnerability management once upstream support ends. (<a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/?utm_source=chatgpt.com">kubernetes.io</a>)</p><h4>2. Migrate to Another Ingress Controller</h4><p>Possible alternatives include:</p><ul><li>NGINX Ingress Controller (F5)</li><li>Traefik</li><li>HAProxy Ingress</li><li>Kong</li><li>Envoy Gateway</li><li>Cloud-provider-specific ingress controllers</li></ul><p>This path preserves the traditional ingress-controller operational model while moving away from the retired community project.</p><h4>3. Adopt Gateway API</h4><p>Some organizations are using this transition as an opportunity to modernize Kubernetes networking entirely.</p><p>This is particularly attractive for multi-team platforms, large-scale environments, or organizations already investing in service mesh or advanced traffic management.</p><h4>4. Run Both During Migration</h4><p>Many environments will likely operate Ingress and Gateway API simultaneously during transition periods.</p><p>This is especially realistic for large enterprises where networking migrations happen incrementally over long timeframes.</p><h3>The Bigger Picture</h3><p>The retirement of ingress-nginx does not mean NGINX is disappearing from Kubernetes. It does not mean ingress controllers are disappearing either. And it does not mean Kubernetes networking is collapsing. What it does represent is a transition point.</p><p>The original Kubernetes Ingress model helped standardize how applications were exposed externally during Kubernetes’ rapid adoption years. The community ingress-nginx controller became one of the most widely deployed implementations of that model. But Kubernetes networking has evolved substantially since then.</p><p>The Ingress API itself is now frozen. Gateway API is becoming the focus for future innovation. Meanwhile, organizations are reassessing which controllers, vendors, and architectures best fit long-term operational and security requirements.</p><p>The important takeaway is that the specific community ingress controller is reaching end-of-life while the Kubernetes networking ecosystem evolves toward newer APIs and different implementation models. That distinction changes the entire conversation.</p><h3>References</h3><ul><li><a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/?utm_source=chatgpt.com">Kubernetes ingress-nginx retirement announcement</a></li><li><a href="https://kubernetes.io/blog/2026/01/29/ingress-nginx-statement/?utm_source=chatgpt.com">Kubernetes Steering Committee statement</a></li><li><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/?utm_source=chatgpt.com">Kubernetes Ingress documentation</a></li><li><a href="https://kubernetes.io/docs/concepts/services-networking/gateway/?utm_source=chatgpt.com">Kubernetes Gateway API documentation</a></li><li><a href="https://community.f5.com/kb/technicalarticles/the-ingress-nginx-alternative-f5-nginx-ingress-controller-for-the-long-term/345041?utm_source=chatgpt.com">F5 article on NGINX Ingress Controller as an alternative</a></li><li><a href="https://github.com/kubernetes/ingress-nginx?utm_source=chatgpt.com">kubernetes/ingress-nginx repository</a></li><li><a href="https://github.com/nginx/kubernetes-ingress?utm_source=chatgpt.com">nginx/kubernetes-ingress repository</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed424bd30964" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond RBAC: Building Custom Verbs in Kubernetes with Veil]]></title>
            <link>https://lobuhisec.medium.com/beyond-rbac-building-custom-verbs-in-kubernetes-with-veil-6e788e4d8c0e?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e788e4d8c0e</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[sensitive-data-exposure]]></category>
            <category><![CDATA[kubernetes-rbac]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 08 May 2026 07:27:00 GMT</pubDate>
            <atom:updated>2026-05-08T07:27:00.143Z</atom:updated>
            <content:encoded><![CDATA[<h3>How field-level access control closes the gap left by action-resource RBAC.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KNa2OgCssPksQpAJJXt0qg.png" /></figure><p><strong>Disclaimer:</strong> Veil is currently an early proof-of-concept created to explore whether field-level authorization could fit naturally into the Kubernetes ecosystem. The project is still experimental and should not be considered production-ready. The main goal at this stage is to gather early feedback from the Kubernetes and security communities, validate the design assumptions and understand whether this problem resonates with real-world operators.</p><p>You locked down your Kubernetes cluster. Roles are tight, service accounts follow least-privilege principles and the RBAC review from the security team came back clean.</p><p>Everything appears correct: users with list permissions on Secrets cannot retrieve their values.</p><pre>$ kubectl get secrets --as=system:serviceaccount:default:secret-reader<br>NAME        TYPE     DATA   AGE<br>my-secret   Opaque   2      2d7h<br>$ kubectl get secret my-secret --as=system:serviceaccount:default:secret-reader<br>Error from server (Forbidden): secrets &quot;my-secret&quot; is forbidden: User &quot;system:serviceaccount:default:secret-reader&quot; cannot get resource &quot;secrets&quot; in API group &quot;&quot; in the namespace &quot;default&quot;</pre><p>Then someone who can only list Secrets runs:</p><pre>$ kubectl get secrets --as=system:serviceaccount:default:secret-reader -o yaml<br>apiVersion: v1<br>items:<br>- apiVersion: v1<br>  data:<br>    password: czNjcjN0<br>    username: YWRtaW4=<br>  kind: Secret<br>  metadata:<br>    creationTimestamp: &quot;2026-04-24T10:10:20Z&quot;<br>    name: my-secret<br>    namespace: default<br>    resourceVersion: &quot;641&quot;<br>    uid: 05fd4157-30c8-4872-a5be-ea09fed6833d<br>  type: Opaque<br>kind: List<br>metadata:<br>  resourceVersion: &quot;&quot;</pre><p>Every secret value in that namespace appears in the output. They are base64 encoded, but decoding them takes seconds.</p><p>Nothing here indicates a misconfigured RBAC policy. The cluster behaves exactly as Kubernetes was designed to behave.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlBOgv6NVE-II1GjEsG7fA.png" /><figcaption>“Role Based Access Control Good Practices” in K8s Documentation</figcaption></figure><p>The real issue is that Kubernetes RBAC controls <strong>actions against resources</strong>, not <strong>data exposure</strong>. It determines whether an identity can operate on a resource, but not which parts of that resource should be visible. Kubernetes handles the first problem well. The second is absent from the native model.</p><p>That gap is where Veil lives.</p><h3>What security teams notice during audits</h3><p>Kubernetes RBAC operates at the resource boundary. If a subject has permission to perform an operation on a resource, the API server returns the entire serialized object.</p><p>For many resources this behaviour is harmless. For others it becomes a source of exposure.</p><p>Consider the list verb on Secrets. Granting secrets/list to a CI pipeline or monitoring component often looks reasonable. Those systems may legitimately need to know which Secrets exist.</p><p>What the permission actually returns is the full object representation for every Secret within scope, including the .data field that holds credential values.</p><p>A simple command illustrates the point:</p><pre>kubectl get secrets -n production \<br>  --as=system:serviceaccount:ci:pipeline-runner -o json \<br>  | jq &#39;.items[].data | map_values(@base64d)&#39;</pre><p>If the service account has list permissions, , this works exactly as shown. Database credentials, API tokens and TLS keys all appear in the output.</p><p>The behaviour is technically correct. From a security perspective, list is essentially a mass-read operation.</p><p>Another example appears in Pod specifications. Even if an identity cannot read Secrets directly, it may still discover them indirectly through workload definitions. Pod manifests reference mounted Secrets through the field spec.volumes[*].secret.secretName.</p><p>With permission to manage Pods, an identity can reconstruct which workloads depend on which Secrets.</p><pre>kubectl get pods -n production -o json \<br> | jq &#39;.items[] |<br>      {pod: .metadata.name,<br>       secrets: [.spec.volumes[]?.secret.secretName | select(.!=null)]}&#39;</pre><p>From a security perspective this information is often enough to map sensitive dependencies across the cluster.</p><p>Audits regularly reveal similar patterns elsewhere in the API. Node objects expose operating system and kernel metadata. ConfigMaps frequently contain configuration that reveals internal topology. ServiceAccount objects expose token references linked to downstream permissions.</p><p>None of these behaviours represent a bug. They are a consequence of the design boundary of RBAC.</p><p>RBAC decides whether a resource is accessible. Once access is granted, the entire object is returned.</p><h3>Why Field-Level Access Control Fits Kubernetes’ Philosophy</h3><p>Kubernetes has always embraced <strong>fine-grained control as a core design principle</strong>. Across the platform, operators are given increasingly precise mechanisms to define what workloads are allowed to do and how they interact with the environment.</p><p>At the lowest levels, controls exist over <strong>syscalls and kernel interactions</strong> through mechanisms such as seccomp profiles. At the networking layer, administrators can define <strong>NetworkPolicies</strong> that precisely constrain which pods may communicate with one another. At higher layers, service meshes allow operators to enforce <strong>application-layer policies</strong>, inspecting and filtering requests based on paths, headers, or identities.</p><p>This progressive increase in <strong>policy granularity</strong> is one of the defining characteristics of the Kubernetes ecosystem. Operators can restrict behavior at multiple layers of the stack with remarkable precision.</p><p>Yet when it comes to <strong>authorization of API resources</strong>, Kubernetes RBAC stops at the resource boundary. Once a subject is authorized to perform an operation on a resource, the API server returns the entire serialized object. The system does not provide a native way to restrict which <strong>fields of that object</strong> should be visible to the caller.</p><p>From a hardening perspective, this leaves an interesting gap. Organizations that wish to implement <strong>more fine-grained authorization models</strong> may want to allow access to the existence or metadata of resources without exposing sensitive fields contained within them. Field-level access control would allow RBAC to evolve in the same direction of precision that Kubernetes already demonstrates in other areas of the platform.</p><h3>Precedents in Other Systems</h3><p>The idea of restricting access to <strong>parts of a resource rather than the resource as a whole</strong> is not new. Several mature systems implement similar concepts.</p><p>Relational databases provide one of the most familiar examples. Many SQL engines allow administrators to grant <strong>column-level privileges</strong>, enabling users to query only specific columns of a table while denying access to others. An analyst, for instance, might be able to read an employee’s name and department but not their salary.</p><p>This model demonstrates that authorization systems can operate at a <strong>sub-resource level</strong> while preserving the integrity of the underlying object. The resource still exists as a single entity, but the system enforces visibility boundaries on the data returned to the caller.</p><p>In environments where sensitive information is embedded within otherwise useful resources, such approaches allow administrators to implement <strong>principle-of-least-privilege policies with greater precision</strong>.</p><p>For Kubernetes, introducing field-level access control would represent a similar step toward <strong>more expressive authorization</strong>, aligning RBAC with the broader philosophy of granular policy enforcement that already permeates the platform.</p><h3>Introducing Veil</h3><p>Veil (<a href="https://github.com/veil-k8s/veil">veil-k8s/veil</a>) is a PoC that extends Kubernetes RBAC by introducing field-level visibility control without replacing the existing authorization model.</p><p>The central concept is a resource called <strong>FieldPolicy</strong>. A FieldPolicy defines a custom verb that wraps a native Kubernetes verb while applying filtering rules to the returned object.</p><p>A simplified example looks like this:</p><pre>apiVersion: config.veil.io/v1alpha1<br>kind: FieldPolicy<br>metadata:<br>  name: real-list<br>spec:<br>  parentVerbs: [&quot;list&quot;]<br>  mode: allow<br>  fields:<br>    - &quot;$.metadata.name&quot;<br>    - &quot;$.metadata.namespace&quot;<br>    - &quot;$.metadata.labels&quot;</pre><p>In this policy a new verb named real-list is introduced. Internally it wraps the native list verb, but only the declared fields are returned to the client. Sensitive fields such as .data never appear in the response.</p><p>The filtering happens on the server side before the response leaves the cluster.</p><p>Nothing is hidden by client-side tooling or post-processing scripts. The API server simply returns a sanitized object.</p><h3>Architecture</h3><p>Veil is implemented using native Kubernetes extension mechanisms. It relies on the API aggregation layer together with a CRD and two admission webhooks.</p><p>When a client queries a resource under the veil.io API group, the request is routed to an extension API server. The server verifies authorization using a SubjectAccessReview, retrieves the upstream resource from the Kubernetes API server and applies the FieldPolicy filtering rules before returning the response.</p><p>The FieldPolicy definitions themselves are stored as Kubernetes resources under the config.veil.io API group. These objects define which verbs are wrapped, which filtering mode is applied and which fields should be included or removed.</p><p>Two admission webhooks complete the architecture. The mutating webhook simplifies RBAC usage by injecting the underlying native verb whenever a custom verb appears in a Role definition. The validating webhook allows FieldPolicies to enforce restrictions on write operations by rejecting objects that contain forbidden fields.</p><h3>Why the Aggregation Layer</h3><p>Before settling on the current architecture, several alternative implementations were explored.</p><p>The first idea was a transparent proxy positioned between kubectl and the Kubernetes API server. In that design every request would pass through an intermediary that removes restricted fields before returning the response.</p><p>Although technically feasible, this approach introduces significant operational complexity. Every user would need a modified kubeconfig pointing to the proxy. All API traffic would depend on an additional component in the control plane. The proxy would also need to replicate parts of the Kubernetes authentication and authorization logic to ensure correct behaviour.</p><p>Another approach involved generating truncated versions of Kubernetes resources. A controller could watch resources such as Secrets or Pods and create sanitized copies that remove sensitive fields.</p><p>This approach avoids traffic interception but introduces new challenges. Maintaining consistency between original objects and sanitized copies requires reconciliation logic, garbage collection and careful handling of race conditions. The cluster would also end up storing multiple representations of the same resource.</p><p>A variation of this design persists the sanitized objects directly in etcd. While this avoids some synchronization problems, it doubles the storage footprint and introduces a second source of truth.</p><p>These experiments made one thing clear. Any solution that intercepts all API traffic or duplicates resources inside etcd introduces complexity that outweighs its benefits.</p><p>The Kubernetes Aggregation Layer offers a cleaner solution.</p><p>Instead of modifying the existing API server behaviour, Veil registers a new API group under veil.io. Requests targeting that group are automatically routed to the Veil extension server using the standard aggregation mechanism.</p><p>This allows Veil to integrate naturally with Kubernetes RBAC while avoiding intrusive changes to the control plane.</p><h3>Why Veil does not modify native resources</h3><p>Another important design decision is that Veil does not intercept native Kubernetes resources directly.</p><p>At first glance, filtering responses for the native secrets resource might seem convenient. Users could continue running kubectl get secrets without noticing any difference.</p><p>Implementing such behaviour would require one of the previously discarded architectures, like using proxies in kube-config or delivering a custom k8s release.</p><p>Instead, Veil exposes its own resources under the veil.io API group.</p><p>Client runs:</p><pre>kubectl get secrets.veil.io</pre><p>Then the request is handled by the Veil extension server. Veil retrieves the corresponding native resource from the upstream Kubernetes API server in real time, applies the FieldPolicy rules and returns the sanitized result.</p><p>Nothing is stored in etcd. No duplicated resources exist. The upstream Kubernetes API remains the single source of truth.</p><p>Veil simply proxies the request, filters the result and returns the modified object.</p><p>This design keeps the architecture predictable while avoiding unnecessary complexity.</p><h3>Allow mode and deny mode</h3><p>FieldPolicies operate in two filtering modes.</p><p>In <strong>allow mode, </strong>Veil only returns the fields explicitly listed in the policy appear in the response. Everything else is removed. This approach works well when the safe surface is small and well understood.</p><p><strong>Deny mode</strong> returns the full object except for the fields declared in the policy. This mode is useful when most fields are safe but specific attributes must be removed.</p><p>Field selection relies on JSONPath expressions, which allows policies to match nested structures across arrays and complex objects.</p><h3><strong>A Subtle Detail: Annotations</strong></h3><p>When kubectl apply is used, Kubernetes stores the full manifest inside the annotation kubectl.kubernetes.io/last-applied-configuration. The annotation contains the entire object serialized as JSON.</p><p>If a tool removes sensitive fields from the main object but leaves this annotation untouched, the data still exists within the annotation payload.</p><p><strong>Veil handles this case automatically.</strong> The extension server parses the annotation content, applies the same filtering rules defined in the applied FieldPolicy and rewrites the sanitized value before returning the object.</p><p>This prevents sensitive values from leaking through nested serialized manifests.</p><h3>Operator experience</h3><p>From the operator’s perspective the workflow remains simple. A Role references the custom verb defined by a FieldPolicy.</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: Role<br>metadata:<br>  name: secret-reader-veiled<br>  namespace: default<br>rules:<br>- apiGroups: [&quot;veil.io&quot;]<br>  resources: [&quot;secrets&quot;]<br>  verbs: [&quot;real-list&quot;]</pre><p>The mutating webhook will automatically inject the corresponding native verb.</p><p>Developers and automation tools simply query the resource under the veil.io API group.</p><p>Running the native command returns the full Secret object:</p><pre>#secret-reader Role and SA use Secrets/list<br>#secret-reader-veiled cannot point to secrets.veil.io because is not using a FieldPolicy<br>kubectl get secrets   --as=system:serviceaccount:default:secret-reader -o yaml<br>apiVersion: v1<br>items:<br>- apiVersion: v1<br>  data:<br>    password: czNjcjN0<br>    username: YWRtaW4=<br>  kind: Secret<br>  metadata:<br>    creationTimestamp: &quot;2026-04-24T10:10:20Z&quot;<br>    name: my-secret<br>    namespace: default<br>    resourceVersion: &quot;641&quot;<br>    uid: 05fd4157-30c8-4872-a5be-ea09fed6833d<br>  type: Opaque<br>kind: List<br>metadata:<br>  resourceVersion: &quot;&quot;</pre><p>Running the Veil version returns a filtered representation:</p><pre>kubectl get secrets.veil.io \<br>  --as=system:serviceaccount:default:secret-reader-veiled <br>#secret-reader-veiled Role and SA use Secrets/real-list<br>#secret-reader-veiled cannot point to Secrets directly because uses a FieldPolicy<br>kubectl get secret.veil.io --as=system:serviceaccount:default:secret-reader-veiled -o yaml<br>apiVersion: v1<br>items:<br>- apiVersion: v1<br>  kind: Secret<br>  metadata:<br>    name: my-secret<br>    namespace: default<br>kind: List<br>metadata:<br>  resourceVersion: &quot;&quot;</pre><p>The response remains valid Kubernetes JSON, so existing tooling continues to function without modification.</p><h3>Where Veil fits in the policy ecosystem</h3><p>The Kubernetes ecosystem already provides mature policy engines such as Kyverno and OPA Gatekeeper. <strong>These systems operate during admission and prevent unsafe objects from being written to the cluster</strong>.</p><p>Once an object exists in etcd, however, those systems no longer influence how it is read.</p><p>Veil addresses that missing layer by controlling what information is returned during read operations.</p><p><strong>Admission policies protect writes. Field-level filtering protects reads.</strong></p><p>Together they provide coverage across the entire lifecycle of Kubernetes resources.</p><h3>Why this matters</h3><p>In multi-tenant clusters, teams often share namespaces while maintaining strict separation of credentials. Field-level filtering allows developers to inspect cluster state without exposing secrets belonging to other workloads.</p><p>Compliance environments (PCI-DSS, HIPAA…) frequently require proof that sensitive data is not transmitted to unauthorized identities. Field-level controls provide verifiable guarantees that credential values are never included in API responses.</p><p>Platform engineering teams face a similar challenge when exposing Kubernetes access to developers. Veil allows them to grant visibility into cluster state without risking credential exposure.</p><h3>The boundary was never the verb</h3><p>Kubernetes RBAC was designed to answer a specific question: who can perform which operations on which resources.</p><p>What it never attempted to answer is which parts of those resources should be visible to a given identity.</p><p>That missing layer has existed in Kubernetes since its earliest releases.</p><p><strong>Veil fills that gap by introducing field-level visibility controls that integrate directly with the Kubernetes authorization model.</strong> No new authentication flow is required, no proxies, no new k8s release, no duplicated data in etcd and existing RBAC policies remain intact.</p><p>Kubernetes has long favored granular control across the stack. Extending that philosophy to authorization may mean treating the field, not only the resource, as the meaningful security boundary.</p><p>Github: <a href="https://github.com/veil-k8s/veil">https://github.com/veil-k8s/veil</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e788e4d8c0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Calls It Hate, But We Just Call It Content: A Vibecoded Tool Against Normalized Digital Hate…]]></title>
            <link>https://lobuhisec.medium.com/ai-calls-it-hate-but-we-just-call-it-content-a-vibecoded-tool-against-normalized-digital-hate-2d03449e9aa7?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d03449e9aa7</guid>
            <category><![CDATA[hate]]></category>
            <category><![CDATA[racism]]></category>
            <category><![CDATA[hate-speech]]></category>
            <category><![CDATA[youtube]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 13 Jun 2025 08:17:38 GMT</pubDate>
            <atom:updated>2025-06-13T08:17:38.456Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI Calls It Hate, But We Just Call It Content: A Vibecoded Tool Against Normalized Digital Hate Speech</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_rXoPUWgtM82nM85FvA48w.jpeg" /></figure><p>In the face of growing online hate and disinformation, civil society often finds itself outgunned. When some friends approached me with the intention of filing a formal complaint against a well-known influencer accused of spreading hate speech, the scale of the task quickly became apparent. The YouTube channel in question hosted hundreds of videos, each potentially riddled with harmful rhetoric. Even with a dedicated team of volunteers, manually reviewing every piece of content would have taken weeks, if not months.</p><p>That’s when technology stepped in.</p><h3>The Challenge of Scale</h3><p>The initial idea was simple: use AI to help prioritize the most critical content. OpenAI’s GPT-based moderation API seemed like a promising tool, capable of classifying content into various harmful categories. But as we experimented, we faced a familiar obstacle — cost. Running even a basic classification over hundreds of hours of autogenerated subtitles and thousands of user comments would quickly become financially unfeasible.</p><p>Luckily, we discovered omni-moderation-latest, a free moderation endpoint from OpenAI. With its only limitation being a rate-limit (rather than cost), it was the perfect match. This model allowed us to build a pipeline that could analyze and flag hate speech across vast quantities of data without burning through our NGO’s limited resources.</p><h3>Building HateHunter</h3><p>The first version of the tool — dubbed <em>HateHunter</em> — was a simple CLI script that exported flagged results to HTML. It was efficient for internal use, but far from accessible to non-technical users.</p><p>As interest grew, it became clear we needed a WebUI — a way for users without programming backgrounds to easily create projects, add channels or videos, and collaboratively review flagged content. Then Sonet 4 was released. With its powerful natural language and coding capabilities, it became the silent co-pilot in building our interface, guiding us through full-stack challenges we had never tackled before.</p><p>Vibecoding — with its chaotic blend of trial, error, and breakthrough — became the spirit of this project. What started as a technical proof of concept quickly turned into a usable -maybe not robuts nor secure-platform developed almost entirely from scratch by someone with no prior frontend experience.</p><h3>Real-World Impact</h3><p>HateHunter has since analyzed tens of thousands of lines of subtitles and comments. The results? A significant reduction in the human hours needed to process content. While the model isn’t flawless — manual review is still necessary to fully understand context — it acts as a powerful filter, surfacing the most problematic content for human validation.</p><p>More importantly, HateHunter now supports report generation, making it easier for organizations to compile legally actionable evidence. Subtitles and comments flagged by the AI can be exported in structured formats, ready to be reviewed by authorities or included in formal complaints.</p><h3>Already Making a Difference</h3><p>I’m proud to share that this tool has already been used in several ongoing legal cases involving a particular individual accused of promoting racist and supremacist content. Thanks to HateHunter, these cases are progressing through the Spanish legal system with clearer, more structured evidence — something that would have been nearly impossible to assemble manually.</p><h3>A Final Reflection</h3><p>In building this tool, a deeply unsettling question emerged:<br> <strong>Why is an algorithm better at spotting hate speech than the platforms that host it, the authorities meant to regulate it, or even the viewers who consume it daily?</strong></p><p>How did we arrive at a point where machines — mere mathematical constructs of nodes and weights — have a stronger moral compass than many of us?</p><p>HateHunter is just a tool. But it’s also a mirror, reflecting back the biases we ignore and the silence we maintain. It’s time we start asking harder questions — not just of the technology we build, but of the society we’re building it for.</p><p>Tool: <a href="https://github.com/lobuhi/HateHunter/">https://github.com/lobuhi/HateHunter/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d03449e9aa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Panic: Your Cluster May Not Be Affected by the New Critical NGINX Vulnerabilities]]></title>
            <link>https://lobuhisec.medium.com/dont-panic-your-cluster-may-not-be-affected-by-the-new-critical-nginx-vulnerabilities-78355c166b20?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/78355c166b20</guid>
            <category><![CDATA[vulnerabil]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[critical]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 21:23:22 GMT</pubDate>
            <atom:updated>2025-03-25T21:37:59.384Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*cQjilKfZQWSFe2Fd.jpeg" /></figure><p>From time to time, vulnerabilities affecting the NGINX Ingress Controller make headlines, often with high CVSS scores and critical tags. While these issues shouldn’t be dismissed, it’s important to understand that their real-world impact on Kubernetes clusters is often limited. This article breaks down why that’s the case.</p><h3>1. Ingress Resources Are Optional</h3><p>The first key point is that the Ingress resource itself is optional in Kubernetes. Clusters can function perfectly without it, especially in internal-only or tightly controlled environments. Many workloads are exposed using alternative methods like LoadBalancer services, NodePort, or even direct service meshes. If a cluster doesn’t make use of Ingress resources, a vulnerability in any Ingress controller becomes irrelevant to that environment.</p><h3>2. NGINX Is Just One Ingress Class— Not the Only One</h3><p>Although NGINX is arguably the most popular Ingress Class in the Kubernetes ecosystem, it is just one of many. Other Ingress Controllers — like Traefik, HAProxy, Contour, and Kong — are widely used, depending on specific use cases and preferences. A vulnerability in NGINX Ingress does not imply a vulnerability in all these other solutions, which often have different architectures and security postures.</p><h3>3. Managed Clusters Are Moving Toward Cloud-Native Solutions</h3><p>The rise of managed Kubernetes offerings from cloud providers (like EKS, GKE, and AKS) has led many organizations to adopt native cloud load balancers to expose services. These integrations often bypass the need for traditional Ingress controllers entirely. For instance, GKE customers might use Google Cloud Load Balancing directly, while EKS users rely on AWS ALB Ingress Controller or Gateway Load Balancer integrations.</p><p>This shift reduces reliance on NGINX Ingress and significantly limits the attack surface associated with it.</p><h3>4. The Industry Is Transitioning to Gateway API</h3><p>Perhaps most significantly, the Kubernetes project is moving away from the Ingress resource altogether. The Gateway API, a more extensible and role-oriented alternative, is gaining traction and has been available as a stable feature since October 2023. This new standard allows for better separation of concerns, improved security, and greater flexibility in configuring traffic routing.</p><p>As adoption of the Gateway API grows and deprecation of the Ingress resource looms on the horizon, the relevance of NGINX Ingress-specific vulnerabilities will continue to decline.</p><h3>Conclusion</h3><p>While NGINX Ingress vulnerabilities may seem alarming at first glance — especially when marked as critical — it’s essential to analyze them in context. In many Kubernetes environments:</p><ul><li>Ingress isn’t even used,</li><li>NGINX isn’t the only (or the chosen) controller,</li><li>Cloud-native alternatives are replacing it,</li><li>And the broader ecosystem is shifting toward Gateway API.</li></ul><p>Security teams should still review and assess any announced vulnerabilities, but in many cases, these issues may not pose a real threat to the actual cluster setup. Context matters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78355c166b20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Avoid Detection by Modifying AWS CLI User-Agent]]></title>
            <link>https://lobuhisec.medium.com/how-to-avoid-detection-by-modifying-aws-cli-user-agent-0a82a6a6d441?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a82a6a6d441</guid>
            <category><![CDATA[aws-guardduty]]></category>
            <category><![CDATA[cloudtrail]]></category>
            <category><![CDATA[kali]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[user-agent]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 14 Feb 2025 11:56:28 GMT</pubDate>
            <atom:updated>2025-02-14T12:12:49.250Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>When performing security assessments or penetration tests on AWS environments, CloudTrail and GuardDuty are common monitoring services that log suspicious activity. One detection method they use is analyzing the <strong>User-Agent</strong> string sent by the AWS CLI.</p><p>While certain elements of the <strong>User-Agent</strong> string cannot be changed at runtime, such as platform information, additional metadata can be appended via environment variables like AWS_EXECUTION_ENV. However, a more effective approach is to <strong>modify the AWS CLI source code</strong> and recompile it, ensuring the <strong>User-Agent</strong> string does not raise red flags.</p><p>This guide explains how to achieve this by recompiling AWS CLI, a method that is more efficient than using Burp Suite as detailed in <a href="https://hackingthe.cloud/aws/avoiding-detection/guardduty-pentest/">Hacking The Cloud</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*_bW0rmxHnjmiBnjZwR9B2g.png" /></figure><h3>Understanding AWS CLI User-Agent Structure</h3><p>The AWS CLI relies on <strong>botocore</strong>, which builds the User-Agent string dynamically. Since AWS CLI is distributed as a <strong>precompiled package</strong>, users cannot modify certain parts of this string at runtime. The <strong>Linux distribution</strong>, for example, is automatically detected and cannot be overridden by environment variables.</p><h3>Recompiling AWS CLI to Modify User-Agent</h3><p>To fully control the <strong>User-Agent</strong>, follow these steps to download, modify, and rebuild AWS CLI.</p><p>1. Download the latest AWS CLI source sode</p><pre>curl -o awscli.tar.gz https://awscli.amazonaws.com/awscli.tar.gz</pre><p>2. Extract and enter the source directory</p><pre>tar -xzf awscli.tar.gz<br>cd awscli-2.X.X</pre><p>3. Create a Virtual Environment and Activate It</p><pre>virtualenv venv -p python3<br>source venv/bin/activate</pre><p>4. Run Configuration with this argument which will download dependencies at building time:</p><pre>./configure --with-download-deps</pre><p>5. Modify the User-Agent Distribution Info</p><p>The Linux distribution information is set in awscli/clidriver.py. Modify this function as follows:</p><pre>def _get_linux_distribution():<br>    linux_distribution = &#39;ubuntu&#39;  # Hardcode to avoid detection<br>    # Delete or comment all lines in between<br>    return linux_distribution</pre><p>This ensures that AWS CLI reports itself as an <strong>Ubuntu-based installation</strong>, even if used on <strong>Kali/Parrot Linux</strong> or other distributions.</p><p>6. Build and Install the Modified AWS CLI</p><pre>make<br>sudo make install</pre><h3>Verifying the Changes</h3><p>To check if the AWS CLI is now reporting the modified <strong>User-Agent</strong>, run the following command:</p><pre>aws s3 ls --debug 2&gt;&amp;1 | grep User-Agent</pre><h3>Expected Output (Example)</h3><pre>2025-02-14 06:31:35,005 - MainThread - botocore.endpoint - DEBUG - <br>Making request for OperationModel(name=ListBuckets) with params: <br>{&#39;url_path&#39;: &#39;/&#39;, &#39;query_string&#39;: {}, &#39;method&#39;: &#39;GET&#39;, &#39;headers&#39;: <br>{&#39;User-Agent&#39;: &#39;aws-cli/2.24.4 md/awscrt#0.23.8 ua/2.0 os/linux#6.11.2-amd64<br>md/arch#x86_64 lang/python#3.12.8 md/pyimpl#CPython cfg/retry-mode#standard<br>md/installer#source-sandbox md/distrib#ubuntu md/prompt#off <br>md/command#s3.ls&#39;}, ...}</pre><p>Notice that the <strong>md/distrib#ubuntu</strong> value now appears, which can help blend activity into production environments.</p><h3>Conclusion</h3><p>By recompiling AWS CLI, we can modify its <strong>User-Agent</strong> string in a way that is resistant to simple rules based on User-Agent in GuardDuty or any other SIEM that ingests CloudTrail logs. This technique provides a more efficient approach than using Burp Suite for interception and rewriting requests. Security professionals and penetration testers can leverage this method to avoid raising immediate alerts during AWS assessments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a82a6a6d441" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prepare your containers for the worst: a DFIR case]]></title>
            <link>https://lobuhisec.medium.com/prepare-your-containers-for-the-worst-a-dfir-case-844d87d24fcd?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/844d87d24fcd</guid>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 14 Jun 2024 17:41:25 GMT</pubDate>
            <atom:updated>2024-06-14T17:41:25.254Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, while talking to a colleague, he explained that he was facing a forensic case involving a service hosted in a container. The client, as is often the case, panicked, stopped the container, created a disk image, and sent it for analysis.</p><p>In the search for evidence on the disk, no application logs or traces of the container were found. There were many conjectures about the container’s whereabouts, but even the most meticulous find commands failed to locate any strings related to the container, until he found the docker compose file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/0*EurIZRK9WmEXMbzh.jpg" /></figure><h3>First lesson: Save the logs</h3><p>The nature of containers is ephemeral, and their construction using Linux namespaces creates their own filesystem, separate from the host where they are hosted, leading to a problem: data persistence.</p><p>You have probably seen or experienced how easy it is to bring up any type of database with Docker and how in a few seconds, with just a few environment variables, you can have any version of Mongo, Redis, or MySQL running and ready to receive data. But what happens if the container is deleted? You lose the database and all its information.</p><p>To address this issue, we need a solution that allows us to persistently store the database information so that it doesn’t disappear every time we delete the container. This solution is called <em>volumes</em>.</p><p>Volumes are essentially filesystems mounted inside the container that are actually part of the host. In other words, it’s a folder or path shared by the host and the container, so even if the container is deleted, the information will remain persistent on the host and can be mounted repeatedly in subsequent container runs.</p><p>This company already understood the importance of volumes and used them to ensure data persistence for the application and to exchange configuration files. However, there is an essential path -overlooked in this case- when creating a container: /var/log (or wherever your app stores its logs).</p><p>Of course, it’s not enough to simply create a volume for /var/log; you need to manage these logs, ingest them into a SIEM or monitoring tool, and periodically remove them. If a container is compromised, its logs will be too.</p><p>It’s not necessary to create a volume to ingest logs into a SIEM, but it’s the best approach because the alternative would be to add the SIEM or monitoring agent inside the container, which would increase the image size and affect its performance. Additionally, it’s easier to manage these agents at the node level, extracting data from /var/log, rather than generating as many agents as there are containers, which could become chaotic.</p><p>The first lesson is this: If you care about the security of your containerized applications and want visibility into everything that’s happening, safeguarding the logs should be one of your priorities.</p><h3>Second lesson: Do NOT delete your container, just stop it</h3><p>In this scenario, another issue was the complete disappearance of the container. The lifecycle of a container is not limited to being or not being; there are other states. However, it’s common, especially in environments where we don’t want to have dozens of completed or stopped containers wasting storage, to launch them with the --rmparameter, which will delete the container once its execution is complete. If we don’t use this parameter, the container will remain as Stopped or Terminated when its execution is finished, allowing us to relaunch it or even recover its information under the path /var/lib/docker/containersfor Docker.</p><p>But in this case, we were not using Docker, but Docker Compose, and its operation is slightly different. Docker Compose does not have a runcommand, but up, which brings up all the images defined in the YAML file. What’s the opposite of up? Down? Indeed, the go-to command in Compose to stop execution is docker compose down, but this not only stops the containers but also deletes them, and their information will no longer be available even at the disk level, as it will disappear from /var/lib/docker/containers.</p><p>Lesson learned: During the stress of a DFIR involving containers, we shouldn’t rush to use the first command that comes to mind without considering the consequences. In this case, docker compose down deleted the container and all the logs generated by the application. When it comes to Docker alone, the stop option won’t save us if we started the container with the --rm option, but in Compose, the stop option should gracefully stop the containers and leave their trace as stopped containers in /var/lib/docker/containers, from which we could recover some logs.</p><h3>Conclusion</h3><p>Containers are not inherently prepared to be persistent in a DFIR case, and it is the responsibility of administrators and the security team to establish minimum standards to ensure log persistence and prevent the complete deletion of containers before stopping them to halt the attack and create a usable disk image.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=844d87d24fcd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWRBACS: AWACS for RBAC]]></title>
            <link>https://towardsdev.com/awrbacs-awacs-for-rbac-b6cb2ac75e3e?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6cb2ac75e3e</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[rbac]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[authorization]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Tue, 21 May 2024 00:06:50 GMT</pubDate>
            <atom:updated>2024-05-22T17:24:01.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*uTYVMQd83U4qgXyDM6Rh8w.png" /><figcaption>AWRBACS ready to take off!</figcaption></figure><p>Tool: <a href="https://github.com/lobuhi/awrbacs">https://github.com/lobuhi/awrbacs</a></p><p>Excuse me, but one of my hobbies is playing Digital Combat Simulator (DCS) and Flight Simulator, and I thought the idea of the AWACS would be funny. For those who are not familiar with this term, an AWACS or <em>Airborne Warning and Control System</em> is nothing more than a plane with a giant radar. Obviously, its use is exclusively military, and elevating the radar to high altitude, as opposed to having them on the ground, helps achieve greater range and mobility to detect threats at long distances, creating a kind of radio-frequency umbrella that sees everything hundreds of kilometers away.</p><p>Continuing with the analogy and in relation to <a href="https://raesene.github.io/blog/2024/04/22/Fun-with-Kubernetes-Authz/">Raesene’s recent blog about webhook-level authorization</a>, I ended up realizing that the current tools for auditing RBAC, although excellent in their purpose and functionality, did not fully meet my needs as a security auditor, especially in vast environments with dozens of clusters, third-parties, CRDs, and other elements outside the core of Kubernetes. This meant that in most cases, I audited RBAC for the usual permissions that I know are dangerous and act on specific resources in <em>v1 </em>and <em>apps</em>. However, it is very likely that in some of these audits I have overlooked some permission on an unknown resource outside my usual list or that I have not paid too much attention to everything that the recently created <em>reader</em> service account can do.</p><p>And this is ultimately because Kubernetes clusters, even just one of them, can be massive in terms of RBAC, and to audit all its corners, I have found myself instrumenting via bash script the krew <a href="https://github.com/corneliusweig/rakkess">access-matrix</a> plugin, its standalone <a href="https://github.com/corneliusweig/rakkess">rakkess</a>, the famous <a href="https://github.com/aquasecurity/kubectl-who-can">who-can</a> plugin, or the old Python script <a href="https://github.com/cyberark/kubernetes-rbac-audit">ExtensiveRoleCheck.py</a>. Don’t get me wrong, they have served me and will continue to be useful in the future, but now I needed something of longer reach, massive, and that covered the largest possible surface, like an AWACS. And with this premise, AWRBACS was born.</p><h3>AWRBACS: What and How</h3><p>AWRBACS is not here to replace the aforementioned tools or plugins but rather to complement them. The usage modes are simple:</p><ul><li>-<strong>kubeconfig </strong>allows us to define a custom path for the configuration file.</li><li>-<strong>as</strong> allows defining which user we want to review.</li><li><strong>-sa</strong> allows defining which service account to query, it must be expressed preceded by its namespace.</li><li><strong>-self</strong> allows checking what permissions our credentials have in the kubeconfig file.</li></ul><p>And the crown jewels:</p><ul><li><strong>-f</strong> allows using an input file that contains all users defined through custom webhooks and third-parties (Keycloaks, LDAP, IAM…)</li><li><strong>-auto</strong> automatically enumerates all subjects, users, and service accounts defined in rolebindings and clusterrolebindings and checks them.</li><li><strong>-no-kube-system</strong> is ideal for use with <strong>-auto</strong>, as it will omit system users and service accounts defined in the kube-system namespace, where most default deployed elements in the system are located.</li></ul><p>Some recommended examples would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_IVJ8SIIaqMaJzR4KUJKg.png" /><figcaption>Multiple users and SAs</figcaption></figure><p>Or also, check for subject in bindings automatically:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8SAHvbrtlMZ7V1_lUExJrg.png" /><figcaption>Note here that Jane and Bob, managed through webhook authz do not appear</figcaption></figure><p>In both cases, and this is important, each permission on each user and service account is checked individually through the kube-apiserver. This is done so methodically because:</p><ol><li>The -<strong>list</strong> argument of <strong>kubectl auth can-i</strong> to obtain webhook authorizations does not show the real permissions, as <a href="https://raesene.github.io/blog/2024/04/22/Fun-with-Kubernetes-Authz/">Raesene demonstrated in his blog</a>.</li><li>I am not a big fan of static analyses, especially with NetworkPolicies, where you might get an unpleasant surprise if you discover that your CNI does not support them, so I applied this same principle to RBAC, especially if there are webhooks involved.</li></ol><p>Additionally, it is worth mentioning that AWRBACS obtains all available resources through api-resources, so no CRD will be out of the radar.</p><h3>CRUD in Kubernetes</h3><p>The resulting table is based on CRUD. Kubernetes CRUD, which is obviously a bit more intricate than it may seem at first glance. To create or delete objects, there is no problem; we only have <strong>CREATE </strong>or <strong>DELETE</strong>, simple.</p><p>However, the read function in k8s is given by three actions: <strong>get</strong>, <strong>list</strong>, and <strong>watch</strong>. Moreover, one might think that these are well-defined permissions and that someone who can <strong>list </strong>secrets, for example, could not in any case read their content beyond listing their names. Once again, Kubernetes does its thing, as these permissions are actually nested in the form <strong>WATCH </strong>&gt; <strong>LIST </strong>&gt; <strong>GET</strong>, so if someone could perform a <strong>WATCH </strong>on any resource, they could, in fact, obtain its content.</p><p>Something similar happens with the process of editing objects. Kubernetes incorporates the verbs <strong>PATCH </strong>and <strong>UPDATE</strong>, which apply different ways of modifying an object, with <strong>PATCH </strong>being ideal for partial changes or <strong>UPDATE </strong>for a complete renewal of an object.</p><h3>Conclusion</h3><p>There are already many tools for auditing RBAC that allow for surgically precise investigation of different permissions and verbs on very specific objects. Others, however, have predefined or customizable rules to detect failures in best practices in permission assignment.</p><p>Obtaining a complete view of a cluster’s RBAC can be complex, requiring knowledge of all deployed resources and a thorough review of all defined bindings. AWRBACS comes to solve this by either automating the retrieval of users and service accounts or, for third-party use, providing a dump of users defined in your LDAP. In both cases, any account will be checked individually for CRUD permissions on each and every resource existing in the cluster.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6cb2ac75e3e" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/awrbacs-awacs-for-rbac-b6cb2ac75e3e">AWRBACS: AWACS for RBAC</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DaemonSets: The Philosopher’s Stone of Lazy Sysadmins]]></title>
            <link>https://lobuhisec.medium.com/daemonsets-the-philosophers-stone-of-lazy-sysadmins-0183bae8a75d?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0183bae8a75d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[daemonset]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 10:27:46 GMT</pubDate>
            <atom:updated>2024-02-14T10:27:46.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*L-qdfTrbMQ5By9mv8xqyiw.png" /><figcaption>Me on twitter, waiting for hate</figcaption></figure><p>In the complex and ever-evolving landscape of system administration, Kubernetes DaemonSets have emerged as a seemingly magical solution, akin to the mythical Philosopher’s Stone, for deploying and managing containerized applications across a cluster of machines. However, as with any powerful tool, there is a dark side to its use, particularly when it comes to security implications of deploying privileged and non-isolated workloads, such as Prometheus, for monitoring purposes. This article delves into the risks associated with such practices and argues for a more traditional approach to deploying monitoring tools.</p><h4>The Allure of DaemonSets</h4><p>DaemonSets, a feature of Kubernetes, allow sysadmins to automatically deploy and run a copy of a pod on every node in a cluster. This functionality is especially useful for deploying system-level services, such as log collectors or monitoring agents, which need to run on every node. The convenience and efficiency of DaemonSets are undeniable, offering sysadmins a “lazy” way to ensure widespread service deployment with minimal effort.</p><h4>The Security Conundrum</h4><p>The problem arises when DaemonSets are used to deploy privileged and non-isolated workloads. Tools like Prometheus, widely used for monitoring Kubernetes clusters, often require access to the underlying host to retrieve data. When such tools are deployed using DaemonSets with elevated privileges and without proper isolation, it significantly increases the complexity of the cluster and expands the attack surface.</p><p>Privileged pods have access to host-level resources, bypassing the security mechanisms of the container runtime and Kubernetes itself. This creates a potential entry point for attackers, who, upon compromising a single pod, could escalate their privileges and gain control over the entire cluster. The deployment of non-isolated workloads further exacerbates this issue, as it allows for potential lateral movement within the cluster, giving attackers the opportunity to exploit vulnerabilities in one part of the system to compromise other parts.</p><h4>The Case for Host-Level Monitoring</h4><p>Despite the widespread industry practice of deploying monitoring tools within Kubernetes clusters, there is a strong argument to be made for installing such tools at the host level. Host-level monitoring tools should operate outside the Kubernetes cluster, reducing the risk of them being compromised through cluster-level vulnerabilities. This approach not only minimizes the attack surface of the cluster but also ensures that monitoring capabilities remain intact even if the cluster itself is compromised. Of course, we would lose the capabilities that Kubernetes offers us in restarting failed workloads, but solutions can be found to implement this at the node level as well.</p><p>Moreover, host-level monitoring tools can offer more comprehensive visibility into system-level metrics and logs, which are crucial for detecting and responding to security incidents. By operating at the host level, these tools are less susceptible to the limitations and vulnerabilities associated with containerized environments.</p><h4>Conclusion</h4><p>While DaemonSets offer a convenient and efficient means of deploying services across a Kubernetes cluster, the security implications of using them to deploy privileged and non-isolated workloads cannot be overlooked. The expansion of the attack surface and the increased complexity of the cluster’s security posture demand a reconsideration of such practices. In the realm of monitoring, particularly, the traditional approach of installing tools at the host level presents a more secure and effective alternative. As tempting as it may be to reach for the Philosopher’s Stone of DaemonSets, sysadmins must weigh the convenience against the potential risks and consider the broader implications for their cluster’s security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0183bae8a75d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Orange’s RIPE Account Incident: Why Security Matters at Every Layer and Process]]></title>
            <link>https://lobuhisec.medium.com/the-oranges-ripe-account-incident-why-security-matters-at-every-layer-and-process-de9fb63beb9f?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/de9fb63beb9f</guid>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[orange]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[racoon]]></category>
            <category><![CDATA[ripe]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Fri, 05 Jan 2024 15:03:16 GMT</pubDate>
            <atom:updated>2024-01-05T17:07:06.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11cW8k7C7QoJi1nWL8LXcQ.png" /></figure><p>The cybersecurity world witnessed a concerning incident these days: the compromise of Orange’s RIPE account, obtained through the Racoon malware in a compromised asset back in September 2023.</p><p>This event underscores the critical importance of performing proper Digital Security Incident Response (DFIR) procedures and techniques. The detection of the malware should have triggered a thorough review and immediate change of all compromised credentials. However, this essential step was overlooked.</p><p>Another troubling aspect of the incident was the revelation that the compromised password was ‘<em>ripeadmin</em>’, a classic example of weak password choice. With just eight lowercase alphabetical characters, its hash would be easily crackable. Furthermore, RIPE’s password policy did not force users to create stronger passwords, so we cannot hold Orange entirely responsible for such an ill-advised decision.</p><p>However, even with a stronger password, the leakage and misuse could still have occurred. This is where the importance of implementing a second factor of authentication (2FA) comes into play. This additional security mechanism, regrettably overlooked by Orange and not enforced by RIPE, could have been a significant barrier for attackers.</p><p>The conclusion is clear: the successful attack on Orange’s RIPE account is a compilation of failures at multiple security levels. An effective DFIR analysis leading to a credential change, coupled with the activation of 2FA, could have prevented this incident. This case highlights the pressing need for organizations to adopt a more rigorous and layered approach to cybersecurity. Strong password policies, multi-factor authentication, and quick and efficient incident response, among other processes, are crucial for safeguarding the integrity of critical systems in today’s digital landscape. Ultimately, the incident should serve as a wake-up call for all entities in the digital realm, emphasizing the importance of robust and proactive security to prevent such incidents.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de9fb63beb9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Post-Exploitation: A Crucial Element in Cybersecurity Defense Strategies]]></title>
            <link>https://lobuhisec.medium.com/understanding-post-exploitation-a-crucial-element-in-cybersecurity-defense-strategies-bca78d62962d?source=rss-28e384ca5f9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bca78d62962d</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[post-exploitation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[network-defense]]></category>
            <dc:creator><![CDATA[Luis Toro (aka @LobuhiSec)]]></dc:creator>
            <pubDate>Wed, 08 Nov 2023 11:33:30 GMT</pubDate>
            <atom:updated>2023-11-08T11:33:30.214Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZFfuFKdOBkHH6ovltYiPw.png" /></figure><p>In the digital landscape, cybersecurity is often conceptualized as a fortress that must be defended at all costs. However, this analogy becomes deeply flawed if we neglect to consider what happens once an adversary breaches the initial defenses. At Kubecon China 2023, while discussing the intricacies of post-exploiting a compromised etcd, I encountered a vivid interest in the methods of exploiting and compromising them. Despite this, I realised that there was a significant gap in the understanding and vital role of post-exploitation strategies by those not involved in cyber security and that these are generally underestimated.</p><p>To truly grasp the importance of post-exploitation, consider a corporation as a village. This village, much like any enterprise, contains valuable assets. For the sake of analogy, let’s imagine these assets are represented by wooden houses. Surrounding this village is a high stone wall, akin to the cybersecurity measures such as Web Application Firewalls (WAF) or robust firewalls. These walls serve as the first line of defense against external threats, designed to prevent invaders from entering the village.</p><p>Now, let’s delve into a critical scenario — the outbreak of a fire within one of the wooden houses. In the context of cybersecurity, this is comparable to a successful breach by a cyber attacker. The stone walls (WAFs and firewalls) are rendered moot in this situation, as the threat is now within, spreading chaos and destruction. The focus must shift to post-breach tactics and damage control. In cybersecurity terms, this equates to post-exploitation techniques.</p><p>Post-exploitation techniques are the measures taken after a successful breach to understand the scope of the attack, contain the damage, eradicate the threat, and recover any compromised systems. Just as a village would have protocols to deal with internal fires, such as bucket brigades or firebreaks, a corporation requires a robust post-exploitation strategy to mitigate the impact of a breach. This could include isolating compromised systems, analyzing the breach to understand the attacker’s methods, and implementing measures to prevent future incidents.</p><p>Neglecting post-exploitation strategies is akin to ignoring the risk of internal fires in our hypothetical village. Without appropriate measures in place, a single incident can escalate, leading to widespread damage that could have been contained or minimized with prompt and effective post-breach actions.</p><p>In cybersecurity, as in village safeguarding, the key is not just in preventing invaders from getting in but also in being adequately prepared for the possibility that they might. As defenders, we must understand that no perimeter is impenetrable and that true security lies in our ability to respond effectively after a breach has occurred. It’s not enough to stop attackers at the gates; we must also be prepared to deal with the consequences of their entry, ensuring the safety and integrity of our digital ‘villages’.</p><p>Therefore, post-exploitation is not a topic to be overlooked or underestimated. It’s a critical phase where the real test of our defenses lies. As cybersecurity professionals, we must advocate for and develop comprehensive post-exploitation strategies to ensure our enterprises can withstand and recover from any breach, no matter how small or large.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bca78d62962d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>