A sophisticated new malware framework, dubbed “DKnife,” has emerged, posing a significant threat to network security by targeting Linux-based routers and edge devices. Attributed to China-nexus threat actors, this malicious toolset allows attackers to establish a persistent foothold within a target’s infrastructure, enabling precise monitoring of data flow and manipulation of network traffic. This Adversary-in-the-Middle (AitM) framework has been active since at least 2019, remaining largely undetected until recently.
Cisco Talos analysts identified DKnife while investigating the distribution of the DarkNimbus backdoor. The analysis revealed DKnife as more than just a passive monitoring tool, but an active attack platform capable of intercepting traffic for specific services, particularly those popular among Chinese users. By injecting malicious payloads, attackers can bypass traditional endpoint security measures, highlighting a shift in threat actor tactics towards edge devices for covert operations. The potential impact of a DKnife infection is substantial, as a compromised router can expose every connected device.
The Mechanics of Traffic Hijacking and Malware Delivery
DKnife’s offensive capabilities are centered on its ability to seamlessly hijack binary downloads. The framework employs a complex deep packet inspection (DPI) engine that continuously monitors network traffic for specific types of requests, such as Android application updates or Windows executable downloads. When a matching request is detected, the malware intercepts it before it reaches the legitimate server.
The compromised gateway first intercepts the initial update manifest request and checks it against a local configuration file. If a match is found, DKnife sends a forged response back to the victim’s device. This response redirects the download to a malicious URL hosted on a virtual internal network established by the malware itself. This internal network is managed by a component known as `yitiji.bin`, which creates a bridged interface to route the attacker’s traffic. By confining the malicious delivery within this virtual local area network, attackers avoid IP address conflicts and reduce the risk of detection by external network monitoring tools.
This stealthy mechanism ensures that the victim believes they are downloading a legitimate update. However, they are, in reality, installing backdoors like ShadowPad or DarkNimbus, effectively granting the attackers comprehensive control over the endpoint device. The malware can also selectively disrupt traffic from antivirus products, preventing them from updating or communicating with their servers. Furthermore, it can harvest sensitive user data, including credentials and device identifiers, turning the network gateway into an extensive espionage tool.
The ongoing evolution of the DKnife framework suggests that threat actors will likely continue to refine their methods for compromising edge devices. Security researchers and network administrators face the challenge of adapting detection and mitigation strategies to address these increasingly sophisticated attacks. The reliance on Linux-based devices in critical infrastructure makes them prime targets, underscoring the need for robust security practices and continuous monitoring of network traffic for anomalous behavior.

