Exploit databaseDownload repository ZIP
GH-ea91ecf629103514d4b348ce44007631
jamf/cve-2020-1206-poc
Sources for CVE-2020-1206
3 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files89
jamf/cve-2020-1206-pocRevision 9e917e593af3
- ↑..Parent directory
- Add-AdRemoteUserToLocalGroup.ps1
- Add-DFSFolder.ps1
- Add-Printer.ps1
- Change-DomainUserPassword.ps1
- Check-ReturnValue.ps1
- Config-FileSharing.ps1
- Create-AdUserWithGroupMembership.ps1
- Create-DFSNamespace.ps1
- Create-Folder.ps1
- Create-ManagedServiceAccount.ps1
- Create-SelfSignedCert.ps1
- Create-ShadowCopy.ps1
- CreateLocalSideForestTrust.ps1
- Disable-ICMPRedirect.ps1
- Disable-IPv6.ps1
- Disable_Firewall.ps1
- Enable-AdRecyleBin.ps1
- Enable-WinRM.ps1
- EnableRemoteAccess.ps1
- Execute-RemoteScript.ps1
- Find-PtfConfigFiles.ps1
- Get-AdLdsInstanceId.ps1
- Get-AvailablePort.ps1
- Get-CertHash.ps1
- Get-DomainControllerParameters.ps1
- Get-DomainGuid.ps1
- Get-DomainNetbiosName.ps1
- Get-DomainSid.ps1
- Get-ForestFuncLvl.ps1
- Get-InstalledScriptPath.ps1
- Get-OSVersion.ps1
- Get-OSVersionNumber.ps1
- Get-Parameter.ps1
- GetVMNameByComputerName.ps1
- GetVmParameters.ps1
- GetVmParametersByComputerName.ps1
- GptTmpl.txt
- Install-ADDS.ps1
- Install-AdCertificateService-Feature.ps1
- Install-AdLds-Feature.ps1
- Install-AdLds-Instance.ps1
- Install-DFSComponent.ps1
- Install-DfsManagement-Feature.ps1
- Install-FSRM.ps1
- Install-IIS.ps1
- Install-Iis-Feature.ps1
- Install-SelfSignedCert.ps1
- InstallADLDS.ps1
- InstallADLDSAnswerFile.txt
- Join-Domain.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CommonScripts/Write-Log.ps1
PowerShell · 3,754 bytes#############################################################################
## Copyright (c) Microsoft. All rights reserved.
## Licensed under the MIT license. See LICENSE file in the project root for full license information.
##
## Microsoft Windows Powershell Scripting
## Purpose: Write logs according to LogLevel configured in ParamConfig.xml.
##
##############################################################################
Param(
[String]$logContent,
[String]$level = "Debug",
[String]$logPath = "",
[String]$configFile = ".\ParamConfig.xml"
)
#----------------------------------------------------------------------------
# Starting script
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Function: Show-ScriptUsage
# Usage : Describes the usage information and options
#----------------------------------------------------------------------------
function Show-ScriptUsage
{
Write-host
Write-host "Write logs in log file."
Write-host
Write-host "The Path of the log file can be saved to $configFile."
Write-host "If you don't input log file path, the saved value should be used."
Write-host
Write-host "Example: Write-Log.ps1 `"Test log`" Debug C:\Test.log"
Write-host
}
#----------------------------------------------------------------------------
# Show help if required
#----------------------------------------------------------------------------
if ($args[0] -match '-(\?|(h|(help)))')
{
Show-ScriptUsage
return
}
#----------------------------------------------------------------------------
# Verify required parameters
#----------------------------------------------------------------------------
if ($logContent -eq $null -or $logContent -eq "")
{
Throw "Parameter logContent is required."
}
#----------------------------------------------------------------------------
# Convert log level to int
#----------------------------------------------------------------------------
switch ($level.ToUpper())
{
"DEBUG"
{
$level = "1"
}
"VERBOSE"
{
$level = "2"
}
"CLIENT"
{
$level = "3"
}
Default
{
$level = "0"
}
}
#----------------------------------------------------------------------------
# Get the LogLevel, if `$level less than LogLevel, don't write log on screen
#----------------------------------------------------------------------------
$logLevel = .\Get-Parameter.ps1 $configFile LogLevel
#----------------------------------------------------------------------------
# Get the full path of $logPath
#----------------------------------------------------------------------------
if ($logPath -ne "")
{
$fileName = Split-Path $logPath -leaf
$path = .\Get-Parameter.ps1 $configFile LogPath
if (!(Test-Path $path))
{
New-Item -Type Directory -Path $path -Force
}
$logPath = "$path\$fileName"
.\Set-Parameter.ps1 $configFile LogFile $logPath "If no log file path specified, this value should be used."
}
else
{
$logPath = .\Get-Parameter.ps1 $configFile LogFile
}
#----------------------------------------------------------------------------
# Write log info and add time stamp
#----------------------------------------------------------------------------
$timeString = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss")
$logContent = "[$timeString] $logContent"
#Write log on screen
$logLevel = $logLevel - 1
if ([Int]$level -gt [Int]$logLevel)
{
Write-Host $logContent
}
#write log in log file
if (Test-Path $logPath)
{
Add-Content -Path $logPath -Force -Value $logContent
}
else
{
Set-Content -Path $logPath -Force -Value $logContent
}