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.
socks5server
Advanced tools
A simple SOCKS v5/v4/v4a server implementation and demo proxy.
You can run it easily as:
socks5server [options]
This will create a proxy defaults at 127.0.0.1:1080
.
options
:see socks5server --help
npm i socks5server
Add a -g
if you want to install it globally or use socks5server
command.
const socks5server=require('socks5server');
var server=socks5server.createServer();
//or
var server=new socks5server.socksServer();
server
.on('tcp',(socket, port, address, CMD_REPLY)=>{
//do sth with the tcp proxy request
}).on('udp',(socket, clientPort, clientAddress, CMD_REPLY)=>{
//do sth with the udp proxy request
}).on('error', function (e) {
console.error('SERVER ERROR: %j', e);
}).on('client_error',(socket,e)=>{
console.error(' [client error]',`${net.isIP(socket.targetAddress)?'':'('+socket.targetAddress+')'} ${socket.remoteAddress}:${socket.targetPort}`,e.message);
}).on('socks_error',(socket,e)=>{
console.error(' [socks error]',`${net.isIP(socket.targetAddress)?'':'('+(socket.targetAddress||"unknown")+')'} ${socket.remoteAddress||"unknown"}}:${socket.targetPort||"unknown"}`,e);
}).listen(1080, "127.0.0.1");
/*
CMD_REPLY(reply code,addr,port)
see https://www.ietf.org/rfc/rfc1928.txt "6 Replies"@page5 for details
*/
The proxy.js
is a simple demo of the server.
✅:OK ❌:not implemented ❓:i don't kown
address
auth methods
CMD
I mainly modified the socks5 part and not sure if socks4 has been completely implemented.
RFC:
(The MIT License)
FAQs
A simple SOCKS 5/4/4a implementation and demo proxy
The npm package socks5server receives a total of 7 weekly downloads. As such, socks5server popularity was classified as not popular.
We found that socks5server demonstrated a healthy version release cadence and project activity because the last version was released less than 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.