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.
Azure signing utilities for node (just table service right now)
The goal is to provide a way to grant access keys to your azure resources (like querying a table from the browser) with a very small footprint.
Like the node azure client(s) the credentials are taken from environment variables by default:
AZURE_STORAGE_ACCOUNT
: used in the "resource" parameterAZURE_STORAGE_ACCESS_KEY
: used to generate sig
query parameter and sign the other paramsSee the azure docs for more details
The tests are written in an end-to-end style see them for actual usage (making calls to azure)
var signTable = require('azure-sign/table');
var expires = new Date();
// good for an hour
expires.setHours(expires.getHours() + 1);
// sign a table resource
var queryParams = table.sas({
// this must be lowercase even if your table is uppercase, etc...
resource: 'tablename',
// allow reads
signedpermissions: 'r',
signedexpiry: expires
});
// query params is suitable for use in any table query that is supported
// via reads
// a quick example using superagent
var superagent = require('superagent');
superagent.get('https://mytable.table.core.windows.net/mytable()').
query('$filter', '(PartitionKey eq "mypartition")').
// turn on json mode
set('Accept', 'application/json');
end(function(err, result) {
var json = result.res.body;
});
var superagent = requrie('superagent');
var now = new Date().toUTCString();
var url = 'https://' + tableService.host + '/' + tableName + '()';
var req = superagent('GET', url);
// These are all required headers
req.set('Content-Type', 'application/json');
req.set('Date', now)
req.set('x-ms-date', now)
req.set('x-ms-version', '2013-08-15');
var headers = {
'Content-Type': req.get('Content-Type'),
'Date': req.get('Date')
};
var signed = subject.sharedKey({
method: req.method,
headers: headers,
resource: tableName + '()'
});
req.set('Authorization', signed);
// now your request is authenticated go for it!
// ... yay
FAQs
Azure Shared Access Signature generation.
The npm package azure-sign receives a total of 2 weekly downloads. As such, azure-sign popularity was classified as not popular.
We found that azure-sign 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.