Guides

What Is Command and Control (C2)? How Attackers Steer Compromised Systems

Command and control is the hidden phone line between an attacker and the malware on your network. Here is how it works, the techniques attackers use, and how defenders cut it.

Cysoro Security TeamPublished · 9 min read
C2SERVERGUIDESCommand& controlThe attacker's hidden phone line.
Quick answer

Command and control (C2) is the set of techniques attackers use to communicate with systems they have already compromised, so they can send instructions and receive stolen data. MITRE ATT&CK lists it as tactic TA0011. The compromised host runs an implant that checks in with an attacker-run C2 server, usually disguised as normal web or DNS traffic.

Key takeaways

  • C2 is the attacker's remote control channel: the implant calls out to a C2 server, so blocking it stops the attack even after the initial infection.
  • MITRE ATT&CK catalogs 18 C2 techniques under TA0011, from web protocols and DNS tunneling to encrypted channels and domain generation algorithms.
  • Beaconing — small, regular check-ins at fixed intervals — is the most reliable detection signal, alongside unusual DNS queries and traffic to rare domains.

Getting malware onto a machine is only half an attack. After that, the attacker needs a way to talk to it: to tell it what to steal, to send it new tools, and to receive the data it collects. That hidden conversation is command and control.

What is command and control (C2)?

Command and control, written C2 or C&C, is how an attacker communicates with and directs systems they have already compromised. MITRE ATT&CK defines it as tactic TA0011: "the adversary is trying to communicate with compromised systems to control them."

The compromised host runs a small program called an implant, agent, or beacon. The attacker runs a C2 server somewhere on the internet. The channel between them carries commands one way and stolen data and status reports the other way. Without that channel, the malware is stranded: it cannot receive new instructions or send anything out.

C2 is not one tool or one protocol. It is a whole category of techniques, and MITRE ATT&CK catalogs 18 of them under TA0011. Attackers pick whichever channel blends in best on the target network, as the MITRE ATT&CK page for TA0011 explains.

How does a C2 channel work?

A C2 channel usually works by callback: the compromised host reaches out to the attacker's server, rather than the attacker connecting in. Outbound connections look normal to most firewalls, which is exactly why attackers prefer them.

How a C2 channel worksCompromised hostimplant / beaconchecks in every60 secondsinside your networkC2 serverattacker-controlledissues commands,receives stolen dataon the internetbeacon: "any orders?"commands + stolen dataDisguised as normal HTTPS or DNS traffic so firewalls let it through.
The callback model: the implant calls out, so the traffic looks like ordinary browsing. Illustration by Cysoro.

A typical exchange runs in four steps. First, the implant wakes on a timer and sends a short check-in, often just a few hundred bytes. Second, the C2 server replies with a task, such as "collect browser passwords" or "download this tool." Third, the implant runs the task and sends back the results. Fourth, the implant sleeps until the next check-in, sometimes adding random jitter to the interval so the timing looks less regular.

This callback model matters for defense. Because the connection starts inside your network, an inbound firewall rule cannot stop it. You have to watch what leaves, not just what comes in.

Where does C2 sit in an attack?

C2 comes after initial access and execution, and before the attacker's real objectives. In the Lockheed Martin Cyber Kill Chain it is the fifth stage, just before "actions on objectives" — the theft, encryption, or sabotage the attacker actually wants.

That position makes C2 a strategic chokepoint. If defenders detect and block the channel, the attacker loses control of the compromised hosts, no matter how clever the initial intrusion was. CISA's #StopRansomware Guide treats cutting off attacker communications as a core part of both prevention and response.

Ransomware groups illustrate the point. In CISA and the FBI's advisory on BlackSuit (Royal) ransomware, the actors communicated with C2 infrastructure and downloaded multiple tools after gaining access, before disabling antivirus, exfiltrating data, and encrypting systems. The C2 stage was the bridge between breaking in and doing damage.

What are the main C2 techniques?

Attackers route the channel through whatever traffic blends in best. Each approach maps to a MITRE ATT&CK technique under TA0011.

TechniqueATT&CK IDHow it worksWhy it is hard to spot
Web protocolsT1071.001C2 hidden inside HTTP or HTTPS requestsLooks like ordinary browsing
DNST1071.004Commands and data tunneled inside DNS queriesDNS is rarely blocked or inspected
Encrypted channelT1573Payload encrypted with AES or RSAContent cannot be read by inspection
Web service / dead dropT1102Legitimate cloud or social sites relay commandsDestination is a trusted service
Non-standard portT1571Known protocol on an unusual port, such as HTTPS on port 8088Port-based rules miss it
Protocol tunnelingT1572C2 wrapped inside another protocol, such as SSHOuter protocol looks legitimate
Dynamic resolutionT1568Domain generation algorithms and fast-flux DNSBlocking one domain changes nothing
ProxyT1090Traffic chained through internal or external proxiesTrue server stays hidden

