{"id":"MAL-2026-10741","summary":"Malicious code in netcontrol-agent (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (967b375e5686bd1eab74838f00cd21c2a8e15291f03a8140b494a83052fd2a92)\nnetcontrol-agent.js implements a remote agent that long-polls a configured server URL and pipes the returned bytes directly into an interactive shell's stdin (cmd.exe on Windows, $SHELL or /bin/bash -i on Linux), while streaming stdout/stderr back to the server's /session/\u003cid\u003e/output endpoint. The relayLoop auto-attaches to any session the server advertises, so whoever controls NC_SERVER_URL obtains full interactive command execution on every host running the agent. The --install path escalates blast radius by writing a systemd unit that runs the agent as root, or a Windows scheduled task with /RU SYSTEM /RL HIGHEST /SC ONSTART, providing boot persistence at maximum privilege. An NC_AUTO_UPDATE mode downloads a replacement agent script from the same server and atomically overwrites AGENT_PATH, letting the server push arbitrary new code to installed hosts on the next poll. Collected host identifiers (os.hostname(), version) are also POSTed to the server. The remote-shell-plus-persistence-plus-self-update composition is a full backdoor mechanism regardless of the package's self-description.\n","modified":"2026-07-16T19:19:50.166246532Z","published":"2026-07-16T18:40:53Z","database_specific":{"malicious-packages-origins":[{"versions":["1.0.5"],"id":"IN-MAL-2026-010743","import_time":"2026-07-16T18:54:02.307188193Z","modified_time":"2026-07-16T18:40:53Z","sha256":"967b375e5686bd1eab74838f00cd21c2a8e15291f03a8140b494a83052fd2a92","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/netcontrol-agent/v/1.0.5"}],"affected":[{"package":{"name":"netcontrol-agent","ecosystem":"npm","purl":"pkg:npm/netcontrol-agent"},"versions":["1.0.5"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"netcontrol-agent.js","sha256":"5e6353c764e6e9d7054d76cb741748bfaa33d409ebbf646951db3619e2f3e388","tlsh":"b6f2d57665f6423539a3d17eab0f50127b2af0077209d864b68c72846fcd82c9277dfa"}],"package_integrity":[{"hashes":{"sha1":"3cb4d994e8739bff42a6eb98b3a2fee4d8953874","sha512_sri":"sha512-CKpbjDKCtjDby2sunxJo6M6gipzbdV01dLvDZL4HHWa9vPwcc41f0u0f84PkockEYMPq1ww3kzdJLg1TvFpIkA=="},"filename":"netcontrol-agent-1.0.5.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/netcontrol-agent/MAL-2026-10741.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}