They detect backdoor cwpdoor in cwpsrv of Web Control Panel (CWP) affecting versions 1.15.10 and 1.24.0

Author: Published 6 min de lectura 23 reading

The images in this article were generated with artificial intelligence. How we publish

Researchers at QiAnXin's XLab have identified a back door trojan directly integrated into the web server binary using Web Control Panel (CWP), a free panel to manage Linux servers. The malicious component has been called cwpdoor by the researchers; it is the cwpsrv process itself recombined with additional code that allows an attacker to execute arbitrary commands sent in HTTP requests and, crucially, that these requests are not recorded in the access files.

What has been confirmed: the backdoor is a modified version of cwpsrv that maintains normal behavior except when it receives a request with specific headers (names starting with X-Ngx-Integrity) containing a valid timestamp and signature; in that case it extracts and executes the command that travels in the request. The installer captured by XLab appears as an update script (cwpsrv _ update.sh) and affects only two specific versions of the server: cwpsrv 1.15.10 and 1.24.0. The installer requires root privileges to replace the binary and, after replacement, restores the time marks of the file so that ls or stat do not demonstrate the modification. XLab published technical indicators including MD5 for the installer and the compromised binaries, a download IP and the observed URLs: MD5 e505d4ffa21cf494a5dc2d7c8f4f1236 (installer), 965ae67fb40de1bab5169ada993349f (cwpsrv 1.15.10 modified), d3f4e95113d49ab3991b45e457bda75b (cwpsrv), as amended [136.71 / cpsp. The XLab testers and the samples uploaded to VirusTotal showed no detection at the time of the analysis.

They detect backdoor cwpdoor in cwpsrv of Web Control Panel (CWP) affecting versions 1.15.10 and 1.24.0
Image generated with IA.

What seems likely and not yet verified:: The fact that the installer requires root implies that the attackers already had privileged access to the server before planting cwpdoor; however, the researchers have not determined the initial vector: they could be committed SSH credentials, a prior exploitation, another backdoor installed before (e.g. Ebury) or legitimate abuse of updates by malicious actors. There has also been a rise to VirusTotal from Brazil on September 30 that contained a copy of the backdoor along with samples of the Ebury malware - a known backdoor / roba- credentials of OpenSSH, but XLab does not establish a direct relationship between the two samples and warns that they could be independent in the same host.

How it works technically: cwpdoor replaces cwpsrv with an additional logic version. During normal HTTP traffic it behaves as the original application; when you receive a request with valid X-Ngx-Integrity headers, check the timestamp and signature and then execute the command provided by the attacker. To avoid detection, the installer restores the time marks of the binary and the backdoor itself avoids leaving track of the requests on conventional access logs. XLab also detected the creation of a Unix socket called ngx _ http _ integrity _ helper used by the backdoor for internal communication; the existence of that socket is one of the commitment indicators they recommend.

Who's at risk: servers that run Web Control Panel with the affected versions and have also been previously compromised so that an attacker has obtained root. It is not a vulnerability that can be remotely exploited over an uncompromised service: the installer needs root-level permissions to replace the binary. Even so, the combination of vectors (weak credentials, exposed SSH access, explosion in other components) can lead to a real infection.

Actual consequences: once installed, cwpdoor allows an attacker to execute arbitrary orders with the privileges of the cwpsrv process (which usually run with high permits) without such actions appearing in the web server access records. This facilitates tasks of persistence, escalation, exfiltration of data and deployment of other malicious loads (e.g., a back door in SSH like Ebury). In addition, the elimination of traces in timstamps and records complicates manual detection and forensic analysis.

Recommended tests and detection (confirmed by XLab):: the researchers propose three practical checks: 1) Socket: ss-axp-124; grep integrity - if ngx _ http _ integrity _ helper appears, is an indication of commitment; 2) Processes: ps aux-124; grep cwpsrv - look for unexpected auxiliary processes launched by cwpsrv; 3) File: strings / usr / local / cwpsrv / bin / cwpsrv-124; grep X-Ngx-Integrity - the presence of these chains in the binary indicates the modification. The hashes published in VirusTotal should also be consulted to compare samples (e.g. https: / / www.virustotal.com / gui / file / e505d4ffa21cf494a5dc2d7c8f4f1236 / detection) and to review the observed download URL / IP (136.0.141 [.] 71).

Mitigation and immediate response steps:: if you manage a server with CWP, act as if it is committed and follow these priority steps: (a) Isolate the network server to cut out outgoing communications; (b) Run the above checks and look for the backup that the installer creates in / usr / local / cwpsrv / bin with name starting with cwpsrv.pre- (if it exists, restores that binary); c) If the backup is not available, replace cwpsrv with a clean version obtained from a reliable source or reinstall the panel from scratch; d) Update CWP to the latest available version and confirm that ss-axp-124; grep integrity returns empty; e) Change all the credentials associated with the panel, administrator accounts, SSH keys and any credential stored on the server; f) Consider complete reconstruction (reimage) if you detect signs of persistence or other malicious binaries - treat it as a total commitment of the host g); Do a forensic analysis: look for Ebury or other backdoors, check / var / log / auth.log and outgoing network connections, and keep forensic images if you need further research. Additional information about Ebury can be consulted to understand your profile: https: / / en.wikipedia.org / wiki / Ebury _ (malware).

They detect backdoor cwpdoor in cwpsrv of Web Control Panel (CWP) affecting versions 1.15.10 and 1.24.0
Image generated with IA.

Medium-term operational recommendations: limit SSH access (use password-free key authentication and IP-restricted), apply MFA on panels and administrative access, deploy binary integrity detection (tripwire / OSSEC), monitor unusual outgoing connections and set alerts on critical binary changes. If you don't need CWP, you value disinstalling it and migrating to solutions with better security history and signed updates.

Limits and open aspects: XLab documented the installer sample and binary modifications, but has not published a number of affected servers or identified the initial commitment vector. The presence of Ebury in a sample uploaded to VirusTotal suggests that some affected servers may contain multiple threats, but there is no definitive evidence that both malware belong to the same actor. For more technical details and indicators published by researchers it is recommended to review the original source and correlate it with the detections in sample analysis services.

If you manage infrastructure with CWP, prioritize immediate review and follow the recommendations of containment and mediation: the sum of a backdoor that leaves no trace on the logs and the potential presence of other backdoors makes it the safest option, in many cases, to assume the loss of confidence of the system and rebuild from known and secure images. The official CWP site can be used to check product updates and guides: https: / / control-webpanel.com /.

Coverage

Related

More news on the same subject.