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.
Cross correlation of two 16-bit buffers in JS. Uses Fourier transforms for fast calculation, as explained e.g. at http://mathworld.wolfram.com/Cross-CorrelationTheorem.html
See xcorr.test.js
.
const sig = Buffer.from([0, 1, 0, 0]); // two 16-bit samples
Xcorr(sig, sig) === {
xcorr: [1, 0], // raw cross-correlation profile
xcorrMax: 1, // max cross-correlation
iMax: 0, // index in first buffer at which cross-correlation is maxed
}
More about the sign of ìMax
:
// two arrays of four 16-bit samples, rotated by one sample
const sig1 = Buffer.from([0, 1, 0, 0, 0, 4, 0, 2]);
const sig2 = Buffer.from([0, 2, 0, 1, 0, 0, 0, 4]);
Xcorr(sig1, sig2).iMax === -1
Xcorr(sig2, sig1).iMax === 1
If the input signals do not have a length equal to a power of 2 (2, 4, 8, 16…), they are padded with zeroes.
FAQs
Cross correlation in JS
The npm package abr-xcorr receives a total of 7 weekly downloads. As such, abr-xcorr popularity was classified as not popular.
We found that abr-xcorr 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.