JPCERT/CC Details CJDoor Backdoor’s Use of cjdns Encrypted Mesh

· Original article ↗

Summary

JPCERT/CC analyzed CJDoor, a 64-bit MIPS Linux backdoor that uses cjdns to accept inbound peers over an encrypted mesh, enabling remote commands and tunneling. Its prevalence and use in attacks remain unclear.

Key points

  • JPCERT/CC found CJDoor while examining open directories on malware-distribution servers identified in prior reporting on UAT-7810; it also found Rekoobe and a MIPS TUN/TAP kernel module.
  • During initialization, CJDoor collects device and network details and sends them in an HTTP GET request to a specified IP address; it does not support HTTPS or domain names for this destination.
  • Instead of periodically connecting to a C2 server, CJDoor listens for inbound UDP connections and joins an attacker-controlled cjdns encrypted mesh network.
  • CJDoor adds remote-control functions, including arbitrary shell-command execution and a reverse shell; JPCERT/CC identified 14 commands in LinkCommandSender and 24 additional commands in modified cjdns modules.
  • The malware is based on cjdns v20 but alters its packet format, adding a 16-byte prefix and custom command-message values that can help distinguish CJDoor traffic.
  • CJDoor configures a TUN interface and IPv6 for mesh communication. JPCERT/CC notes that the TUN interface and files associated with tools such as ud and ts may provide investigation clues.
  • CJDoor’s infection scale and extent of use in actual attacks remain unknown.

Article Details

Attack Vectors
  • CJDoor was found among files in open directories on two malware-distribution servers associated with UAT-7810; the initial infection mechanism is not established.
  • After initialization, CJDoor listens for inbound UDP connections so an attacker can connect to the device through a cjdns overlay network.
Defensive Notes
  • JPCERT/CC notes that randomly selected listening ports and encrypted cjdns traffic can make detection from traffic content alone difficult.
  • Potential investigation clues include the TUN interface and files associated with ud and ts.
  • CJDoor-specific command traffic uses Control_Header.type value 0x1F and includes lnkq and lnkr fields, which are absent from standard cjdns.

Indicators of compromise

TypeIndicatorContext
SHA256324911d9f045eaca8fc5ee292e75416e9f9af91f2833245600926ef0bea8edc6SHA-256 of the Rekoobe sample named t, found in an open malware-distribution directory.
SHA25642d8ff0f14d117edc01c307f4277f5661565678b068edfb75854b7fe265d6dbcSHA-256 of the TUN/TAP kernel module found alongside the malware; JPCERT/CC says it may have been placed there to provide TUN/TAP functionality on infected devices.
SHA256597ed061ac707ed539f7a30d5edca5149bfe50f4dcb736e34fec29e4f139f702SHA-256 of the CJDoor sample named netd, found in an open malware-distribution directory.

MITRE ATT&CK

Threat Actors

Malware

Products

Countries

Related Articles