Botnet Tracking Starts at the Wrong Layer and That Is Why Infections Keep Compounding

By IPThreat Team August 24, 2026

The Assumption That Keeps Security Teams One Step Behind

Most botnet tracking programs begin at the perimeter and work inward. Security teams watch firewall logs, pull IP reputation feeds, and wait for blocklist hits to confirm something is wrong. The fundamental problem with this approach is that by the time a botnet node triggers a perimeter alert, it has already completed its initial objective: establishing persistent communication, enrolling in the command-and-control (C2) hierarchy, and beginning whatever payload delivery or reconnaissance the operator assigned to it.

The Kimwolf v7 botnet, documented recently in threat intelligence reporting, illustrates this point precisely. Unlike earlier Kimwolf variants that relied on fixed C2 infrastructure, version 7 rebuilds its communication layer dynamically, cycling through domain-generation algorithms (DGAs) and compromised residential proxies at a rate that makes perimeter IP blocking a reactive measure with a permanent time lag. Tracking it at the IP layer alone is like counting water with a sieve. The water moves faster than the holes close.

This article addresses what effective botnet tracking actually requires: a multi-layer instrumentation strategy that starts before the infection completes, catches lateral movement in real time, and feeds mitigation actions into the infrastructure rather than waiting for escalation queues to drain.

What Botnet Operators Actually Exploit to Stay Invisible

Operators running modern botnets invest significant effort in making their infrastructure look like normal traffic. PurpleDelta's fraudulent employment operations, flagged in recent threat reporting, demonstrate how botnet-adjacent campaigns now embed initial access vectors inside legitimate-looking recruitment workflows. Targets receive convincing job offers, interact with real-seeming onboarding platforms, and download trojanized documents that install bot clients silently. The initial connection from an infected endpoint looks identical to a legitimate outbound HTTPS session to a cloud storage provider.

Three techniques define how modern botnet operators evade detection during the tracking phase.

Fast-Flux Infrastructure

Fast-flux DNS swaps the IP addresses associated with C2 domains every few minutes, distributing the domain across a rotating pool of compromised nodes acting as proxies. Tracking the domain name rather than the IP is necessary, but even domain tracking becomes complex when the botnet uses DGAs to generate thousands of potential domain names daily, registering only the ones the C2 operator needs at the moment of contact.

Legitimate Service Abuse

Modern botnets embed C2 communications inside legitimate cloud services. GitHub repositories, Google Docs, Pastebin, and Discord channels have all been used as dead drops where bot clients retrieve instructions without generating traffic to recognizable malicious infrastructure. From a network monitoring perspective, the traffic is indistinguishable from normal employee activity without deep behavioral analysis at the endpoint level.

Named Pipe and Local IPC Abuse

Recent reporting on named pipe attacks under Windows highlights a pattern increasingly visible in botnet lateral movement: once a single node is compromised inside a network, attackers use Windows interprocess communication mechanisms to spread laterally without generating network traffic at all. Named pipes allow data transfer between processes on the same host and, in some configurations, across hosts in a Windows domain environment. Lateral movement through named pipes leaves a different forensic footprint than lateral movement over the network, and most network-centric botnet detection approaches miss it entirely.

Building the Instrumentation Stack Before You Need It

Effective botnet tracking requires instrumentation at four distinct layers simultaneously. No single layer provides complete visibility, and gaps between layers are where sophisticated operators survive longest.

Layer 1: DNS Query Telemetry

DNS is the earliest signal available in botnet communications. Every bot client must resolve its C2 domain before any malicious traffic flows. Deploying a recursive DNS logging solution that captures all query and response pairs, including NX domain responses, provides the raw data needed to identify DGA activity and fast-flux behavior.

Concrete implementation: Configure your internal recursive resolvers to forward full query logs to your SIEM. Run a DGA detection model against the query stream, either using an open-source implementation like EXPOSURE or a commercial feed that scores domains at query time. Flag any endpoint making more than 15 NX domain queries per minute, which is a reliable indicator of DGA enumeration behavior. Correlate NX domain spikes against the timing of new malware campaigns in your threat intelligence feeds.

Layer 2: Network Flow Analysis

NetFlow, IPFIX, and sFlow data from your core switches and routers give you traffic volume and connection metadata without requiring full packet capture. This layer catches beaconing behavior that DNS telemetry alone cannot surface: regular, periodic outbound connections to a fixed set of IPs at consistent intervals, even when those IPs rotate in fast-flux configurations.

