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.
require('protos.js');
var users = [];
users.load('users.txt'); // arrays can load data
if (!users.has('mike')) { // arrays can check content
users.push('mike')
users.save('users.txt') // arrays can save data
}
if ('mike'.in(users)) { // strings can also check if exists in arrays
'mike is here'.log() // strings can console.log
'John'.appendFile('users.txt') // strings can append to file
}
var str = 'test';
str.log(); // same as console.log(str);
str.save('file.txt');
str.save('file.txt', function() {
'async saved!'.log();
});
var str = ''.load('data.txt');
['a','b','c','d'].cut(1,3);
['a','b','c','d'].cut(1,-1); // -1 means last item (like python)
// STRING MANIPULATION MADE EASY (python style)
var el = 'hello'.cut(1,3);
var lo = 'hello'.cut(3,-1);
var num = '3'.toInt();
// JSON FILES
var struct = {}.load('file.json'); // load json files into js object
struct.save('file.json'); // save js object into json file
struct.save('file.json', function() { // save async
'saved'.log();
});
struct.dir() // same as console.dir(struct);
// FUZZY HASHING thanks to ctph.js
'hello'.compare('hell') // 50%
'hello'.compare('hello') // 100%
'hello'.compare('abcd') // 0%
var hash = 'hello'.fuzzyHash();
// calling a function on all items
objects.call('method',[params]);
FAQs
Tons of prototypes for an easier life
The npm package protos.js receives a total of 3 weekly downloads. As such, protos.js popularity was classified as not popular.
We found that protos.js 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.