Show HN: Imrobot – 인간이 아닌 AI 에이전트를 확인하는 역방향 CAPTCHA

hackernews | | 📦 오픈소스
#ai 에이전트 #captcha #hn #review #보안 #웹 자동화
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

'Imrobot'는 사람이 아닌 AI 에이전트임을 검증하는 역방향 CAPTCHA 기술로, 사용자가 에이전트 전용 API에 무단 접근하는 것을 방지합니다. 이 시스템은 LLM이 쉽게 풀 수 있는 결정론적 문제를 생성하고, 상태가 없는 HMAC-SHA256 암호화 서명을 활용해 데이터베이스 의존도 없이 무결성을 보장합니다. 또한, 검증된 에이전트에는 이후 요청 시 사용할 수 있는 JWT 형식의 증명 토큰을 발급하며, A2A 패턴 기반의 자동 발견 기능을 통해 다양한 프레임워크와의 호환성을 지원합니다.

본문

Traditional CAPTCHAs prove you're human. But what about the opposite? As AI agents become first-class web citizens — browsing, booking, purchasing, automating — some systems need to verify their visitors are legitimate AI agents, not humans trying to bypass agent-only access. Think agent-facing APIs, AI-only platforms, or multi-agent authentication. imrobot flips the CAPTCHA model: it generates deterministic challenge pipelines that are trivial for any LLM or programmatic agent to solve ( { console.log('Robot verified!', token) }} /> ) } import { ImRobot } from 'imrobot/vue' function handleVerified(token) { console.log('Robot verified!', token) } script> import ImRobot from 'imrobot/svelte' script> console.log('Robot verified!', token)} /> import { register } from 'imrobot/web-component' register() // registers document.querySelector('imrobot-widget') .addEventListener('imrobot-verified', (e) => { console.log('Robot verified!', e.detail) }) import { generateChallenge, solveChallenge, verifyAnswer, } from 'imrobot/core' const challenge = generateChallenge({ difficulty: 'medium' }) const answer = solveChallenge(challenge) const isValid = verifyAnswer(challenge, answer) // true For production use, the server SDK provides tamper-proof, stateless challenge verification using HMAC-SHA256. No database required — the cryptographic signature ensures integrity. import { createVerifier } from 'imrobot/server' const verifier = createVerifier({ secret: process.env.IMROBOT_SECRET!, // min 16 chars difficulty: 'medium', }) // API route: generate a signed challenge app.get('/api/challenge', async (req, res) => { const challenge = await verifier.generate() res.json(challenge) // includes HMAC signature }) // API route: verify agent's answer (stateless) app.post('/api/verify', async (req, res) => { const { challenge, answer } = req.body const result = await verifier.verify(challenge, answer) // result: { valid: true, elapsed: 42, suspicious: false } // or: { valid: false, reason: 'wrong_answer' | 'expired' | 'invalid_hmac' | 'tampered' } res.json(result) }) The server verifier checks in order: HMAC signature validity (challenge and pipeline not tampered), expiration (challenge not expired), and answer correctness (pipeline re-executed). A different secret on a different server will reject the challenge — preventing cross-site replay attacks. Protect your API endpoints with framework-agnostic middleware. Verified agents receive a JWT-like Proof-of-Agent token (HMAC-SHA256 signed) that they pass via X-Agent-Proof header on subsequent requests. import { requireAgent, createAgentRouter } from 'imrobot/server' // Mount challenge/verify endpoints const router = createAgentRouter({ secret: process.env.IMROBOT_SECRET! }) app.get('/imrobot/challenge', router.challenge) app.post('/imrobot/verify', router.verify) // Protect routes — only verified agents can access const agentOnly = requireAgent({ secret: process.env.IMROBOT_SECRET!, rateLimit: { windowMs: 60_000, maxRequests: 30 }, }) app.get('/api/data', agentOnly, (req, res) => { res.json({ agent: req.agentProof }) }) For agents that need to verify themselves programmatically without any UI: import { invisibleVerify } from 'imrobot/core' const result = await invisibleVerify({ challengeUrl: 'https://api.example.com/imrobot/challenge', verifyUrl: 'https://api.example.com/imrobot/verify', agentId: 'my-bot-v1', maxRetries: 3, }) if (result.success) { // Use result.proofToken in X-Agent-Proof header fetch('/api/protected', { headers: { 'X-Agent-Proof': result.proofToken! }, }) } Built-in CLI for testing, benchmarking, and inspecting challenges: npx imrobot challenge --difficulty hard npx imrobot solve --difficulty medium npx imrobot benchmark --count 1000 npx imrobot info Inspired by the A2A Agent Card pattern, imrobot supports a discovery endpoint that lets AI agents automatically find and interact with your imrobot-protected service. import { createDiscoveryHandler, createAgentRouter, requireAgent } from 'imrobot/server' // Mount the discovery endpoint const discovery = createDiscoveryHandler({ challengePath: '/imrobot', name: 'My Agent API', description: 'Agent-verified data service', }) app.get('/.well-known/imrobot.json', discovery) // Mount challenge/verify as usual const router = createAgentRouter({ secret: process.env.IMROBOT_SECRET! }) app.get('/imrobot/challenge', router.challenge) app.post('/imrobot/verify', router.verify) Agents fetch /.well-known/imrobot.json and receive a structured document describing the protocol, endpoint paths, supported difficulty levels, and step-by-step instructions for completing verification: { "protocol": "imrobot", "version": "1.0", "endpoints": { "challenge": "/imrobot/challenge", "verify": "/imrobot/verify", "proofHeader": "X-Agent-Proof" }, "difficulties": ["easy", "medium", "hard"], "instructions": "1. GET the challenge endpoint..." } For framework-agnostic usage (Hono, Koa, Fastify, etc.), use buildDiscoveryDocument() directly: import { build

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →