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.
A super-simplistic and -minimal wrapper for talking to the Janus signalling API. Developed for use with Janus as a web game networking backend via janus-plugin-sfu.
If you want a batteries-included wrapper, you should use the one distributed by the Janus developers -- janus.js. This one is different in a few ways:
Require minijanus
in Node, or link to bundle.js in a browser. Then:
var ws = new WebSocket("ws://localhost:8188", "janus-protocol");
ws.addEventListener("open", () => {
var session = new Minijanus.JanusSession(ws.send.bind(ws));
ws.addEventListener("message", ev => session.receive(JSON.parse(ev.data)));
session.create().then(() => establishConnection(session)).then(() => {
console.info("Connection established: ", handle);
});
});
function negotiateIce(conn, handle) {
return new Promise((resolve, reject) => {
conn.addEventListener("icecandidate", ev => {
handle.sendTrickle(ev.candidate || null).then(() => {
if (!ev.candidate) { // this was the last candidate on our end and now they received it
resolve();
}
});
});
});
};
function establishConnection(session) {
var conn = new RTCPeerConnection({});
var handle = new Minijanus.JanusPluginHandle(session);
return handle.attach("janus.plugin.sfu").then(() => {
var iceReady = negotiateIce(conn, handle);
var unreliableCh = conn.createDataChannel("unreliable", { ordered: false, maxRetransmits: 0 });
var reliableCh = conn.createDataChannel("reliable", { ordered: true });
var mediaReady = navigator.mediaDevices.getUserMedia({ audio: true });
var offerReady = mediaReady
.then(media => {
conn.addStream(media);
return conn.createOffer({ audio: true });
}, () => conn.createOffer());
var localReady = offerReady.then(conn.setLocalDescription.bind(conn));
var remoteReady = offerReady
.then(handle.sendJsep.bind(handle))
.then(answer => conn.setRemoteDescription(answer.jsep));
return Promise.all([iceReady, localReady, remoteReady]);
});
}
To generate bundle.js:
$ npm run build
$ npm run test
FAQs
A small Javascript wrapper for talking to the Janus WebRTC signalling API.
The npm package minijanus receives a total of 2 weekly downloads. As such, minijanus popularity was classified as not popular.
We found that minijanus 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.