Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
vi-bot — 基于客户端的机器人检测库,包含28个加权模块、行为分析、浏览器指纹识别、蜜罐以及服务端验证。可检测无头浏览器、Selenium、Puppeteer、Playwright以及隐形自动化框架。 | Kitploit
工具/GitHubGitHub/mohamedlahmeri01/vi-bot
防御工具IDS/IPS规避Web安全反机器人指纹欺骗异常检测
GitHubmohamedlahmeri01/vi-bot

vi-bot

基于客户端的机器人检测库,包含28个加权模块、行为分析、浏览器指纹识别、蜜罐以及服务端验证。可检测无头浏览器、Selenium、Puppeteer、Playwright以及隐形自动化框架。

查看仓库
211个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

BotDetect v2 — 生产环境机器人检测库

BotDetect 徽标

客户端机器人与自动化检测库,具备加权评分、行为分析、浏览器指纹识别及可配置阈值。可检测无头浏览器、Selenium、Puppeteer、Playwright、基于CDP的工具以及隐身自动化框架。

v2.1.0 — 反检测蜜罐、GPU稳定的Canvas指纹识别、增强的行为分析、惰性初始化、服务端篡改检测、请求指纹绑定及速率限制。


目录

  • 功能特性
  • 架构
  • 快速开始
  • 客户端 API
  • 服务端集成
  • 检测模块
  • 配置
  • 生产环境检查清单
  • 测试

功能特性

  • 28 个检测模块,覆盖自动化框架、无头浏览器、指纹识别、行为分析、蜜罐及堆栈跟踪陷阱
  • 加权评分系统 — 每个信号具有可配置权重;最终分数在服务端计算
  • 三种判定等级:human(人类)、suspicious(可疑)、bot(机器人),对应不同摩擦动作(monitor 监控、challenge 挑战、block 阻止)
  • 服务端验证 — 基于 nonce、防重放、PoW 签名
  • 堆栈跟踪陷阱 — 猴子补丁 DOM API 以捕获自动化工具调用栈
  • 行为分析 — 鼠标曲率、按键节奏方差、滚动加速度、触摸动态
  • 反检测蜜罐 — 随机化 CSS 隐藏、诱饵字段、真实感字段名
  • 服务端篡改检测 — 验证信号完整性,检测作弊尝试
  • 请求指纹绑定 — PoW 令牌与 HTTP 请求属性绑定
  • 速率限制 — 所有验证端点按会话限制
  • 无脚本检测 — 识别从未发送检测载荷的客户端
  • 已知爬虫白名单 — 排除 20+ 合法爬虫的评分

架构

root@kitploit:~
浏览器                                  你的服务器
┌──────────────────────────┐            ┌──────────────────────┐
│ Collector(单例)         │  POST      │ Express 中间件        │
│  ├─ 28 个检测模块         │  信号      │  ├─ NonceManager      │
│  ├─ BehaviorTracker      │  + nonce   │  ├─ RateLimiter       │
│  ├─ HoneypotTraps        │───────────▶│  ├─ TamperDetector    │
│  ├─ 堆栈跟踪陷阱          │            │  ├─ computeVerdict()  │
│  └─ IframeContext        │            │  └─ 工作量证明         │
│                         │  判定结果    │                        │
│  ↓ collect() →          │  + proof   │  返回:                │
│  DetectionResult[]      │◀───────────│  { verdict, score,     │
└──────────────────────────┘            │    confidence, proof,  │
                                        │    tamperScore }       │
                                        └──────────────────────┘
                                              │
                                              ▼
                                        会话保护端点
                                        (登录、结账等)
                                        验证 proof 后放行

核心原则:浏览器仅收集原始 DetectionResult[] 信号。服务端使用秘密权重表计算最终判定。客户端计算的判定结果永远不可信。


快速开始

1. 构建

root@kitploit:~
npm install
npm run build

输出到 dist/:

  • botdetect.min.js(含 polyfill,约 151 KB)
  • botdetect-clean.min.js(仅现代浏览器,约 74 KB)

2. 在页面中引入

root@kitploit:~
<script src="/path/to/botdetect.min.js"></script>
<script>
  BotDetect.collector.enableTraps();
  BotDetect.collector.enableBehavioralTracking();
  BotDetect.collector.enableHoneypots();
</script>

3. 设置服务端验证

root@kitploit:~
cd server
npm install express cors express-session
node example-integration.js

4. 在敏感操作时发送信号

root@kitploit:~
async function onLogin() {
  const { nonce } = await (await fetch('/api/botdetect/nonce')).json();
  BotDetect.collector.setNonce(nonce);

  const signals = await BotDetect.collector.collect();

  const resp = await fetch('/api/botdetect/verify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ signals, nonce })
  });
  const { verdict, score, proof, friction } = await resp.json();

  document.getElementById('botdetect-proof').value = proof;
  document.getElementById('login-form').submit();
}

5. 在服务端验证