Web protocols (T1071.001)

The most common channel is plain HTTPS. The implant sends a request that looks like a visit to a normal website, and the server hides commands in the response. Because almost every network allows outbound HTTPS, this traffic passes most firewalls without a second look.

DNS tunneling (T1071.004)

DNS queries carry commands encoded in subdomain names, and the answers carry data back. DNS is essential for every network, so it is rarely blocked, and many organizations do not log or inspect it closely. Long, random-looking subdomains and unusually high query volumes are the giveaway.

Encrypted channels (T1573)

Attackers encrypt the C2 payload itself, on top of whatever protocol carries it. Even if a defender intercepts the traffic, the content is unreadable. MITRE notes that these implementations can still be vulnerable to reverse engineering if the keys are baked into the malware, which is how analysts sometimes crack them.

Web services and dead drops (T1102)

Instead of talking to a server they own, attackers post commands on a legitimate service — a cloud storage file, a social media post, a paste site — and the implant reads them from there. Blocking the service is not an option for most organizations, so defenders must watch for odd access patterns to it.

Domain generation algorithms and fast flux (T1568)

A domain generation algorithm lets the implant and the server compute the same list of thousands of possible domains for a given day. The attacker only needs to register one of them. Fast-flux DNS goes further, rotating the IP addresses behind a single domain every few minutes. Both techniques make blocklists nearly useless on their own.

What C2 architectures do attackers use?

Attackers choose an architecture based on how much resilience and stealth they need. The trade-off is control against exposure: the harder the infrastructure is to take down, the harder it is for the attacker to manage.

  • Centralized: every implant talks to one server or a small set of servers. Simple to run, but one takedown ends the campaign.
  • Multi-layer and proxy-based: traffic passes through redirectors and proxies, so the real server never appears in victim logs. The BlackSuit actors used tools such as Chisel and SSH tunnels for this.
  • Peer-to-peer: implants talk to each other and pass commands along, so there is no single server to seize. Harder to build, but very resilient.
  • Web service-based: a legitimate service acts as the relay, as in the dead-drop technique above.
  • Hybrid: a mix, often with fallback channels (T1008) so that if the primary channel is blocked, the implant switches to a backup.

Fallback channels deserve attention from defenders: blocking the first C2 domain you find may simply push the implant onto its backup, so hunt for the full set before you block.

What does C2 look like in real attacks?

Real campaigns show how central C2 is to the whole operation. The examples below come from CISA and FBI advisories, not from speculation.

BlackSuit (Royal) ransomware, documented by CISA and the FBI, used phishing for initial access, then communicated with C2 infrastructure to download tools, repurposed legitimate Windows software, and used Chisel, SSH, PuTTY, and OpenSSH to keep the channel open. Only after that did the actors disable antivirus, exfiltrate data, and encrypt systems. Ransom demands typically ranged from about $1 million to $10 million, with over $500 million demanded in total.

Botnets are the large-scale version of the same idea. One C2 server can direct tens of thousands of infected machines to send spam, launch denial-of-service attacks, or mine cryptocurrency, all through the same beacon-and-command loop.

Advanced persistent threats use C2 for months or years. Their implants beacon slowly — sometimes once a day — and use encrypted, jittered check-ins to stay below detection thresholds while they quietly collect documents and credentials.

How do you detect command and control traffic?

C2 detection is mostly about finding patterns that normal traffic does not have. No single signal proves an infection, but several together are strong evidence.

Six signals that expose a C2 channel1. Regular beaconingevenly spaced check-ins, same size, same destination2. Rare or new domainsfirst-seen domains, very young registrations3. Odd DNS querieslong random subdomains, high query volume4. Unusual portsHTTPS on port 8088, DNS over odd ports5. Traffic at odd hoursa workstation phoning home at 3 a.m.6. Data leaving quietlysteady small uploads to one destination
Combine signals: one alone is weak, three together is a case. Illustration by Cysoro.
  1. Look for beaconing. Plot connection times for each host. Human browsing is irregular; a beacon fires on a schedule, with similar packet sizes each time.
  2. Watch DNS. Flag long, high-entropy subdomains, domains registered in the last few days, and hosts making far more DNS queries than their peers.
  3. Baseline normal destinations. Most hosts talk to a small set of domains. A new, rare destination that one host contacts repeatedly deserves investigation.
  4. Inspect TLS without breaking it. Even encrypted traffic leaks metadata: destination, timing, certificate details, and the size and direction of flows.
  5. Use endpoint detection. Endpoint tools see the process making the connection, which network logs alone cannot show. An unknown process beaconing out is a strong lead.
  6. Check for fallback behavior. If you block one domain and the host immediately contacts a different rare domain, you have likely found a fallback channel.

