메뉴
HN
Hacker News • 54일 전

스마트폰에서 구동되는 오프라인 AI 모의해킹 에이전트

IMP
7/10
핵심 요약

해커뉴스에 'Nightcrawler'라는 모의해킹(Pentesting) 에이전트가 소개되었습니다. 이 시스템은 스마트폰에 소형 AI 모델(LFM2.5-1.2B)과 해킹 툴을 탑재하여 클라우드나 인터넷 연결 없이도 완전히 자율적으로 네트워크 정찰, 취약점 발굴, 침투 및 보고서 생성을 수행합니다. 별도의 서버 없이 오프라인 모바일 환경에서 은밀하고 독립적인 보안 점검을 수행할 수 있다는 점이 가장 큰 의의가 있습니다.

번역된 본문

Nightcrawler는 스마트폰에서 완전히 독립적으로 실행되는 자율적 모의해킹(Penetration testing) 에이전트입니다. 폰을 대상 네트워크에 투입하고 자리를 비우기만 하면, 기기가 알아서 호스트를 발견하고 서비스를 매핑하며 취약점을 찾아 모의해킹 보고서를 생성합니다. 이 모든 과정에 클라우드 연결이 전혀 필요 없습니다.

░█▄░█ █ █▀▀ █░█ ▀█▀ █▀▀ █▀█ ▄▀█ █░█░█ █░░ █▀▀ █▀█ ░█░▀█ █ █▄█ █▀█ ░█░ █▄▄ █▀▄ █▀█ ▀▄▀▄▀ █▄▄ ██▄ █▀▄ v0.1.0 자율형 모바일 모의해킹 에이전트 사양: OnePlus 8 · NetHunter · LFM2.5-1.2B · OpenCL GPU

이것은 무엇인가? 모의해킹(펜테스팅)은 실제 공격을 시뮬레이션하여 컴퓨터 네트워크의 보안을 테스트하는 작업입니다(네트워크 소유자의 명시적인 허가가 전제됨). 전문 모의해킹 엔지니어는 실제 공격자가 발견하기 전에 취약점을 찾아내기 위해 고용됩니다. Nightcrawler는 이 과정을 스마트폰에서 자동화합니다. 스마트폰의 GPU에서 로컬로 구동되는 소형 AI 모델(LFM2.5-1.2B-Instruct-Heretic, 12억 개 매개변수)을 사용하여 어떤 호스트를 탐색할지, 어떤 도구를 사용할지, 무엇을 찾아야 할지 등 다음 수행 작업을 스스로 결정합니다. 인터넷 연결이나 클라우드 API가 전혀 필요하지 않습니다.

데모 ▶️ 인스타그램에서 Nightcrawler의 실제 작동 영상 보기

작동 방식

  • WiFi 침투(선택 사항): WiFi가 없는 환경에 투입될 경우, 외장 USB WiFi 어댑터를 사용하여 자율적으로 WPA2 네트워크를 크래킹할 수 있습니다.
  • 정찰(Reconnaissance): 은밀한 스캔을 사용하여 네트워크의 기기를 발견합니다.
  • 열거(Enumeration): 발견된 서비스(웹 서버, 파일 공유, SSH, DNS 등)를 탐색합니다.
  • 익스플로잇(Exploitation): 알려진 취약점 및 기본 자격 증명(비밀번호 등)을 테스트합니다.
  • 보고(Reporting): 발견된 내용과 해결 가이드가 포함된 구조화된 모의해킹 보고서를 생성합니다.

이 에이전트는 인내심 있는 인간 모의해킹 엔지니어처럼 작동합니다. 여러 호스트를 순환하면서 한 번에 하나의 작은 행동만 수행하며, 몇 시간에 걸쳐 점진적으로 정보를 축적합니다. 이로 인해 모든 호스트를 한꺼번에 공격하는 기존의 취약점 스캐너보다 탐지하기 훨씬 어렵습니다.

