A malicious version of the CWP web server is silently opening Linux servers to attackers. CWPdoor hides its activity, bypasses normal access logging and executes commands through specially crafted encrypted HTTP requests.

Linux servers running Control Web Panel (CWP) could face a stealthy compromise through a newly discovered malware called CWPdoor. Attackers are distributing the malware through a trojanized version of cwpsrv, the web server component responsible for handling the CWP management interface.

Unlike conventional backdoors that continuously listen for incoming connections, CWPdoor uses a passive approach. It remains dormant until an attacker sends a specially crafted HTTP request. This makes the malware harder to identify through routine network monitoring.

How Attackers Install CWPdoor

CWP, previously known as CentOS Web Panel, is an open-source web hosting administration platform. It provides administrators with a centralized interface for managing web servers, email services, DNS and databases.

Security researchers at XLab discovered the malware on June 29 after identifying a malicious script disguised as a legitimate software updater.

The script replaces the original cwpsrv binary with a trojanized version. Researchers identified attacks targeting versions 1.15.10 and 1.24.0.

Additionally, the installation script attempts to conceal its activity through several anti-forensic techniques:

  • Restores original file and directory timestamps.
  • Deletes temporary installation files.
  • Clears command-history records.
  • Replaces the legitimate web server binary without obvious indicators.

As a result, administrators may struggle to identify the initial compromise through routine file inspection.

Encrypted Commands Allow Remote Access

CWPdoor relies on specially crafted HTTP headers to receive instructions from its operators.

The attacker sends three custom headers:

  • X-Ngx-Integrity-Data: Contains the encrypted command.
  • X-Ngx-Integrity-Time: Provides the request timestamp.
  • X-Ngx-Integrity-Sig: Contains the RSA signature.

The malware verifies the RSA signature and checks whether the request timestamp falls within a five-minute window. Only after successful validation does it decrypt the command and forward it to a helper process for execution.

CWPdoor uses AES-256-CBC encryption to protect commands and their output. Furthermore, its signature-validation mechanism prevents attackers from modifying the timestamp or encrypted payload independently without invalidating the signature.

This design provides controlled remote command execution while making unauthorized or replayed requests more difficult.

Log Suppression Makes Detection More Difficult

One of CWPdoor's most concerning capabilities involves manipulating the server's logging functionality.

The malware interferes with the web server's logging module to prevent malicious triggering requests from appearing in normal access logs.

Consequently, security teams may see fewer indicators of suspicious activity during routine investigations.

XLab also identified a CWPdoor sample uploaded to VirusTotal on September 30 inside an archive containing the Ebury backdoor.

The malicious cwpsrv.suspeito binary received zero detections at the time of discovery. This raised concerns about the malware's ability to evade existing security products.

However, researchers have not established a confirmed operational relationship between CWPdoor and Ebury.

Why This Threat Matters to Server Administrators

CWPdoor creates significant risks for organizations that depend on Linux servers for hosting applications, websites and business services.

A compromised control panel could provide attackers with an opportunity to execute unauthorized commands, access sensitive information, deploy additional malware and establish persistent access.

The threat also highlights the risks associated with trusting software update mechanisms without independently verifying their integrity.

XLab reported more than 340,000 publicly exposed CWP instances during the month preceding its research. Although exposure does not automatically indicate compromise, it demonstrates the potential reach of this attack surface.

How to Detect and Respond to CWPdoor

Administrators should investigate CWP environments for the following indicators:

  • Unexpected ngx_http_integrity_helper Unix socket.
  • Suspicious cwpsrv helper processes.
  • X-Ngx-Integrity strings embedded in the server binary.
  • Unexpected modifications to the legitimate cwpsrv executable.
  • Unusual processes or network activity associated with the CWP service.

If an infection is confirmed, organizations should take immediate action:

  1. Isolate the affected server to prevent further attacker activity.
  2. Replace the compromised cwpsrv binary with a verified legitimate copy.
  3. Upgrade Control Web Panel to the latest supported version.
  4. Rotate CWP administrator credentials and other potentially exposed credentials.
  5. Investigate the host for additional malware, persistence mechanisms and unauthorized accounts.
  6. Review network activity and authentication records for evidence of further compromise.

Simply replacing the malicious binary may not remove every attacker foothold. Therefore, organizations should conduct a complete incident investigation before returning affected servers to production.

The Bigger Security Lesson

CWPdoor demonstrates how attackers can compromise trusted server components rather than exploiting only externally exposed applications.

For organizations operating Linux infrastructure, software integrity monitoring, secure update validation and continuous endpoint monitoring remain essential.

Security teams should also avoid relying exclusively on application access logs. Attackers who manipulate logging mechanisms can undermine traditional detection methods.

The key takeaway: A legitimate server process does not guarantee a legitimate server. Organizations must continuously verify the integrity of critical infrastructure components and investigate unexpected changes before attackers turn them into persistent access points.