NGINX Server Hack: How Attackers Hijack User Traffic (2026)

Hackers Hijack User Traffic: A Stealthy Attack on NGINX Servers

A silent threat is lurking in the digital shadows, targeting NGINX servers and manipulating user traffic.

A malicious campaign has been uncovered by security researchers, revealing a sophisticated attack on NGINX, a widely-used open-source web traffic management software. This software acts as a vital intermediary between users and servers, ensuring smooth web serving, load balancing, caching, and reverse proxying.

Here's the twist: the attackers are not exploiting a vulnerability in NGINX itself. Instead, they are stealthily modifying its configuration files, adding malicious 'location' blocks that capture and redirect user requests. And this is where it gets tricky—the traffic is rerouted through the attackers' infrastructure, but it still reaches the intended destination, making it incredibly hard to detect.

The Attack Unveiled:

The campaign, uncovered by DataDog Security Labs, specifically targets NGINX installations and Baota hosting management panels used by Asian top-level domains and government/educational sites. By injecting malicious code, attackers gain control over user traffic without raising alarms.

The multi-stage attack toolkit operates in five steps:

  1. Stage 1 - zx.sh: The master controller script initiates the attack, downloading and executing subsequent stages. It's designed with a fallback mechanism for adaptability.
  2. Stage 2 - bt.sh: This stage targets Baota-managed NGINX configuration files, selecting injection templates and safely rewriting configurations to maintain service continuity.
  3. Stage 3 - 4zdh.sh: Enumerating common configuration locations, this stage uses parsing tools to prevent corruption, detect previous injections, and validate changes before reloading NGINX.
  4. Stage 4 - zdh.sh: Focusing on specific domains, this stage follows a similar process but with a narrower targeting approach, ensuring a forced restart if needed.
  5. Stage 5 - ok.sh: The final stage scans compromised configurations, mapping hijacked domains and exfiltrating data to a C2 server.

The Stealth Factor:

What makes this attack particularly insidious is its ability to go unnoticed. By hiding malicious instructions within rarely scrutinized configuration files, attackers ensure that security alerts are not triggered. Moreover, since user traffic still reaches its intended destination, the redirection through the attacker's infrastructure is unlikely to be detected without specific monitoring.

The Future of IT Infrastructure:

As cyber threats evolve, so must our defenses. The increasing complexity of IT infrastructure demands automated solutions that can keep up with the pace. Learn how your team can stay ahead of the curve, reduce manual delays, and enhance reliability through automated responses in the latest Tines guide. Explore the future of IT infrastructure and discover how to build intelligent workflows that adapt to the ever-changing threat landscape.

And here's a thought: Could this attack have been prevented with more robust configuration file monitoring? Share your insights and join the discussion on the evolving nature of cyber threats and the strategies to combat them.

NGINX Server Hack: How Attackers Hijack User Traffic (2026)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Arielle Torp

Last Updated:

Views: 5768

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.