winbox-mcp
winbox-mcp
EN: A disposable Windows Sandbox MCP server over SSH — test Excel add-ins and installers, and dynamically analyze unknown .exe files (stdlib Python + PowerShell).
한국어 | English

SSH 한 줄로 붙는, 일회용 Windows 샌드박스 MCP 서버. 엑셀 애드인·설치 프로그램 시험과 리버스 엔지니어링 실험(모르는 exe 실행)을 깨끗한 Windows에서 하고, 끝나면 통째로 버린다.
Python 표준 라이브러리 + PowerShell만 사용.
pip install, Node, npm 없음.호스트 쪽에 포트를 열지 않는다. MCP 통신은 SSH 표준입출력, 호스트↔샌드박스는 공유 폴더 우편함 하나.
그래서 네트워크를 끈 샌드박스에서도 같은 도구가 그대로 동작한다.
맥/리눅스 에이전트 ──ssh(-T)──▶ Windows 호스트: winbox.py (MCP)
│ 공유 폴더 우편함 (mail\req.json → mail\res)
▼
Windows Sandbox: guest\agent.ps1
(네트워크 on/off, 종료 시 전부 삭제)언제 유용한가
이럴 때 | winbox로 하는 일 | 상태 |
만든 설치기·ZIP 배포본이 남의 깨끗한 PC에서도 되는지 | 매번 새 샌드박스에 | ✅ 바로 사용 |
설치기가 어디에 뭘 깔고, 지운 뒤 뭐가 남는지 (폴더·레지스트리·예약작업·자동실행) | 설치 전후·제거 후 | ✅ 실측 (심어 둔 3종 모두 탐지) |
출처가 애매한 exe·외부 도구를 내 PC에 깔기 전에 맛보기 |
| ✅ 바로 사용 |
맥/리눅스의 AI 에이전트가 Windows에서만 되는 확인을 해야 할 때 (PowerShell, 한국어 Windows 동작) | SSH 한 줄로 샌드박스에서 | ✅ 바로 사용 |
엑셀 애드인이 엑셀 안에서 실제로 뜨는지 | 매번 Office 오프라인 설치 후 확인 | ⚠️ 미실측 (샌드박스에 Office 없음) |
안 맞는 경우: 진짜 악성코드 분석(샌드박스 탈출은 못 막는다 — 전용 분석 PC 사용), 버튼을 눌러 보는 UI 자동화(일부러 뺐다), 호스트 PC가 꺼져 있거나 콘솔에 로그인 안 된 상태.
Related MCP server: Windows Management MCP Server
준비물 (Windows 호스트)
Windows 10/11 Pro·Enterprise·Education (Home은 샌드박스 없음), 가상화 켜짐
Windows 기능 켜기/끄기→ Windows 샌드박스 체크 → 재부팅OpenSSH 서버 (Tailscale 등으로 원격 접속 가능하면 됨)
Python 3.9+ (
py -3)맥/리눅스에서
./install.sh <user>@<호스트>— 호스트 홈의winbox-mcp로 복사하고 자가검사까지 돌린다호스트 콘솔에 로그인된 상태여야 한다 — 샌드박스 창은 로그인된 데스크톱 세션에 뜬다. SSH로 불러도 winbox가 예약 작업(
schtasks /IT)으로 그 세션에 띄워 준다.
에이전트에 붙이기
SSH 키 로그인이 되어 있어야 한다(비밀번호 프롬프트가 뜨면 MCP가 멈춘다). 아래 어느 쪽이든 결국 같은 한 줄이다:
ssh -T -o BatchMode=yes <user>@<호스트> "py -3 winbox-mcp\winbox.py"
Claude Code — 플러그인 (MCP 서버 + 사용법 스킬이 같이 깔린다)
claude plugin marketplace add kims6305-bjk/winbox-mcp
claude plugin install winbox@winbox --config host=<user>@<호스트>Hermes — config.yaml에 넣고, 사용법 스킬은 skills/winbox를 ~/.hermes/skills/로 복사
mcp_servers:
winbox:
command: ssh
args: ["-T", "-o", "BatchMode=yes", "<user>@<호스트>", "py -3 winbox-mcp\\winbox.py"]
timeout: 900Codex CLI
codex mcp add winbox -- ssh -T -o BatchMode=yes <user>@<호스트> "py -3 winbox-mcp\winbox.py"그 밖의 MCP 클라이언트도 command: ssh와 위 인자만 넣으면 된다.
도구 11개
도구 | 하는 일 |
| 깨끗한 샌드박스 부팅. |
| 켜져 있나, 꺼져 있으면 다른 에이전트가 쓰는 중인지 |
| 지금 샌드박스를 버리고 새것으로 (자리는 놓지 않음) |
| 반복 시험 1회: 새 샌드박스 → 스냅샷 → 파일 넣기 → 실행 → 스냅샷 → 비교 |
| 샌드박스 안에서 PowerShell 실행 → 종료코드·stdout·stderr (시간 제한) |
| 호스트 파일·폴더를 샌드박스 |
| 샌드박스 파일을 호스트로 꺼내기 |
| 화면 PNG |
| 파일·레지스트리·COM 등록·서비스·예약작업·프로세스·TCP 연결·DNS 기록 |
| 두 스냅샷 비교 — 생긴 것/지워진 것/바뀐 것 |
| 샌드박스 폐기. 산출물 폴더( |
쓰는 법 — 대표 시나리오
1) 엑셀 애드인·설치기 시험 (깨끗한 PC에서 되나?)
box_start → box_snapshot before → box_copy_in setup.exe → box_exec "& C:\winbox\in\setup.exe /quiet"
→ box_snapshot installed → box_diff before installed # 무엇을 어디에 깔았나 (AddIns·XLSTART·HKCU\Software\Microsoft\Office·CLSID)
→ (제거 실행) → box_snapshot removed → box_diff before removed # 지운 뒤 찌꺼기
→ box_stop샌드박스에는 Office가 없다. 엑셀 안에서 애드인이 실제로 뜨는지까지 보려면 매번 Office를 설치해야 한다
(Office 배포 도구로 호스트에 설치 원본을 한 번 받아 두고 box_copy_in → 오프라인 설치). 이 경로는 아직 실측 전이다.
2) 리버스 엔지니어링 실험 (모르는 exe가 실제로 뭘 하나?)
box_start network=off → box_snapshot before → box_copy_in sample.exe
→ box_exec "Start-Process C:\winbox\in\sample.exe; Start-Sleep 60"
→ box_snapshot after → box_diff before after # 자동실행·서비스·예약작업·새 파일·연결 시도·DNS 조회
→ box_screenshot → box_stopProcmon·x64dbg 같은 분석 도구는 샌드박스에 없다. 필요하면 포터블판을 box_copy_in으로 넣는다.
3) 고치고 다시 깔아 보기 (반복)
빌드를 고칠 때마다 box_trial 한 번이면 된다. 매번 깨끗한 샌드박스에서 시작하고, {in}은 넣은 파일 경로로 바뀐다.
box_trial host_path=C:\build\MyAddin command="& {in} /quiet" # 1회차: 실패 → 고침
box_trial host_path=C:\build\MyAddin command="& {in} /quiet" # 2회차: 새 샌드박스에서 다시
box_trial ... clean=false snapshot=false # 빨리 돌릴 땐 같은 샌드박스·스냅샷 생략같은 이름의 파일·폴더를 다시 넣으면 덮어쓴다.
여러 에이전트가 같이 쓸 때
Windows 샌드박스는 호스트에 한 대뿐이다. 그래서 winbox는 호스트 전역 잠금(%LOCALAPPDATA%\winbox\lock.json)으로 자리를 나눈다.
누가 쓰는 중이면
box_start가 "다른 에이전트가 사용 중: (pid, 시작 시각)"으로 거절한다.box_start wait_s=600처럼 주면 자리가 날 때까지 줄을 선다.owner(또는 환경변수WINBOX_OWNER)로 이름표를 단다.box_status가 지금 누가 쓰는지 알려 준다.쓰던 winbox가 죽으면 잠금 주인이 없어진 것으로 보고 다음 사람이 넘겨받는다. 남은 샌드박스는 그때 치운다.
샌드박스 없이 배선만 시험
WINBOX_LOCAL=1이면 샌드박스 대신 호스트에서 에이전트를 직접 띄운다. SSH·MCP·우편함 배선 점검용이며 격리가 없으니
신뢰하는 명령만 쓴다. 이 모드에서 에이전트는 절대 컴퓨터를 끄지 않는다(종료 명령은 샌드박스 전용 계정 WDAGUtilityAccount에서만 실행).
보안 메모
샌드박스는 Hyper-V로 분리된 별도 커널이고, 닫으면 안의 모든 것이 지워진다.
클립보드·마이크·카메라·프린터 연결은 꺼져 있다.
호스트와 공유하는 폴더는 3개뿐:
tools(읽기 전용),in(읽기 전용),mail(읽고 쓰기).mail폴더는 샌드박스 안에서 쓸 수 있으니 꺼내온 결과물은 믿지 않는 자료로 다룬다. winbox는 거기서 JSON·PNG를 읽기만 하고 실행하지 않는다.에이전트는 30분 동안 요청이 없으면 샌드박스를 스스로 끈다. MCP 연결이 정상 종료되면 바로 정리하고, 강제로 끊긴 경우는 이 30분 유휴 종료에 맡긴다.
샌드박스 탈출 취약점까지 막아 주지는 않는다. 진짜 악성코드 분석은 전용 분석 PC를 쓴다.
실측 메모 (v0.2.2)
맥 → Tailscale SSH → Windows 11 호스트(24H2, 26100 샌드박스)에서 진짜 Windows 샌드박스로 확인한 것:
부팅: 기능 켠 뒤 첫 부팅 72초, 이후 11~13초.
box_exec왕복 약 1.5초(대부분 PowerShell 기동 시간). 한글 출력·종료코드·stderr·시간초과 정상, 계정은WDAGUtilityAccount.network=off: 네트워크 어댑터 0개, 외부 접속 실패 확인.빈 샌드박스 스냅샷: 1장 약 3MB·약 17초(파일 4,494개·레지스트리 6,121값). 실사용 PC(219MB·4분)보다 훨씬 작다.
설치 전후 비교: 심어 둔 애드인(
AddIns\winbox-test.xlam), 엑셀 자동로드(Excel\Options\OPEN), 예약작업(\wbtest)을 모두 잡았다.화면 캡처: 샌드박스 바탕화면이 정상으로 찍힌다(2032×1111).
두 에이전트 동시 접속(로컬 모드): A가 쓰는 동안 B는 즉시 거절,
wait_s로 줄 선 B는 A가 놓은 직후 자리를 받았다.
실측으로 찾아 고친 것
샌드박스 공유 폴더는 새 파일 이름을 늦게 보여 준다. 호스트가 새로 만든 파일은 샌드박스 안에서 약 20초 주기로만 나타나지만, 이미 있는 파일의 내용 변경은 0.4초 안에 보였다. 그래서 요청은 새 파일 대신
req.json한 개를 덮어써서 보낸다(왕복 20초 → 1.5초).box_copy_in은 샌드박스 쪽에서 파일이 실제로 보일 때까지 기다린 뒤 돌아온다.한국어 Windows에서
tasklist출력 디코딩이 깨져 잠금 확인이 죽던 문제."네트워크 서버에 너무 많은 세션이 설정되어 있습니다" 창이 뜨며 부팅이 안 되던 문제. 샌드박스 창을 죽여도 VM은 계속 살아 있었고, 그 상태에서 새 샌드박스를 띄우면 이 창이 뜬다. 이제 종료 때 VM을
hcsdiag kill로 직접 끄고 완전히 내려갈 때까지 기다린다. 쓰던 에이전트가 강제종료돼도 다음 에이전트가 13초 만에 넘겨받고,box_reset은 30초에서 13초로 줄었다. (hcsdiag는 관리자 권한이 필요해서 SSH 계정이 관리자가 아니면 남은 VM을 직접 정리해야 한다.)
아직 실측 전: 샌드박스 안에 Office를 깔아 엑셀에서 애드인이 실제로 뜨는지, Codex 등록.
원본 계열 도구보다 작은 이유
비슷한 공개 도구들은 Windows 앱 개발자용이라 MSIX 패키지, 런타임 자동 설치, 화면 녹화, UI 자동화, 다른 에이전트용 포장 여러 벌을 함께 싣는다. winbox는 애드인·설치기 시험과 동적 분석 두 용도만 본다. 대신 그 두 용도에 필요한 것 — 설치 전후 비교, 반복 시험, 여러 에이전트 줄 서기 — 은 넣었다.
일부러 뺀 것
UI 자동화(버튼 찾아 누르기), 화면 녹화, MSIX 앱, 런타임 자동 설치. 엑셀 화면을 직접 눌러 봐야 할 때 UI 자동화부터 붙인다.
시험
python3 test_winbox.py # 어디서나 (설정 생성·비교·잠금·MCP 응답)
WINBOX_HOST=<user>@<호스트> python3 mcp_probe.py local < steps.json # SSH 너머 실제 왕복 (WINBOX_LOCAL)Glama
This server is listed on Glama. There you can browse its tools, check its quality score, and try it online with MCP Inspector before installing.
라이선스
AGPL-3.0 — LICENSE·NOTICE 참고. 상업 이용을 포함해 자유롭게 쓰고 고치고 재배포할 수 있지만, 고친 버전은 (네트워크 서비스로만 돌려도) 소스를 AGPL-3.0으로 공개해야 합니다.
Available Tools
11 toolsbox_copy_inCopy file into sandboxAIdempotent
Copy a file or folder from the Windows host into the sandbox at C:\winbox\in<name> (read-only inside the sandbox) and wait up to 90 s until the guest can see it. Overwrites a previously copied item with the same name. Returns the guest path to pass to box_exec. Requires a running sandbox.
Inputs: host_path (required).
box_copy_outCopy file out of sandboxAIdempotent
Copy a file or folder from inside the sandbox to the host run folder (\mail\out<name>), overwriting an existing item of the same name. Returns the host path. Use before box_stop/box_reset to keep results. Requires a running sandbox.
Inputs: guest_path (required).
box_diffDiff two snapshotsARead-onlyIdempotent
Compare two snapshots taken with box_snapshot in this sandbox run and list what was added, removed or changed in each section (up to 40 items per kind shown). Does not touch the sandbox; writes the full diff to \mail\out\diff--.json on the host and returns its path.
Inputs: after (required), before (required).
box_execRun PowerShell in sandboxADestructive
Run a PowerShell command inside the running sandbox and wait for it. Returns JSON with exit, stdout, stderr, timed_out and ms. Side effects are whatever the command does, confined to the sandbox (it can reach the internet if network='on'). Requires box_start first. Use box_trial for a full copy-run-diff cycle.
Inputs: command (required), timeout_s.
box_resetReset sandboxADestructive
Discard the current sandbox and boot a clean one while keeping the lock, so no other agent can grab it in between. Everything inside the old sandbox is lost; its host run folder (outputs, snapshots) is kept. Memory size is reused. Requires a running sandbox (otherwise use box_start). Use between install attempts; box_trial does this for you when clean=true.
Inputs: network.
box_screenshotScreenshot sandboxARead-onlyIdempotent
Capture the sandbox desktop and return it as a PNG image plus the host path where it was saved (\mail\out\shot-HHMMSS.png). Does not change sandbox state. Use to check installer dialogs or GUI state. Requires a running sandbox.
Inputs: no named parameters.
box_snapshotSnapshot sandbox stateA
Record the sandbox's system state (files, registry, services, scheduled tasks, autoruns, processes, network connections, DNS cache) under a name, for later comparison with box_diff. Saved as \mail\out\snap-.json; reusing a name overwrites it. May take several minutes (limit 600 s). Returns per-section item counts. Requires a running sandbox.
Inputs: name (required).
box_startStart sandboxA
Boot a fresh, disposable Windows Sandbox VM and take the host-wide sandbox lock; call this first, then box_exec/box_copy_in/box_snapshot, and box_stop when done (box_trial starts one automatically). Blocks until the in-guest agent is ready (up to 240 s). Fails if this session already has a sandbox (use box_reset), if another agent holds the lock and wait_s runs out, or if a sandbox opened outside winbox is running. A lock left by a dead winbox process is taken over and its leftover sandbox is killed. Returns the boot time and the host run folder.
Inputs: owner, wait_s, network, memory_mb.
box_statusSandbox statusARead-onlyIdempotent
Read-only check of whether this session has a running sandbox (run folder, network mode); if not, reports which other agent (owner, pid, since) holds the host-wide lock, if any. Use before box_start to see if the sandbox is free.
Inputs: no named parameters.
box_stopStop sandboxADestructiveIdempotent
Destroy the sandbox (everything inside it is deleted) and release the host-wide lock. Files already copied out, screenshots, snapshots and diffs stay in the host run folder, whose path is returned. Safe to call again: returns an 'already off' message. Also happens automatically when the MCP client disconnects.
Inputs: no named parameters.
box_trialInstall trial (copy, run, diff)ADestructive
One full install-and-observe iteration in a single call: (start if none is running, or reset if clean=true) -> snapshot 'pre' -> copy host_path in -> run command -> snapshot 'post' -> diff. Returns exit code, duration, the last 4000 chars of stdout and 2000 of stderr, and the change summary. Overwrites earlier 'pre'/'post' snapshots. Destroys the previous sandbox state when clean=true. Use box_exec/box_snapshot/box_diff instead for finer control.
Inputs: command (required), host_path (required), clean, network, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a distinct trigger condition and lifecycle role: box_start fails if a sandbox exists, box_reset requires one, box_status is explicitly read-only, and box_stop is idempotent. The only overlap is the composite box_trial versus box_exec/box_snapshot/box_diff, but the descriptions explicitly state box_trial is the one-shot wrapper and the individual tools are for finer control, so an agent can pick correctly.
All tools share a uniform box_ prefix with lowercase snake_case, which makes the set scannable. Minor deviation: some suffixes are verbs (start, stop, reset, exec) while others are nouns (status, screenshot, snapshot, diff), so the pattern is not strictly verb_noun.
Eleven tools map cleanly onto the sandbox lifecycle (start/reset/stop/status), execution (exec, trial), file transfer (copy_in/copy_out), and inspection (screenshot, snapshot, diff). No tool appears redundant or vestigial, and the count sits comfortably in the well-scoped range.
The surface covers the full VM lifecycle plus the install-and-observe loop, which is the stated domain, with no dead ends for the core workflow. Minor gaps remain: no way to list or delete named snapshots, no in-sandbox file read/listing without a round-trip copy_out, and network mode is only implied as a box_start parameter rather than exposed as its own control.
Maintenance
Related MCP Connectors
Remote MCP access to a real Windows, macOS, Linux or Android machine. Outbound only.
Windows MCP server for AI agents (WebGL browser QA, MS Office COM, NVENC) via x402 USDC.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
Air-gapped gVisor cyber range, AD/MCP security lab & anti-cheat benchmark for AI pentest agents.
Related MCP Servers
AlicenseAqualityCmaintenanceMCP server to give every agent an ephemeral Linux sandboxes for executing shell commands.153MIT- AlicenseNot gradedqualityDmaintenanceA Python-based MCP server for local Windows diagnostics, task management, cleanup, hardware inspection, security checks, and administrative workflows.80 PyPI6MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that executes caller-supplied Python code in a network-isolated, locked-down sandbox and returns stdout/stderr/exit code. Supports stdio, HTTP, and SSE transports with optional auth.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that discovers Korean e-Government and financial websites and launches them in a clean disposable Windows Sandbox (or macOS macSandbox) without requiring security software installation. It handles search and sandbox execution, leaving authentication and actual tasks to the user.2AGPL 3.0