@anonympins/fingerprint 0.6.7 โ†’ 0.7.0

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,19 @@
1
+ ## Version 0.7.0
2
+
3
+ - ๐Ÿ›ก๏ธ **Targeted Re-Challenge Strategy (`mustReChallenge`)**: Re-introduced and hardened the re-challenge workflow specifically targeted at honeypot triggers and critical indicators (e.g., `honeypotScore >= mediumThreshold` or any indicator score reaching $\ge 100$). Legitimate sessions with valid clearance tickets are preserved, while active attack attempts immediately invalidate existing tickets and force verification.
4
+ - ๐Ÿ“ก **QUIC / HTTP/3 Transport Profiling & Protocol Anomaly Scoring**: Implemented deep inspection of QUIC transport parameters (`initial_max_data`, `initial_max_streams_bidi`, control frame ordering `s,m,p`, and extensible priority schemes). Deviations between browser User-Agents and QUIC transport implementations (e.g. `curl-impersonate`, `quiche`, custom bot clients) are surfaced in `protocolAnomalyScore` and `quicAnomalyScore`.
5
+ - โšก **WebRTC DataChannel for Cooperative Proof-of-Space**: Added direct peer-to-peer WebRTC DataChannel signaling (`webrtc_signal`, `RTCPeerConnection`) to cooperative Proof-of-Space challenges. Subnet nodes now exchange PoSpace verification blocks directly without routing heavy binary payloads through the application server, falling back seamlessly to HTTP mailbox polling if P2P negotiation fails.
6
+ - ๐Ÿ“ˆ **Analog Asymptotic Inconsistency Scoring (`calculateAnalogInconsistencyScore`)**: Replaced abrupt, stepped similarity thresholds with a smooth sigmoid function asymptotically bounded at 99.9. This prevents discrete score cliffs and false positives for minor profile drifts across JavaScript, PHP, and Java engines.
7
+ - ๐ŸŒ **Bayesian Subnet Scoring & IP Dispersion**: Refactored `subnetScore` using Bayesian density estimation, User-Agent dispersion factors, and IP-to-device ratios scaled via hyperbolic tangent (`tanh`) with a 99.9 asymptote, effectively distinguishing dense CGNAT/corporate gateways from distributed proxy clusters.
8
+ - ๐Ÿ•ต๏ธ **Virtualization & Threat Intel Scoring**: Added `virtualizationScore` to expose virtual display drivers and headless emulators (SwiftShader, Mesa llvmpipe, soft-pipe renderers, and standard headless display resolutions), alongside `threatIntelScore` correlating RTT proxy timing and federated ZKP public keys.
9
+
10
+ ## Version 0.6.8
11
+
12
+ - ๐Ÿงน **Removal of Arbitrary Re-challenging**: Removed the `mustReChallenge` feature which forced an arbitrary re-challenge even when a user presented a valid clearance ticket. The system now relies exclusively on a real-time calculated suspicion score, ensuring a predictable user journey without arbitrary blocks.
13
+ - โš™๏ธ **WebAssembly & PoW Workers Optimization**: Drastic improvements to the WASM module loading routines and the execution of background threads (`pow.worker.js`). Parallel computations now run more smoothly, strictly adhere to restrictive Content Security Policy (CSP) directives, and benefit from a more robust fallback to the main thread in the absence of support.
14
+ - ๐Ÿ˜ **Native DNS Support in PHP**: Integrated the native `resolveDnsNative` method into the PHP engine for DNS resolution. This method autonomously handles IPv4 (A) and IPv6 (AAAA/PTR) records without external system calls, guaranteeing better performance and increased compatibility with asynchronous environments.
15
+ - ๐Ÿ”‘ **Full Transition to Strong Cryptographic Randomness**: Migrated all random generation functions (`random()`, `secureRandomFloat()`) to native API CSPRNGs (`crypto.randomInt` and `crypto.randomBytes`). This permanently eliminates distribution bias (modulo bias) and resolves CodeQL static analysis warnings.
16
+
1
17
  ## Version 0.6.7
2
18
 
3
19
  - ๐Ÿงฌ **WebAssembly (WASM)** : new client version
package/README.md CHANGED
@@ -86,16 +86,12 @@ pip install anonympins-fingerprint
86
86
  ```
87
87
 
88
88
  ### Java
89
- ```bash
90
- mvn clean install
91
- ```
92
-
93
- Then, in your **pom.xml**, add :
89
+ In your **pom.xml**, add :
94
90
  ```xml
95
91
  <dependency>
96
92
  <groupId>com.anonympins</groupId>
