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.
Armlet is a Node.js client for the Mythril Platform API.
Install with:
$ npm i armlet
Here is a small example of how you might use this client. For demonstration purposes, we'll set the credentials created on the Mythril Platform, you can use either the Ethereum address or email used during registration and the password you created:
$ export MYTHRIL_PASSWORD=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
$ # Only one of two below is needed:
$ export EMAIL=me@example.com
$ export MYTHRIL_ETH_ADDRESS=0x.............
Then get the Mythril Platform analysis results with the promise returned by the exposed function:
const armlet = require('armlet')
const client = new armlet.Client(
{
password: process.env.MYTHRIL_PASSWORD, // adjust this
// Use one of the two options below
ethAddress: process.env.MYTHRIL_ETH_ADRRESS,
email: process.env.EMAIL // adjust this
})
const data = {
contractName: 'TestMe',
abi: [
{
constant: false,
inputs: [
{
name: 'first_input',
type: 'uint256',
},
],
name: 'lol',
outputs: [
{
name: '',
type: 'uint256',
},
],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
],
bytecode: '0xf6...',
deployedBytecode: '0xf6...',
sourceMap: '25:78:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:78:1;;;;;;;',
deployedSourceMap: '25:78:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:78:1;;;;;;;',
sourceList: [
'basecontract.sol',
'maincontract.sol',
],
sources: {
'basecontract.sol': '[... source code ...]',
'maincontract.sol': '[... source code ...]',
},
analysisMode: 'full',
};
client.analyze({data})
.then(issues => {
console.log(issues)
}).catch(err => {
console.log(err)
})
You can also specify the timeout in milliseconds to wait for the analysis to be done (the default is 10 seconds). For instance, to wait up to 5 seconds:
client.analyze({data, timeout: 5000})
.then(issues => {
console.log(issues)
}).catch(err => {
console.log(err)
})
See the example directory for some simple but runnable examples of how to use the client.
For more info join the Mythril community at Discord.
FAQs
[![CircleCI](https://circleci.com/gh/ConsenSys/armlet.svg?style=svg)](https://circleci.com/gh/ConsenSys/armlet) [![Coverage Status](https://coveralls.io/repos/github/ConsenSys/armlet/badge.svg?branch=master)](https://coveralls.io/github/ConsenSys/armlet?b
The npm package armlet receives a total of 190 weekly downloads. As such, armlet popularity was classified as not popular.
We found that armlet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.