{"id":17967288,"url":"https://github.com/gmh5225/go-detection-hyper-v","last_synced_at":"2026-03-09T17:12:08.741Z","repository":{"id":259631177,"uuid":"879087960","full_name":"gmh5225/Go-Detection-Hyper-v","owner":"gmh5225","description":"A simple Go program that detects whether the current Windows system is running inside a Hyper-V virtual machine environment(Guest) using CPUID instruction.","archived":false,"fork":false,"pushed_at":"2024-10-27T07:44:35.000Z","size":45,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T21:20:45.262Z","etag":null,"topics":["detection","golang","hyper-v"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmh5225.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}},"created_at":"2024-10-26T23:56:30.000Z","updated_at":"2025-03-18T17:59:38.000Z","dependencies_parsed_at":"2024-12-04T12:02:11.529Z","dependency_job_id":null,"html_url":"https://github.com/gmh5225/Go-Detection-Hyper-v","commit_stats":null,"previous_names":["gmh5225/go-detection-hyper-v"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FGo-Detection-Hyper-v","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FGo-Detection-Hyper-v/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FGo-Detection-Hyper-v/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmh5225%2FGo-Detection-Hyper-v/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmh5225","download_url":"https://codeload.github.com/gmh5225/Go-Detection-Hyper-v/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245426222,"owners_count":20613308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["detection","golang","hyper-v"],"created_at":"2024-10-29T14:05:14.046Z","updated_at":"2026-03-09T17:12:08.693Z","avatar_url":"https://github.com/gmh5225.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyper-V Detection Tool\n\nA simple Go program that detects whether the current Windows system is running inside a Hyper-V virtual machine environment(Guest) using CPUID instruction.\n\n## Install\n``\ngo install github.com/gmh5225/Go-Detection-Hyper-v@v0.0.5\n``\n\n## Uninstall\n``\nwhere/which Go-Detection-Hyper-v\n``\n\n## Clean module cache\n``\ngo clean -modcache\n``\n\n## How It Works\n\nThe program uses the CPUID instruction to:\n1. Check for the Hyper-V vendor string (\"Microsoft Hv\")\n2. Verify specific feature flags that indicate a Hyper-V environment\n\n## Project Structure\n\n- `main.go` - Main program logic and Hyper-V detection implementation\n- `cpuid_amd64.s` - Assembly code for CPUID instruction\n\n## Technical Details\n\nThe detection is performed by:\n1. Using CPUID with leaf `0x40000000` to check for Hyper-V vendor signature\n2. Using CPUID with leaf `0x40000003` to verify specific feature flags\n\n## Output\n\nThe program will output one of two messages:\n- \"Running in Hyper-V environment(Guest)\"\n- \"Not running in Hyper-V environment(Guest)\"\n\n## Thanks\n- https://x.com/sixtyvividtails/status/1850373100665282775\n- https://x.com/sixtyvividtails/status/1850396353765019739\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmh5225%2Fgo-detection-hyper-v","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmh5225%2Fgo-detection-hyper-v","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmh5225%2Fgo-detection-hyper-v/lists"}