@anonympins/fingerprint 0.7.3 → 0.7.5

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,44 @@
1
+ ## Version 0.7.5
2
+
3
+ - 🛡️ **Differential Privacy on Federated Threat Intelligence**:
4
+ - **Laplacian Noise on Federation Timestamps ($\text{Laplace}(0, b)$)**: Added mathematical perturbation to exact event timestamps in federated ban exchanges (`share_threat_intel`) parameterized by sensitivity $\Delta t = 5000\text{ms}$ and privacy budget $\epsilon$ (`differentialPrivacy.epsilon`). Timestamps are bounded within a safe $\pm 60\text{s}$ window to satisfy anti-replay checks while completely preventing malicious or compromised federation nodes from reconstructing inter-domain browsing trajectories via millisecond timing correlation.
5
+ - **Randomized Response Decoy Injection (Chaffing)**: Implemented randomized response logic where nodes inject and broadcast synthetic ZKP public keys generated uniformly in $\mathbb{Z}_p$ with probability $p = 1 / (1 + e^{\epsilon})$ (or customizable `dummyRate`). Due to the negligible collision probability of 256-bit keys ($\approx 2^{-256}$), decoys never reach the collaborative consensus threshold ($K \ge 3$), guaranteeing mathematical plausible deniability without causing false positives.
6
+ - **Multi-Runtime Parity**: Fully implemented across JavaScript (`fingerprint.js`), PHP (`FingerprintEngine.php`), Python (`engine.py`), and Java (`FingerprintEngine.java`, `FingerprintProperties.java`).
7
+
8
+ - 🌐 **Network Layer Anomaly Detection**:
9
+ - **MTU Anomaly Scoring (`mtuAnomalyScore`)**: Introduced `mtuAnomalyScore` to the suspicion vector and configuration weights across all runtimes. Evaluates passive TCP SYN options (specifically MSS — Maximum Segment Size) to detect anomalous MTU values typical of VPN/GRE tunneling, WireGuard encapsulation, or residential proxy backconnect chains attempting to masquerade as standard domestic browser connections.
10
+
11
+ - ♿ **Accessibility (a11y) & Invisible Honeypot Hardening**:
12
+ - **Screen-Reader Compliant Honeypot Fields**: Hardened dynamic DOM honeypot generation within `FingerprintClient` with `aria-hidden="true"`, `tabindex="-1"`, and `autocomplete="off"` attributes combined with defensive offscreen CSS positioning (`position: absolute; left: -9999px; transform: scale(0); opacity: 0; pointer-events: none;`). Ensures assistive technologies (NVDA, JAWS, VoiceOver) and browser autofill routines ignore honeypot inputs for visually impaired users while maintaining a 100% trap catch rate against automated scrapers.
13
+
14
+ - 🤖 **Crawler Whitelist Updates & Multi-Language Parity**:
15
+ - **Meta / Facebook Whitelist Addition**: Added dedicated IP subnets and CIDR definitions for Meta and Facebook crawlers (`facebookexternalhit`, `31.13.64.0/18`, `66.220.144.0/20`, `69.63.176.0/20`, `157.240.0.0/16`) to guarantee smooth link preview generation and indexing without challenge interruptions.
16
+ - **Cross-Platform Whitelist Synchronization**: Standardized crawler allowlists and DNS verification workflows (Googlebot, Bingbot, Yandex, Facebook) across all supported backend engines (Node.js, PHP, Python, and Java).
17
+
18
+ - 🔧 **Core Engine Refinements**:
19
+ - **`fingerprint.js` Updates**: Synchronized client-side metric collectors, refined behavioral input tracking, and plugged federation broadcast hooks directly into the core security pipeline.
20
+ - **Java Configuration Enhancements**: Added missing getters/setters and mapped configuration fields (`quicAnomalyScore`, `virtualizationScore`, `differentialPrivacy`, `federatedPeers`) in `FingerprintProperties.java`.
21
+ - **PHP Store Lifecycle**: Resolved initialization order edge cases for store instances during request processing in `FingerprintEngine.php`.
22
+
23
+ - 📖 **Documentation**:
24
+ - **Configuration Options Reference (`full_options.md`)**: Documented all new settings, including `mtuAnomalyScore`, `differentialPrivacy` block (`enabled`, `epsilon`, `dummyRate`), and federated threat sharing parameters.
25
+
26
+ ---
27
+
28
+ ## Version 0.7.4
29
+
30
+ - 🛡️ **Security & Rate Limiting**:
31
+ - **Domain-Aware Challenge Rate Limiter**: Implemented a new rate-limiting mechanism that operates on a per-domain basis. This enhances stability in multi-tenant architectures and mitigates challenge-based DoS attacks by isolating traffic per host.
32
+ - **Transparent Service Worker Interception (`fingerprint.worker.js`)**: Introduced a dedicated Service Worker and client integration (`initServiceWorker`, `syncServiceWorkerCredentials`) for transparent network request decoration (`X-Device-Fingerprint`, `X-Behavior-Metrics`). This avoids monkey-patching `window.fetch` directly, keeping native prototypes intact to prevent prototype tampering triggers while supporting domain-scoped protection.
33
+ - ⚖️ **Scoring Parity & Enhancements**:
34
+ - **`behaviorScore` Overhaul**: Reworked the behavioral scoring logic across all supported languages (Node.js, PHP, Java, Python) for more accurate detection of human-like interactions versus automated patterns.
35
+ - **`x-behavior-metrics` Direct Score & Binary Flag Support**: Added support for direct evaluation of client-side binary flags (`1` for verified human yielding a score of `0`, `0` for detected bot yielding a score of `100`) as well as raw numeric suspicion scores passed in the `x-behavior-metrics` header. (Contributed by @anonympins)
36
+ - **Cross-Language Weight Parity**: Harmonized the weights within all security profiles to ensure identical scoring and behavior across every runtime environment.
37
+ - **HTTP/2 Pseudo-Header Validation**: Hardened `protocolAnomalyScore` to detect and penalize invalid pseudo-headers in HTTP/2 fingerprints, improving detection of non-standard and bot-like clients.
38
+ - **Java Engine Parity**: The Java engine's auto-tuner and configuration management have been brought to full parity with the other language implementations.
39
+ - 🔧 **Fixes & Maintenance**:
40
+ - Corrected library import paths and expanded test coverage for the updated `behaviorScore` logic.
41
+
1
42
  ## Version 0.7.3
