Bu düzeltme, yerel Windows komut dosyası komut dosyası kullanan bir Windows PowerShell komut dosyasını kullanmayı içerir.
Bu talimatlar; DPA Uygulaması, DPA Veri Deposu ve Bağımsız DPA Aracısı (tek başına bir sunucuda veya başka bir uygulama sunucusu türüne yüklü) dahil olmak üzere her tür Windows DPA kurulumuna uygulanabilir.
Apache Log4j güvenlik açıkları hakkında daha fazla bilgi için aşağıdaki Dell Güvenlik Önerilerine bakın:
Bu talimatlarla ilgili sorular veya yardım için Dell Teknik Destek ile iletişime geçin.
Manuel düzeltme adımları:
Not:
Not: Alternatif olarak, log4j_jndiremoval.txt dosyasının tam metni, bu talimatların sonunda sağlanmıştır; bu metin dosyası kopyalanır ve bir metin dosyasına kopyalanır.
Windows PowerShell penceresinde, DPA Uygulaması veya DPA Veri Deposu üzerinde bir Aracı yüklemesi ise şu komut kullanılır:
dpa aracı durdurma
Windows PowerShell penceresinden bağımsız bir DPA Aracısı yüklemesi ise şu komut kullanılır:
\dpa durdurma
Örnek:
C:\Program Files\EMC\DPA\agent\etc\dpa stop
Not: DPA yükleme yolunun tekrar girilmesi gerekir.
Windows PowerShell penceresinde, DPA Uygulaması veya DPA Veri Deposu üzerinde bir Aracı yüklemesi ise şu komut kullanılır:
dpa aracı başlatma
Windows PowerShell penceresinden bağımsız bir DPA Aracısı yüklemesi ise şu komut kullanılır:
\dpa start
Örnek:
C:\Program Files\EMC\DPA\agent\etc\dpa start
Zeyilname:
Aşağıda PowerShell komut dosyasının tam metni verilmiştir. Bu KB'ye bağlı dosyaya erişilemiyorsa yukarıdaki adımlarda kullanmak üzere bu metin kopyalanır ve metin dosyasına (.txt) olduğu gibi kopyalanır ve takılabilir.
param ( [switch]$verify ) '--------------------------------------------------------------------------' '--------------------------------------------------------------------------' ' Data Protection Advisor CVE-2021-44228, CVE-2021-45046 Patcher 1.1 ' ' Developer : Pankaj Pande(p.pande@dell.com) ' ' Release : 29 Dec 2021 ' '--------------------------------------------------------------------------' 'Welcome to CVE-2021-44228, CVE-2021-45046 Patching Tool.' 'This utility will assist you in patching Data Protection Advisor for CVE-2021-44228 and CVE-2021-45046 on a Windows system.' "Special Note : The tool automates remediation steps for all internal components. Following remediation, validation checks are also run. While this tool remediates these vulnerabilities, all available information from Apache on log4j continues to be monitored. If new CVEs are discovered, Dell Technologies' Engineering teams will clarify impact and new remediation steps where necessary. If needed this tool will be updated to include the new remediation steps." '---------------------------------------------------------------------------' function List-JndiLookup { Param ( [string[]]$JarFiles, [string] $FilenameToRemove ) #initiate the .net namespace add-type -AssemblyName 'System.IO.Compression.filesystem' "The number of files to be processed is : $($JarFiles.Count)" #list the files we are processing # them later foreach ($JarFile in $JarFiles) { "$JarFile" } $processedFiles = 0; $skippedFiles = 0; foreach ($JarFile in $JarFiles) { # Open the jar for updating (.jar files are just .zip files) try { $ProcessJarFile = [io.compression.zipfile]::Open($JarFile,'Update') } catch { # Error Handling } "Checking $JarFile for $FilenameToRemove" $totalFilesInJar = ($ProcessJarFile.Entries | Where FullName -Match $FilenameToRemove).Count if($totalFilesInJar -gt 0){ $processedFiles++ } #close Zip try { $ProcessJarFile.Dispose() } catch { # Error Handling } } if ( $processedFiles -gt 0) { Write-Host "$processedFiles file(s) found vulnerable" -fore red Write-Host "Finished...Please make sure to run the patching on this sytem" -fore red } else { Write-Host "$processedFiles file(s) found vulnerable" -fore green Write-Host "Finished...No Action needed" -fore green } } function Remove-JndiLookup { Param ( [string[]]$JarFiles, [string] $FilenameToRemove ) #initiate the .net namespace add-type -AssemblyName 'System.IO.Compression.filesystem' "The number of files to be processed is : $($JarFiles.Count)" #list the files we are processing # them later foreach ($JarFile in $JarFiles) { "$JarFile" } "Starting patching/Removel Process" $processedFiles = 0; $skippedFiles = 0; foreach ($JarFile in $JarFiles) { # Open the jar for updating (.jar files are just .zip files) try { $ProcessJarFile = [io.compression.zipfile]::Open($JarFile,'Update') } catch { # Error Handling } "Checking $JarFile for $FilenameToRemove" $totalFilesInJar = ($ProcessJarFile.Entries | Where FullName -Match $FilenameToRemove).Count if($totalFilesInJar -gt 0){ "Deleting unwanted file $FilenameToRemove from $JarFile" ($ProcessJarFile.Entries | Where FullName -Match $FilenameToRemove).Delete() $processedFiles++ } else { "File $FilenameToRemove not found inside $JarFile, this may have already been deleted." $skippedFiles++ } # Clean up / close the zip try { $ProcessJarFile.Dispose() } catch { # Error Handling } } "$processedFiles file(s) processed`n$skippedFiles file(s) skipped" Write-Host "Finished..." -fore green } if ( $verify ) { Write-Host "Running in dry-run mode. Will not process any files" -fore green } else { Write-Host "Running in fix mode. Will patch files that are found affected" -fore red } $dpa_path = Read-Host "Enter the DPA location " Write-Host "Running in : '$dpa_path' " -fore green if ($verify) { List-JndiLookup -JarFiles (Get-ChildItem -Exclude 'tmp' -Recurse -Path "$dpa_path" -Filter 'dpa*.jar' | ? { $_.FullName -inotmatch 'tmp' }).FullName -FilenameToRemove 'JndiLookup.class' } else { Remove-JndiLookup -JarFiles (Get-ChildItem -Exclude 'tmp' -Recurse -Path "$dpa_path" -Filter 'dpa*.jar' | ? { $_.FullName -inotmatch 'tmp' }).FullName -FilenameToRemove 'JndiLookup.class' }
Bu talimatlarla ilgili sorular veya yardım için Dell Teknik Destek ile iletişime geçin.