Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Show a process output with debug utility.
npm install debug-proc
Running node with the appropriate environment vars (DEBUG=proc
in this example):
var debugProc = require('debug-proc')('proc');
var proc = spawn('./script.sh', ['abc', 123]);
debugProc(proc);
/*
proc ./script.sh abc 123 +0ms
proc stdout message 1 +10ms
proc stderr message 1 +3ms
proc stdout message 2 +46ms
proc stderr message 2 +1ms
*/
// the process spawn args, stderr and stdout can be disabled
debugProc(proc, {spawnargs: false, stdout: false});
/*
proc stderr message 1 +3ms
proc stderr message 2 +1ms
*/
debugProc(proc, {decorate: 'name'});
/*
proc ./script.sh: ./script.sh abc 123 +0ms
proc ./script.sh: stdout message 1 +10ms
proc ./script.sh: stderr message 1 +3ms
proc ./script.sh: stdout message 2 +46ms
proc ./script.sh: stderr message 2 +1ms
*/
debugProc(proc, {decorate: 'pid'});
/*
proc pid 10425: ./script.sh abc 123 +0ms
proc pid 10425: stdout message 1 +10ms
proc pid 10425: stderr message 1 +3ms
proc pid 10425: stdout message 2 +46ms
proc pid 10425: stderr message 2 +1ms
*/
debugProc(proc, {
decorate: function(proc) {
return 'process-description: ';
}
});
/*
proc process-description: ./script.sh abc 123 +0ms
proc process-description: stdout message 1 +10ms
proc process-description: stderr message 1 +3ms
proc process-description: stdout message 2 +46ms
proc process-description: stderr message 2 +1ms
*/
cd examples/
DEBUG=proc node example.js
MIT license - http://www.opensource.org/licenses/mit-license.php
FAQs
Show a process output with `debug` utility
We found that debug-proc 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.