Small teams without a security operations center can still do the basics: enable DNS logging, review firewall logs for odd hours and rare destinations, and use the free DNS lookup tool to check suspicious domains against their registration and resolution history.

How do you prevent and disrupt C2?

Prevention starts before the implant ever lands, and disruption continues after it does. CISA's ransomware guidance groups the controls into a few practical layers.

  • Filter DNS and web traffic. Use a DNS filtering service and block newly registered and uncategorized domains by default. This stops many C2 channels at the first lookup.
  • Apply egress filtering. Only allow outbound traffic on the ports and to the destinations your business actually needs. Block direct outbound connections that bypass your proxy.
  • Patch and segment. Keep systems patched, because C2 follows initial access through known vulnerabilities, and segment the network so one compromised host cannot reach everything.
  • Enforce MFA and least privilege. Stolen credentials are the fuel for lateral movement after C2 is established; phishing-resistant MFA and limited admin rights slow the attacker down.
  • Deploy endpoint detection and response. Modern endpoint tools detect beaconing behavior and kill the implant process, not just the domain it talks to.
  • Keep offline backups. If C2 leads to ransomware, tested offline backups are what let you recover without paying, as CISA's ransomware protection guidance stresses.

When you find C2, resist the urge to block it instantly and move on. First, scope the incident: which hosts talked to it, what data left, and whether fallback channels exist. Then block at DNS and firewall level, isolate the hosts, and remove the implant. Our small business cybersecurity checklist covers these controls alongside backups and patching.

C2 vs botnet vs RAT: what's the difference?

These terms overlap, which causes confusion. C2 is the channel; the other terms describe what uses it.

TermWhat it isExample
Command and control (C2)The communication channel between attacker and compromised hostAn implant beaconing to a server over HTTPS
BotnetA large fleet of compromised hosts controlled togetherThousands of infected routers sending spam
Remote access trojan (RAT)Malware that gives interactive remote control of one machineAn attacker browsing a victim's files live
Beacon / implantThe small program on the compromised hostA Cobalt Strike beacon checking in
C2 serverThe attacker-run system issuing commandsA rented virtual server running the panel

A RAT needs C2 to work, a botnet is many hosts sharing C2, and a beacon is the client side of the channel. If you hear someone say "the C2", they usually mean the server; if they say "C2 traffic", they mean the channel itself.

The bottom line

Command and control is the attacker's lifeline inside your network. The initial infection gets the headlines, but the C2 channel is what turns a single compromised machine into stolen data, deployed ransomware, or a foothold for months of quiet espionage.

That is also the good news: C2 is the stage where defenders have the most chances to win. Watch what leaves your network, log your DNS, look for beaconing, and block ruthlessly when you find it. You can check the domains your own systems resolve with the free DNS lookup tool.

Frequently asked questions

What is command and control in simple terms?

Command and control is how an attacker talks to malware already inside a network. The malware checks in with the attacker's server, receives instructions such as steal this file or encrypt that folder, and sends back the results.

What is a C2 server?

A C2 server is the attacker-run system on the other end of the channel. It issues commands to compromised hosts, receives stolen data, and delivers new tools or malware. Taking down or blocking a C2 server cuts the attacker's control.

Is C2 the same as a botnet?

No. A botnet is a large group of compromised machines controlled together, while C2 is the communication channel itself. A botnet uses C2, but a single compromised laptop in a targeted attack also uses C2 without being part of a botnet.

How do attackers hide C2 traffic?

They blend it into normal traffic: HTTPS web requests, DNS queries, cloud storage, or social media. They also encrypt the channel, vary timing, use fast-flux DNS, and generate new domains with algorithms so blocklists cannot keep up.

What is beaconing?

Beaconing is when a compromised host contacts its C2 server at regular intervals, for example every 60 seconds, to ask for instructions. Regular, small, evenly spaced connections to an unusual destination are a classic detection signal.

Can a firewall stop command and control?

Partly. Egress filtering, DNS filtering, and blocking known malicious domains stop many C2 channels, but attackers use HTTPS and legitimate services that firewalls normally allow. Detection needs network monitoring and endpoint detection as well.

What should I do if I find C2 traffic on my network?

Isolate the affected host from the network, preserve logs and memory for investigation, block the C2 domain or IP at the firewall and DNS level, and report the incident. Do not simply delete the malware first, or you lose the evidence of what it did.

Sources

  1. MITRE ATT&CK — Command and Control (TA0011)
  2. CISA — #StopRansomware Guide
  3. CISA, FBI — #StopRansomware: BlackSuit (Royal) Ransomware
  4. CISA — How Can I Protect Against Ransomware?
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against MITRE ATT&CK tactic TA0011 and CISA's #StopRansomware guidance and advisories.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free