Concrete implementation: Baseline outbound connection intervals per endpoint over a 14-day period. Flag any endpoint with connection regularity to external destinations that falls within a coefficient of variation below 0.1, meaning the connections are suspiciously clock-like. Real user traffic is irregular. Bot beaconing is not. Most commercial network detection and response platforms can run this analysis, as can open-source tools like Zeek with the appropriate behavioral analysis scripts.

Layer 3: Endpoint Process and Named Pipe Telemetry

Given the recent documentation of named pipe abuse in Windows environments, endpoint telemetry is not optional. Deploy an EDR solution that captures process creation events, network connections associated with specific processes, and named pipe creation events. Sysmon configuration on Windows endpoints, at minimum, should log event ID 17 (pipe created) and event ID 18 (pipe connected) to catch lateral movement using this vector.

A practical Sysmon configuration for named pipe monitoring includes filtering for pipe names that match patterns used by common lateral movement frameworks: pipes named msagent_, lsarpc, and random alphanumeric strings longer than 12 characters are all worth alerting on. Legitimate Windows named pipes follow predictable naming conventions. Anomalous pipe names stand out when you have the baseline.

Layer 4: External Threat Feed Correlation

Threat feeds have real limitations when treated as the primary detection mechanism, but as a correlation layer on top of behavioral signals they significantly reduce false positive rates and accelerate investigation. When your DNS telemetry flags a domain as suspicious and an external feed independently classifies a related IP as a C2 node, the combined signal warrants immediate investigation rather than queuing.

Recorded Future's recent expansion of capabilities for third-party risk monitoring reflects a broader industry movement toward operationalizing external intelligence as a real-time input rather than a periodic report. Security operations teams should configure their SIEM to automatically cross-reference flagged IPs and domains against at least three external sources before generating a P1 alert, reducing noise while maintaining detection coverage.

Mapping the C2 Hierarchy Before Taking Action

One of the most costly mistakes in botnet response is disrupting visible infrastructure before understanding the full command hierarchy. Taking down a C2 server before mapping its upstream tiers gives the operator time to reroute and warn other infrastructure components, potentially causing evidence destruction and allowing the botnet to survive with minor reconfiguration.

Before any mitigation action, invest 24 to 72 hours in passive mapping. Use your DNS telemetry to identify all domains the compromised endpoints are querying. Cross-reference those domains against WHOIS registration patterns, certificate transparency logs, and passive DNS repositories. Modern botnet operators often register infrastructure in clusters with shared registration characteristics: similar registrant email formats, the same payment processor, the same autonomous system, or the same certificate authority with matching subject alternative name patterns.

The 0ktapus threat group, which victimized over 130 organizations using a combination of phishing and botnet-style automated credential harvesting, used exactly this infrastructure clustering pattern. Investigators who identified one phishing domain were able to pivot through certificate transparency logs to identify 40 additional domains in the same campaign because the operator reused a specific SSL certificate generation workflow with a consistent subject pattern.

Document the following before beginning mitigation: the full list of C2 domains and IPs, the enrollment mechanism the bot client uses to register with the C2, the communication protocol and any encryption details visible from traffic analysis, and the estimated number of compromised nodes inside your environment. This documentation becomes critical for law enforcement engagement and for ensuring that remediation does not leave secondary implants active.

Mitigation Operations That Actually Reduce the Footprint

Once mapping is complete, mitigation proceeds in phases rather than as a single network block. Phased mitigation reduces the risk of tipping off the operator through sudden traffic pattern changes and gives security teams time to confirm remediation effectiveness at each step.

Phase 1: Sinkholing

DNS sinkholing redirects queries for known C2 domains to an internal server you control, preventing bot clients from reaching the actual C2 while logging all infected endpoints that attempt to check in. Configure your internal DNS resolvers to return a sinkhole IP for every confirmed C2 domain. The sinkhole server should log the source IP, timestamp, and queried domain for every connection attempt. This log becomes your definitive inventory of infected endpoints, updated in real time as bots attempt to beacon.

Sinkholing provides visibility without triggering remediation, giving you time to plan endpoint-level cleanup. It also allows you to measure how many infected endpoints exist by counting unique source IPs connecting to the sinkhole, giving remediation teams an accurate workload estimate before they begin.

Phase 2: Endpoint Isolation and Remediation

Using the sinkhole log as your infection inventory, begin isolating endpoints in priority order: systems with privileged access first, shared infrastructure second, standard workstations third. Isolation through EDR policy is preferable to network VLAN reassignment because it leaves the endpoint reachable for forensic collection without allowing it to communicate with other internal systems.

