J-magic is a stealthy passive backdoor associated with compromises of enterprise-grade Juniper edge devices, including systems functioning as VPN gateways. Active from at least mid-2023 into mid-2024, it is notable for using Extended Berkeley Packet Filter functionality to inspect network traffic on selected interfaces and ports while remaining dormant until it detects a specially crafted magic packet. Upon activation, it can initiate a reverse shell, enabling covert operator access without exposing a conventional listening service under normal conditions.
The malware includes packet-capture and filtering logic that monitors inbound TCP traffic and can communicate with command-and-control infrastructure over SSL. Its design emphasizes low observability on network appliances and edge infrastructure, where endpoint security coverage is often limited. J-magic also employs defense-evasion measures such as masquerading as a legitimate kernel-thread-like process name to blend into Linux process listings.
Observed targeting has centered on Juniper edge devices in enterprise environments, with a significant share of affected systems appearing to serve as VPN gateways. J-magic is part of a broader class of Linux and network-device implants, alongside families such as BPFDoor and Symbiote, that use packet-filtering mechanisms and magic-packet activation to create covert access channels on infrastructure systems.
13 distinct techniques documented for this family, organized by ATT&CK tactic.
The [J-magic](https://attack.mitre.org/software/S1203) agent is executed through a command line argument which specifies an interface and listening port.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) can monitor TCP traffic for packets containing one of five different predefined parameters and will spawn a reverse shell if one of the parameters and the proper response string to a subsequent challenge is received.(Citation: Lumen J-Magic JAN 2025)
The "magic packet" concept (TCP SYN with a window of 54321) is a form of traffic signaling to activate the passive C2.
During the 2016 Ukraine Electric Power Attack, DLLs and EXEs with filenames associated with common electric power sector protocols were used to masquerade files.
[J-magic](https://attack.mitre.org/software/S1203) can rename itself as “[nfsiod 0]” to masquerade as the local Network File System (NFS) asynchronous I/O server.(Citation: Lumen J-Magic JAN 2025)
Cyclops Blink can rename its running process to [kworker:0/1] to masquerade as a Linux kernel thread.
J-magic can rename itself as "[nfsiod 0]" to masquerade as the local Network File System (NFS) asynchronous I/O server.
[J-magic](https://attack.mitre.org/software/S1203) can overwrite previously executed command line arguments.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) can monitor TCP traffic for packets containing one of five different predefined parameters and will spawn a reverse shell if one of the parameters and the proper response string to a subsequent challenge is received.(Citation: Lumen J-Magic JAN 2025)
The "magic packet" concept (TCP SYN with a window of 54321) is a form of traffic signaling to activate the passive C2.
[J-magic](https://attack.mitre.org/software/S1203) has a pcap listener function that can create an Extended Berkley Packet Filter (eBPF) on designated interfaces and ports.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) can compare the host and remote IPs to check if a received packet is from the infected machine.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) has a pcap listener function that can create an Extended Berkley Packet Filter (eBPF) on designated interfaces and ports.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) can monitor incoming C2 communications sent over TCP to the compromised host.(Citation: Lumen J-Magic JAN 2025)
[J-magic](https://attack.mitre.org/software/S1203) can monitor TCP traffic for packets containing one of five different predefined parameters and will spawn a reverse shell if one of the parameters and the proper response string to a subsequent challenge is received.(Citation: Lumen J-Magic JAN 2025)
The "magic packet" concept (TCP SYN with a window of 54321) is a form of traffic signaling to activate the passive C2.
The content repeatedly describes malware and threat actors using SSL, TLS, HTTPS, RSA, AES, Blowfish, RC4, ECIES, Diffie-Hellman, OpenSSL, WolfSSL, and mutual TLS to protect command and control traffic.
[J-magic](https://attack.mitre.org/software/S1203) can communicate back to send a challenge to C2 infrastructure over SSL.(Citation: Lumen J-Magic JAN 2025)
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.