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.
webrtc-stun
Advanced tools
100% TypeScript STUN implementation for WebRTC.
npm i webrtc-stun
import * as dgram from 'dgram';
import * as stun from '../src';
import * as pkg from '../package.json';
const socket = dgram.createSocket({ type: 'udp4' });
const tid = stun.generateTransactionId();
socket.on('message', msg => {
const res = stun.createBlank();
// if msg is valid STUN message
if (res.loadBuffer(msg)) {
// if msg is BINDING_RESPONSE_SUCCESS and valid content
if (
res.isBindingResponseSuccess({
transactionId: tid,
fingerprint: true,
})
) {
const attr = res.getXorMappedAddressAttribute();
// if msg includes attr
if (attr) {
console.log('my rinfo', attr);
}
}
}
socket.close();
});
const req = stun
.createBindingRequest(tid)
.setSoftwareAttribute(`${pkg.name}@${pkg.version}`)
.setFingerprintAttribute();
socket.send(req.toBuffer(), 19302, 'stun.l.google.com');
See also /examples
directory.
FAQs
Pure TypeScript STUN implementation.
The npm package webrtc-stun receives a total of 11 weekly downloads. As such, webrtc-stun popularity was classified as not popular.
We found that webrtc-stun 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.