Forensic collection before remediation is non-negotiable for any endpoint involved in an active botnet infection. Memory acquisition captures the running bot process, decrypted C2 communication keys, and any secondary payloads loaded only in memory. Disk imaging captures persistence mechanisms. Both are required if law enforcement engagement is a possibility.

Phase 3: Infrastructure Hardening to Prevent Re-enrollment

Botnet remediation frequently fails when the initial access vector remains available after the bot client is removed. Audit the infection path for every compromised endpoint. If watering hole attacks or ScanBox-style keylogger deployments were involved in initial infection, as seen in recent campaigns targeting specific industry sectors, patch the browser and plugin vulnerabilities those campaigns exploited and implement web proxy filtering to block the staging domains involved.

For environments where named pipe lateral movement was used, restrict named pipe permissions through Group Policy to prevent unauthenticated access and audit the service accounts that had network logon rights across the affected Windows domain. Lateral movement through named pipes typically requires a service account with excessive privileges. Removing those privileges closes the path even before the infected endpoints are fully remediated.

Operationalizing Botnet Threat Intelligence for Future Tracking

The intelligence generated during a botnet tracking and mitigation operation has value beyond the immediate incident. Structure your documentation to feed future detection use cases.

Capture the DGA seed and algorithm if reverse-engineering the bot binary is feasible. A known DGA allows you to pre-compute future domain names the botnet might use and register them as sinkholes proactively, a technique used by organizations like Shadowserver and industry ISACs to stay ahead of botnet reactivation after infrastructure disruption.

Publish indicators of compromise through your sector's information sharing organization. The 0ktapus campaign spread across 130 organizations in part because early victims either did not detect the initial compromise or did not share indicators quickly enough for others to benefit. Local government organizations are particularly underserved in this area. Recent calls for cybersecurity professionals to support municipal security operations highlight a gap where botnet-related indicators generated by commercial and enterprise defenders could significantly benefit smaller organizations with limited security resources.

Formalize a threat actor profile from the tracking data. Botnet operators leave behavioral fingerprints: preferred hosting providers, registrar patterns, malware families, and initial access techniques. A well-documented profile allows your team to prioritize future alerts that match the pattern without waiting for a full investigation cycle to confirm attribution.

Where Teams Consistently Underinvest

Across real-world botnet investigations, two areas consistently receive insufficient investment relative to their detection value.

The first is internal east-west traffic monitoring. Most organizations have robust monitoring at the perimeter but limited visibility into traffic between internal systems. Botnet lateral movement, particularly through SMB, WMI, and named pipes, is almost entirely invisible without network monitoring inside the perimeter. Deploying span ports or network taps at core internal switches and feeding that data to your NDR platform provides the visibility needed to catch lateral movement in progress rather than after the fact.

The second is asset inventory accuracy. Botnet detection through behavioral baselines requires knowing what normal looks like for each asset. An outdated or incomplete asset inventory means behavioral thresholds are calibrated against an inaccurate baseline, generating excessive false positives and causing analysts to tune detection rules in ways that create blind spots. Maintaining an accurate, continuously updated asset inventory is foundational to the detection approach described throughout this article.

Practical Takeaways for Security Teams This Quarter

  • Implement DNS query logging with DGA scoring on all internal recursive resolvers before the next quarter ends. This is the highest-value, lowest-cost addition to botnet detection available to most organizations.
  • Add Sysmon with named pipe event logging to all Windows endpoints in your environment and configure forwarding to your SIEM. Review pipe creation events weekly until you have a clean baseline.
  • Build a sinkholing capability using an internal DNS server with logging enabled. Test it against a known-benign domain before you need it operationally.
  • Define a phased mitigation playbook that separates mapping, sinkholing, isolation, and remediation into distinct phases with explicit criteria for moving between them.
  • Audit service account privileges in your Windows domain with a specific focus on accounts with network logon rights across multiple systems. Excessive service account privileges are the primary enabler of named pipe lateral movement.
  • Establish or renew a relationship with your sector ISAC and configure automated indicator sharing for confirmed botnet infrastructure. Information sharing is the mechanism that makes individual tracking efforts collectively valuable.

Botnet operators invest in persistence and adaptability because they have learned that most defenders are instrument-constrained and process-slow. Closing that gap requires building instrumentation before the incident, structuring mitigation to preserve intelligence, and converting each tracking operation into detection capability that makes the next one faster. The botnets that continue operating inside enterprise networks for months are not more sophisticated than the defenders. They are operating in spaces the defenders chose not to instrument.

Contact IPThreat