주요 개념

  • 드롭박스(Drop box): 자율적으로 테스트를 수행하기 위해 대상 네트워크에 설치해 둔(버려둔) 기기
  • 범위(Scope): 테스트할 권한이 부여된 네트워크/호스트의 집합
  • 교전 규칙(Rules of Engagement, ROE): 수행이 허용된 작업을 명시한 법적 문서
  • 은밀성(Stealth): 네트워크 모니터링(IDS/IPS)에 의한 탐지를 회피하기 위한 기술
  • MCP(Model Context Protocol): AI 도구 사용을 위한 표준 인터페이스
  • C2(Command and Control): 에이전트를 모니터링하고 제어하기 위한 웹 대시보드

아키텍처 ┌──────────────────────────────────────────────────────────┐ │ 스마트폰 (OnePlus 8) │ │ │ │ ┌─────────────┐ ┌──────────────────┐ │ │ │ LFM2.5 │ │ 에이전트 루프 │ │ │ │ 1.2B 모델 │◄──►│ (main.py) │ │ │ │ (GPU에서 구동)│ │ 다음 작업 결정 │ │ │ │ (:8080) │ └────────┬─────────┘ │ │ └─────────────┘ │ │ │ │ │ │ ┌────────▼─────────┐ │ │ │ 범위 프록시(Scope)│ ← 안전 계층 │ │ │ 실행 전 모든 명령 │ 위험 행동 및 │ │ │ 검증 │ 범위 벗어남 차단 │ │ └────────┬─────────┘ │ │ │ │ │ ┌────────▼─────────┐ │ │ │ Kali MCP 서버 │ ← 실제 nmap, curl, │ │ │ smbclient 등 실행 │ 해킹 명령어 실행 │ │ └──────────────────┘ │ │ │ │ ┌──────────────────┐ ┌──────────────────┐ │ │ │ 웹 대시보드 │ │ SQLite DB │ │ │ │ (:8888) │ │ 호스트, 취약점, │ │ │ │ 모니터링 및 제어 │ │ 자격증명, 명령어 │ │ │ └──────────────────┘ └──────────────────┘ │ └──────────────────────────────────────────────────────────┘ 전체 시스템 설계는 docs/ARCHITECTURE.md를 참조하십시오.

주요 기능

  • 완전 자율적: 작동 중 인간의 개입이 필요 없음
  • 100% 로컬 추론: 클라우드 없이 스마트폰의 GPU에서만 AI가 구동됨
  • 범위 강제 적용: 2중 방어 계층을 통해 승인되지 않은 네트워크 범위 외의 행동 차단
  • 은밀성 최우선(Stealth-first): 느린 스캔 속도, 호스트 순환, 위장 트래픽 사용, nmap -T2 옵션만 사용
  • 27개의 익스플로잇 플레이북: 자동으로 실행되는 다중 단계 공격 체인
  • 24,956건의 CVE 데이터베이스: 버전을 인식하여 취약점 일치 여부 확인
  • 웹 대시보드: 실시간 모니터링, 호스트 관리, C2 제어 기능
  • WiFi 침투 모드: USB 어댑터를 이용한 자율적 WPA2 크래킹(Pwnagotchi에서 영감 받음)
  • 수동적 발견(Passive discovery): 백그라운드에서 mDNS/NBNS/DHCP/ARP 브로드캐스트 캡처
  • 다중 네트워크 지원: 네트워크별로 데이터 격리, MAC 키 기반 호스트를 통해 DHCP 변경 시에도 유지
  • 자가 복구(Self-healing): 가비지(불필요 데이터) 감지, 컨텍스트 리셋, 와치독, 루프(Stuck) 현상 감지
