IEVADS
Korporācija Microsoft ir izlaidusi drošības biļetenu MS14-025. Lai iegūtu papildinformāciju par šo drošības biļetenu:
-
Mājas datoru lietotāji:
https://www.microsoft.com/security/pc-security/updates.aspxIzlaist detaļas: mājas datora vai klēpjdatora atjauninājumus no vietnes Microsoft Update lejupielādēt tūlīt:
-
IT speciālisti:
Palīdzība un atbalsts par šo drošības atjauninājumu iegūšanu
Palīdzības atjauninājumu instalēšanu:
Microsoft Update atbalsts
Drošības risinājumi IT profesionāļiem:
TechNet drošības problēmu novēršana un atbalsts
Aizsargātu datora, kurā darbojas operētājsistēma Windows Windows vīrusu un ļaunprātīgas programmatūras:
Pretvīrusu risinājumu un drošības centrs
Vietējā atbalsta atbilstoši jūsu valstī:
Starptautiskais atbalsts
Papildinformācija
Zināmās problēmas un iegūtu informāciju par šo drošības atjauninājumu
Šajos rakstos satur plašāku informāciju par šo drošības atjauninājumu, tas attiecas uz konkrēto produktu versijām. Rakstos var būt zināma informācija. Ja tā notiek, katru raksta saite ir uzskaitītas zināma problēma.
-
2928120
MS14-025: Atjauninājuma apraksts drošības atjauninājums Windows Remote Server Administration Tools sistēmās, kurās ir instalēta 2919355: 13 maijs 2014 -
2961899
MS14-025: Atjauninājuma apraksts Windows Remote Server Administration Tools drošības atjauninājuma sistēmām, kurās nav instalēts 2919355: 13 maijs 2014
Grupas politikas Preferences
Pārskats
Dažos grupas politikas Preferences var saglabāt paroli. Šī funkcionalitāte tiek noņemts, jo parole ir saglabāta insecurely. Šajā rakstā aprakstīts lietotāja interfeisa izmaiņas un visas pieejamās risinājumus.
Šo grupas politikas Preferences vairs ļaus lietotājvārdus un paroles jāsaglabā:
-
Diska kartes
-
Lokālie lietotāji un grupas
-
Plānoti uzdevumi
-
Pakalpojumi
-
Datu avotu
Tas ietekmēs visus esošos grupas politikas objektus (GPO) vidē atkarīgi paroles, kas atrodas šīs preferences. Tas novērsīs jaunu grupu politikas Preferences izveide, izmantojot šo funkcionalitāti.
Par disku kartes, lokālie lietotāji un grupas un pakalpojumus, var līdzīgu mērķu ar citiem un drošāku funkcionalitāti sistēmā Windows.
Ieplānotie uzdevumi un datu avotu, jūs nevarēsit pašu mērķu, kas bija pieejami, izmantojot grupas politikas Preferences paroles nedroši funkcionalitāti.
Scenāriji
Šīs izmaiņas ietekmē šo grupas politikas Preferences. Katra izvēle attiecas uz īsu brīdi un pēc tam sīkāk. Turklāt risinājumi tiek nodrošināti, kas ļauj veikt tos pašus uzdevumus.
Ietekmētā izvēle |
Attiecas uz lietotāju |
Attiecas uz datora |
Lokālo lietotāju pārvaldība |
jā |
jā |
Kartēto disku |
jā |
nē |
Pakalpojumi |
nē |
jā |
Plānoti uzdevumi (līmeņa uz augšu) |
jā |
jā |
Plānoti uzdevumi (zemākā līmeņa) |
jā |
jā |
Nekavējoties uzdevumi (līmeņa uz augšu) |
jā |
jā |
Nekavējoties uzdevumi (zemākā līmeņa) |
jā |
jā |
Datu avotu |
jā |
jā |
Izmaiņu kopsavilkums
-
Visas ietekmētās preferences paroles lauki tiek atspējoti. Administratori nevar izveidot jaunu preferences, izmantojot paroles jomā.
-
Dažas preferences lietotājvārda lauks ir atspējota.
-
Nevar atjaunināt esošu preferences, kas satur paroles. Tie var būt tikai izdzēsto vai atspējots, konkrēto preferences vajadzības.
-
Delete un izslēgt darbība ir mainīti preferences.
-
Atverot jebkuru ar atribūtu CPassword izvēle, administrators administrators saņem šādu brīdinājuma dialoglodziņš informēt viņu nesen izslēgšanas. Mēģina saglabāt izmaiņas jauna vai esoša preferences, kas nepieciešama CPassword atribūts ir saistīta ar vienu un to pašu dialoglodziņu. Dzēst tikai un Disable rīcību neizraisa brīdinājumu dialoglodziņi.
1. scenārijs: Lokālo lietotāju pārvaldība
Lokālā lietotāja pārvaldības preferences bieži izmanto, lai izveidotu lokālo administratoru, kuriem ir zināmas paroli datorā. Šis līdzeklis nav droša tāpēc, ka grupu politikas Preferences saglabā paroles. Tādēļ šīs funkcionalitātes vairs nav pieejams. Šo izvēli ietekmē:
-
Datora konfigurācija -> vadības paneļa iestatījumi -> Lokālie lietotāji un grupas jauns -> -> lokālais lietotājs
-
User Configuration -> vadības paneļa iestatījumi -> Lokālie lietotāji un grupas jauns -> -> lokālais lietotājs
Svarīgas izmaiņas
Darbība: Izveidot vai aizstāt
-
Lietotājvārduun paroli, Paroles apstiprināšana lauki tiek atspējoti.
-
Kad administrators atver vai tiek mēģināts saglabāt izmaiņas esošo izvēli, kas satur paroles, tiek parādīts dialoglodziņš brīdinājuma.
Darbība: atjauninājums
-
Paroles un Paroles apstiprināšana lauki tiek atspējoti.
-
Kad administrators atver vai tiek mēģināts saglabāt izmaiņas esošo izvēli, kas satur paroles, tiek parādīts dialoglodziņš brīdinājuma.
Darbība: dzēšana
-
Nekādas izmaiņas darbībā
Risinājumi
Tiem, kas iepriekš atsaucas uz grupas politikas preferences iestatījumu lokālā administratora paroles, tiek nodrošināta šo skriptu kā drošu alternatīvu CPassword. Kopēt un saglabāt saturu uz jaunu Windows PowerShell failu un pēc tam palaidiet skriptu, kā norādīts tās. PIEMĒRAM, sadaļā.
Microsoft piedāvā programmēšanas piemērus tikai uzskatāmībai, nesniedzot nekādas tiešas vai netiešas garantijas. Tas ietver, bet neaprobežojas ar netiešām garantijām par piemērotību pārdošanai vai atbilstību noteiktam mērķim. Šajā rakstā tiek pieņemts, ka pārzināt programmēšanas valodu, kas tiek aprakstīta, un rīkus, kas tiek izmantoti, lai izveidotu un atkļūdotu procedūras. Microsoft atbalsta inženieri var palīdzēt izskaidrot kādas noteiktas procedūras funkcionalitāti. Taču viņi nemainīs šos piemērus, lai sniegtu skaidrākus, un neveidos jaunas procedūras, kas atbilstu īpašām prasībām.
function Invoke-PasswordRoll
{
<#
.SYNOPSIS
This script can be used to set the local account passwords on remote machines to random passwords. The username/password/server combination will be saved in a CSV file.
The account passwords stored in the CSV file can be encrypted using a password of the administrators choosing to ensure clear-text account passwords aren't written to disk.
The encrypted passwords can be decrypted using another function in this file: ConvertTo-CleartextPassword
Function: Invoke-PasswordRoll
Author: Microsoft
Version: 1.0
.DESCRIPTION
This script can be used to set the local account passwords on remote machines to random passwords. The username/password/server combination will be saved in a CSV file.
The account passwords stored in the CSV file can be encrypted using a password of the administrators choosing to ensure clear-text account passwords aren't written to disk.
The encrypted passwords can be decrypted using another function in this file: ConvertTo-CleartextPassword
.PARAMETER ComputerName
An array of computers to run the script against using PowerShell remoting.
.PARAMETER LocalAccounts
An array of local accounts whose password should be changed.
.PARAMETER TsvFileName
The file to output the username/password/server combinations to.
.PARAMETER EncryptionKey
A password to encrypt the TSV file with. Uses AES encryption. Only the passwords stored in the TSV file will be encrypted, the username and servername will be clear-text.
.PARAMETER PasswordLength
The length of the passwords which will be randomly generated for local accounts.
.PARAMETER NoEncryption
Do not encrypt the account passwords stored in the TSV file. This will result in clear-text passwords being written to disk.
.EXAMPLE
. .\Invoke-PasswordRoll.ps1 #Loads the functions in this script file
Invoke-PasswordRoll -ComputerName (Get-Content computerlist.txt) -LocalAccounts @("administrator","CustomLocalAdmin") -TsvFileName "LocalAdminCredentials.tsv" -EncryptionKey "Password1"
Connects to all the computers stored in the file "computerlist.txt". If the local account "administrator" and/or "CustomLocalAdmin" are present on the system, their password is changed
to a randomly generated password of length 20 (the default). The username/password/server combinations are stored in LocalAdminCredentials.tsv, and the account passwords are AES encrypted using the password "Password1".
.EXAMPLE
. .\Invoke-PasswordRoll.ps1 #Loads the functions in this script file
Invoke-PasswordRoll -ComputerName (Get-Content computerlist.txt) -LocalAccounts @("administrator") -TsvFileName "LocalAdminCredentials.tsv" -NoEncryption -PasswordLength 40
Connects to all the computers stored in the file "computerlist.txt". If the local account "administrator" is present on the system, its password is changed to a random generated
password of length 40. The username/password/server combinations are stored in LocalAdminCredentials.tsv unencrypted.
.NOTES
Requirements:
-PowerShellv2 or above must be installed
-PowerShell remoting must be enabled on all systems the script will be run against
Script behavior:
-If a local account is present on the system, but not specified in the LocalAccounts parameter, the script will write a warning to the screen to alert you to the presence of this local account. The script will continue running when this happens.
-If a local account is specified in the LocalAccounts parameter, but the account does not exist on the computer, nothing will happen (an account will NOT be created).
-The function ConvertTo-CleartextPassword, contained in this file, can be used to decrypt passwords that are stored encrypted in the TSV file.
-If a server specified in ComputerName cannot be connected to, PowerShell will output an error message.
-Microsoft advises companies to regularly roll all local and domain account passwords.
#>
[CmdletBinding(DefaultParameterSetName="Encryption")]
Param(
[Parameter(Mandatory=$true)]
[String[]]
$ComputerName,
[Parameter(Mandatory=$true)]
[String[]]
$LocalAccounts,
[Parameter(Mandatory=$true)]
[String]
$TsvFileName,
[Parameter(ParameterSetName="Encryption", Mandatory=$true)]
[String]
$EncryptionKey,
[Parameter()]
[ValidateRange(20,120)]
[Int]
$PasswordLength = 20,
[Parameter(ParameterSetName="NoEncryption", Mandatory=$true)]
[Switch]
$NoEncryption
)
#Load any needed .net classes
Add-Type -AssemblyName "System.Web" -ErrorAction Stop
#This is the scriptblock that will be executed on every computer specified in ComputerName
$RemoteRollScript = {
Param(
[Parameter(Mandatory=$true, Position=1)]
[String[]]
$Passwords,
[Parameter(Mandatory=$true, Position=2)]
[String[]]
$LocalAccounts,
#This is here so I can record what the server name that the script connected to was, sometimes the DNS records get messed up, it can be nice to have this.
[Parameter(Mandatory=$true, Position=3)]
[String]
$TargettedServerName
)
$LocalUsers = Get-WmiObject Win32_UserAccount -Filter "LocalAccount=true" | Foreach {$_.Name}
#Check if the computer has any local user accounts whose passwords are not going to be rolled by this script
foreach ($User in $LocalUsers)
{
if ($LocalAccounts -inotcontains $User)
{
Write-Warning "Server: '$($TargettedServerName)' has a local account '$($User)' whos password is NOT being changed by this script"
}
}
#For every local account specified that exists on this server, change the password
$PasswordIndex = 0
foreach ($LocalAdmin in $LocalAccounts)
{
$Password = $Passwords[$PasswordIndex]
if ($LocalUsers -icontains $LocalAdmin)
{
try
{
$objUser = [ADSI]"WinNT://localhost/$($LocalAdmin), user"
$objUser.psbase.Invoke("SetPassword", $Password)
$Properties = @{
TargettedServerName = $TargettedServerName
Username = $LocalAdmin
Password = $Password
RealServerName = $env:computername
}
$ReturnData = New-Object PSObject -Property $Properties
Write-Output $ReturnData
}
catch
{
Write-Error "Error changing password for user:$($LocalAdmin) on server:$($TargettedServerName)"
}
}
$PasswordIndex++
}
}
#Generate the password on the client running this script, not on the remote machine. System.Web.Security isn't available in the .NET Client profile. Making this call
# on the client running the script ensures only 1 computer needs the full .NET runtime installed (as opposed to every system having the password rolled).
function Create-RandomPassword
{
Param(
[Parameter(Mandatory=$true)]
[ValidateRange(20,120)]
[Int]
$PasswordLength
)
$Password = [System.Web.Security.Membership]::GeneratePassword($PasswordLength, $PasswordLength / 4)
#This should never fail, but I'm putting a sanity check here anyways
if ($Password.Length -ne $PasswordLength)
{
throw new Exception("Password returned by GeneratePassword is not the same length as required. Required length: $($PasswordLength). Generated length: $($Password.Length)")
}
return $Password
}
#Main functionality - Generate a password and remote in to machines to change the password of local accounts specified
if ($PsCmdlet.ParameterSetName -ieq "Encryption")
{
try
{
$Sha256 = new-object System.Security.Cryptography.SHA256CryptoServiceProvider
$SecureStringKey = $Sha256.ComputeHash([System.Text.UnicodeEncoding]::Unicode.GetBytes($EncryptionKey))
}
catch
{
Write-Error "Error creating TSV encryption key" -ErrorAction Stop
}
}
foreach ($Computer in $ComputerName)
{
#Need to generate 1 password for each account that could be changed
$Passwords = @()
for ($i = 0; $i -lt $LocalAccounts.Length; $i++)
{
$Passwords += Create-RandomPassword -PasswordLength $PasswordLength
}
Write-Output "Connecting to server '$($Computer)' to roll specified local admin passwords"
$Result = Invoke-Command -ScriptBlock $RemoteRollScript -ArgumentList @($Passwords, $LocalAccounts, $Computer) -ComputerName $Computer
#If encryption is being used, encrypt the password with the user supplied key prior to writing to disk
if ($Result -ne $null)
{
if ($PsCmdlet.ParameterSetName -ieq "NoEncryption")
{
$Result | Select-Object Username,Password,TargettedServerName,RealServerName | Export-Csv -Append -Path $TsvFileName -NoTypeInformation
}
else
{
#Filters out $null entries returned
$Result = $Result | Select-Object Username,Password,TargettedServerName,RealServerName
foreach ($Record in $Result)
{
$PasswordSecureString = ConvertTo-SecureString -AsPlainText -Force -String ($Record.Password)
$Record | Add-Member -MemberType NoteProperty -Name EncryptedPassword -Value (ConvertFrom-SecureString -Key $SecureStringKey -SecureString $PasswordSecureString)
$Record.PSObject.Properties.Remove("Password")
$Record | Select-Object Username,EncryptedPassword,TargettedServerName,RealServerName | Export-Csv -Append -Path $TsvFileName -NoTypeInformation
}
}
}
}
}
function ConvertTo-CleartextPassword
{
<#
.SYNOPSIS
This function can be used to decrypt passwords that were stored encrypted by the function Invoke-PasswordRoll.
Function: ConvertTo-CleartextPassword
Author: Microsoft
Version: 1.0
.DESCRIPTION
This function can be used to decrypt passwords that were stored encrypted by the function Invoke-PasswordRoll.
.PARAMETER EncryptedPassword
The encrypted password that was stored in a TSV file.
.PARAMETER EncryptionKey
The password used to do the encryption.
.EXAMPLE
. .\Invoke-PasswordRoll.ps1 #Loads the functions in this script file
ConvertTo-CleartextPassword -EncryptionKey "Password1" -EncryptedPassword 76492d1116743f0423413b16050a5345MgB8AGcAZgBaAHUAaQBwADAAQgB2AGgAcABNADMASwBaAFoAQQBzADEAeABjAEEAPQA9AHwAZgBiAGYAMAA1ADYANgA2ADEANwBkADQAZgAwADMANABjAGUAZQAxAGIAMABiADkANgBiADkAMAA4ADcANwBhADMAYQA3AGYAOABkADcAMQA5ADQAMwBmAGYANQBhADEAYQBjADcANABkADIANgBhADUANwBlADgAMAAyADQANgA1ADIAOQA0AGMAZQA0ADEAMwAzADcANQAyADUANAAzADYAMAA1AGEANgAzADEAMQA5ADAAYwBmADQAZAA2AGQA"
Decrypts the encrypted password which was stored in the TSV file.
#>
Param(
[Parameter(Mandatory=$true)]
[String]
$EncryptedPassword,
[Parameter(Mandatory=$true)]
[String]
$EncryptionKey
)
$Sha256 = new-object System.Security.Cryptography.SHA256CryptoServiceProvider
$SecureStringKey = $Sha256.ComputeHash([System.Text.UnicodeEncoding]::Unicode.GetBytes($EncryptionKey))
[SecureString]$SecureStringPassword = ConvertTo-SecureString -String $EncryptedPassword -Key $SecureStringKey
Write-Output ([System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($SecureStringPassword)))
}
Administratori var pievienot lokālā administratora kontu datoros ar Active Directory grupas izveide un pievienošana lokālās administratoru grupas, izmantojot grupas politikas Preferences -> lokālā grupa. Šī darbība nav cache akreditācijas datus. Dialoglodziņā ir līdzīgs šim. Šo metodi, nepieciešams savienojums ar Active Directory domēna pakalpojumus, kad lietotājs ir pieteicies, izmantojot šos akreditācijas datus.
2. scenārijs: Kartētos diskus
Administratori izmanto diska kartes lietotājiem piešķirt tīkla atrašanās vietas. Paroles aizsardzības līdzekli tiek izmantota, lai nodrošinātu pilnvarots piekļūt diskam. Šo izvēli ietekmē:
-
User Configuration -> Windows iestatījumi -> diska kartes -> Jauns -> kartētā diska
Svarīgas izmaiņas
Darbība: Izveidot atjaunināšanas vai nomainiet
-
Lietotājvārdsun paroleparoles apstiprināšana lauki tiek atspējoti.
Darbība: dzēšana
-
Nekādas izmaiņas darbībā
Risinājumi
Vietā izmantojot metodi paroles autentifikāciju, varat izmantot Windows Explorer, lai pārvaldīt koplietošanas atļaujas un lietotāju tiesības piešķirt. Active Directory objektu kontroles atļaujas var izmantot mapi.
3. scenārijs: pakalpojumi
Pakalpojumu izvēle var izmantot, lai mainītu rekvizītus šādā veidā, ka tie tiek izpildīti kontekstā, nevis to sākotnējā drošības konteksts. Šo izvēli ietekmē:
-
Datora konfigurācija -> vadības paneļa iestatījumi -> pakalpojumi -> -> Jauns pakalpojums
Svarīgas izmaiņas
Startēšanas: Nav izmaiņu, automātiskā vai rokasgrāmata
-
Lauku un Apstiprināt paroli ir atspējoti.
-
Administrators var izmantot tikai iebūvēto kontu.
Sākuma: atspējošana
-
Nekādas izmaiņas darbībā
Jauns dialoglodziņš
-
Administratori, kas mēģina izmantot šim kontam nav veidotas-, lietotājiem"saņem šādu brīdinājumu:
Risinājumi
Pakalpojumu joprojām var palaist kā lokālās sistēmas kontu. Pakalpojumu atļaujas var tikt mainīti, dokumentēta šajā Microsoft zināšanu bāzes rakstu:
256345 kā konfigurēt grupas politikas iestatījumu iestatīt drošības sistēmas pakalpojumi
Ņemiet vērā, ja vēlaties konfigurēt pakalpojuma nav, konfigurējiet iestatījumus datorā, kurā darbojas pakalpojums.
4. scenārijs: Plānotā un nekavējoties uzdevumi (līmeņa uz augšu)
Tie tiek izmantoti, lai palaistu plānoti uzdevumi saistībā ar konkrētu drošības. Iespēja saglabāt akreditācijas datus plānoti uzdevumi izpildīts patvaļīgs lietotāja lietotājam nav pieteicies vairs nav pieejams. Šo izvēli ietekmē. (Ņemiet vērā, daži platformās "vismaz Windows 7" ir aizstāta ar "Windows Vista un jaunākās versijās.")
-
Datora konfigurācija -> vadības paneļa iestatījumi -> Scheduled Tasks -> New -> ieplānot uzdevumu (vismaz Windows 7)
-
Datora konfigurācija -> vadības paneļa iestatījumi -> Scheduled Tasks -> New -> tūlītēja uzdevums (vismaz Windows 7)
-
User Configuration -> vadības paneļa iestatījumi -> Scheduled Tasks -> New -> ieplānot uzdevumu (vismaz Windows 7)
-
User Configuration -> vadības paneļa iestatījumi -> Scheduled Tasks -> New -> tūlītēja uzdevums (vismaz Windows 7)
Svarīgas izmaiņas
Darbība: Izveidot atjaunināšanas vai nomainiet
-
Kad atlasāt opciju palaist, vai lietotājs ir pieteicies vai ne , dialoglodziņš vairs aicina administratora akreditācijas dati.
-
Nevar saglabāt paroli izvēles rūtiņa ir atspējota. Pēc noklusējuma ir atzīmēta arī lodziņu.
Darbība: dzēšana
Darbības izmaiņas
Risinājumi
Par "ieplānots uzdevums (vismaz Windows 7)" un "tūlītēja uzdevums (vismaz Windows 7)" uzdevumus, administratori var izmantot noteiktu lietotāja kontu, konkrētā lietotājs ir pieteicies. Vai arī tie var piekļūt tikai Lokālie resursi kā lietotājam. Šos uzdevumus joprojām var palaist saistībā ar vietējo pakalpojumu.
5. scenārijs: Plānotā un nekavējoties uzdevumi (zemākā līmeņa)Tā ir zemākā līmeņa versija izmanto, lai palaistu Ieplānotie uzdevumi saistībā ar konkrētu drošības preferences. Iespēja saglabāt akreditācijas datus plānoti uzdevumi izpildīts patvaļīgs lietotāja lietotājam nav pieteicies vairs nav pieejams. Šo izvēli ietekmē:
-
Datora konfigurācija -> vadības paneļa iestatījumi -> plānoti uzdevumi -> New -> ieplānotu uzdevumu
-
Datora konfigurācija -> vadības paneļa iestatījumi -> plānoti uzdevumi -> New -> tūlītēja uzdevums (Windows XP)
-
User Configuration -> vadības paneļa iestatījumi -> plānoti uzdevumi -> New -> ieplānotu uzdevumu
-
User Configuration -> vadības paneļa iestatījumi -> plānoti uzdevumi -> New -> tūlītēja uzdevums (Windows XP)
Svarīgas izmaiņas
Darbība: Izveidot atjaunināšanas vai nomainiet
-
Palaist kā izvēles rūtiņa ir atspējota. Tādēļ visi Lietotājvārdsun paroleParoles apstiprināšana lauki ir atspējoti.
Darbība: dzēšana
Nekādas izmaiņas darbībā
Risinājumi
"Ieplānotu uzdevumu" un "(Windows XP) tiešā uzdevuma" vienumu plānoti uzdevumi programmu, izmantojot atļaujām, kas pašreiz ir pieejamas lokālo pakalpojumu.
6. scenārijs: Datu avoti
Datu avotu izvēle tiek izmantota, lai piesaistītu datu avotu datoram vai lietotājam. Šis līdzeklis vairs saglabā akreditācijas datus, lai iespējotu piekļuvi datu avotiem, kuriem ir aizsargāta ar paroli. Šo izvēli ietekmē:
-
Datora konfigurācija -> vadības paneļa iestatījumi -> datu avoti
-
User Configuration -> vadības paneļa iestatījumi -> datu avoti
Svarīgas izmaiņas
Darbība: Izveidot atjaunināšanas vai nomainiet
-
Lietotājvārdsun paroleParoles apstiprināšana lauki tiek atspējoti:
Darbība: dzēšana
-
Nekādas izmaiņas darbībā
Risinājumi
Risinājumi nav pieejami. Šo izvēli vairs saglabā akreditācijas datus, lai atļautu piekļuvi datu avotiem, kuriem ir aizsargāta ar paroli.
CPassword izslēgšanas
Noņemot CPassword
Windows PowerShell skriptu, kas ir ietverts šajā Microsoft zināšanu bāzes rakstā nosaka, vai domēna satur visus CPassword var izmantot grupas politikas Preferences. Ja CPassword XML ir noteicis konkrētā izvēle, tā tiek parādīta šajā sarakstā.
Nosaka CPassword preferences
Šis skripts ir jāpalaiž no lokālā direktorija tīrāmā domēna kontrollerī. Kopēt un saglabāt saturu uz jaunu failu Windows PowerShell, noteikt sistēmas disku un palaidiet skriptu, kas norādīti šī izmantošana.
<#.SYNOPSIS
Group Policy objects in your domain can have preferences that store passwords for different tasks, such as the following:
1. Data Sources
2. Drive Maps
3. Local Users
4. Scheduled Tasks (both XP and up-level)
5. Services
These passwords are stored in SYSVOL as part of GP preferences and are not secure because of weak encryption (32-byte AES).
Therefore, we recommend that you not deploy such preferences in your domain environment and remove any such existing
preferences. This script is to help administrator find GP Preferences in their domain's SYSVOL that contains passwords.
.DESCRIPTION
This script should be run on a DC or a client computer that is installed with RSAT to print all the preferences that contain
password with information such as GPO, Preference Name, GPEdit path under which this preference is defined.
After you have a list of affected preferences, these preferences can be removed by using the editor in the Group Policy Management Console.
.SYNTAX
Get-SettingsWithCPassword.ps1 [-Path <String>]
.EXAMPLE
Get-SettingsWithCPassword.ps1 -Path %WinDir%\SYSVOL\domain
Get-SettingsWithCPassword.ps1 -Path <GPO Backup Folder Path>
.NOTES
If Group Policy PS module is not found the output will contain GPO GUIDs instead of GPO names. You can either run
this script on a domain controller or rerun the script on the client after you have installed RSAT and
enabled the Group Policy module.
Or, you can use GPO GUIDs to obtain GPO names by using the Get-GPO cmdlet.
.LINK
http://go.microsoft.com/fwlink/?LinkID=390507
#>
#----------------------------------------------------------------------------------------------------------------
# Input parameters
#--------------------------------------------------------------------------------------------------------------
param(
[string]$Path = $(throw "-Path is required.") # Directory path where GPPs are located.
)
#---------------------------------------------------------------------------------------------------------------
$isGPModuleAvailable = $false
$impactedPrefs = { "Groups.xml", "ScheduledTasks.xml","Services.xml", "DataSources.xml", "Drives.xml" }
#----------------------------------------------------------------------------------------------------------------
# import Group olicy module if available
#----------------------------------------------------------------------------------------------------------------
if (-not (Get-Module -name "GroupPolicy"))
{
if (Get-Module -ListAvailable |
Where-Object { $_.Name -ieq "GroupPolicy" })
{
$isGPModuleAvailable = $true
Import-Module "GroupPolicy"
}
else
{
Write-Warning "Unable to import Group Policy module for PowerShell. Therefore, GPO guids will be reported.
Run this script on DC to obtain the GPO names, or use the Get-GPO cmdlet (on DC) to obtain the GPO name from GPO guid."
}
}
else
{
$isGPModuleAvailable = $true
}
Function Enum-SettingsWithCpassword ( [string]$sysvolLocation )
{
# GPMC tree paths
$commonPath = " -> Preferences -> Control Panel Settings -> "
$driveMapPath = " -> Preferences -> Windows Settings -> "
# Recursively obtain all the xml files within the SYVOL location
$impactedXmls = Get-ChildItem $sysvolLocation -Recurse -Filter "*.xml" | Where-Object { $impactedPrefs -cmatch $_.Name }
# Each xml file contains multiple preferences. Iterate through each preference to check whether it
# contains cpassword attribute and display it.
foreach ( $file in $impactedXmls )
{
$fileFullPath = $file.FullName
# Set GPP category. If file is located under Machine folder in SYSVOL
# the setting is defined under computer configuration otherwise the
# setting is a to user configuration
if ( $fileFullPath.Contains("Machine") )
{
$category = "Computer Configuration"
}
elseif ( $fileFullPath.Contains("User") )
{
$category = "User Configuration"
}
else
{
$category = "Unknown"
}
# Obtain file content as XML
try
{
[xml]$xmlFile = get-content $fileFullPath -ErrorAction Continue
}
catch [Exception]{
Write-Host $_.Exception.Message
}
if ($xmlFile -eq $null)
{
continue
}
switch ( $file.BaseName )
{
Groups
{
$gppWithCpassword = $xmlFile.SelectNodes("Groups/User") | where-Object { [String]::IsNullOrEmpty($_.Properties.cpassword) -eq $false }
$preferenceType = "Local Users"
}
ScheduledTasks
{
$gppWithCpassword = $xmlFile.SelectNodes("ScheduledTasks/*") | where-Object { [String]::IsNullOrEmpty($_.Properties.cpassword) -eq $false }
$preferenceType = "Scheduled Tasks"
}
DataSources
{
$gppWithCpassword = $xmlFile.SelectNodes("DataSources/DataSource") | where-Object { [String]::IsNullOrEmpty($_.Properties.cpassword) -eq $false }
$preferenceType = "Data sources"
}
Drives
{
$gppWithCpassword = $xmlFile.SelectNodes("Drives/Drive") | where-Object { [String]::IsNullOrEmpty($_.Properties.cpassword) -eq $false }
$preferenceType = "Drive Maps"
}
Services
{
$gppWithCpassword = $xmlFile.SelectNodes("NTServices/NTService") | where-Object { [String]::IsNullOrEmpty($_.Properties.cpassword) -eq $false }
$preferenceType = "Services"
}
default
{ # clear gppWithCpassword and preferenceType for next item.
try
{
Clear-Variable -Name gppWithCpassword -ErrorAction SilentlyContinue
Clear-Variable -Name preferenceType -ErrorAction SilentlyContinue
}
catch [Exception]{}
}
}
if ($gppWithCpassword -ne $null)
{
# Build GPO name from GUID extracted from filePath
$guidRegex = [regex]"\{(.*)\}"
$match = $guidRegex.match($fileFullPath)
if ($match.Success)
{
$gpoGuid = $match.groups[1].value
$gpoName = $gpoGuid
}
else
{
$gpoName = "Unknown"
}
if($isGPModuleAvailable -eq $true)
{
try
{
$gpoInfo = Get-GPO -Guid $gpoGuid -ErrorAction Continue
$gpoName = $gpoInfo.DisplayName
}
catch [Exception] {
Write-Host $_.Exception.Message
}
}
# display prefrences that contain cpassword
foreach ( $gpp in $gppWithCpassword )
{
if ( $preferenceType -eq "Drive Maps" )
{
$prefLocation = $category + $driveMapPath + $preferenceType
}
else
{
$prefLocation = $category + $commonPath + $preferenceType
}
$obj = New-Object -typeName PSObject
$obj | Add-Member –membertype NoteProperty –name GPOName –value ($gpoName) –passthru |
Add-Member -MemberType NoteProperty -name Preference -value ($gpp.Name) -passthru |
Add-Member -MemberType NoteProperty -name Path -value ($prefLocation)
Write-Output $obj
}
} # end if $gppWithCpassword
} # end foreach $file
} # end functions Enum-PoliciesWithCpassword
#-----------------------------------------------------------------------------------
# Check whether Path is valid. Enumerate all settings that contain cpassword.
#-----------------------------------------------------------------------------------
if (Test-Path $Path )
{
Enum-SettingsWithCpassword $Path
}
else
{
Write-Warning "No such directory: $Path"
}
Lietošanas piemērs (tiek pieņemts, ka sistēmas disks ir C)
.\Get-SettingsWithCPassword.ps1 –path “C:\Windows\SYSVOL\domain” | Format-List
Piezīme. Ņemiet vērā, ka varat norādīt visas dublējuma GPO ceļa vietā domēna.
Noteikšanas skripts ģenerē sarakstu, kas ir līdzīgs šim:
Periodiem sarakstiem, apsveriet iespēju saglabāt izvades failu:
.\Get-SettingsWithCPassword.ps1 –path “C:\Windows\SYSVOL\domain” | ConvertTo-Html > gpps.html
Noņemot CPassword preferences
Lai noņemtu preferences, kuras ir CPassword dati, ieteicams izmantot grupas politiku pārvaldības konsoles (GPMC) domēna kontrollerī, vai klientam ir instalēti servera attālās administrācijas rīki. Jūs varat noņemt visas preferences piecas šīs konsoles darbības. Lai to izdarītu, izpildiet tālāk norādītās darbības.
-
GPMC, atveriet iekļautos datus CPassword izvēle.
-
Mainīt darbības izdzēst vai Atspējot, kā jūsu izvēle.
-
Noklikšķiniet uz Labi , lai saglabātu izmaiņas.
-
Pagaidiet vienu vai divas grupas politikas atsvaidzināšanas cikla ļauj izplatīt klientiem izmaiņas.
-
Pēc izmaiņas attiecas uz visiem klientiem, dzēsiet izvēle.
-
Atkārtojiet darbības no 1 līdz 5, cik nepieciešams, lai iztīrītu visu vide. Noteikšanas skripts parāda nulles rezultātu, kad esat pabeidzis visas darbības.
Faila nosaukums |
SHA1 Jaucējalgoritms |
SHA256 Jaucējalgoritms |
---|---|---|
Windows6.0-KB2928120-ia64.msu |
B2A74305CB56191774BFCF9FCDEAA983B26DC9A6 |
DCE8C0F9CEB97DBF1F7B9BAF76458B3770EF01C0EDC581621BC8C3B2C7FD14E7 |
Windows6.0-KB2928120-x64.msu |
386457497682A2FB80BC93346D85A9C1BC38FBF7 |
1AF67EB12614F37F4AC327E7B5767AFA085FE676F6E81F0CED95D20393A1D38D |
Windows6.0-KB2928120-x86.msu |
42FF283781CEC9CE34EBF459CA1EFE011D5132C3 |
016D7E9DBBC5E487E397BE0147B590CFBBB5E83795B997894870EC10171E16D4 |
Windows6.1-KB2928120-ia64.msu |
5C2196832EC94B99AAF9B074D3938525B7219690 |
9958FA58134F55487521243AD9740BEE0AC210AC290D45C8322E424B3E5EBF16 |
Windows6.1-KB2928120-x64.msu |
EA5332F4E289DC799611EAB8E3EE2E86B7880A4B |
417A2BA34F8FD367556812197E2395ED40D8B394F9224CDCBE8AB3939795EC2A |
Windows6.1-KB2928120-x86.msu |
7B7B6EE24CD8BE1AB3479F9E1CF9C98982C8BAB1 |
603206D44815EF2DC262016ED13D6569BE13D06E2C6029FB22621027788B8095 |
Windows8-RT-KB2928120-x64.msu |
E18FC05B4CCA0E195E62FF0AE534BA39511A8593 |
FCAED97BF1D61F60802D397350380FADED71AED64435D3E9EAA4C0468D80141E |
Windows8-RT-KB2928120-x86.msu |
A5DFB34F3B9EAD9FA78C67DFC7ACACFA2FBEAC0B |
7F00A72D8A15EB2CA70F7146A8014E39A71CFF5E39596F379ACD883239DABD41 |
Windows8.1-KB2928120-x64.msu |
A07FF14EED24F3241D508C50E869540915134BB4 |
6641B1A9C95A7E4F0D5A247B9F488887AC94550B7F1D7B1198D5BCBA92F7A753 |
Windows8.1-KB2928120-x86.msu |
DE84667EC79CBA2006892452660EB99580D27306 |
468EE4FA3A22DDE61D85FD3A9D0583F504105DF2F8256539051BC0B1EB713E9C |
Windows8.1-KB2961899-x64.msu |
10BAE807DB158978BCD5D8A7862BC6B3EF20038B |
EC26618E23D9278FC1F02CA1F13BB289E1C6C4E0C8DA5D22E1D9CDA0DA8AFF51 |
Windows8.1-KB2961899-x86.msu |
230C64447CC6E4AB3AD7B4D4655B8D8CEFBFBE98 |
E3FAD567AB6CA616E42873D3623A777185BE061232B952938A8846A974FFA7AF |