2
43
 
3
44
  - 🛡️ **Scoring Corrections & Anti-Spoofing Fixes**:
package/README.md CHANGED
@@ -91,7 +91,7 @@ In your **pom.xml**, add :
91
91
  <dependency>
92
92
  <groupId>com.anonympins</groupId>
93
93
  <artifactId>fingerprint-engine</artifactId>
94
- <version>0.7.3</version>
94
+ <version>0.7.5</version>
95
95
  </dependency>
96
96
  ```
97
97
  ## Documentation
package/package.json CHANGED
@@ -1,107 +1,109 @@
1
- {
2
- "name": "@anonympins/fingerprint",
3
- "version": "0.7.3",
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
- "main": "index.js",
6
- "type": "module",
7
- "engines": {
8
- "node": ">=20.0.0"
9
- },
10
- "scripts": {
11
- "test": "vitest run --reporter=verbose",
12
- "pub": "npm run build && npm login && npm publish --access public",
13
- "build": "node src/js/build-client.js"
14
- },
15
- "exports": {
16
- ".": "./index.js",
17
- "./client": {
18
- "import": "./src/js/fingerprint.client.obfuscated.js",
19
- "require": "./src/js/fingerprint.client.obfuscated.js",
20
- "browser": "./src/js/fingerprint.client.obfuscated.js"
21
- },
22
- "./client/src/*": "./src/js/*",
23
- "./fp.wasm": "./public/fp.wasm",
24
- "./fp.js": "./public/fp.js",
25
- "./package.json": "./package.json"
26
- },
27
- "files": [
28
- "index.js",
29
- "src/js/",
30
- "public/",
31
- "README.md",
32
- "LICENSE",
33
- "CHANGELOG.md",
34
- "src/php/",
35
- "composer.json",
36
- "phpunit.xml"
37
- ],
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/anonympins/fingerprint.git"
41
- },
42
- "keywords": [
43
- "anti-bot",
44
- "bot-detection",
45
- "security",
46
- "middleware",
47
- "express",
48
- "nodejs",
49
- "fingerprint",
50
- "device-fingerprinting",
51
- "ja3",
52
- "tls-fingerprinting",
53
- "proof-of-work",
54
- "pow",
55
- "useful-proof-of-work",
56
- "upow",
57
- "waf",
58
- "scraping",
59
- "scalping",
60
- "mitigation",
61
- "rate-limiting",
62
- "honeypot",
63
- "behavioral-analysis"
64
- ],
65
- "author": "anonympins",
66
- "license": "MIT",
67
- "bugs": {
68
- "url": "https://github.com/anonympins/fingerprint/issues"
69
- },
70
- "homepage": "https://github.com/anonympins/fingerprint#readme",
71
- "devDependencies": {
72
- "cookie-parser": "^1.4.6",
73
- "express": "^4.22.2",
74
- "javascript-obfuscator": "^4.1.0",
75
- "jsdom": "^24.0.0",
76
- "prom-client": "^15.1.2",
77
- "terser": "^5.30.3",
78
- "vitest": "^4.1.11"
79
- },
80
- "overrides": {
81
- "body-parser": "2.3.0",
82
- "qs": "6.16.0"
83
- },
84
- "peerDependencies": {
85
- "ioredis": "^5.3.2",
86
- "knex": ">=3.0.0",
87
- "mongodb": "^6.3.0",
88
- "sqlite3": "^5.1.7"
89
- },
90
- "peerDependenciesMeta": {
91
- "ioredis": {
92
- "optional": true
93
- },
94
- "mongodb": {
95
- "optional": true
96
- },
97
- "knex": {
98
- "optional": true
99
- },
100
- "sqlite3": {
101
- "optional": true
102
- }
103
- },
104
- "dependencies": {
105
- "@tensorflow/tfjs": "^4.22.0"
106
- }
107
- }
1
+ {
2
+ "name": "@anonympins/fingerprint",
3
+ "version": "0.7.5",
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
+ "main": "index.js",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20.0.0"
9
+ },
10
+ "scripts": {
11
+ "test": "vitest run --reporter=verbose",
12
+ "pub": "npm run build && npm login && npm publish --access public",
13
+ "build": "node src/js/build-client.js"
14
+ },
15
+ "exports": {
16
+ ".": "./index.js",
17
+ "./client": {
18
+ "import": "./src/js/fingerprint.client.obfuscated.js",
19
+ "browser": "./src/js/fingerprint.client.obfuscated.js"
20
+ },
21
+ "./worker": {
22
+ "import": "./src/js/fingerprint.worker.js",
23
+ "default": "./src/js/fingerprint.worker.js"
24
+ },
25
+ "./fp.wasm": "./public/fp.wasm",
26
+ "./fp.js": "./public/fp.js",
27
+ "./package.json": "./package.json"
28
+ },
29
+ "files": [
30
+ "index.js",
31
+ "src/js/",
32
+ "public/",
33
+ "README.md",
34
+ "LICENSE",
35
+ "CHANGELOG.md",
36
+ "src/php/",
37
+ "composer.json",
38
+ "phpunit.xml"
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/anonympins/fingerprint.git"
43
+ },
44
+ "keywords": [
45
+ "anti-bot",
46
+ "bot-detection",
47
+ "security",
48
+ "middleware",
49
+ "express",
50
+ "nodejs",
51
+ "fingerprint",
52
+ "device-fingerprinting",
53
+ "ja3",
54
+ "tls-fingerprinting",
55
+ "proof-of-work",
56
+ "pow",
57
+ "useful-proof-of-work",
58
+ "upow",
59
+ "waf",
60
+ "scraping",
61
+ "scalping",
62
+ "mitigation",
63
+ "rate-limiting",
64
+ "honeypot",
65
+ "behavioral-analysis"
66
+ ],
67
+ "author": "anonympins",
68
+ "license": "MIT",
69
+ "bugs": {
70
+ "url": "https://github.com/anonympins/fingerprint/issues"
71
+ },
72
+ "homepage": "https://github.com/anonympins/fingerprint#readme",
73
+ "devDependencies": {
74
+ "cookie-parser": "^1.4.6",
75
+ "express": "^4.22.2",
76
+ "javascript-obfuscator": "^4.1.0",
77
+ "jsdom": "^24.0.0",
78
+ "prom-client": "^15.1.2",
79
+ "terser": "^5.30.3",
80
+ "vitest": "^4.1.11"
81
+ },
82
+ "overrides": {
83
+ "body-parser": "2.3.0",
84
+ "qs": "6.16.0"
85
+ },
86
+ "peerDependencies": {
87
+ "ioredis": "^5.3.2",
88
+ "knex": ">=3.0.0",
89
+ "mongodb": "^6.3.0",
90
+ "sqlite3": "^5.1.7"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "ioredis": {
94
+ "optional": true
95
+ },
96
+ "mongodb": {
97
+ "optional": true
98
+ },
99
+ "knex": {
100
+ "optional": true
101
+ },
102
+ "sqlite3": {
103
+ "optional": true
104
+ }
105
+ },
106
+ "dependencies": {
107
+ "@tensorflow/tfjs": "^4.22.0"
108
+ }
109
+ }
Binary file