AI SNITCHED ON THE HACKERS
Hackers are increasingly turning to AI for assistance in their attacks. However, as it turns out, AI doesn't always effectively assist attackers. If handled carelessly, artificial intelligence can reveal cybercriminals. During an espionage operation targeting government servers, the hackers' carelessness gave them away. Palo Alto Networks' Unit 42 team uncovered the CL-UNK-1211 campaign, which targeted government agencies and related Linux infrastructure. Researchers are not yet releasing the names of the affected agencies.
The discovered malicious scripts contained unusual comments with step-by-step explanations. These explanations resembled language model responses. Operators constantly switched between PHP, Bash, Python, and JavaScript, and commands were often encoded in Base64. Unit 42 specialists believe the attackers simply copied pre-existing code from the AI or instructed an agent to execute it. However, no evidence of a fully autonomous attack was found. To penetrate and gain a foothold on Linux servers, the attackers used web shells, programs for remotely executing commands through a website. The hackers modified the auto_prepend_file parameter in PHP configurations, thereby forcing the server to automatically download a malicious file before running regular scripts each time. One of the backdoors used by the attackers disguised itself as a system component of the Plesk panel. The hackers were able to intercept passwords without complex exploits. The attackers simply modified the .bashrc file so that the sudo command first displayed a fake password prompt and logged the entered value. Only then did the real sudo command run. The attackers inserted similar code into the administrator login page without causing any visible errors. The credentials obtained during these actions opened the way for the attackers to access other systems. As a separate tool, the hackers used SysGoRAT, a remote access Trojan written in Go for Linux and Windows. The program then accepted commands via WebSocket, transferred files, took screenshots, opened an interactive shell, and freely acted as a proxy on the internal network. To gain persistence, the malware could create a systemd service, a cron job, or a Windows startup entry. The attackers' primary interest was in the databases and service email on the systems they targeted. Using the search_social.php script, the hackers searched email headers for mentions of Facebook, Instagram, TikTok, and other platforms. This helped the attackers find accounts associated with government addresses. However, an attempt to collect entire mailboxes into ZIP archives failed because the script prepared for downloading contained a syntax error. To advance within the network, the hackers used SSH, proxies, and access to SQL servers. On some compromised servers, the attackers managed to gain root privileges and leave SSH keys for re-entry. This use of AI has been seen in other large-scale hacking campaigns. But in this case, the combination of automated scripts and manual persistence methods was particularly noticeable. Before leaving the compromised systems, the attackers deleted logs, changed file timestamps, and attempted to leave marks that would resemble traces of a legitimate penetration test. The scripts also attempted to stop Cortex XDR, but system protection blocked such actions. Researchers from Unit 42 admit that despite identifying traces of the hackers, they have not yet been able to identify the perpetrators of the attack. Furthermore, the total amount of data stolen is also unknown. One thing is clear: due to carelessness in using AI and tools, the hackers were unable to remain undetected.
