Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@hazae41/foras
Advanced tools
WebAssembly port of Deflate, Gzip, and Zlib compression algorithms
WebAssembly port of Deflate, Gzip, and Zlib compression algorithms
npm i @hazae41/foras
Node Package 📦 • Deno Module 🦖 • Next.js CodeSandbox 🪣
import { Foras, deflate, inflate } from "@hazae41/foras";
// or { Foras, gzip, gunzip }
// or { Foras, zlib, unzlib }
// Wait for WASM to load
await Foras.initBundledOnce()
const bytes = new TextEncoder().encode("Hello world")
const compressed = deflate(bytes).copyAndDispose()
const decompressed = inflate(compressed).copyAndDispose()
import { Foras, DeflateEncoder, DeflateDecoder } from "@hazae41/foras";
// or { Foras, GzEncoder, GzDecoder }
// or { Foras, ZlibEncoder, ZlibDecoder }
// Wait for WASM to load
await Foras.initBundledOnce()
const bytes = new TextEncoder().encode("Hello world")
const compresser = new DeflateEncoder()
compresser.write(bytes)
compresser.flush()
const compressed1 = compresser.read().copyAndDispose()
const compressed2 = compresser.finish().copyAndDispose()
compresser.free()
You need to install Rust
Then, install wasm-pack
cargo install wasm-pack
Finally, do a clean install and build
npm ci && npm run build
You can build the exact same bytecode using Docker, just be sure you're on a linux/amd64
host
docker compose up --build
Then check that all the files are the same using git status
git status --porcelain
If the output is empty then the bytecode is the same as the one I commited
Each time I commit to the repository, the GitHub's CI does the following:
docker compose up --build
git status --porcelain
output is not emptyEach time I release a new version tag on GitHub, the GitHub's CI does the following:
npm diff
between the cloned repository and the same version tag on NPMIf a version is present on NPM but not on GitHub, do not use!
FAQs
WebAssembly port of Deflate, Gzip, and Zlib compression algorithms
The npm package @hazae41/foras receives a total of 243 weekly downloads. As such, @hazae41/foras popularity was classified as not popular.
We found that @hazae41/foras demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.