@anonympins/fingerprint 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ ## Version 0.4.4
2
+
3
+ ### 🧮 Pattern Score Ratios & Weighted Subscores
4
+ - **Linear Weighted Pattern Scores**: Introduced configurable ratios (`regularityRatio`, `benfordRatio`, `enumerationRatio`) to dynamically adjust the influence of timing regularity, Benford's law deviation, and sequential path enumeration on the final `requestPatternScore`.
5
+
6
+ ### 🕸️ Advanced Client Tracking & Touch Analysis
7
+ - **Mobile Client Touch Analysis**: Implemented detailed analysis of mobile touch events, extracting advanced behavioral metrics such as average pressure, touch radius size, coordinate variance, and multi-touch count to effectively detect automated touch emulation.
8
+ - **WASM Client Caching with IndexedDB**: Added client-side persistent storage of compiled WebAssembly modules in IndexedDB (`wasm-cache-db`) to drastically reduce initialization times, skipping compilation overhead on subsequent visits.
9
+ - **Phantom Interactive Traps**: Added invisible phantom interactive link traps to hook headlessly automated clients via hover/focus events.
10
+
11
+ ### 🛡️ Enhanced Honeypot Protections & Extensibility
12
+ - **External Analyzers Support**: Extended the honeypot subsystem to allow plugging in external analyzers (e.g., custom regex matching or WAF frameworks like ModSecurity) to evaluate request payloads.
13
+ - **Optimized Injection Filters**: Refined input inspection to recursively search deeply nested NoSQL/SQL structures using centralized security algorithms.
14
+
15
+ ### 📶 Stable Subnet Reputation & Rate Limiting
16
+ - **Hardware-Anchored Subnet Metrics**: Refactored subnet score aggregations to anchor suspicious activities to hardware-based device hashes (`deviceHash`) rather than easily cleared tracking cookies, preventing proxy rotation masking.
17
+ - **Subnet Challenge Rate Limiting**: Integrated a Token Bucket rate limiter (`checkChallengeRateLimit`) that throttles challenge requests per IPv4/IPv6 subnet to prevent denial of service (DoS) attacks on verification systems.
18
+
19
+ ### 🤖 Botnet Clustering & Similarity Scores
20
+ - **Botnet Cluster Score**: Implemented network-wide botnet detection (`botnetClusterScore`) using exponential mathematical decay. It groups volatile client requests that share identical stable hardware profiles across distinct IP addresses within a rolling 10-minute window.
21
+
22
+ ## Version 0.4.3
23
+
24
+ ### 🔒 Rotation Score Hardening (Anti-Spoofing & No-JS Parity)
25
+ - **Server-Only Rotation Analysis**: Completely removed all client-side telemetry (`X-Device-Fingerprint`, canvas, gpu, hardware concurrency) from the `rotationScore` computation across all engines (Node.js, PHP, Python).
26
+ - **Zero-Trust Client Inputs**: Fixed a vulnerability where client-side fingerprint spoofing or the absence of JS headers on static/API requests could trick the engines into triggering false-positive rotation alerts. The stable part analysis now relies exclusively on server-side signatures (`ua`, `ja3`, `ja4`, `h2`, `tcp`).
27
+
28
+ ### 🐍 Python Engine Parity & uPoW
29
+ - **Useful Proof-of-Work (uPoW) in Python**: Fully implemented uPoW support in Python, bringing complete parity to task dispatching and solution integration with the Node.js and PHP versions.
30
+ - **Dry Run & Score Matching**: Added robust Dry Run mode and suspicion score calculations in the Python engine, allowing passive security evaluation without request interruption.
31
+
32
+ ### 🐘 PHP Engine Enhancements
33
+ - **PHP uPoW Coverage**: Greatly expanded test coverage for the PHP `ProblemManager` and useful work integrations, ensuring reliability under heavy workloads.
34
+
35
+ ### 🛡️ Challenge Routing & Better Re-challenge
36
+ - **Refined Challenge Router**: Restructured challenge routing and solution validation pipelines for direct, consistent handling of cryptographic results.
37
+ - **Smarter Re-challenging**: Improved re-challenge behavior across all engines. If an already cleared device's score spikes above the high threshold again, the existing clearance ticket is bypassed, instantly prompting a fresh security challenge.
38
+
1
39
  ## Version 0.4.2 (Hotfix)
2
40
 
3
41
  ### 🧬 Auto-Tuner Rework & Sanity Guardrails
