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/zeroeh/udp-mitm
Use NAT to MITM specific UDP traffic for traffic shaping purposes. The primary purpose of this project is to capture UDP traffic from games and process/edit them before they reach their destination. Since UDP is connectionless, unlike TCP which can be rerouted via hosts file, it needs special handling such as a specific NAT reroute or an application with a pcap hook to capture and edit the packets en route.
If you do not understand the above 2 concepts or want to see visually, please see diagram1.png.
Download the NTP client script to the host machine and the NTP proxy script to the intercept. When the steps refer to the bash script to run, please look here for the script.
Set up the intercept and host machines by going to ethernet settings and sharing the connection. See how to do this here or here, or you can just google "linux share internet connection through ethernet". For a raspberry pi tutorial, see here
If the above instructions from the links dont work, try deleting ALL ethernet profiles on both intercept and host machines and trying step 1 again. If it still doesn't work, try flushing the iptables with iptables --flush && iptables -t nat --flush
on the intercept and reboot. If it still doesn't work, you may need to enable ipv4 forwarding on the intercept. You can do this with sudo sysctl net.ipv4.ip_forward=1
which should apply every reboot and to apply the change immediately do sudo echo "1" > /proc/sys/net/ipv4/ip_forward
.
On the host machine, shut off or disconnect from wifi and see if you can get internet, if not, refer to step 2 again. If it succeeds, continue. (you can use ifconfig to see which IP addresses are assigned to eth0, which they should be if everything is working)
On the intercept machine, run the "start_reroute.sh" script. Arguments for this script will be:
(example: sudo ./start_reroute.sh 123 5555 10.42.0.1 10.42.0.0/24
) If the script doesn't work, you may need to make it executable. (chmod +x start_reroute.sh
)
iptables -t nat -L -n -v
to double check that the iptables rules were applied. There should be a rule in OUTPUT and a rule in PREROUTING.go run ntp_proxy.go
go run ntp_client.go
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.