원문 보기
원문 보기 (영어)
Nightcrawler An autonomous penetration testing agent that runs entirely on a smartphone. Drop the phone on a network, walk away, and it discovers hosts, maps services, finds vulnerabilities, and generates a pentest report — all without cloud connectivity. ░█▄░█ █ █▀▀ █░█ ▀█▀ █▀▀ █▀█ ▄▀█ █░█░█ █░░ █▀▀ █▀█ ░█░▀█ █ █▄█ █▀█ ░█░ █▄▄ █▀▄ █▀█ ▀▄▀▄▀ █▄▄ ██▄ █▀▄ v0.1.0 AUTONOMOUS MOBILE PENTEST AGENT OnePlus 8 · NetHunter · LFM2.5-1.2B · OpenCL GPU What is this? Penetration testing (pentesting) is the practice of testing a computer network's security by simulating an attack — with the network owner's explicit permission. Professional pentesters are hired to find vulnerabilities before real attackers do. Nightcrawler automates this process on a phone. It uses a small AI model (LFM2.5-1.2B-Instruct-Heretic, 1.2 billion parameters) running locally on the phone's GPU to decide what to do next — which host to probe, which tool to use, what to look for. No internet connection or cloud API required. Demo ▶️ Watch Nightcrawler in action on Instagram How it works WiFi Breach (optional) — If dropped without WiFi, it can autonomously crack WPA2 networks using an external USB WiFi adapter Reconnaissance — Discovers devices on the network using stealthy scans Enumeration — Probes discovered services (web servers, file shares, SSH, DNS, etc.) Exploitation — Tests for known vulnerabilities and default credentials Reporting — Generates a structured pentest report with findings and remediation advice The agent operates like a patient human pentester — it rotates across hosts, does one small action per turn, and builds knowledge gradually over hours. This makes it much harder to detect than traditional vulnerability scanners that blast every host at once. Key concepts Term What it means Drop box A device left on a target network to perform testing autonomously Scope The set of networks/hosts you're authorized to test Rules of Engagement (ROE) A legal document specifying what you're allowed to do Stealth Techniques to avoid detection by network monitoring (IDS/IPS) MCP Model Context Protocol — a standard interface for AI tool use C2 Command and Control — the web dashboard for monitoring and steering the agent Architecture ┌──────────────────────────────────────────────────────────┐ │ PHONE (OnePlus 8) │ │ │ │ ┌─────────────┐ ┌──────────────────┐ │ │ │ LFM2.5 │ │ Agent Loop │ │ │ │ 1.2B model │◄───►│ (main.py) │ │ │ │ on GPU │ │ Decides what │ │ │ │ (:8080) │ │ to do next │ │ │ └─────────────┘ └────────┬─────────┘ │ │ │ │ │ ┌────────▼─────────┐ │ │ │ Scope Proxy │ ← Safety layer │ │ │ Validates every │ Blocks out- │ │ │ command before │ of-scope │ │ │ execution │ actions │ │ └────────┬─────────┘ │ │ │ │ │ ┌────────▼─────────┐ │ │ │ Kali MCP Server │ ← Runs the │ │ │ nmap, curl, │ actual │ │ │ smbclient, ... │ commands │ │ └──────────────────┘ │ │ │ │ ┌──────────────────┐ ┌──────────────────┐ │ │ │ Web Dashboard │ │ SQLite DB │ │ │ │ (:8888) │ │ Hosts, vulns, │ │ │ │ Monitor & steer │ │ creds, commands │ │ │ └──────────────────┘ └──────────────────┘ │ └──────────────────────────────────────────────────────────┘ For the full system design, see docs/ARCHITECTURE.md . Features Fully autonomous — no human in the loop during operation 100% local inference — AI runs on the phone's GPU, no cloud needed Scope-enforced — two-layer defense prevents out-of-scope actions Stealth-first — slow scan rates, host rotation, cover traffic, nmap -T2 only 27 exploit playbooks — multi-step attack chains that execute automatically 24,956-entry CVE database — version-aware vulnerability matching Web dashboard — real-time monitoring, host management, C2 controls WiFi breach mode — autonomous WPA2 cracking with USB adapter (Pwnagotchi-inspired) Passive discovery — background capture of mDNS/NBNS/DHCP/ARP broadcasts Multi-network — data isolated per network, survives DHCP changes via MAC-keyed hosts Self-healing — garbage detection, context reset, watchdogs, stuck detection Training capture — logs successful interactions for future model fine-tuning Report generation — downloadable pentest report with vulns, exploit chains, remediation See docs/FEATURES.md for the complete feature reference. Hardware Required Android phone with Kali NetHunter (tested on OnePlus 8, Snapdragon 865) Root access via Magisk 12GB+ RAM (model uses ~1.3GB, Android uses ~4GB, rest for tools) Optional USB WiFi adapter for offline WiFi breach mode (Ralink RT3572 recommended) Custom kernel with MAC80211 for monitor mode ( build guide ) NVIDIA AGX for offloading to a larger model over Tailscale GPU Performance All inference via OpenCL on Adreno 650 GPU: Model Quantization Prompt Speed Generation Speed LFM2.5-1.2B-Instruct-Heretic (production) Q8_0 115 tok/s 13 tok/s Qwen3.5-0.8B Q8_0 30.5 tok/s 6.3 tok/s Qwen3.5-4B Q4_0 10.1 tok/s 2.0 tok/s Note: Android throttles the GPU on battery power (6x slowdown). Nightcrawler includes a GPU governor daemon that forces max performance and auto-throttles at ≤15% battery. Quick Start # 1. Install (inside Kali NetHunter chroot) bash INSTALL.sh # 2. Wait for llama-server to start (~5 min after boot) curl -s http://127.0.0.1:8080/health # Should return {"status":"ok"} # 3. Start all services bash scripts/run-36h.sh # 4. Open the web dashboard (from any device on your Tailscale network) # https://<your-tailscale-hostname>:8888 Dry Run (no real commands executed) NC_DRY_RUN=1 python3 main.py This uses a mock Kali server so you can test the agent loop without executing real network commands. Manual Start (if not using tmux launcher) kali-server-mcp --port 5000 & python3 scope_proxy.py --config config.yaml --port 8800 --upstream http://127.0.0.1:5000 & bash scripts/webui-daemon.sh start python3 main.py & Configuration Edit config.yaml before deployment: mission : id : " CLIENT-YYYY-XXX " # Your engagement ID scope : networks : ["auto"] # "auto" = detect from wlan0 at startup excluded_hosts : ["auto"] # "auto" = gateway + self IP excluded_ports : [502, 503] # SCADA/ICS ports to never touch authorization : " ROE-YYYY-XXX.pdf " max_runtime_hours : 0 # 0 = no limit model : local : ctx_size : 8192 port : 8080 Dynamic scope detection means zero config changes when moving between networks — the agent reads the current subnet from wlan0 at startup. Project Structure nightcrawler/ ├── main.py # Entry point ├── config.yaml # Mission scope + model config ├── scope_proxy.py # Scope enforcement proxy ├── INSTALL.sh # Installer │ ├── agent/ # Core agent logic │ ├── loop.py # Decision loop + error recovery │ ├── planner.py # Phase state machine (recon → exploit) │ ├── llm_client.py # LLM API client (llama.cpp / remote) │ ├── db.py # SQLite backend (hosts, vulns, creds) │ ├── host_memory.py # Per-host observations + auto-tagging │ ├── cve_db.py # 24,956-entry CVE database │ ├── attack_planner.py # Strategic directives for exploit phase │ ├── output_parser.py # Extract structured data from tool output │ ├── offline_manager.py # WiFi breach pipeline state machine │ ├── net_detect.py # Auto-detect network from wlan0 │ ├── cover_traffic.py # Stealth blending with realistic web traffic │ ├── passive_capture.py # Background tcpdump for broadcast traffic │ └── ... │ ├── proxy/ # Scope enforcement components │ ├── scope.py # IP/port/host validation │ ├── rate_limiter.py # Command rate limiting + jitter │ └── command_filter.py # Destructive command blocklist │ ├── webui/ # Web dashboard (Flask) │ ├── server.py # API + stealth middleware │ └── templates/index.html # Dashboard UI │ ├── data/ # Static data files │ ├── cve_exploits.json # CVE→exploit command mappings │ └── playbooks.json # 27 multi-step attack playbooks │ ├── prompts/ # LLM prompt templates (hot-reloadable) ├── scripts/ # Operational scripts (start, stop, watchdogs) ├── tests/ # Test suites (API, UI, offline mode) ├── kernels/ # WiFi driver modules + kernel docs ├── simulation/ # Dry-run mock server ├── docs/ # Architecture, GPU setup, features ├── logs/ # Runtime