By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: CorgeaPublished July 15, 2026

TL;DR: Eleven malicious NuGet DotnetTool packages disguised as game-cheat utilities staged a Windows payload, inherited cloud configuration through environment variables, and used Google Sheets, Cloudflare Worker, Telegram, and S3 fallback infrastructure for control and telemetry, according to Corgea. This is executable supply-chain risk, not just dependency hygiene: package registries can deliver code execution the moment a tool command is run.


At a glance

What this is: This is an analysis of 11 malicious NuGet DotnetTool packages that acted as downloader infrastructure and staged a Windows payload with cloud-backed control channels.

Why it matters: It matters because developer tooling can sit alongside privileged credentials, making package-registry abuse a direct IAM, secrets, and endpoint risk for both human and non-human identity estates.

👉 Read Corgea's analysis of malicious NuGet tools and Windows payload staging


Context

Malicious package registry abuse is a supply-chain problem, but the security gap is often an identity and secrets problem as well. A developer workstation can hold browser sessions, cloud tokens, SSH agents, package credentials, and internal documentation, so a tool installed with one command can become a practical entry point into the wider environment. In this case, the risk is not hidden in an application dependency tree. It is embedded in a command-line tool that executes with the user context of whoever runs it.

The broader lesson for IAM and AppSec teams is that installable tooling should be governed as executable software, not as inert metadata. That means treating package registries, CLI utilities, and ephemeral developer workflows as part of the control surface for identity, secrets exposure, and runtime execution. The article is atypical only in its gaming-cheat disguise. The underlying pattern is increasingly familiar: package-delivered code executes first, then reaches outward for configuration, telemetry, and operator control.


Key questions

Q: How should security teams handle malicious CLI tools in developer environments?

A: Treat them as code execution, not as low-risk utilities. The install command is the trust boundary, so teams should require allowlisting, endpoint telemetry, and approval for any tool that can run local code, reach cloud services, or inherit sensitive session context from the user.

Q: Why do package-registry tools create more risk than ordinary libraries?

A: Because a tool package can execute immediately when installed and invoked, while a library usually needs an application to call it. That makes the tool path a direct execution channel with access to the developer’s sessions, secrets, and local privileges.

Q: What breaks when environment variables are used to pass control data into malware?

A: Standard host-based detection often misses the full chain because the downloader only needs to set values and launch a child process. The second stage can then read credentials, endpoints, or configuration from inherited process context without obvious hardcoding.

Q: Who is accountable when a developer tool leads to credential exposure?

A: Accountability sits across endpoint security, identity governance, and the engineering team that approved or installed the tool. If the exposed material includes secrets or delegated access, the issue becomes an identity incident, not just a malware event. Frameworks such as NIST Cybersecurity Framework 2.0 and OWASP Non-Human Identity Top 10 support that shared ownership model.


Technical breakdown

Why DotnetTool packages are executable attack paths

A .NET DotnetTool package is not just a library download. It restores package contents, exposes a console command, and then runs bundled assemblies through the dotnet host in the user context. That makes the install-and-run boundary the security boundary. In this campaign, the malicious tool chain used that model to launch a downloader, stage a second payload, and continue execution outside the NuGet package itself. The key technical point is that a package registry can become a software delivery channel for code execution, even when the package does not look like a traditional dependency.

Practical implication: Treat tool installation as code execution and require allowlisting, provenance checks, and endpoint monitoring for any newly installed CLI tool.

How the downloader stages payloads and bypasses simple controls

The first-stage assembly behaved like loader infrastructure. It used a mutex to prevent duplicate execution, attempted privilege-sensitive clock resync, resolved GitHub hostnames through DNS-over-HTTPS, and tried multiple staging sources including Hugging Face, GitHub Releases, and a dormant torrent branch. It then wrote the fetched binary locally and launched it through cmd.exe. That staging design matters because it separates delivery, retrieval, and execution, which gives the operator resilience and makes simple network blocks less effective than teams often assume.

Practical implication: Monitor for .NET tools spawning PowerShell, cmd.exe, DoH lookups, and outbound fetches to staging services from developer endpoints.

How inherited environment variables turn loader code into a control plane

The second stage showed how a malicious tool can pass configuration without hard-coding everything into the payload. The downloader set AWS-style environment variables, including a worker URL, and then launched pepesoft.exe so the child process could read remote configuration and operator state. That pattern lets the first stage stay small while the second stage remains flexible. It also shows why secrets and environment variables on developer machines matter, because inherited process context can carry credentials, service endpoints, and control values directly into attacker logic.

Practical implication: Assume a compromised developer session can expose both static secrets and runtime environment variables, then rotate credentials and review process inheritance paths.


Threat narrative

Attacker objective: The attacker objective was persistent operator control over developer endpoints, plus telemetry, screenshots, and selectable access to the victim machine.

  1. Entry occurred when a user installed and executed a malicious NuGet DotnetTool package that presented itself as a game-themed utility.
  2. Escalation occurred when the tool downloader fetched pepesoft.exe from multiple staging paths, bypassed simple DNS controls, and executed the payload under cmd.exe.
  3. Impact occurred when the payload collected host telemetry, screenshots, and operator-controlled state through Google Sheets, Telegram, and cloud fallback infrastructure.

NHI Mgmt Group analysis

Package registries now function as executable trust boundaries: the meaningful question is no longer whether a package is a dependency or a tool, but whether the install path can execute code with the user's authority. That distinction matters because developer utilities frequently sit beside browser sessions, cloud credentials, and source control tokens. For AppSec and IAM teams, the control problem is provenance, execution, and credential containment, not package naming alone.

Developer tooling creates a secrets blast radius that classic dependency reviews miss: this campaign did not need production runtime access to be dangerous. It needed a workstation that already trusted cloud sessions and local tokens. That is where NHI governance intersects the problem, because CLI tools can inherit environment variables, access cloud endpoints, and expose service-linked secrets without crossing a traditional application boundary.

Loader-style staging is becoming the standard form of registry abuse: the downloader, the payload, and the operator control plane are intentionally separated. That separation complicates detection because defenders may only see benign-looking tool installation, then DoH lookups, then a second-stage process launch. The named concept here is package-registry execution boundary collapse, where install-time trust and run-time trust are treated as the same thing. Practitioners should separate them explicitly.

Telemetry channels are now part of malware design, not just exfiltration plumbing: Google Sheets, Telegram, Cloudflare Workers, and S3 fallback were used as operator infrastructure rather than incidental destinations. That means defenders should think about SaaS API abuse, not just malware signatures. This is especially relevant for environments where human identity, device identity, and service identity all converge on the same workstation.

Not every malicious package behaves like a dependency compromise, and that is the governance gap: teams often review libraries but under-review installable tools, wrappers, and one-off utilities. This campaign shows why the policy boundary should include any package that can execute code locally. IAM and AppSec teams should treat CLI tools as governed software assets, not convenience downloads.

What this signals

Package-registry execution boundary collapse: teams need a policy that distinguishes between code you import and code you execute. Once that boundary disappears, the workstation becomes a privileged runtime, not just a development aid, and secrets hygiene has to extend into CLI trust, session containment, and local process monitoring.

The practical signal for programmes is that software intake, identity governance, and endpoint response can no longer run as separate workstreams. Build hosts and developer laptops should be measured for tool provenance, inherited environment exposure, and outbound SaaS abuse in the same way you already watch for unusual authentication or token misuse.

If your programme still assumes package registries are mainly a dependency problem, this campaign shows the gap. The more accurate model is that installable tools can act as loaders, configuration channels, and telemetry relays, which makes them relevant to IAM, PAM, secrets management, and NHI governance alike.


For practitioners

  • Classify CLI tools as executable software assets Require provenance review, allowlisting, and approval for any newly installed DotnetTool package on developer workstations and build hosts.
  • Monitor tool-spawned process chains Alert on .NET tools spawning PowerShell, cmd.exe, or unusual child processes, especially when those processes perform DNS-over-HTTPS lookups or fetch binaries from external staging domains.
  • Rotate and review workstation-exposed credentials Assume any developer endpoint that executed one of these tools may have exposed browser sessions, cloud keys, package tokens, or secrets entered during runtime.
  • Block known staging and telemetry infrastructure Add detections and outbound blocks for the listed GitHub, Hugging Face, Cloudflare Worker, Selcloud, and Google Sheets indicators, then retrohunt historical traffic for the same patterns.

Key takeaways

  • This campaign shows that package registries can deliver executable code, not just dependencies, so install-time trust is now part of the attack surface.
  • The operational impact is broader than malware detection because workstation compromise can expose cloud sessions, secrets, and inherited environment variables.
  • Teams that govern developer tooling as executable software, not convenience utilities, will close a control gap that classic AppSec reviews often miss.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5, CIS Controls v8 and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKTA0002 , Execution; TA0006 , Credential Access; TA0011 , Command and ControlThe campaign uses tool execution, credential-bearing hosts, and external control channels.
NIST CSF 2.0PR.AC-4Developer tool trust and access scope are central to the exposure path.
NIST SP 800-53 Rev 5IA-5Secrets and authenticator handling on endpoints are directly implicated.
CIS Controls v8CIS-5 , Account ManagementCompromised developer accounts and tokens need lifecycle control.
NIST AI RMFMANAGEAI-assisted detection and governance of loader-style tooling fits enterprise risk management.

Map tool installation and child-process telemetry to these tactics and hunt for staged command execution.


Key terms

  • DotnetTool Package: A DotnetTool package is a .NET package type that installs a command-line executable rather than only a reusable library. Because the installed tool can run locally under the user’s context, it is an execution boundary and not just a dependency record.
  • Package-Registry Execution Boundary: The point at which a package installation becomes trusted code execution. In practical terms, it is the moment a user runs a tool or helper from a registry and grants it access to local processes, sessions, and environment variables.
  • Inherited Process Context: The set of credentials, environment variables, permissions, and runtime state a child process receives from its parent. Attackers use this to pass configuration or secrets into a second-stage payload without embedding them directly in the binary.
  • Loader Infrastructure: A staged malware design where the first component’s main job is to retrieve, configure, and launch a second payload. This pattern complicates detection because the initial code may look like a downloader, updater, or installer before any harmful action becomes visible.

What's in the full analysis

Corgea's full analysis covers the operational detail this post intentionally leaves for the source:

  • Detailed package-by-package indicators for all 11 malicious DotnetTool IDs and their staged behaviours
  • Code-level breakdown of the downloader logic, including mutexing, DNS-over-HTTPS resolution, and payload launch paths
  • Host artefacts and hunting guidance for Windows developer workstations, package caches, and local tool manifests
  • Infrastructure indicators tied to GitHub Releases, Hugging Face, Cloudflare Worker, Selcloud, and Telegram control paths

👉 The full Corgea article covers package IDs, code markers, and host-hunting details for these malicious tools.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, secrets management, and identity lifecycle control. It helps security and identity practitioners connect workstation trust decisions to broader identity risk.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 19, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org