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.
binary-util
Advanced tools
A utility library for working with binary data in.
It does not have full support for all types of data, but it does have the ones I needed.
A full example of how to use this library can be found in my RE MSG library.
Here are some non-exhaustive examples:
import { Decoder } from "binary-util"
const data = Buffer.from([
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21,
])
const decoder = new Decoder(data)
// You can use it to just read data straight from the buffer
decoder.readString({ length: 5 }) // Hello
decoder.readString({ length: 7 }) // ", World"
// Utilities
encoder.seek(-1)
encoder.seek(1)
encoder.alignTo(8)
// Or you can use it more ergonomically when possible
const decoder2 = new Decoder(Buffer.alloc(2, 2))
const result = {
a: decoder2.readUint8(), // 2
b: decoder2.readUint8(), // 2
}
import { Encoder } from "binary-util"
const encoder = new Encoder()
encoder.writeString("Hello, World")
encoder.seek(-1)
encoder.seek(1)
encoder.alignTo(8)
encoder.writeUint8(2)
encoder.goto(1)
FAQs
A utility library for working with binary data.
The npm package binary-util receives a total of 5 weekly downloads. As such, binary-util popularity was classified as not popular.
We found that binary-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.