package/README.md CHANGED
@@ -1,61 +1,71 @@
1
- # Fingerprint anti-bot protection
2
-
3
- NodeJS tests : [![Test NodeJS](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-nodejs.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci.yml) / PHP tests : [![PHP](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-php.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci-php.yml) / Python tests : [![PHP](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-php.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci-python.yml)
4
-
5
- [![Release](https://img.shields.io/github/v/release/anonympins/fingerprint)](https://github.com/anonympins/fingerprint/releases)
6
- [![License](https://img.shields.io/github/license/anonympins/fingerprint)](https://github.com/anonympins/fingerprint/blob/main/LICENSE)
7
- ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/anonympins/fingerprint)
8
-
9
- A multi-layered behavioral, cryptographic, and network analysis engine designed to identify and mitigate malicious requests (bots, scrapers, session hijacking) in real-time. Supports both **Node.js** and **PHP** environments.
10
-
11
- ![illustration](https://i.ibb.co/fV1QT6Mf/image-c6e10859baae53bb595112ec08fc9e27.png)
12
-
13
- ## Key Features
14
-
15
- - **Multi-Layered Detection**: Combines TLS/JA3/JA4 analysis, HTTP header consistency checks, IP reputation, and behavioral tracking (mouse movements, keystrokes).
16
- - **Adaptive Mitigation**: Imposes progressive cryptographic Proof-of-Work (PoW) challenges to block automated clients without impacting legitimate human users.
17
- - **Predefined Profiles**: Ready-to-use security profiles (`balanced`, `strict`, `api`, `blog`, `ecommerce`) tailored to your specific use case.
18
-
19
- ## Quick Start
20
-
21
- ### Node.js
22
-
23
- ```bash
24
- npm install @anonympins/fingerprint
25
- ```
26
-
27
- ### PHP
28
-
29
- ```bash
30
- composer require anonympins/fingerprint
31
- ```
32
-
33
- ## Documentation
34
-
35
- To prevent documentation drift, all detailed guides and reference materials are maintained in the `doc/` directory. Please refer to [these resources](https://github.com/anonympins/fingerprint/wiki/home) to configure and integrate the engine:
36
-
37
- 1. **[Key Concepts & Suspicion Vectors](https://github.com/anonympins/fingerprint/wiki/concepts)**: Learn how the engine calculates suspicion scores across the 15 distinct vectors and manages the Proof-of-Work mitigation layers.
38
- 2. **[Node.js Integration Guide](https://github.com/anonympins/fingerprint/wiki/nodejs_integration)**: Step-by-step instructions for Express.js middleware and raw HTTP server integrations.
39
- 3. **[PHP Integration Guide](https://github.com/anonympins/fingerprint/wiki/php_integration)**: Configuration details for direct PHP integration, TLS fingerprinting forwarding via Nginx/Apache, and securing Prometheus metrics.
40
- 4. **[Full Configuration Options](https://github.com/anonympins/fingerprint/wiki/full_options)**: Complete parameter list for fine-tuning weights, custom honeypots, and security profile overrides.
41
- 5. **[API Reference](https://github.com/anonympins/fingerprint/wiki/api_reference)**: Public API signatures and guides on substituting the in-memory datastore with Redis or MongoDB.
42
-
43
- Start with the **[Documentation Portal](https://github.com/anonympins/fingerprint/wiki/home)** for a complete index.
44
-
45
- ## Contributing
46
-
47
- We welcome community contributions! Please read our **[Contributing Guidelines](https://github.com/anonympins/fingerprint/blob/main/CONTRIBUTING.md)** for information on:
48
- - Setting up your local environment (Node.js and PHP).
49
- - Running the test suites (`Vitest` and `PHPUnit`).
50
- - Coding and pull request standards.
51
-
52
- Thanks to our contributors :
53
- - [anonympins](https://github.com/anonympins)
54
-
55
- ## Used actively on
56
-
57
- - https://primals.net and sub-sites
58
-
59
- ## License
60
-
1
+ # Fingerprint anti-bot protection
2
+
3
+ NodeJS tests : [![Test NodeJS](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-nodejs.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci.yml) / PHP tests : [![PHP](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-php.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci-php.yml) / Python tests : [![PHP](https://img.shields.io/github/actions/workflow/status/anonympins/fingerprint/ci-php.yml)](https://github.com/anonympins/fingerprint/actions/workflows/ci-python.yml)
4
+
5
+ [![Release](https://img.shields.io/github/v/release/anonympins/fingerprint)](https://github.com/anonympins/fingerprint/releases)
6
+ [![License](https://img.shields.io/github/license/anonympins/fingerprint)](https://github.com/anonympins/fingerprint/blob/main/LICENSE)
7
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/anonympins/fingerprint)
8
+
9
+ A multi-layered behavioral, cryptographic, and network analysis engine designed to identify and mitigate malicious requests (bots, scrapers, session hijacking) in real-time. Supports **Node.js**, **Python** and **PHP** environments.
10
+
11
+ ![illustration](https://i.ibb.co/fV1QT6Mf/image-c6e10859baae53bb595112ec08fc9e27.png)
12
+
13
+ ### Presentation video
14
+
15
+ [![Presentation](https://i.ibb.co/1tkPS01C/Capture-d-cran-2026-09-07-194728.png)](https://www.youtube.com/watch?v=Ujeznl0JAl4)
16
+
17
+ ## Key Features
18
+
19
+ - **Multi-Layered Detection**: Combines TLS/JA3/JA4 analysis, HTTP header consistency checks, IP reputation, and behavioral tracking (mouse movements, keystrokes).
20
+ - **Adaptive Mitigation**: Imposes progressive cryptographic Proof-of-Work (PoW) challenges to block automated clients without impacting legitimate human users.
21
+ - **Predefined Profiles**: Ready-to-use security profiles (`balanced`, `strict`, `api`, `blog`, `ecommerce`) tailored to your specific use case.
22
+
23
+ ## Quick Start
24
+
25
+ ### Node.js
26
+
27
+ ```bash
28
+ npm install @anonympins/fingerprint
29
+ ```
30
+
31
+ ### PHP
32
+
33
+ ```bash
34
+ composer require anonympins/fingerprint
35
+ ```
36
+
37
+ ### Python
38
+ ```bash
39
+ pip install fingerprint-engine
40
+ ```
41
+
42
+ ## Documentation
43
+
44
+ To prevent documentation drift, all detailed guides and reference materials are maintained in the `doc/` directory. Please refer to [these resources](https://github.com/anonympins/fingerprint/wiki/home) to configure and integrate the engine:
45
+
46
+ 1. **[Key Concepts & Suspicion Vectors](https://github.com/anonympins/fingerprint/wiki/concepts)**: Learn how the engine calculates suspicion scores across the 15 distinct vectors and manages the Proof-of-Work mitigation layers.
47
+ 2. **[Node.js Integration Guide](https://github.com/anonympins/fingerprint/wiki/nodejs_integration)**: Step-by-step instructions for Express.js middleware and raw HTTP server integrations.
48
+ 3. **[PHP Integration Guide](https://github.com/anonympins/fingerprint/wiki/php_integration)**: Configuration details for direct PHP integration, TLS fingerprinting forwarding via Nginx/Apache, and securing Prometheus metrics.
49
+ 3. **[Python Integration Guide](https://github.com/anonympins/fingerprint/wiki/python_integration)**: Python middleware for ASGI and WSGI integration.
50
+ 4. **[Full Configuration Options](https://github.com/anonympins/fingerprint/wiki/full_options)**: Complete parameter list for fine-tuning weights, custom honeypots, and security profile overrides.
51
+ 5. **[API Reference](https://github.com/anonympins/fingerprint/wiki/api_reference)**: Public API signatures and guides on substituting the in-memory datastore with Redis or MongoDB.
52
+
53
+ Start with the **[Documentation Portal](https://github.com/anonympins/fingerprint/wiki/home)** for a complete index.
54
+
55
+ ## Contributing
56
+
57
+ We welcome community contributions! Please read our **[Contributing Guidelines](https://github.com/anonympins/fingerprint/blob/main/CONTRIBUTING.md)** for information on:
58
+ - Setting up your local environment (Node.js and PHP).
59
+ - Running the test suites (`Vitest` and `PHPUnit`).
60
+ - Coding and pull request standards.
61
+
62
+ Thanks to our contributors :
63
+ - [anonympins](https://github.com/anonympins)
64
+
65
+ ## Used actively on
66
+
67
+ - https://primals.net and sub-sites
68
+
69
+ ## License
70
+
61
71
  This project is licensed under the MIT License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anonympins/fingerprint",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Advanced anti-bot library for Node.js using multi-layer fingerprinting (JA3, client-side, headers), behavioral analysis, and adaptive Proof-of-Work (PoW) challenges to mitigate scraping, scalping, and automated threats.",
5
5
  "main": "index.js",
6
6
  "type": "module",