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/codec-abc/Yew-WebRTC-Chat
This project showcase a simple HTML chat using WebRTC and programmed in Rust and compiled to WASM. Live Demo
After reading this wonderful post by the Cheerp team I wanted to see if the same can be done with "pure" Rust using WASM.
Since doing a game from scratch was too complicated as a first step I aimed to just play along with Rust, HTML (using Yew) and WebRTC by doing a chat application. 3D and WebGL will come another time.
It turns out that it is not very difficult to get something working as you can see below:
If you try to run locally prefer testing with Chrome locally because I encountered issues with Firefox. Also, be wary that some extensions might block WebRTC connections. Also, if you are testing with a friend it might not work as I am using only a STUN server. From the tests I made, I found out that the connections are often blocked on corporate networks and using a TURN server would solve the problem. But unlike STUN server there aren't free TURN servers. Finally, the error handling is not totally done yet as I don't know how I actually handle errors (and also what the WebRTC API allows me to do). If you are stuck reload the page on both side and try again.
To build this project you need to:
cargo install wasm-pack
cargo install http-server
To run it once build you need to type
wasm-pack build --target web --no-typescript --out-dir ./static/pkg
static
dir with http-server -p 8080
(Alternatively you can use any static file server like python3 -m http.server
)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.