97
- <artifactId>fingerprint</artifactId>
98
- <version>0.6.7</version>
93
+ <artifactId>fingerprint-engine</artifactId>
94
+ <version>0.7.0</version>
99
95
  </dependency>
100
96
  ```
101
97
  ## Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anonympins/fingerprint",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
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",
package/public/fp.wasm CHANGED
Binary file
@@ -14,7 +14,7 @@ const __dirname = dirname(__filename);
14
14
  function buildWasm() {
15
15
  return new Promise((resolve) => {
16
16
  console.log('Attempting to build WASM module (optional)...');
17
- const command = "em++ src/cpp/main.cpp src/cpp/utils.cpp -o public/fp.js -s WASM=1 -s MODULARIZE=1 -s EXPORT_NAME='createFingerprintModule' -s \"EXPORTED_FUNCTIONS=['_malloc','_free','_hash_string','_solve_cpu_target','_solve_memory_challenge','_generate_gpu_pow_trajectory']\" -O3 --no-entry";
17
+ const command = "em++ -msimd128 src/cpp/main.cpp src/cpp/utils.cpp -o public/fp.js -s WASM=1 -s MODULARIZE=1 -s EXPORT_NAME='createFingerprintModule' -s \"EXPORTED_FUNCTIONS=['_malloc','_free','_hash_string','_solve_cpu_target','_solve_memory_challenge','_generate_gpu_pow_trajectory']\" -O3 --no-entry";
18
18
 
19
19
  exec(command, (error, stdout, stderr) => {
20
20
  if (error) {
@@ -31,19 +31,19 @@ function getRandomNonTrivialOpcodes(tempLocal) {
31
31
  const insts = [];
32
32
  const ops = [
33
33
  // local.get tempLocal, i32.const rand, rotl, local.set tempLocal
34
- () => [0x20, tempLocal, 0x41, ...encodeSLEB128(Math.floor(Math.random() * 31) + 1), 0x77, 0x21, tempLocal],
34
+ () => [0x20, tempLocal, 0x41, ...encodeSLEB128(crypto.randomInt(1, 32)), 0x77, 0x21, tempLocal],
35
35
  // local.get tempLocal, i32.const rand, rotr, local.set tempLocal
36
- () => [0x20, tempLocal, 0x41, ...encodeSLEB128(Math.floor(Math.random() * 31) + 1), 0x78, 0x21, tempLocal],
36
+ () => [0x20, tempLocal, 0x41, ...encodeSLEB128(crypto.randomInt(1, 32)), 0x78, 0x21, tempLocal],
37
37
  // local.get tempLocal, i32.const rand, xor, local.set tempLocal
38
- () => [0x20, tempLocal, 0x41, ...encodeSLEB128(Math.floor(Math.random() * 10000)), 0x73, 0x21, tempLocal],
38
+ () => [0x20, tempLocal, 0x41, ...encodeSLEB128(crypto.randomInt(0, 10000)), 0x73, 0x21, tempLocal],
39
39
  // local.get tempLocal, popcnt, i32.const rand, mul, local.set tempLocal
40
- () => [0x20, tempLocal, 0x69, 0x41, ...encodeSLEB128(Math.floor(Math.random() * 1000) + 1), 0x6c, 0x21, tempLocal],
40
+ () => [0x20, tempLocal, 0x69, 0x41, ...encodeSLEB128(crypto.randomInt(1, 1001)), 0x6c, 0x21, tempLocal],
41
41
  // local.get tempLocal, clz, local.get tempLocal, ctz, add, local.set tempLocal
42
42
  () => [0x20, tempLocal, 0x67, 0x20, tempLocal, 0x68, 0x6a, 0x21, tempLocal]
43
43
  ];
44
- const count = 2 + Math.floor(Math.random() * 3);
44
+ const count = crypto.randomInt(2, 5);
45
45
  for (let i = 0; i < count; i++) {
46
- const op = ops[Math.floor(Math.random() * ops.length)];
46
+ const op = ops[crypto.randomInt(0, ops.length)];
47
47
  insts.push(...op());
48
48
  }
49
49
  return insts;
@@ -53,7 +53,7 @@ function generatePolymorphicInstructions(stateLocal = 4, tempLocal = 5) {
53
53
  const insts = [];
54
54
 
55
55
  // Initialize tempLocal with a random value
56
- const initVal = Math.floor(Math.random() * 1000) - 500;
56
+ const initVal = crypto.randomInt(-500, 500);
57
57
  insts.push(0x41, ...encodeSLEB128(initVal), 0x21, tempLocal);
58
58
 
59
59
  // Initialize stateLocal to 0