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 files33
dungnm24/cve-2020-0796Revision fe7aebbe1789
- ↑..Parent directory
- Config-CDC.ps1
- Config-DM.ps1
- Config-ENDPOINT.ps1
- Config-PDC.ps1
- Config-RODC.ps1
- Config-SDC.ps1
- Config-TDC.ps1
- ConfigGroupPolicyForClaims.ps1
- Create-ADObject.ps1
- Create-Account.ps1
- CreateLocalSideForestTrust.ps1
- Get-CertHash.ps1
- GetAvailablePort.ps1
- GetLDSInstanceGUID.ps1
- GetVmParameters.ps1
- GetVmParametersByComputerName.ps1
- GptTmpl.txt
- InstallADLDS.ps1
- InstallADLDSAnswerFile.txt
- Join-Domain.ps1
- NewCentralAccessPolicy.ps1
- NewCentralAccessRule.ps1
- NewClaimType.ps1
- NewResourceProperty.ps1
- PromoteChildDomain.ps1
- PromoteDomainController.ps1
- PromoteRODC.ps1
- Protocol.xml
- RestartAndRun.ps1
- RestartAndRunFinish.ps1
- SetAutoLogon.ps1
- SetNetworkConfiguration.ps1
- WaitFor-ComputerReady.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
WindowsProtocolTestSuites/TestSuites/ADFamily/Setup/Scripts/ConfigGroupPolicyForClaims.ps1
PowerShell · 3,009 bytes# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
##############################################################################
# Configure Group Policy for Claims
##############################################################################
Param
(
[string]$capName
)
Write-Host "Configuring Group Policy for Claims ..." -ForegroundColor Yellow
# Configure Central Access Policy
Write-Host "Configuring Central Access Policy ..." -ForegroundColor Yellow
$id = (Get-GPO -Name "Default Domain Policy").id
$caps = Get-ADCentralAccessPolicy -Identity $capName
$path = $env:windir + "\SYSVOL\domain\Policies\{$id}\MACHINE\Microsoft\Windows NT\Cap"
$file = $path + "\cap.inf"
if(!(Test-Path -Path $path))
{
New-Item -ItemType Directory -Path $path -Force
}
if(Test-Path -Path $file)
{
Remove-Item -Path $file -Force
}
New-Item -ItemType File -Path $file -Force
echo "" >> $file
echo "[Version]" >> $file
echo "Signature=`"`$Windows NT`$`"" >> $file
echo "[CAPS]" >> $file
echo "`"$caps`"" >> $file
# Configure Audit
Write-Host "Configuring Audit ..." -ForegroundColor Yellow
$id = (Get-GPO -Name "Default Domain Policy").id
$path = $env:windir + "\SYSVOL\domain\Policies\{$id}\MACHINE\Microsoft\Windows NT\Audit"
$file = $path + "\audit.csv"
if(!(Test-Path -Path $path))
{
New-Item -ItemType Directory -Path $path -Force
}
if(Test-Path -Path $file)
{
Remove-Item -Path $file -Force
}
New-Item -ItemType File -Path $file -Force
echo "Machine Name,Policy Target,Subcategory,Subcategory GUID,Inclusion Setting,Exclusion Setting,Setting Value" >> $file
echo ",System,Audit Central Access Policy Staging,{0cce9246-69ae-11d9-bed3-505054503030},Success and Failure,,3" >> $file
# Enable FAST and Claims for this Realm
Write-Host "Enable FAST and Claims for this Realm ..." -ForegroundColor Yellow
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\KDC /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\KDC\Parameters /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\KDC\Parameters /v EnableCbacAndArmor /t REG_DWORD /d 1 /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\KDC\Parameters /v CbacAndArmorLevel /t REG_DWORD /d 2 /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\kerberos /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\kerberos\Parameters /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\kerberos\Parameters /v EnableCbacAndArmor /t REG_DWORD /d 1 /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\kerberos\Parameters /v SupportedEncryptionTypes /t REG_DWORD /d 0x7fffffff /f
gpupdate /force
Write-Host "Configure Group Policy for Claims Successfully." -ForegroundColor Green