The attackers attack Azure developers with no less than 218 malicious NPM packets to steal personal databases.

The Azure developers need to be vigilant of what packages they install because their account is at breach risk if they install this package.

It has been observed that Azure developers are being targeted by a new large-scale supply chain attack with a minimum of 218 malicious NPM packages to steal personally identifiable information.

JFrog researchers Andrey Polkovnychenko and Shachar Menashe stated in a new report, “After manually inspecting some of these packages, it became apparent that this was a targeted attack against the entire @azure NPM scope, by an attacker that employed an automatic script to create accounts and upload malicious packages that cover the entirety of that scope.”

The complete set of malicious packages was shared with the NPM maintainers approximately two days post publishing, resulting in fast removal. However, each package was downloaded around 50 times on average.

The breach refers to what’s typosquatting, which occurs when bad actors send rogue packages with the names duplicating legitimate libraries to an open software registry like NPM or PyPI, with the hopes of tricking users to install them.

For this particular instance noticed by the DevSecOps firm, the undisclosed adversary is expected to have generated dozens of malicious counterparts with the same name as the current @azure scope packages but without the scope name (e.g., @azure/core-tracing vs. core-tracing).

The researchers said, “The attacker is relying on the fact that some developers may erroneously omit the @azure prefix when installing a package. For example, running NPM install core-tracing by mistake, instead of the correct command – NPM install @azure/core-tracing.”

The attack not only used unique usernames to upload each package to the repository to eliminate raising suspicion, but the malware-laced libraries also featured big version numbers (e.g., 99.10.9), highlighting an attempt to execute a dependency confusion attack.

Suppose a developer unintentionally installs one of these packages, it leads to the execution of a reconnaissance payload that’s developed to list directories and collect user data like existing working directory and IP addresses related to network interfaces and DNS servers, all of which is later exfiltrated to a hardcoded, remote server.

Experts’ view:

“Due to the meteoric rise of supply chain attacks, especially through the NPM and PyPI package repositories, it seems that more scrutiny and mitigations should be added. For example, adding a CAPTCHA mechanism on NPM user creation would not allow attackers to easily create an arbitrary amount of users from which malicious packages could be uploaded, making attack identification easier,” the researchers said.