Skip to content
신선한 자몽 농장
Go back

Hyper-V를 껐는데도 VBS가 계속 실행되는 문제 해결

개요

Windows 11에서 별도의 가상화 프로그램을 쓰려던 중, Hyper-V를 사용하지 않는데도 Windows Hypervisor가 계속 실행되어 가상화 기능을 쓸 수 없는 현상이 있었다.

보통 VBS(Virtualization Based Security) 관련 문제라면 다음 항목부터 확인하게 된다.

하지만 이번에는 위 기능을 모두 끄거나 설치하지 않은 상태에서도 VBS가 계속 실행되고 있었다. 결국 DeviceGuard의 WindowsHello Scenario를 비활성화하고 나서야 VBS가 해제됐다.


1. 문제 발생 환경

가상화 프로그램을 쓰려면 BIOS의 VT-x/AMD-V는 켜져 있어야 하므로, 이를 끄는 건 해결 방법으로 고려하지 않았다. 목표는 하드웨어 가상화는 유지하면서 Windows의 VBS/Hypervisor만 끄는 것이었다.


2. VBS 실행 상태 확인

우선 PowerShell에서 Win32_DeviceGuard를 조회했다.

Get-CimInstance -ClassName Win32_DeviceGuard `
-Namespace root\Microsoft\Windows\DeviceGuard |
Format-List *

주요 값은 다음과 같았다.

SecurityServicesConfigured        : {0}
SecurityServicesRunning           : {0}
VirtualizationBasedSecurityStatus : 2

구성되거나 실행 중인 VBS 보안 서비스는 없는데, VirtualizationBasedSecurityStatus가 2로 VBS 자체는 실행 중이었다.

Hypervisor 상태도 확인했다.

Get-ComputerInfo -Property HyperVisorPresent
HyperVisorPresent
-----------------
True

설정만 남아 있는 게 아니라 Windows Hypervisor가 실제로 동작하고 있었다.


3. BCD 설정 확인

다음으로 부팅 구성을 확인했다.

bcdedit /enum {current}
isolatedcontext         Yes
hypervisorlaunchtype    Off
vsmlaunchtype           Off

hypervisorlaunchtype과 vsmlaunchtype은 이미 Off였다. Hypervisor/VSM 자동 실행을 꺼 두었는데도 Hypervisor가 올라오고 있는 상황이었다.


4. Device Guard 관련 설정 확인

Device Guard 레지스트리를 확인했다.

reg query "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /s
EnableVirtualizationBasedSecurity = 0
RequirePlatformSecurityFeatures   = 0
Mandatory                         = 0

Scenario별 상태도 확인했다.

CredentialGuard
    Enabled = 0

HypervisorEnforcedCodeIntegrity
    Enabled = 0

KernelShadowStacks
    Enabled = 0

SecureBiometrics
    Enabled = 0

SystemGuard
    Enabled = 0

Credential Guard, HVCI 등 VBS를 켜는 대표적인 기능은 모두 비활성화되어 있었다.

Policy 영역도 마찬가지였다.

reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard" /s
EnableVirtualizationBasedSecurity = 0
RequirePlatformSecurityFeatures   = 0
LsaCfgFlags                       = 0
HypervisorEnforcedCodeIntegrity   = 0
HVCIEnabled                       = 0
HVCIMATRequired                   = 0

5. 그런데 Secure Kernel은 실행 중

여기서 이상한 부분을 발견했다.

HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\KeyGuard\Status
IsSecureKernelRunning    = 1
EncryptionKeyAvailable   = 1
EncryptionKeyPersistent  = 1
SecretsMode              = 1
KeyGuardEnabled          = 1
CredGuardEnabled         = 0
LsaIsoLaunchAttempted    = 1
LsaIsoLaunchError        = 0

핵심은 이 세 줄이었다.

IsSecureKernelRunning = 1
KeyGuardEnabled       = 1
CredGuardEnabled      = 0

Credential Guard는 꺼져 있는데 Secure Kernel과 KeyGuard는 동작하고 있었다. 즉 Credential Guard 때문에 VBS가 켜진 건 아니라고 판단했다.

KeyGuard\Status는 상태 확인 용도로만 조회했고, 값을 직접 0으로 바꾸지는 않았다.


6. 이벤트 로그에서 결정적인 단서 확인

추측으로 레지스트리를 계속 건드리는 대신, Windows가 부팅 중에 VBS를 왜 켜는지 이벤트 로그부터 확인했다.

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddHours(-2)
} -ErrorAction SilentlyContinue |
Where-Object {
    $_.ProviderName -match 'Hyper-V|Kernel|DeviceGuard|CodeIntegrity'
} |
Select-Object TimeCreated, Id, ProviderName, Message |
Format-List

부팅 시점에 Hypervisor가 시작된 기록이 있었다.

Microsoft-Windows-Hyper-V-Hypervisor
Event ID: 1

하이퍼바이저를 시작했습니다.

더 중요한 건 Microsoft-Windows-Kernel-Boot의 Event ID 153이었다.

가상화 기반 보안
정책: VBS Enabled, VSM Required, Boot Chain Signer Soft Enforced

enabled due to VBS registry configuration

Windows가 어떤 레지스트리 구성 때문에 VBS가 필요하다고 판단하고 있었다. 여기서부터는 Hyper-V 기능이 아니라 Device Guard/VBS 레지스트리를 중심으로 원인을 좁혀 갔다.


7. DeviceGuard Scenario 전체 점검

4번에서 본 Scenario 외에 다른 항목이 있는지 전체를 다시 확인했다.

CredentialGuard                  Enabled = 0
HypervisorEnforcedCodeIntegrity  Enabled = 0
KernelShadowStacks               Enabled = 0
SecureBiometrics                 Enabled = 0
SystemGuard                      Enabled = 0
WindowsHello                     Enabled = 1

다른 Scenario는 모두 0인데 WindowsHello만 1이었다.

HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\WindowsHello
    Enabled = 1

이 값이 실제로 VBS 실행과 관계가 있는지 확인하기 위해 A/B 테스트를 진행했다.


8. 변경 전 DeviceGuard 레지스트리 백업

레지스트리를 바꾸기 전에 기존 설정부터 백업했다. 관리자 PowerShell에서 실행한다.

reg export "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" "$env:USERPROFILE\Desktop\DeviceGuard-backup.reg" /y

백업 파일이 생성됐는지 확인한다.

Get-Item "$env:USERPROFILE\Desktop\DeviceGuard-backup.reg"

PowerShell에서는 cmd 문법인 %USERPROFILE%이 아니라 $env:USERPROFILE을 써야 한다.


9. WindowsHello Scenario 비활성화

reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\WindowsHello" /v Enabled /t REG_DWORD /d 0 /f

변경 확인:

reg query "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\WindowsHello"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\WindowsHello
    Enabled    REG_DWORD    0x0

이 상태로 재부팅했다.


10. 재부팅 후 결과

재부팅 후 VBS와 Hypervisor 상태를 다시 확인했다.

Get-CimInstance -ClassName Win32_DeviceGuard `
-Namespace root\Microsoft\Windows\DeviceGuard |
Select-Object VirtualizationBasedSecurityStatus,
              SecurityServicesConfigured,
              SecurityServicesRunning
