Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
qaap-uws
Advanced tools
Readme
qaap-uws
(upstream uws
) tries to mimic ws
as closely as possible without sacrificing too much performance. In most cases you simply swap require('ws')
with require('qaap-uws')
:
var WebSocketServer = require('qaap-uws').Server;
var wss = new WebSocketServer({ port: 3000 });
function onMessage(message) {
console.log('received: ' + message);
}
wss.on('connection', function(ws) {
ws.on('message', onMessage);
ws.send('something');
});
There are some important incompatibilities with ws
though, we aim to be ~90% compatible but will never implement behavior that is deemed too inefficient:
ArrayBuffer
. This means you need to copy it to keep it past the callback. It also means you need to convert it with Buffer.from(message)
if you expect a Node.js Buffer
.webSocket._socket
is not a net.Socket
, it is just a getter function with very basic functionalities.webSocket._socket.remote...
might fail, you need to cache it at connection.webSocket
acts like an EventEmitter
with one listener per event maximum.webSocket.upgradeReq
is only valid during execution of the connection handler. If you want to keep properties of the upgradeReq for the entire lifetime of the webSocket you better attach that specific property to the webSocket at connection.At installation qaap-uws
will try to recompile itself using the system's C++11 compiler (GCC 4.8+, Clang 3.3, VC++ 2015+).
If this fails it will silently fall back to using the precompiled binaries.
NPM installation will never fail but require('qaap-uws')
will throw if it cannot properly load the binary module.
FAQs
node.js μws fork aimed at making PRs available to humans.
The npm package qaap-uws receives a total of 3 weekly downloads. As such, qaap-uws popularity was classified as not popular.
We found that qaap-uws 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.