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.
github.com/ebookbug/udp-hole-punching
Yusuke punches a hole right through your NAT
Disclaimer: This is not a production ready chat application. While it does create AES encrypted connections client <-> client
and client <-> server
, this code has not been audited or tested by any security specialists. This is simply an exercise for me to learn more about P2P networking and technologies as well as provide some examples of the technologies in use for others who are interested in learning. Additionally, the udp client does not implement a protocol that ensures the successful delivery of messages and so some will be lost over spotty connections.
Click the above image to watch a youtube video of the chat app in action. The terminal in the top right hand corner is SSHed into a VPS which runs the rendezvous server. The terminal in the bottom right is the terminal UI. The web app on the left is the GUI.
go get github.com/wilfreddenton/udp-hole-punching
The main package is the rendezvous server. Find a VPS or something to host it on. You can run everything locally but it won't really be testing whether or not hole punching works because it's on the same machine. Make sure that the server has TCP and UDP ports open to incoming traffic from 0-65535.
To run it:
go install
There are two UIs that you can use gui
which is a web UI and term-ui
which is a terminal UI. You can use any combination of UIs.
Before you use one you should open the main.go
file and switch the serverTCPIP
and serverUDPIP
constants to the IP address of your rendezvous server (no port).
To run the web UI
cd gui/ui
npm install
npm run build
cd ..
go install
gui
if your rendezvous server is running on locally or gui -serverIP=<server IP here>
localhost:8000
To disconnect and start a new chat simply refresh.
To run the terminal UI
cd term-ui
go install
term-ui
if your rendezvouse server is running locally term-ui -serverIP=<server IP here>
To disconnect and start a new chat ctrl-c
to exit the program and run it again.
If not a friend then get access to a computer behind a different router and set up a client on there.
Run the clients and provide the PeerID of one client to the other client and if the network topology permits hole punching then you will establish an encrypted connection between the clients.
ID
of the peer it would like to being communicating withTo make the implementation of hole punching a little simpler, the clients to not attempt to connect to each other's private IP addresses. Clients that are behind the same NAT will still be able to connect but they will do so with public IP addresses and not private ones. The routers I have tested seemed to understand that the peers were on it's local network and facilitated the connection without going to the outside internet.
FAQs
Unknown package
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.