Get-ComputerInfo -Property HyperVisorPresent

계속 실행 중이던 VBS가 비활성화된 것을 확인했다. 이번 환경에서는 다음 값 하나를 바꾼 것으로 문제가 해결됐다.

HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\WindowsHello

Enabled = 1  →  Enabled = 0

11. 원인 정리

이번 문제의 특이점은 Hyper-V가 설치되어 있지 않았고, 일반적인 VBS 관련 설정도 이미 모두 꺼져 있었다는 것이다.

구분항목상태
꺼져 있던 것Hyper-V / WSL미설치
Core Isolation / Credential Guard / HVCI / System Guard비활성화
EnableVirtualizationBasedSecurity0
hypervisorlaunchtype / vsmlaunchtypeOff
그런데 실행 중VirtualizationBasedSecurityStatus2
HyperVisorPresentTrue
IsSecureKernelRunning / KeyGuardEnabled1
WindowsHello Scenario1

이벤트 로그에는 VBS Enabled, VSM Required, enabled due to VBS registry configuration이 남아 있었고, WindowsHello\Enabled를 1 → 0으로 바꾸고 재부팅하자 VBS가 꺼졌다. 따라서 이 시스템에서는 DeviceGuard의 WindowsHello Scenario가 VBS/Secure Kernel 실행과 연관되어 있었다고 판단할 수 있다.

다만 WindowsHello\Enabled = 1이 왜 설정됐는지는 확인하지 못했다. 다음 중 무엇이 최초 원인인지는 현재 상태만으로 단정할 수 없다.

확인된 사실은 “WindowsHello Scenario를 끄자 VBS가 해제됐다”는 것까지다.


핵심 요약

단계확인한 것결과
VBS 상태Win32_DeviceGuard, HyperVisorPresentVBS 2, Hypervisor True
Windows 기능Hyper-V / WSL / 코어 격리미설치 또는 비활성화
BCDhypervisorlaunchtype, vsmlaunchtype모두 Off
DeviceGuardCredential Guard / HVCI / System Guard모두 0, 하지만 Secure Kernel·KeyGuard 실행 중
이벤트 로그Kernel-Boot Event ID 153enabled due to VBS registry configuration
Scenario 전체 점검Scenarios\*\EnabledWindowsHello만 1
조치백업 후 WindowsHello\Enabled = 0, 재부팅VBS 비활성화

정리하며

VBS가 계속 켜지는 문제는 Hyper-V 같은 Windows 기능만 봐서는 원인을 찾기 어려울 수 있다.

특히 일반적인 설정이 모두 꺼져 있는데도:

hypervisorlaunchtype = Off
vsmlaunchtype = Off
EnableVirtualizationBasedSecurity = 0
CredentialGuard = 0
HVCI = 0

다음 결과가 나온다면:

VirtualizationBasedSecurityStatus = 2
HyperVisorPresent = True

무작정 레지스트리를 지우기보다 시스템 이벤트 로그부터 확인하는 것이 좋다. 이번에는 Kernel-Boot Event ID 153의 enabled due to VBS registry configuration 메시지가 원인을 좁히는 가장 중요한 단서였고, 덕분에 DeviceGuard Scenario를 하나씩 비교해 유일하게 켜져 있던 WindowsHello를 찾을 수 있었다.

또한 Microsoft가 서명한 Code Integrity 정책이나 DeviceGuard 관련 파일을 임의로 지우기보다는, 레지스트리를 먼저 백업하고 의심 가는 설정을 하나씩 바꾼 뒤 재부팅해서 비교하는 방식이 안전하다.

Hyper-V도 없고 VBS 설정도 다 껐는데 Hypervisor가 계속 올라온다면, 부팅 이벤트 로그와 DeviceGuard의 개별 Scenario까지 한 번 들여다보자.



Previous Post
php2shell과 node2shell 취약점 점검
Next Post
MCP를 활용해서 생산성 높이기