Azure에서 Windows VM에 RDP를 시도할 때 발생하는 오류: CredSSP 암호화 Oracle 수정
이 문서에서는 CredSSP 암호화 오라클 수정 오류와 함께 RDP를 사용하여 가상 머신(VM)에 연결할 수 없는 문제에 대한 해결 방법을 제공합니다.
원래 제품 버전: Windows를 실행하는 가상 머신
원본 KB 번호: 4295591
증상
다음과 같은 경우를 생각해볼 수 있습니다.
- CVE-2018-0886용 CredSSP(자격 증명 보안 지원 공급자 프로토콜) 업데이트는 Microsoft Azure 또는 로컬 클라이언트의 Windows VM(원격 서버)에 적용됩니다.
- 로컬 클라이언트에서 서버에 원격 데스크톱(RDP) 연결을 시도합니다.
이 경우 다음과 유사한 내용의 오류 메시지가 나타납니다.
인증 오류가 발생했습니다. 요청한 함수가 지원되지 않습니다. 원격 컴퓨터: <computer name or IP>. CredSSP 암호화 Oracle 수정 때문일 수 있습니다. 자세한 내용은 https://go.microsoft.com/fwlink/?linkid=866660을 참조하세요.
CredSSP 업데이트가 설치되었는지 확인하는 방법
다음 업데이트에 대한 업데이트 기록 을 확인하거나 TSpkg.dll의 버전을 확인하세요.
운영 체제 | CredSSP 업데이트가 있는 TSpkg.dll 버전 | CredSSP 업데이트 |
---|---|---|
Windows 7 서비스 팩 1/Windows Server 2008 R2 서비스 팩 1 | 6.1.7601.24117 | KB4103718(월별 롤업) |
KB4103712(보안 전용 업데이트) | ||
Windows Server 2012 | 6.2.9200.22432 | KB4103730(월별 롤업) |
KB4103726(보안 전용 업데이트) | ||
Windows 8.1/Windows Server 2012 R2 | 6.3.9600.18999 | KB4103725(월별 롤업) |
KB4103715(보안 전용 업데이트) | ||
RS1 - Windows 10 버전 1607/Windows Server 2016 | 10.0.14393.2248 | KB4103723 |
RS2 - Windows 10 버전 1703 | 10.0.15063.1088 | KB4103731 |
RS3 - Windows 10 1709 | 10.0.16299.431 | KB4103727 |
원인
이 오류는 안전하지 않은 RDP 연결을 설정하려고 하고 서버 또는 클라이언트의 암호화 Oracle 수정 정책 설정에 의해 안전하지 않은 RDP 연결이 차단된 경우에 발생합니다. 이 설정은 CredSSP를 사용하여 RDP 세션을 구축하는 방법과 안전하지 않은 RDP가 허용되는지 여부를 정의합니다.
이 익스플로잇에 취약하거나 운영 실패를 일으키는 시나리오에 대해서는 다음의 상호 운용성 매트릭스를 참조하세요.
- | - | 서버 | - | - | - |
---|---|---|---|---|---|
- | - | 업데이트 완료 | 업데이트된 클라이언트 강제 적용 | 완화됨 | 취약 |
클라이언트 | 업데이트 완료 | 허용됨 | 차단됨 2 | 허용됨 | 허용됨 |
업데이트된 클라이언트 강제 적용 | 차단됨 | 허용됨 | 허용됨 | 허용됨 | |
완화됨 | 차단됨 1 | 허용됨 | 허용됨 | 허용됨 | |
취약 | 허용됨 | 허용됨 | 허용됨 | 허용됨 |
예제
1 클라이언트에 CredSSP 업데이트가 설치되어 있고 암호화 Oracle 수정 이 완화됨 으로 설정되어 있습니다. 이 클라이언트는 CredSSP 업데이트가 설치되지 않은 서버에 RDP하지 않습니다.
2 서버에 CredSSP 업데이트가 설치되어 있고 암호화 Oracle 수정 이 강제 업데이트된 클라이언트 로 설정되어 있습니다. 서버는 CredSSP 업데이트가 설치되지 않은 클라이언트의 RDP 연결을 차단합니다.
해결 방법
이 문제를 해결하려면 클라이언트와 서버 모두에 CredSSP 업데이트를 설치하여 RDP를 안전한 방식으로 설정할 수 있습니다. 자세한 내용은 CVE-2018-0886 | CredSSP 원격 코드 실행 취약점을 참조하세요.
Azure 직렬 콘솔을 사용하여 이 업데이트를 설치하는 방법
Azure Portal에 로그인하고 가상 머신 을 선택한 다음 VM을 선택합니다.
지원 + 문제 해결 섹션까지 아래로 스크롤한 다음 직렬 콘솔(미리보기) 을 클릭합니다. 직렬 콘솔을 사용하려면 Windows VM 내에서 SAC(특수 관리 콘솔)를 활성화해야 합니다. 콘솔에 SAC> 가 표시되지 않으면(다음 스크린샷 참조), 이 문서의 "원격 PowerShell을 사용하여 이 업데이트를 설치하는 방법" 섹션으로 이동하세요.
cmd
을(를) 입력하여 CMD 인스턴스가 있는 채널을 시작합니다.ch-si 1
을(를) 입력하여 CMD 인스턴스를 실행하는 채널로 전환합니다. 다음과 같은 출력이 수신됩니다.Enter 키를 누른 다음 관리 권한이 있는 로그인 자격 증명을 입력합니다.
유효한 자격 증명을 입력하면 CMD 인스턴스가 열리고 문제 해결을 시작할 수 있는 명령이 표시됩니다.
PowerShell 인스턴스를 시작하려면
PowerShell
을(를) 입력합니다.PowerShell 인스턴스에서 VM 운영 체제를 기반으로 직렬 콘솔 스크립트를 실행합니다. 이 스크립트는 다음 단계를 수행합니다.
- 다운로드 파일을 저장할 폴더를 만듭니다.
- 업데이트를 다운로드합니다.
- 업데이트를 설치합니다.
- 업데이트되지 않은 클라이언트가 VM에 연결할 수 있도록 취약점 키를 추가합니다.
- VM 다시 시작
원격 PowerShell을 사용하여 이 업데이트를 설치하는 방법
PowerShell이 설치된 모든 Windows 기반 컴퓨터에서 다음과 같이 VM의 IP 주소를 호스트 파일의 "신뢰할 수 있는" 목록에 추가합니다.
Set-item wsman:\localhost\Client\TrustedHosts -value <IP>
Azure Portal에서 트래픽이 포트 5986을 허용하도록 VM의 네트워크 보안 그룹 을 구성합니다.
Azure Portal에서 가상 머신 > < VM >을 선택한 다음 작업 섹션까지 아래로 스크롤하고 실행 명령 을 클릭한 다음 EnableRemotePS 를 실행합니다.
Windows 기반 컴퓨터에서 적절한 VM 시스템 버전에 대한 원격 PowerShell 스크립트를 실행합니다. 이 스크립트는 다음 단계를 수행합니다.
- VM에서 원격 PowerShell에 연결합니다.
- 다운로드 파일을 저장할 폴더를 생성합니다.
- Credssp 업데이트를 다운로드합니다.
- 업데이트를 설치합니다.
- 업데이트되지 않은 클라이언트가 VM에 연결할 수 있도록 취약성 레지스트리 키를 설정합니다.
- 향후 보다 쉽게 완화할 수 있게 직렬 콘솔을 사용하도록 설정하세요.
- VM을 다시 시작합니다.
해결 방법
경고
다음 설정을 변경하면 원격 서버를 공격에 노출하는 비보안 연결이 허용됩니다. 주의를 기울여 이 절의 단계를 수행하십시오. 레지스트리를 잘못 수정하면 심각한 문제가 발생할 수 있습니다. 레지스트리를 수정하기 전에 문제가 발생할 경우에 대비하여 레지스트리를 복원 가능하도록 백업하세요.
시나리오 1: 업데이트된 클라이언트가 업데이트되지 않은 서버와 통신할 수 없습니다.
가장 일반적인 시나리오는 클라이언트에 CredSSP 업데이트가 설치되어 있으며, 암호화 Oracle 수정 정책 설정은 CredSSP 업데이트가 설치되지 않은 서버에 대한 비보안 RDP 연결을 허용하지 않는 것입니다.
이 문제를 해결하려면 다음과 같이 하십시오.
CredSSP 업데이트가 설치된 클라이언트에서 gpedit.msc 를 실행한 다음 탐색 창에서 컴퓨터 구성 > 관리 템플릿 > 시스템 > 자격 증명 위임 으로 이동합니다.
암호화 Oracle 수정 정책을 사용 으로 변경한 다음 보호 수준 을 취약성 으로 변경합니다.
gpedit.msc를 사용할 수 없는 경우 다음과 같이 레지스트리를 사용하여 똑같이 변경할 수 있습니다.
관리자 권한으로 명령 프롬프트 창을 엽니다.
다음 명령을 실행하여 레지스트리 값을 추가합니다.
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2
시나리오 2: 업데이트되지 않은 클라이언트가 패치된 서버와 통신할 수 없습니다.
Azure Windows VM에 이 업데이트가 설치되어 있으며 업데이트되지 않은 클라이언트 수신이 제한되는 경우 다음 단계에 따라 암호화 Oracle 수정 정책 설정을 변경합니다.
PowerShell이 설치된 모든 Windows 컴퓨터에서 호스트 파일의 "신뢰할 수 있는" 목록에 VM의 IP를 추가합니다.
Set-item wsman:\localhost\Client\TrustedHosts -value <IP>
Azure Portal로 이동하여 VM을 찾은 다음 PowerShell 포트 5985 및 5986을 허용하도록 네트워크 보안 그룹 을 업데이트합니다.
Windows컴퓨터에서 다음과 같이 PowerShell을 사용하여 VM에 연결합니다.
HTTP의 경우:
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName "<<Public IP>>" -port "5985" -Credential (Get-Credential) -SessionOption $Skip
HTTPS의 경우:
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName "<<Public IP>>" -port "5986" -Credential (Get-Credential) -useSSL -SessionOption $Skip
다음 명령을 실행하여 레지스트리로 암호화 Oracle 수정 정책 설정을 변경합니다.
Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters' -name "AllowEncryptionOracle" 2 -Type DWord
Azure 직렬 콘솔 스크립트
OS 버전 | 스크립트 |
---|---|
Windows 7 서비스 팩 1/Windows Server 2008 R2 서비스 팩 1 | #다운로드 위치 생성md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu" $destination = "c:\temp\windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows6.1-KB4103718-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
Windows Server 2012 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/04/windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu" $destination = "c:\temp\windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows8-RT-KB4103730-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
Windows 8.1/Windows Server 2012 R2 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu" $destination = "c:\temp\windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows8.1-KB4103725-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS1 - Windows 10 버전 1607/Windows Server 2016 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu" $destination = "c:\temp\windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103723-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS2 - Windows 10 버전 1703 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu" $destination = "c:\temp\windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103731-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS3 - Windows 10 버전 1709/Windows Server 2016 버전 1709 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu" $destination = "c:\temp\windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103727-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS4 - Windows 10 1803/Windows Server 2016 버전 1803 | #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu" $destination = "c:\temp\windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103721-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
원격 PowerShell 스크립트
OS 버전 | 스크립트 |
---|---|
Windows 7 서비스 팩 1/Windows Server 2008 R2 서비스 팩 1 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu" $destination = "c:\temp\windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows6.1-KB4103718-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
Windows Server 2012 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/04/windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu" $destination = "c:\temp\windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows8-RT-KB4103730-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
Windows 8.1/Windows Server 2012 R2 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu" $destination = "c:\temp\windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows8.1-KB4103725-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS1 - Windows 10 버전 1607/Windows Server 2016 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu" $destination = "c:\temp\windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103723-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS2 - Windows 10 버전 1703 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu" $destination = "c:\temp\windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103731-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS3 - Windows 10 버전 1709/Windows Server 2016 버전 1709 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu" $destination = "c:\temp\windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103727-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |
RS4 - Windows 10 1803/Windows Server 2016 버전 1803 | #변수 설정: $subscriptionID = "<your subscription ID>" $vmname = "<IP of your machine or FQDN>" $PSPort = "5986" # PowerShell의 HTTPS를 다른 포트로 사용자 지정하는 경우 이 변수를 변경#구독에 로그인 Add-AzureRmAccount Select-AzureRmSubscription -SubscriptionID $subscriptionID Set-AzureRmContext -SubscriptionID $subscriptionID #원격 PowerShell에 연결 $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip #다운로드 위치 생성 md c:\temp ##KB 파일 다운로드 $source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu" $destination = "c:\temp\windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu" $wc = New-Object System.Net.WebClient $wc.DownloadFile($source,$destination) #KB 설치 expand -F:* $destination C:\temp\ dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103721-x64.cab" #패치되지 않은 클라이언트를 허용하는 취약점 키 추가 REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2 #Azure 직렬 콘솔 플래그 설정 cmd bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 5 bcdedit /set {bootmgr} bootems yes bcdedit /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200 #VM을 다시 시작하여 설치/설정을 완료 shutdown /r /t 0 /f |