
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
catenis-msg-inspector
Advanced tools
Module used to parse Catenis message blockchain transactions
A JavaScript library used for inspection of Catenis messages.
On Node.js:
npm install catenis-msg-inspector
On the browser:
<script src="https://unpkg.com/catenis-msg-inspector"></script>
The Catenis Message Inspector library is compatible with modern web browsers.
It has been tested on the following web browsers:
Note: Internet Explorer is not supported.
On Node.js:
const ctnMsgInspector = require('catenis-msg-inspector');
const msgInspector = new ctnMsgInspector.MessageInspector({network:'testnet'});
On the browser:
<script>
const msgInspector = new ctnMsgInspector.MessageInspector({network:'testnet'});
</script>
The following options can be used when instantiating the message inspector object:
http.request()
function.:txid
.http.request()
function when accessing the blockchain explorer API.http.request()
function when retrieving data from IPFS.Call the inspectMessage()
method of the message inspector object passing the reference to a Catenis message's container.
The object will then gather the information about the Catenis message and return it asynchronously. You can either pass it a callback or use the returned promise. The message information is saved in the message inspector object's properties, and the object itself is returned.
The following properties should be added to the message inspector object once the Catenis message's inspection is done:
bitcoinjs-lib
Node.js module.sendMessage
logMessage
settleOffChainMessages
sendStandardMessage
logStandardMessage
sendOffChainMessage
logOffChainMessage
RIPEMD-160(SHA-256(public key))
) of the public
key of a cryptographic key pair that belongs to the Catenis virtual device.RIPEMD-160(SHA-256(public key))
) of the public
key of a cryptographic key pair that belongs to the Catenis virtual device.ipfs
cids
Node.js module.cids
Node.js module.catenis-off-chain-lib
Node.js module.cids
Node.js module.catenis-off-chain-lib
Node.js module.In the following examples the msgContainer
variable simulates a successful response from the Retrieve Message
Container method of the Catenis API.
const msgContainer = {
blockchain: {
txid: '7b197d3c706b40f0cd6ce5c36309b3429d0bc7ce1d57cb2a9950d58694c7de5f',
isConfirmed: true
}
};
Using a callback:
msgInspector.inspectMessage(msgContainer.blockchain.txid, (err, res) => {
if (err) {
console.error('Error inspecting message:', err);
}
else {
console.log('Inspection result:', res);
}
});
Using promise:
msgInspector.inspectMessage(msgContainer.blockchain.txid)
.then((res) => {
console.log('Inspection result:', res);
}, (err) => {
console.error('Error inspecting message:', err);
});
const msgContainer = {
offChain: {
cid: "QmR8SzCMcu4LYpw16Xo6sVYwdMfcomkp5sAcYdEhQJ69oK"
},
externalStorage: {
ipfs: "QmYDT2i4q6DDLFdQ8JrLJqTryyjGxcwvD6MfA3S3M87Px9"
}
};
Using a callback:
msgInspector.inspectMessage(null, msgContainer.offChain.cid, (err, res) => {
if (err) {
console.error('Error inspecting message:', err);
}
else {
console.log('Inspection result:', res);
}
});
Using promise:
msgInspector.inspectMessage(null, msgContainer.offChain.cid)
.then((res) => {
console.log('Inspection result:', res);
}, (err) => {
console.error('Error inspecting message:', err);
});
const msgContainer = {
offChain: {
cid: 'QmYrsDziW2z6m2Qq5zbMcV3eBwTJWBwZrQR8pGYsAVd7i3'
},
blockchain: {
txid: '20382af6a33b32c957e5ab4e7b2a4feafb307063700c077708ba47de835fc625',
isConfirmed: true
},
externalStorage: {
ipfs: 'QmRoxMMW1Jv7JpLjzGBdhWBJh9QW3acRGFGkBrcihnTz4q'
}
};
Using a callback:
msgInspector.inspectMessage(msgContainer.blockchain.txid, msgContainer.offChain.cid, (err, res) => {
if (err) {
console.error('Error inspecting message:', err);
}
else {
console.log('Inspection result:', res);
}
});
Using promise:
msgInspector.inspectMessage(msgContainer.blockchain.txid, msgContainer.offChain.cid)
.then((res) => {
console.log('Inspection result:', res);
}, (err) => {
console.error('Error inspecting message:', err);
});
This JavaScript library is released under the MIT License. Feel free to fork, and modify!
Copyright © 2020-2023, Blockchain of Things Inc.
FAQs
Module used to parse Catenis message blockchain transactions
The npm package catenis-msg-inspector receives a total of 0 weekly downloads. As such, catenis-msg-inspector popularity was classified as not popular.
We found that catenis-msg-inspector 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.