{"id":25363460,"url":"https://github.com/reanschwarzer9029/capev2-kvm-docker","last_synced_at":"2026-02-11T20:05:30.462Z","repository":{"id":277346686,"uuid":"932114282","full_name":"ReanSchwarzer9029/CAPEv2-KVM-Docker","owner":"ReanSchwarzer9029","description":"CAPEv2-KVM-Docker is a straightforward guide for setting up KVM and CAPEv2. I do not claim credit for CAPEv2 - this repository simply provides setup instructions.","archived":false,"fork":false,"pushed_at":"2025-02-19T05:37:03.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T11:01:47.500Z","etag":null,"topics":["capev2","docker-compose","guide","kvm","malware-analysis","setup"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReanSchwarzer9029.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-13T11:44:20.000Z","updated_at":"2025-02-19T05:37:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"54089eea-54f8-4109-961f-5473a7718a95","html_url":"https://github.com/ReanSchwarzer9029/CAPEv2-KVM-Docker","commit_stats":null,"previous_names":["reanschwarzer9029/capev2-kvm-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ReanSchwarzer9029/CAPEv2-KVM-Docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReanSchwarzer9029%2FCAPEv2-KVM-Docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReanSchwarzer9029%2FCAPEv2-KVM-Docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReanSchwarzer9029%2FCAPEv2-KVM-Docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReanSchwarzer9029%2FCAPEv2-KVM-Docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReanSchwarzer9029","download_url":"https://codeload.github.com/ReanSchwarzer9029/CAPEv2-KVM-Docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReanSchwarzer9029%2FCAPEv2-KVM-Docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29343683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T18:58:20.535Z","status":"ssl_error","status_checked_at":"2026-02-11T18:56:44.814Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capev2","docker-compose","guide","kvm","malware-analysis","setup"],"created_at":"2025-02-14T22:32:30.305Z","updated_at":"2026-02-11T20:05:30.458Z","avatar_url":"https://github.com/ReanSchwarzer9029.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAPEv2 with Docker-Virt-Manager on Ubuntu 22.04\n\nThis guide provides a step-by-step process for setting up [CAPEv2](https://github.com/kevoreilly/CAPEv2) with [Docker-Virt-Manager](https://github.com/m-bers/docker-virt-manager) on **Ubuntu 22.04**.\n\n## Prerequisites\nEnsure you are using `Ubuntu 22.04 Live Server` like `ubuntu-22.04*live-server-amd64.iso`, which can be downloaded from\n[Ubuntu 22.04 Old Releases](https://old-releases.ubuntu.com/releases/22.04.1/).\n\n\u003e ⚠️ **Important:** Running all these commands as `cape` user is recommended. Best is to create `cape` user during OS installation.\n\n- CPU Total Processor Cores: 4 \n  - Number of Processors Recommended: 2\n  - Number of Cores per Processor Recommended: 2\n- CPU with Virtualization Support (VT-x/AMD-V)\n- Memory: 8GB RAM (16GB - 32GB Recommended)\n- Hard Disk: 200GB\n\n## Step 1: Install Docker and Dependencies\n```bash\n# Update system and install necessary dependencies\nsudo apt-get update\nsudo apt-get install -y ca-certificates curl\n\n# Add Docker's official GPG key\nsudo install -m 0755 -d /etc/apt/keyrings\nsudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add Docker repository\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \\\n  $(. /etc/os-release \u0026\u0026 echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable\" | \\\n  sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n\n# Install Docker and plugins\nsudo apt-get update\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n```\n\nRefer to the official Docker documentation for more information: [Docker Installation Guide](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)\n\n## Step 2: Install KVM and Virtualization Dependencies\n```bash\n# Install necessary dependencies\nsudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst uidmap libvirt-dev libguestfs-tools\n\n# Enable and check libvirtd service\nsudo systemctl enable --now libvirtd\nsudo systemctl status libvirtd\n\n# Add current user to libvirt and kvm groups\nsudo usermod -aG libvirt,kvm $USER\nnewgrp libvirt\nnewgrp kvm\n\n# Verify KVM installation\nvirsh list --all\nsudo kvm-ok\n```\n\n## Step 3: Configure Virtualization Directories\n```bash\n# Create necessary directories and set permissions\nsudo mkdir -p /var/lib/libvirt/images\nsudo chown -R libvirt-qemu:kvm /var/lib/libvirt\nsudo chmod -R 775 /var/lib/libvirt\nls -lah /var/run/libvirt/libvirt-sock\n\n# Restart libvirtd service\nsudo systemctl restart libvirtd\n```\n\n## Step 4: Install and Configure Docker-Virt-Manager\n```bash\n# Clone Docker-Virt-Manager repository\ncd /opt\nsudo git clone https://github.com/m-bers/docker-virt-manager.git\ncd docker-virt-manager\n\n# Create ISO directory\nsudo mkdir -p /opt/iso\nsudo chmod 777 /opt/iso\n```\n\n\u003e ⚠️ **Important:** Make sure to have `privileged: true` in `docker-compose.yml` file for KVM support.\n\n\nFollow [docker-compose.yml](docker-virt-manager/docker-compose.yml) and modify as necessary\n\n```bash\n# Build and deploy Docker-Virt-Manager\ndocker build -t docker-virt-manager . \u0026\u0026 docker compose up -d\n\n# Only run this cmd if you need to rebuild and deploy updated Docker-Virt-Manager docker-compose.yml file\ndocker compose up --build -d\n```\n\n- Upload/Download `Windows 10 21H2` ISO into `/opt/iso` directory.\n- Access Docker-Virt-Manager Web UI `http://\u003cUbuntu_22.04_IP_Addr\u003e:8185`\n- Create VM name `cuckoo1` with `Windows 10 21H2` ISO and start the VM.\n\nPersonally I used WinSCP (must have OpenSSH Server running in Ubuntu) to upload the ISO file. If you don't have the Windows 10 ISO, you may choose to git clone [MediaCreationTool.bat](https://github.com/AveYo/MediaCreationTool.bat) and create the ISO.\n\n## Step 5: Install CAPEv2\n```bash\n# Clone CAPEv2 repository\ncd /opt\nsudo git clone https://github.com/kevoreilly/CAPEv2.git\ncd CAPEv2\n```\n\nFollow [cape2.sh](CAPEv2/installer/cape2.sh) and modify as necessary. \n\u003e ⚠️ **Important:** Check OS Network Interface, do not blindly follow!\n```plaintext\n# Configuration\nNETWORK_IFACE=virbr0\nIFACE_IP=\"192.168.122.1\"\nPASSWD=\"\u003ccape_user_password\u003e\"\nUSER=\"cape\"\n```\n\n```bash\n# Run CAPEv2 installer\nsudo ./cape2.sh base cape | tee cape.log\n```\n\n## Step 6: Install Poetry and Dependencies\n```bash\n# Install Poetry\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Install dependencies\ncd /opt/CAPEv2\npoetry install\npoetry env list\npoetry run python3 cuckoo.py\npoetry run pip install -r extra/optional_dependencies.txt\npoetry run pip install chepy certvalidator asn1crypto mscerts\npoetry run extra/libvirt_installer.sh\n```\n\n## Step 7: Configure \u0026 Verify CAPEv2 Services\n\u003e ⚠️ **Important: Restart and Check** to make sure all services are running without missing dependencies or error in `journalctl` logs.\n\nFollow [cuckoo.conf](CAPEv2/conf/cuckoo.conf) and modify as necessary\n\n```bash\n# Edit cuckoo configuration file\nsudo nano /opt/CAPEv2/conf/cuckoo.conf\n```\n\n```plaintext\n# Change the following values\n[resultserver]\n...\nip = 192.168.122.1 # Change to virbr0 IP\n```\n\n```bash\n# Start CAPEv2\npoetry run python3 cuckoo.py\n\n# Restart CAPEv2 services\nsudo systemctl restart cape.service\nsudo systemctl restart cape-processor.service\nsudo systemctl restart cape-web.service\nsudo systemctl restart cape-rooter.service\n\n# Check logs for CAPEv2 services\nsudo journalctl -u cape.service | tail -n 20\nsudo journalctl -u cape-processor.service | tail -n 20\nsudo journalctl -u cape-web.service | tail -n 20\nsudo journalctl -u cape-rooter.service | tail -n 20\n```\n\nThat's it for Part 1. Refer to the following links for Part 2 and Part 3.\n\n[[Part2] Installing and Configuring CAPEv2 on Ubuntu 22.04](https://medium.com/@rizqisetyokus/building-capev2-automated-malware-analysis-sandbox-part-2-0c47e4b5cbcd)\n\n[[Part3] Installing and Configuring CAPEv2 on Ubuntu 22.04](https://medium.com/@rizqisetyokus/building-capev2-automated-malware-analysis-sandbox-part-3-d5535a0ab6f6)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freanschwarzer9029%2Fcapev2-kvm-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freanschwarzer9029%2Fcapev2-kvm-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freanschwarzer9029%2Fcapev2-kvm-docker/lists"}