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.
@castleio/castle-js
Advanced tools
Packaged version of Castle fingerprinting script.
The Castle JavaScript automatically captures every user action in your web application, including clicks, taps, swipes, form submissions, and page views. We use this data to build profiles of good user behavior in order to detect the bad.
npm install --save @castleio/castle-js
yarn add @castleio/castle-js
import * as Castle from '@castleio/castle-js'
Castle.configure(YOUR_CASTLE_APP_ID);
// @param appId [string] castle app id.
// @option options [object] :window (default `window`) eg JSDOM.window
// @option options [boolean] :avoidCookies (default `false`) when true cookie storage will be avoided
// @option options [string] :cookieDomain (default topLevel domain) cookies domain scope
import * as Castle from '@castleio/castle-js'
Castle.configure(appId, options);
import * as Castle from '@castleio/castle-js'
Castle.createRequestToken().then( (requestToken) => {
....
});
// or
const requestToken = await Castle.createRequestToken();
See Castle Docs for more information and how to pass the token further.
If your environment does not support modules you can use the browser version
import '@castleio/castle-js/dist/castle.browser.js'
_castle('setAppId', YOUR_CASTLE_APP_ID);
_castle('createRequestToken').then( (requestToken) => {
....
});
Before
_castle('getClientId')
After
Castle.createRequestToken().then( (requestToken) => {
});
// or
const token = await Castle.createRequestToken();
No longer available commands for _castle(...)
:
`autoForwardClientId`, 'autoTrack', `catchHistoryErrors`, `identify`, `setUserId`, `setAccount`, `setKey`, `setAccount`, `sessionId`, `reset`, `page`, `trackPageView`, `setTrackerUrl`
Request Token is now required to be passed in the request params and it is no longer available in the cookie. Check the docs
ES3+ version supported browsers eg:
Chrome 5+
Firefox 3+
IE 6+
Safari 4+
All modern browsers (desktop and mobile)
MIT
FAQs
Castle Fingerprinting Script
The npm package @castleio/castle-js receives a total of 48,893 weekly downloads. As such, @castleio/castle-js popularity was classified as popular.
We found that @castleio/castle-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.