Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
tcp-send-first-segment-last
Advanced tools
Not all applications receive data off the network correctly, and they can miss key chunks of data even when they don't mean to. As an example, Python's socket.recv needs to be called repeatedly until all data has been received. But, if the receiving application doesn't properly loop, then it may miss key data later in the buffer.
This library ensures that all data will be in the receiving buffer before the receiving application begins reading the data. It does this by sending the TCP segments out of order; and in particular, it does this by sending the first TCP segment last.
By sending the first TCP segment last, all the later segments will
already be waiting in the receiving buffer by the time that the
first segment arrives. Then, if the receiving application only
calls Python's socket.recv
function once, it will still read
all of the intended data.
I first encountered this issue while working on the EXP-301 course from OffSec (a course that focuses on exploiting applications via buffer overflows). And I created this library to help solve labs and challenges from this course.
PyPi project: https://pypi.org/project/tcp-send-first-segment-last/
$ pip install tcp-send-first-segment-last
from tcp_send_first_segment_last.send import send_first_segment_last
payload = b"A" * 5000
send_first_segment_last("127.0.0.1", 4444, payload)
root
to runFAQs
Send the first TCP segment last for large payloads
We found that tcp-send-first-segment-last 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.