
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
packetgram
packet+datagram
npm install packetgram
or
yarn add packetgram
import Packet from 'packetgram';
// Allocate a new packet with a specific size
const packet = Packet.alloc(10);
// Or create from an existing ArrayBuffer
const buffer = new ArrayBuffer(10);
const packet = Packet.from(buffer);
const packet = Packet.alloc(20);
// Write various data types (big-endian by default)
packet.writeUInt32(42);
packet.writeString('Hello');
packet.writeFloat(3.14);
// Or use append methods that automatically grow the buffer
const dynamicPacket = new Packet(5);
dynamicPacket.appendUInt32(100);
dynamicPacket.appendString(' World!');
const packet = Packet.alloc(20);
packet.writeUInt32(42);
packet.writeString('Hello');
// Reset offset to read from the beginning
packet.offset = 0;
const number = packet.readUInt32(); // 42
const text = packet.readString(5); // 'Hello'
const packet = Packet.alloc(10);
packet.writeString('Hello');
// Encode to base64
const encoded = Packet.encode(packet);
// Decode from base64
const decoded = Packet.decode(encoded);
const packet = Packet.alloc(20);
// Default is big-endian (BE)
packet.writeUInt16(42);
packet.writeUInt32(420);
// Switch to little-endian
packet.useEndianness('LE');
packet.writeUInt16(42);
packet.writeUInt32(420);
// Switch back to big-endian
packet.useEndianness('BE');
const packet = Packet.alloc(20);
packet.writeUInt16(42);
packet.writeUInt32(420);
packet.writeString('hello');
// Get a hex dump of the packet
console.log(packet.toString());
// Output:
// 00000000 00 2a 00 00 01 a4 68 65 6c 6c 6f 00 00 00 00 00 | .*....hello..... |
// 00000010 00 00 00 00 | .... |
FAQs
Read and write packets using buffers
The npm package packetgram receives a total of 2 weekly downloads. As such, packetgram popularity was classified as not popular.
We found that packetgram 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.