
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
coindjs-protocol
Advanced tools
Parse and generate binary messages and formats for bitcoin-based systems.
This is the protocol component of CoinDJs, a bitcoin (namecoin and ilk) full node and library.
This includes the necessary libraries to serialize and deserialize the binary format to send over the wire.
npm install coindjs-protocol
This is the method bitcoind uses today, which operates against a list of trusted DNS seeds included in the bitcoind source code.
var timestamp = (new Date()).getTime();
var versionMessage = new protocol.messages.version({
version: 1,
services: 1,
timestamp: timestamp,
addr_recv: {
timestamp: timestamp,
services: 1,
address: '127.0.0.1',
port: 8883
},
addr_from: {
timestamp: timestamp,
services: 1,
address: '127.0.0.1',
port: 8883
},
nonce: (new Buffer('0123456789abcdef', 'hex')),
user_agent: "SomeAgent/0.9",
start_height: 100000
});
// When we create the message, we specify the magic number to put in the header
var bitcoinMagicNumber = new Buffer('f9beb4d9', 'hex');
console.log(versionMessage.toBinary(bitcoinMagicNumber).toString('hex'))
var getblocksMessage = new Buffer('f9beb4d9676574626c6f636b73000000650000001801d1880200000002333433343334333433343334333433343334333433343334333433343334333434353435343534353435343534353435343534353435343534353435343534353132313231323132313231323132313231323132313231323132313231323132', 'hex');
console.log(protocol.messageFromBinary(getblocksMessage, protocol.messages))
var pingHex = new Buffer('3132333470696e6700000000000000000800000070912a883031323334353637', 'hex');
console.log(protocol.messages.ping.fromBinary(pingHex));
As a quick example of using the format primitives to define a new message definition, here is the format to read the raw blocks from the blk????.dat files from the bitcoind datadir:
var BlockMessage = new format.FormatCompound([
['version', format.UInt32],
['prev_block', format.Bytes32],
['merkle_root', format.Bytes32],
['timestamp', format.UInt32],
['bits', format.UInt32],
['nonce', format.UInt32],
['txns', new format.FormatList(format.Tx, 1)],
])
For now, there is a test.js that does basic/manual sanity checks... More testing coming soon.
Obviously, it's all licensed under the MIT license, so use it as you wish; but if you'd like to buy me a coffee, I won't complain. =)
1EMFpt82U3XHLYTXwZZhKnK4erqAyDf5SWDFXSxgGRpNvAFH6LLXMjgvtZhcexr4TH4in4S2tas4vKDPMrV32TE4rebyToi65hHDN1FAQs
Parse and generate binary messages and formats for bitcoin-based systems.
The npm package coindjs-protocol receives a total of 10 weekly downloads. As such, coindjs-protocol popularity was classified as not popular.
We found that coindjs-protocol 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.

Research
/Security News
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.