root@kitploit:~
app.post('/api/login', (req, res) => {
  const bd = req.session.botdetect;
  if (!bd) return res.status(403).json({ error: 'no_verification' });
  if (bd.verdict === 'bot') return res.status(403).json({ error: 'access_denied' });
  if (bd.verdict === 'suspicious') return challengeCaptcha(req, res);
  res.json({ success: true });
});

客户端 API

Collector(单例)

root@kitploit:~
import Collector from './collector/Collector';
// 或通过全局变量:BotDetect.collector

Detector(仅调试用)

root@kitploit:~
import Detector from './detector/Detector';

警告:analyze() 完全在浏览器中运行。切勿将其输出用于生产决策。

类型定义

root@kitploit:~
interface DetectionResult {
  name: string;      // 模块名称
  score: number;     // 0.0 – 1.0
  weight: number;    // 1 – 10(重要性)
  detail?: string;   // 人类可读描述
}

interface DetectionVerdict {
  verdict: 'bot' | 'suspicious' | 'human';
  score: number;       // 0.0 – 1.0
  confidence: number;  // 0.0 – 1.0
  signals: DetectionResult[];
  threshold: number;
  friction: 'monitor' | 'challenge' | 'block';
}

interface CollectorConfig {
  detectionTimeoutMs: number;   // 每个模块超时(默认:3000)
  enableTraps: boolean;
  enableBehavioralTracking: boolean;
  enableHoneypots: boolean;
  thresholds: { strict: number; balanced: number; relaxed: number };
}

服务端集成

Express 中间件

root@kitploit:~
const { createBotDetectEndpoint } = require('./server');

const { router, generateProofOfWork, cleanup } = createBotDetectEndpoint({
  secretSalt: process.env.BOTDETECT_SALT,
  scoring: {
    threshold: 'balanced',       // 'strict' | 'balanced' | 'relaxed' | number
    minSignals: 2,
    signalBoostThreshold: 0.8,
    frictionThresholds: { monitor: 0.2, challenge: 0.5, block: 0.8 }
  },
  nonce: { ttl: 300000 },              // 5 分钟 nonce 过期
  noScript: { timeout: 10000 },         // 10 秒无脚本窗口
  rateLimit: { maxRequests: 10, windowMs: 60000 },
  noScriptPaths: ['/api/login', '/api/checkout', '/api/register']
});

app.use('/api', router);

端点

端点方法用途
/api/botdetect/nonceGET发放一次性 nonce
/api/botdetect/verify

服务端响应格式

root@kitploit:~
{
  "verdict": "human",
  "score": 0.125,
  "confidence": 0.85,
  "tamperScore": 0,
  "friction": "monitor",
  "threshold": 0.5,
  "proof": "a1b2c3d4e5f6..."
}

服务端评分(Node.js)

root@kitploit:~
const { computeVerdict, RateLimiter, NonceManager } = require('./scoring');

const verdict = computeVerdict(signals, {
  threshold: 'balanced',
  minSignals: 2,
  signalBoostThreshold: 0.8,
  frictionThresholds: { monitor: 0.2, challenge: 0.5, block: 0.8 }
});

// 检测到信号篡改时,verdict.tamperScore > 0

检测模块

自动化框架(权重 5–7)

Playwright 专用(权重 3–4)

模块检测内容权重
playwrightWebKitWebKit 自动化痕迹4
playwrightOrientation方向 + chrome.runtime 不一致3

行为分析(权重 7)

模块分析信号权重
behavioralAnalysis鼠标曲率 + 直线比例、按键 CV + 爆发模式 + KPM、滚动加速度 + 方向变化、触摸力方差 + 半径7

浏览器指纹识别(权重 3–4)

Navigator 与操作系统属性(权重 5)

模块检测内容权重
navigatorInconsistencies11 项检查:languages、plugins、mimeTypes、platform、UA、cookies、DNT、touch、hardwareConcurrency、deviceMemory、connection5

屏幕与性能(权重 3)

模块检测内容权重

主动陷阱与蜜罐(权重 8–9)

模块检测内容权重
honeypotTraps随机隐藏字段 + 诱饵 + 金丝雀端点9
stackTraceTrapsquerySelector// 调用者栈分析

网络与上下文(权重 1–2)

白名单(权重 0)

模块检测内容权重
verifiedBots20+ 已知爬虫(Googlebot、Bingbot、Yandex、Facebook、Twitter 等)——返回 -1,排除评分0

配置

Collector

root@kitploit:~
const collector = Collector.getInstance({
  detectionTimeoutMs: 1000,    // 降低以提升用户体验
  enableTraps: true,
  enableBehavioralTracking: true,
  enableHoneypots: true,
  thresholds: {
    strict: 0.3,     // 严格(登录、结账)
    balanced: 0.5,   // 默认
    relaxed: 0.7     // 宽松(内容浏览)
  }
});

Detector(仅调试用)

root@kitploit:~
const detector = Detector.getInstance({
  threshold: 'balanced',      // 'strict' | 'balanced' | 'relaxed' | number
  minSignals: 2,              // 提升前最少信号数
  signalBoostThreshold: 0.8,  // 高于此阈值的信号额外加权
  failPolicy: 'open',         // 'open' = 出错时判定为人类,'closed' = 出错时判定为机器人
  frictionThresholds: {
    monitor: 0.2,
    challenge: 0.5,
    block: 0.8
  }
});

服务端

root@kitploit:~
createBotDetectEndpoint({
  secretSalt: process.env.BOTDETECT_SALT,  // 保持秘密
  scoring: { threshold: 'balanced' },
  nonce: { ttl: 300000, cleanupInterval: 60000 },
  noScript: { timeout: 10000 },
  rateLimit: { maxRequests: 10, windowMs: 60000 },
  requestFingerprint: true,                // 将 PoW 绑定到请求属性
  noScriptPaths: ['/api/login', '/api/checkout']
});

生产环境检查清单

安全

  • secretSalt 存储在环境变量中,绝不写在代码里
  • 启用 HTTPS + HSTS
  • CORS 限制为你的域名
  • Nonce TTL 设为 ≤ 5 分钟
  • 定期轮换会话密钥
  • 按端点配置速率限制
  • 启用请求指纹绑定

性能

  • 调整 detectionTimeoutMs(推荐 1000–2000ms)
  • 对现代浏览器使用精简包(botdetect-clean.min.js)
  • 在敏感操作前,空闲时预加载检测
  • 在生产中监控采集延迟(performance.measure)

监控

  • 记录 tamperScore > 0 的事件(信号作弊尝试)
  • 跟踪 friction === 'block' 比率随时间变化
  • 当速率限制阈值被突破时发出警报
  • 每季度审查检测效果(机器人不断进化)

测试

root@kitploit:~
npm test              # 74 个 Jest 测试,跨越 6 个测试套件
npm run typecheck     # TypeScript 严格模式
npm run lint          # ESLint
npm run build         # Webpack 生产打包

许可证

Apache — Lahmeri Mohamed Amine

下载工具
方法返回类型描述
getInstance(config?)Collector单例访问器
configure(config)void运行时更新配置
getConfig()CollectorConfig当前配置
init()void惰性初始化陷阱、跟踪、蜜罐
enableTraps()void在 DOM API 上安装堆栈跟踪陷阱
enableBehavioralTracking()void开始鼠标/键盘/滚动监控
enableHoneypots(container?)void安装蜜罐字段
collect()Promise<DetectionResult[]>运行所有检测
setNonce(nonce)void存储服务端下发的 nonce
getSessionId()string唯一会话标识符
getFingerprint()string会话指纹哈希
resetBehavioralData()void清除行为数据
destroy()void清理所有监听器和 DOM 元素
方法返回类型描述
getInstance(config?)Detector单例访问器
configure(config)void更新配置
analyze(results)DetectionVerdict评分 + 分类(仅本地调试)
handleError(error)DetectionVerdict失败回退判定
POST
提交信号,接收签名判定
/api/botdetect/midcyclePOST会话中途重新验证
模块检测内容权重
webdrivernavigator.webdriver、selenium 属性、getter 描述符5
chromeDriverwindow 上的重复内置属性、document 中的 cache_6
fakeCreateElement伪造的 document.createElement7
toStringSpoofedFunction.prototype.toString 篡改6
cdpDetectioncdc_*、__playwright__、__puppeteer__ 全局变量、chrome.runtime7
stealthDetection原生函数完整性(Notification、Navigator、Permissions、plugins、languages、canvas)5
inconsistentCloneError结构化克隆算法不一致5
iframeChromeRuntimeiframe 上下文中的 chrome.runtime5
inconsistentChromeObjectchrome 对象在 iframe 与主窗口间不一致4
模块检测内容权重
canvasFingerprintCanvas 渲染差异、像素和、空白画布比例4
webglFingerprintSwiftShader、llvmpipe、Brian Paul 渲染器、着色器精度4
fingerprintConsistency交叉验证:canvas + WebGL + screen + navigator 一致性4
audioFingerprintAudioContext 采样率、频率数据异常3
fontEnumeration有限字体集(≤15 基础字体 → 无头)3
timingAnomaliesperformance.now() 分辨率、循环计时、rAF 延迟、eval 延迟3
screenAnomalies
零尺寸、色彩深度、可用空间不一致
3
performanceAnomalies导航时间、内存、时间原点、performance.now()3
navigationFlow性能条目、pushState 跟踪、缺少 referrer3
getElementById
eval
8
模块检测内容权重
webrtcCheck本地 IP 暴露、ICE 候选异常2
hardwareConcurrencyCPU 核心数与内存比例、不合理值2
hiddenScroll无头浏览器中隐藏滚动条(仅桌面)2
noHovermq不支持 hover 媒体查询(仅桌面)1
webGLDisabledWebGL 被禁用、SwiftShader1
inconsistentPermissionsPermission API 状态不一致4