A new wave of cyberattacks is exploiting NGINX web servers to redirect users to malicious destinations, according to recent findings from Datadog Security Labs.
The campaign primarily targets servers managed via the Baota (BT) control panel, popular in Asia for its ease of web hosting and administration.
The attackers, believed to be linked to the earlier React2Shell remote‑code‑execution campaign, are modifying NGINX configuration files to hijack legitimate web traffic silently.
How the Attack Works
NGINX determines how to route incoming web requests through its configuration files. Attackers are exploiting this mechanism by injecting rogue proxy_pass rules inside location blocks.

When users visit an infected website, their requests are secretly redirected to attacker‑controlled servers instead of the original destination.
The result users unknowingly receive phishing, gambling, or scam pages while the legitimate website appears unaffected, allowing the compromise to persist undetected.
Datadog researchers analyzed the toolkit driving this campaign and identified a five‑stage infection chain, comprising modular shell scripts.
Each script handles a specific phase of the server takeover and persistence process.
- Stage 1 – The Orchestrator (zx.sh): Acts as the initial entry point, typically deployed after the server is breached. It downloads additional payloads and establishes network communication channels, even bypassing blocked utilities like curl or wget.
- Stage 2 – Baota Panel Injection (bt.sh): Focuses on Baota‑managed NGINX servers, scanning configuration paths and injecting malicious rules tailored to the site’s domain structure. It checks for existing compromises to maintain stealth and triggers a soft reload after injection.
- Stage 3 – Advanced Injection (4zdh.sh): Expands coverage to general Linux environments under /etc/nginx/sites‑enabled. The script verifies syntax validity before restarting NGINX to avoid service disruption.
- Stage 4 – Linux‑Targeted Injection (zdh.sh): A more aggressive variant tuned for containerized deployments and regional top‑level domains such as .in and .id. It forcefully restarts NGINX if standard reloads fail.
- Stage 5 – Reporting (ok.sh): Surveys the infected host for hijacked domains and reports findings to the attackers’ command‑and‑control server, completing the feedback loop for campaign tracking.
The redirection campaign threatens a wide range of online services particularly e‑commerce, VPN, and remote access providers that depend on consistent web routing integrity.
Beyond traffic hijacking, adversaries could inject ads, steal credentials, or harvest browsing data.
Security experts recommend administrators routinely audit their NGINX configuration files, especially location blocks containing unexpected proxy_pass directives.
Implementing strict file integrity monitoring, minimizing administrative panel exposure, and keeping Baota and NGINX installations patched can help prevent future compromises.
Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google.