Exploit databaseDownload repository ZIP
GH-88d8bc551618926a04536090300b4292
dungnm24/cve-2020-0796
Sources for CVE-2020-0796
81 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files7
dungnm24/cve-2020-0796Revision fe7aebbe1789
- ↑..Parent directory
- BindSSLCert.ps1
- ConfigContentServer.ps1
- ConfigHostedCacheServer.ps1
- CreateRODC.ps1
- DeployTestFile.ps1
- Protocol.xml
- TrustHostedCacheServer.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
WindowsProtocolTestSuites/TestSuites/BranchCache/Scripts/TrustHostedCacheServer.ps1
PowerShell · 2,533 bytes# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
##############################################################################
# This function is used to add the cert with password into cert store
##############################################################################
param(
[String]$certpath="c:\temp\Data\Certificate.pfx",
[String]$rootCertStore = "LocalMachine",
[String]$certStore = "AuthRoot",
[String]$certPsd = "1"
)
#----------------------------------------------------------------------------
# Global variables
#----------------------------------------------------------------------------
$scriptPath = Split-Path $MyInvocation.MyCommand.Definition -parent
$env:Path += ";$scriptPath;$scriptPath\Scripts"
#----------------------------------------------------------------------------
# Start loging using start-transcript cmdlet
#----------------------------------------------------------------------------
[string]$logFile = $MyInvocation.MyCommand.Path + ".log"
try { Stop-Transcript -ErrorAction SilentlyContinue } catch {} # Ignore Stop-Transcript error messages
Start-Transcript -Path "$logFile" -Append -Force
#----------------------------------------------------------------------------
# Define common functions
#----------------------------------------------------------------------------
function ImportPfxCert([string]$certPath,[string]$certRootStore,[string]$certStore,[string]$pfxPass)
{
if(Test-Path -Path $certPath)
{
Remove-Item -Path $certPath
}
$pfx=new-object System.Security.Cryptography.X509Certificates.X509Certificate2
$pfx.import($certPath,$pfxPass,"Exportable,PersistKeySet")
$store=new-object System.Security.Cryptography.X509Certificates.X509Store($certStore,$certRootStore)
$store.open("MaxAllowed")
$store.add($pfx)
$store.close()
}
#----------------------------------------------------------------------------
# Add cert to Trusted Root Certification Authorities store
#----------------------------------------------------------------------------
Write-Info.ps1 "Add certificate to Trusted Root Certification Authorities Store." -foregroundcolor Green
ImportPfxCert $certpath $rootCertStore $certStore $certPsd
#----------------------------------------------------------------------------
# Ending
#----------------------------------------------------------------------------
Write-Info.ps1 "Completed enable routing and remote access."
Stop-Transcript
exit 0