Hackers Hijack Linux Sudo Commands to Secretly Capture Administrator Passwords

Hackers modified Linux shell settings to secretly capture administrator passwords during a campaign targeting government entities and state-affiliated infrastructure.

Palo Alto Networks Unit 42 tracked the activity as CL-UNK-1211, with observed operations running from October 2025 through April 2026.

The attackers combined credential theft, web shells and custom malware to support intelligence gathering. The central trick involved hijacking sudo through a malicious alias inside a modified .bashrc file.

Instead of immediately invoking the legitimate command, the alias displayed a fake authentication prompt, recorded the password and then passed it to the real sudo command. This allowed normal execution to continue while hiding the interception from the user.

Sudo Hijacking Steals Passwords

The attackers replaced the victim’s .bashrc file with a modified copy containing the credential-stealing command.

When an affected user entered sudo, the malicious alias intercepted the interaction and saved the supplied password in an attacker-controlled log.

That file was named Solarwinds.StatusLog.txt, apparently to resemble legitimate SolarWinds activity. Unit 42 emphasized that it found no evidence that SolarWinds systems or infrastructure were compromised. The name served only as camouflage.

Snippets of code containing comments, indicating the use of AI (Source: unit42)
Snippets of code containing comments, indicating the use of AI (Source: unit42)

Researchers found conversational annotations and step-by-step reasoning comments in malicious PHP and shell scripts.

These artifacts suggest that payloads were generated with large language models or deployed through an automated AI agent. However, the findings do not establish that the entire operation ran autonomously.

The toolkit included SysGoRAT, a custom remote access Trojan written in Go for Linux and Windows. It supported command execution, interactive shells, directory listing and proxy connections.

Its default command-and-control destination was 104.194.158[.]65:443, using WebSocket communications. Linux persistence options included systemd services and scheduled cron execution.

The attackers also searched government mailboxes for messages linked to social media accounts. They attempted to package complete mailboxes for theft, although one examined archive script contained syntax errors and would fail.

Separately, they dumped database contents into local files and attempted to transfer compressed archives outside compromised networks.

To conceal activity, the operators deleted logs, removed scripts after execution and changed file timestamps. They planted misleading red-team markers and attempted to terminate Cortex XDR processes.

Unit 42 reported that those process termination attempts were detected and blocked, leaving endpoint protections active.

Unit 42 recommends strict outbound firewall controls and endpoint monitoring for utilities spawning interactive shells.

Its findings highlight the importance of visibility across Linux servers, databases and mail systems, where attackers combined password interception, persistent access and evidence removal within the same campaign.

Indicators of Compromise

TypeIndicator
IP address45.88.188[.]140
IP address198.23.185[.]234

Note: IP addresses and domains are intentionally defanged (e.g., [.]) to prevent accidental resolution or hyperlinking. Re-fang only within controlled threat intelligence platforms such as MISP, VirusTotal, or your SIEM.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories