Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Try to downgrade the permissions of a process with root privileges and block access if it fails
The root-check npm package is designed to downgrade the process from root user to a regular user if the process is running as root. This is useful for security reasons, as running processes as root can pose significant risks.
Downgrade from root
This feature downgrades the process from root to a regular user. The code sample demonstrates how to use the root-check package to ensure that the process is not running as root, enhancing security.
const rootCheck = require('root-check');
rootCheck();
console.log('Running as non-root user');
The sudo-block package prevents a process from running with sudo privileges. Unlike root-check, which downgrades the process from root to a regular user, sudo-block simply exits the process if it detects that it is running with sudo privileges.
The is-root package checks if the process is running as root. It does not downgrade the process but can be used to conditionally execute code based on whether the process has root privileges. This is different from root-check, which actively downgrades the process.
Try to downgrade the permissions of a process with root privileges and block access if it fails
$ npm install root-check
import rootCheck from 'root-check';
rootCheck();
See the sudo-block
API.
FAQs
Try to downgrade the permissions of a process with root privileges and block access if it fails
We found that root-check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.