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.
A Python 3.8+ UDP Client and Server for building multiplayer games with a focus on security and ease of use.
MpGameServer abstracts all of the complexities with handling network connections and multithreading so that you can focus on building an event driven game server.
The network protocol is based on the work of Glenn Fiedler's Gaffer On Games
MpGameServer has an optional installation of pygame.
pip install mpgameserver[pygame]
You can install MpGameServer from PyPI
pip install mpgameserver
MpGameServer supports python 3.8+
Read the Getting Started guide for how to use this package with PyGame.
Datagrams are encrypted using AES-GCM. A unique key is generated for every connection using ECDH and ECDSA. The elliptic curve SECP256R1 is used. This provides Authentication (a client can verify it is communicating with the correct server), Integrity (the client and server can detect if a message has been modified) Confidentiality (unauthorized users are not able to decrypt the messages.)
The performance goal for this server is to handle 128 concurrent connections, each sending 32 datagrams per second, with 60 server ticks per second.
The primary bottleneck is the encryption or decryption of datagrams. The limit is about 40,000 datagrams per second (depending on hardware). In practice this translates to sending or receiving around 3000 datagrams per second, if any practical workload is performed on each datagram.
The second limitation is that the ack bits in the header only contains 32 bits. The implicit assumption is that there will not be more than 32 unacked datagrams in flight. This puts a limit of 32 datagrams per second, the default timeout. Sending more datagrams than this limit can result in datagrams that are received by the remote client, but are not acked on the sending side. A game or server running at 60 frames per second should take care to structure sending messages to avoid hitting this limit. Note that 32 datagrams per second is a transfer rate of about 45KB per second.
FAQs
Python Multiplayer Game Server
We found that mpgameserver 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.