Cyber Security News

Python-based PyRAT with Cross-Platform Capabilities and Extensive Remote Access Features

A new Python-based remote access trojan has emerged, targeting both Windows and Linux systems with sophisticated surveillance and data theft capabilities.

The malware operates by establishing command-and-control communication through unencrypted HTTP channels, allowing attackers to execute commands, steal files, and capture screenshots remotely.

When executed, it immediately begins fingerprinting the victim’s system by collecting details such as operating system type, hostname, and current username.

This information is then transmitted to the attacker’s server, enabling them to track individual victims across sessions.

K7 Security Labs researchers identified the malware during routine investigations on VirusTotal, where they discovered an ELF binary written entirely in Python.

The trojan was packaged using PyInstaller version 2.1 with Python 2.7, concealing its malicious code within what appeared to be a legitimate executable.

Imported modules (Source – K7 Security Labs)

Upon extraction using specialized tools, analysts uncovered the main entry point in a file named agent-svc.pyc, which contained the complete remote access functionality organized under a single class called “Agent.”

The malware achieves persistence differently depending on the operating system. On Linux systems, it creates a deceptive autostart entry at ~/.config/autostart/dpkgn.desktop, using a name that mimics legitimate Debian package tools to avoid detection.

This file executes automatically when users log in, maintaining the malware’s presence without requiring administrator privileges.

Communication with C2 (Source – K7 Security Labs)

On Windows systems, it adds a registry entry in the current user’s Run key under the name “lee,” ensuring automatic execution at startup while staying within user-level permissions.

Command-and-Control Infrastructure

The trojan communicates with its command server through basic HTTP POST requests directed at specific endpoints, transmitting system data in plain JSON format without encryption.

This design makes the traffic highly vulnerable to network monitoring and detection.

The malware uses a semi-persistent identifier created by combining the victim’s username with their MAC address, allowing attackers to track individual infections even if some system details change.

Communication frequency adapts based on activity state, with idle periods featuring longer intervals to reduce network visibility, while active sessions poll rapidly every half second to maintain responsiveness to incoming commands.

Windows Persistence (Source – K7 Security Labs)

The malware supports extensive file operations including unrestricted uploads and downloads through multipart form-data encoding.

It can enumerate entire directory structures, change working directories, and create ZIP archives for bulk data exfiltration using the DEFLATE compression algorithm.

Screenshot capture functionality records the entire screen through PIL’s ImageGrab module, saving images as temporary JPEG files that are automatically uploaded to the attacker’s server.

All operations run in separate threads to prevent blocking the main communication loop, ensuring continuous availability for receiving new commands while executing existing tasks.

Follow us on Google NewsLinkedIn, and X to Get More Instant UpdatesSet CSN as a Preferred Source in Google.

Tushar Subhra Dutta

Tushar is a senior cybersecurity and breach reporter. He specializes in covering cybersecurity news, trends, and emerging threats, data breaches, and malware attacks. With years of experience, he brings clarity and depth to complex security topics.

Recent Posts

Hackers Target AI Infrastructure With RCE, Prompt Injection and API Key Theft

Hackers are actively probing AI systems, turning exposed gateways and agent tools into routes for…

4 hours ago

Hackers Make Phishing Pages Change Their Code Every Time Someone Opens Them

Hackers are making some phishing pages harder to track by changing the code delivered to…

4 hours ago

Iran-Linked Hackers Reportedly Knock UK Power Plant Offline for Four Days

A cyber incident reportedly forced a British power plant to halt operations for about four…

5 hours ago

Russian Hackers Use New HOOKEDGE Malware to Spy on European Defense and Diplomatic Targets

Russian hackers have used a new backdoor called HOOKEDGE to target defense manufacturers, government bodies,…

6 hours ago

Ransomware Gang Claims AI Can Analyze 700GB of Stolen Data Every Hour

TITAN ransomware is pairing file encryption with an ambitious claim: artificial intelligence that can sort…

6 hours ago

Hackers Compromise Hundreds of WordPress Sites to Deploy Amatera Stealer via ClickFix

A fake student resume is being used to place a remote-access tool on researchers’ Windows…

7 hours ago