Description

In late 2022, security experts introduced GuardDog, a CLI-based tool that leverages Semgrep and package metadata heuristics to detect malicious software packages. By early 2023, researchers began using GuardDog to continuously scan the Python Package Index (PyPI), identifying and manually reviewing nearly 1,500 malicious packages, contributing to one of the largest publicly available datasets of its kind. Their findings, including detailed write-ups on notable packages, are regularly published. One such package, reallydonothing, triggered multiple GuardDog rules: it had an empty description, consisted of a single Python file, overwrote the install command, and executed OS commands. Initially published on May 9, 2024, this package's analysis revealed it targeted specific systems by searching for a secret file, whose path hash would trigger further malicious actions. Following this discovery, several similar packages were released, indicating a sustained and resourceful attack campaign. The detailed analysis showed these packages shared a common malicious setup: a custom install command executed during installation, searching for specific file patterns, and utilizing hardcoded values to determine the URL for downloading a second-stage binary. This binary, after being XORed with another hash derived from the secret file path, was executed on the victim's machine. Each package variant differed slightly in file patterns, hardcoded values, and the paths where the malicious binaries were dropped. These malicious packages primarily targeted macOS systems, leveraging standard folders like /Users/Shared and /Library/Application Support. The complexity of the attack, with its reliance on specific file paths and hashing mechanisms, indicates a targeted approach likely aimed at specific configurations or pre-infected systems. GuardDog's continuous scanning and detailed analysis have been crucial in uncovering and understanding this sophisticated malware campaign.