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.
node-firewalla
Advanced tools
Package to talk your firewalla box & API
If you want to get your firewalla token, or want to help reverse engineering firewalla, checkout firewalla-tools
If you like my work, give this repository a ⭐
or consider Buying Me A Coffee ☕
npm install node-firewalla
import { SecureUtil, NetworkService, FWGroup, FWGroupApi, HostService } from 'node-firewalla'
// Import your public & private key (by file name)
SecureUtil.importKeyPair(publicKeyPath, privateKeyPath)
// Login & get firewalla box
let { groups } = await FWGroupApi.login()
let fwGroup = FWGroup.fromJson(groups[0])
// Send a ping message
let networkService = new NetworkService(fwGroup)
let pingResult = await networkService.ping()
// List all hosts connected to your firewalla
let hostService = new HostService(fwGroup)
let hosts = await hostService.getAll()
To authenticate the first time with your firewalla box, use the create-etp-token script in firewalla-tools. This will generate a public & private key that you need to keep.
Now you simply have to use SecureUtil to import your keys.
import { SecureUtil } from 'node-firewalla'
// using a file name e.g. etp.public.pem
SecureUtil.importKeyPair(publicKeyPath, privateKeyPath)
// using a string e.g. "----BEGIN PUBLIC KEY---- ..."
SecureUtil.importKeyFromString(publicKeyPath, privateKeyPath)
Then to get your firewalla box(es) (a.k.a FWGroup), you will have to login first.
import { FWGroupApi, FWGroup } from 'node-firewalla'
let { groups } = await FWGroupApi.login()
let fwGroup = FWGroup.fromJson(groups[0], "192.168.1.1")
Currently this package doesn't fully support cloud communication, so you will still have to supply your box's IP like above.
Now you can use all the service classes to your hearts content :)
To use a service, you first have to supply the FWGroup (box) to its constructor, e.g.
import { AlarmService } from 'node-firewalla'
// Ignore all current alarms
let alarmService = new AlarmService(fwGroup)
let pingResult = await alarmService.ignoreAll()
Manage alarms
Manage your box
Manage features that your box uses
Manage hosts connected to your box
Get initial data of your box
Manage your firewalla network
FAQs
Package to talk your firewalla box & API
The npm package node-firewalla receives a total of 11 weekly downloads. As such, node-firewalla popularity was classified as not popular.
We found that node-firewalla 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
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.