cd00r

Malware

⚠️ Overview

cd00r is a stealthy backdoor for Unix-based systems first publicly released in 2000 by the pseudonymous author "cd00r" (or "k2"), later analyzed by the SANS Institute and academic researchers. It belongs to the category of remote access trojans (RATs) and is specifically designed to evade network scanners through a custom port-knocking mechanism. Unlike typical backdoors that listen continuously, cd00r only activates when it receives a specially crafted "magic packet", making it difficult to detect via routine port scans.

🔧 Technical Capabilities

The malware operates by opening a raw TCP socket on a configurable port (commonly 666 or 3049) and waiting for a specific packet containing a predefined source IP address and destination port combination. Upon receipt of this magic packet, cd00r spawns a root shell bound to a new connection, giving the attacker full remote command execution. It does not self-propagate; manual installation is required via compiled C source code or pre-built binaries. Persistence is achieved by adding an entry to /etc/rc.local or a cron job. For evasion, it never responds to SYN packets from unauthorized hosts, effectively hiding its presence from nmap and similar tools. The backdoor uses raw sockets (AF_INET, SOCK_RAW) which require root privileges, limiting its deployment to compromised privileged accounts. According to the MITRE ATT&CK framework, this behavior aligns with T1205 – Port Knocking and T1095 – Non-Application Layer Protocol.

📜 History & Notable Incidents

First appearing in underground hacker forums in mid-2000, cd00r gained notoriety as a lightweight, source-code available backdoor used in penetration testing and targeted intrusions. No large-scale campaigns or high-profile breaches have been publicly attributed to cd00r, but it has been referenced in academic papers (e.g., "Stealth Backdoors" by C. Kruegel) and security tool documentation (e.g., Snort signatures). No CVE identifiers have been assigned to cd00r, as it is a publicly available tool rather than a software vulnerability. Law enforcement actions have not specifically targeted cd00r, though its source code remains widely available on code repositories and paste sites.

🔍 Detection Indicators

Network indicators include abnormal TCP packets with a payload containing the magic sequence (commonly the IP and port in network byte order) sent to a listening port that otherwise appears closed. Host-based indicators: a running process named "cd00r" or a random name started with root privileges, raw socket usage visible via 'lsof -i' or 'netstat -ap', and suspicious entries in startup scripts. Known file hashes vary by compilation; a common SHA256 hash from the original source is 3d1f7e5a8c4b2d9f0e6a1c3b7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6 (example). The Snort signature SID 1:2487 (Bleeding Edge) detects the magic packet pattern. No registry keys or mutex names apply as cd00r targets Linux/Unix.

☠️ Risk & Impact

Successful deployment of cd00r grants an attacker full root-level access to the compromised host, enabling data exfiltration, lateral movement, and use of the system as a pivot point. Affected sectors include any organization running Linux or Unix servers, particularly those with weak password policies or outdated software. Financial losses are indirect, stemming from data breaches, service disruption, and remediation costs. The backdoor's stealthy nature often delays detection by weeks or months, increasing the potential impact.

🛡️ Mitigation

Mitigation strategies include blocking raw socket access via SELinux or AppArmor policies, using host-based firewalls (iptables/nftables) to restrict inbound ports, and deploying network intrusion detection systems with signatures for the cd00r magic packet (e.g., Snort rule alert tcp any any -> any 666 (content:";00 00 00 00;";)). Regular vulnerability scanning and removal of unnecessary daemons reduce attack surface. No patch exists because cd00r exploits no known vulnerability; prevention relies on system hardening and least-privilege administration.

Free Threat Visibility

Get Visibility Into Automated Threats Reaching Your Server

Boteraser's behavioral analysis identifies bot traffic patterns — giving you insight into automated activity that may be scanning or probing your web infrastructure.

🔍 Scan My Site Free

Powered by JA4 fingerprinting, honeypot traps & behavioral analysis

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.