ghost-mode-guard-hiding
v1.0.11
Published
Provides a tool to establish a score between users that will help to prior users to moderate.
Downloads
5
Readme
The problem
Many websites, mainly small ones, need to moderate their users. The pain points is that they can't decide how to prioritize the moderation of these users. Who to watch first? Who is the most suspicious to use the website with malicious attentions?
The fact is like 31% of adults are using VPN, 20% of them use incognito mode, and they are very few with bad IP reputation, or using TOR, or using VM, or using anti trackers. But how many of legit users using all of them? And how many malicious users will be on a VPN, in incognito mode, on a VM with anti trackers? Most of them, if they don't want to be caught.
A solution
Provide a tool to establish a score between users that will help to prior users to moderate. The goal is not to know who the user is (it's like, impossible) but know how much he wants to hide his real identity.
Installation
This module is distributed via npm which is bundled with node and
should be installed as one of your project's devDependencies
:
npm install --save-dev ghost-mode-guard-hiding
or
for installation with yarn package manager.
yarn add --dev ghost-mode-guard-hiding
Usage
Test the library with plain results
Import ghost-mode-guard-hiding
once and you're good to go:
// In your own file.js (or any other name)
import { profileHidingEvent } from "ghost-mode-guard-hiding";
Then just use:
profileHidingEvent({
profiling_url: 'https://api.ghostmodeguard.com',
})
Use the library with client encryption
First, request from a client key with the following command:
curl -X 'POST' \
'https://api.ghostmodeguard.com/trust/v1/client?domain=[your client domain]' \
-H 'accept: application/json'
Where [your client domain]
is the domain of the frontend application that will make hiding profiling (swagger API definition explained).
Once you have you private key, copy it, then keep it secret (it will be used on backend application). You need this key only once: it will make you able to read any response from the profiling.
Now use the library with encrypted client:
// In your own file.js (or any other name)
import { profileHidingEvent } from "ghost-mode-guard-hiding";
Then just use:
profileEncryptedHidingEvent({
profiling_url: 'https://api.ghostmodeguard.com',
user_token: '[user-token]',
})
Backend libraries to read encrypted profiling response:
- In Golang: https://pkg.go.dev/github.com/ghostmodeguard/hiding#section-readme
- In Java: https://central.sonatype.com/artifact/com.ghostmodeguard/hidingj
Where:
user-token
is anything that can identify the user once he's logged in. The result of the profiling will be sent to your backend after profiling, so you need to be able to verify this information to avoid injection from malicious users
You will receive a response with an attribute encrypted_response
on the body. This attribute contain the body that can be decrypted with your previous requested private key.
To read the content of encrypted_response
you need to:
- decode from base64 the response
- read the content with your stored private key
- you will have a text with the following content:
[user token provided]:[hiding score]
- validate the token of the user
- store the hiding score for helping to moderate malicious users later
Pay attention: you can use the frontend library only once per second. To request more just contact us to [email protected].
Demo
Try to open the following page with incognito mode, with a VPN, from a virtual machine or with anti trackers or TOR:
https://demo.ghostmodeguard.com/hiding
Examples
Result for a legit user:
Result for a user in incognito mode:
Result for a user using TOR browser:
Result for a bot from a datacenter:
Result for a user using a virtual machine:
Contact [email protected] for more information.
LICENSE
MIT