⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CJDoor: A Linux Backdoor Hidden Inside a Legitimate Mesh Network | Alireza Bolbolabadi - Red Team Security
LOADING

CJDoor: A Linux Backdoor Hidden Inside a Legitimate Mesh Network

Background: From ORB Networks to Open Directories

CJDoor surfaced during a review that connected several overlapping research threads. In July 2026, Cisco Talos documented UAT-7810, an actor that builds and expands Operational Relay Box (ORB) networks, including the LapDogs cluster that SecurityScorecard first described in June 2025. UAT-7810's toolset also includes implants named LONGLEASH, DOGLEASH, and JARLEASH.

JPCERT/CC obtained the CJDoor sample while auditing the distribution servers cited in the Talos report. Two of those servers exposed open directories, which gave analysts a direct view of the actor's payload set. Concentrations of infected devices are reported in the United States and Southeast Asia, with additional endpoints in Japan, South Korea, Hong Kong, and Taiwan.

What CJDoor Is

CJDoor is not a vulnerability in any product. It is a heavily modified fork of the open-source cjdns mesh-networking suite, derived from the cjdns v20 source tree while upstream cjdns has since moved to v22. The implant is delivered as a 64-bit MIPS ELF binary, which strongly suggests consumer or small-business routers, gateways, and other embedded network appliances as the intended host.

The author's modifications turn a benign overlay networking tool into a remote-access backdoor. A new LinkCommandSender module adds 14 commands, including runCommand for arbitrary shell execution and rs for an interactive reverse shell. Twenty-four additional commands were sprinkled across existing cjdns modules. Parameters are Bencode-encoded, command traffic sets a Control_Header.type value of 0x1F (unused by stock cjdns), and frames carry the markers lnkq for queries and lnkr for responses. Stock cjdns clients therefore cannot interoperate with the implant, and those three values are the strongest network-level fingerprints defenders can rely on.

How CJDoor Operates

The implant runs in two stages.

In --init mode, it generates a cjdns key pair, gathers host telemetry (interface names, IP and MAC addresses, iptables state, and TUN device availability), writes that data into sys.dat and netd.dat, and exfiltrates the contents in a plain HTTP GET request to a hardcoded IP address, with no domain and no TLS. This step is the implant's weakest network-side link.

In --conf mode, the binary loads the previously written netd.dat, then deletes sys.dat, netd.dat, and its own executable. That self-cleaning behavior is what makes the implant persistent in capability but light on local artifacts.

Once installed, CJDoor prepares the host for the overlay:

  • It probes /dev/net/tun, /dev/tun, and /tmp/tun. If none of those exist, it executes mknod ./tun c 10 200 to create a TUN device node in the working directory.

  • It brings up a TUN interface named pp1000 and enables IPv6 on it.

  • It can optionally launch /tmp/ud, which behaves like a local port forwarder, and ./ts, which behaves like a SOCKS-style tunneling aid.

The Communication Model: Inbound-Only and Encrypted

cjdns builds an encrypted IPv6 overlay in which node addresses fall inside the fc00::/8 range and are derived from each node's public key. CJDoor leans on that design to make the implant's traffic invisible to most passive defenders.

The implant does not beacon. It listens on a random UDP port and joins the attacker's cjdns mesh only after the operator initiates inbound peering. Because infected hosts never reach out to a fixed server, there is no DNS indicator, no C2 IP to sinkhole, and no outbound pattern to alert on.

All payload traffic uses cjdns CryptoAuth, a combination of Curve25519 key exchange and XSalsa20-Poly1305 symmetric encryption. Because the encryption is cjdns's own and unique to the modified client, payload inspection yields almost nothing.

On disk, configuration files are protected with XSalsa20, using a key derived from the SHA-256 hash of the constant bytes 31 73 37 13 00 00 00 00 and an all-zero 24-byte nonce. Analysts recovering sys.dat or netd.dat forensically can attempt to decrypt them with that exact construction.

What Ships Alongside CJDoor

The same distribution directories also contained two other 64-bit MIPS artifacts that, based on file type and date alignment, appear to have been deployed together:

  • Rekoobe — a backdoor that listens on TCP port 7896 and supports file transfer, a PTY shell, and command execution.

  • A custom TUN/TAP kernel module (tun.ko) — likely dropped onto devices that lack native TUN support so that CJDoor's overlay can be brought up at all.

Practical Impact

For a device that has already been compromised and deployed with CJDoor, the practical outcome is full remote control: arbitrary shell commands, an interactive reverse shell, and tunneled egress through the ud and ts helpers. The architectural durability of the implant is high because the operator retains a unique cjdns identity per device, traffic is encrypted end-to-end inside the overlay, and the --conf self-cleaning step removes most local evidence after each run.

The initial-access vector — how the 64-bit MIPS devices were first compromised to receive CJDoor, Rekoobe, and the tun.ko module — is not described in available reporting and remains an open question. Reported victim counts are not quantified; only a qualitative geographic distribution is provided.

Detection and Mitigation

Because the implant's traffic is encrypted and beacon-less, network detection alone is insufficient. Defenders should center their hunt on host artifacts, with selective network controls at egress points.

Host-side hunt (highest signal):

  • A TUN interface named pp1000, which is not a vendor-default interface name.

  • A tun device node created in an arbitrary working directory, or traces of mknod ./tun c 10 200 execution.

  • Processes named ud and ts executing out of /tmp or the current working directory.

  • Unauthorized loading of a tun.ko kernel module that was not shipped with the device firmware.

  • Listener processes on unexpected UDP ports whose file path and hash do not match the vendor baseline.

Network-side detection:

  • Look for the modified-cjdns fingerprint: Control_Header.type == 0x1F, lnkq query markers, and lnkr response markers. Stock cjdns does not produce these values.

  • Block plain HTTP egress from device firmware where it is unexpected; the --init step uses an unencrypted HTTP GET to a raw IP, which is a useful choke point.

Operational response:

  • Treat any TCP/7896 listener as a coexisting indicator and investigate the firmware of the host exposing it.

  • Re-image MIPS-class network appliances suspected of compromise rather than relying on factory reset, because the overlay identity and any kernel-module persistence can survive a reboot even after the --conf cleanup.

Indicators of Compromise

| Content | Filename | SHA-256 |

|---|---|---|

| CJDoor | netd | 597ed061ac707ed539f7a30d5edca5149bfe50f4dcb736e34fec29e4f139f702 |

| Rekoobe | t | 324911d9f045eaca8fc5ee292e75416e9f9af91 (truncated in source) |

The Rekoobe hash is reported in the source in truncated form; analysts should re-derive the full digest from a controlled retrieval rather than treat the partial value as canonical. The CJDoor netd hash is provided in full.

·
← News