diff --git a/packages/common.vm/common.vm.nuspec b/packages/common.vm/common.vm.nuspec index 8ce9e3214..79076e2e5 100755 --- a/packages/common.vm/common.vm.nuspec +++ b/packages/common.vm/common.vm.nuspec @@ -2,7 +2,7 @@ common.vm - 0.0.0.20241029 + 0.0.0.20241106 Common libraries for VM-packages Mandiant diff --git a/packages/common.vm/tools/vm.common/vm.common.psm1 b/packages/common.vm/tools/vm.common/vm.common.psm1 index f976e6e06..6a54eb2a1 100755 --- a/packages/common.vm/tools/vm.common/vm.common.psm1 +++ b/packages/common.vm/tools/vm.common/vm.common.psm1 @@ -128,20 +128,20 @@ function VM-Assert-Path { } } -# Raise an exception if the Signature of $file_path is invalid +# Raise an exception if the signtool.exe is not found or if the signature of $filePath is invalid +# vcbuildtools.vm installs signtool.exe function VM-Assert-Signature { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] - [String] $file_path + [String] $filePath ) - $signature_status = (Get-AuthenticodeSignature -FilePath $file_path).Status - if ($signature_status -eq 'Valid') { - VM-Write-Log "INFO" "Valid signature: $file_path" - } else { - $err_msg = "Invalid signature: $file_path" - VM-Write-Log "ERROR" $err_msg - throw $err_msg + $signtoolPath = Get-ChildItem -Path "C:\Program Files*\Windows Kits\10\bin\*\x86\signtool.exe" | Select-Object -Last 1 + if (-Not $signtoolPath) { throw "signtool.exe not found" } + + & $signtoolPath verify /pa /all /tw /q $filePath + if ($LASTEXITCODE) { + throw "INVALID SIGNATURE: $filePath" } } diff --git a/packages/googlechrome.vm/googlechrome.vm.nuspec b/packages/googlechrome.vm/googlechrome.vm.nuspec index 9226cd9d1..71fe31c62 100644 --- a/packages/googlechrome.vm/googlechrome.vm.nuspec +++ b/packages/googlechrome.vm/googlechrome.vm.nuspec @@ -2,11 +2,12 @@ googlechrome.vm - 0.0.0.20241002 + 0.0.0.20241106 Google LLC. Chrome is a popular web browser. - + + diff --git a/packages/metasploit.vm/metasploit.vm.nuspec b/packages/metasploit.vm/metasploit.vm.nuspec index e14ef5de4..40b6cda4c 100644 --- a/packages/metasploit.vm/metasploit.vm.nuspec +++ b/packages/metasploit.vm/metasploit.vm.nuspec @@ -2,11 +2,12 @@ metasploit.vm - 6.4.13.20240614 + 6.4.13.20241106 Rapid7 A computer security project that provides information about security vulnerabilities, aids in penetration testing, and IDS signature development. - + + diff --git a/packages/regcool.vm/regcool.vm.nuspec b/packages/regcool.vm/regcool.vm.nuspec index b0692cb21..21d30e9cf 100644 --- a/packages/regcool.vm/regcool.vm.nuspec +++ b/packages/regcool.vm/regcool.vm.nuspec @@ -2,7 +2,7 @@ regcool.vm - 0.0.0.20240411 + 2.015 Kurt Zimmermann In addition to all the features that you can find in RegEdit and RegEdt32, RegCool adds many powerful features that allow you to work faster and more efficiently with registry related tasks diff --git a/packages/regcool.vm/tools/chocolateyinstall.ps1 b/packages/regcool.vm/tools/chocolateyinstall.ps1 index 210c23a50..015d91be3 100644 --- a/packages/regcool.vm/tools/chocolateyinstall.ps1 +++ b/packages/regcool.vm/tools/chocolateyinstall.ps1 @@ -3,38 +3,8 @@ Import-Module vm.common -Force -DisableNameChecking $toolName = 'RegCool' $category = 'Registry' -$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName $zipUrl = 'https://kurtzimmermann.com/files/RegCoolX64.zip' +$zipSha256 = '8fde37cf66024eb68be3c0e34125540f855626935f1cffc0fb7409f3ba343870' -try { - # Download zip - $packageArgs = @{ - packageName = $env:ChocolateyPackageName - file = Join-Path ${Env:TEMP} $toolName - url = $zipUrl - } - $filePath = Get-ChocolateyWebFile @packageArgs - - # Extract zip - Get-ChocolateyUnzip -FileFullPath $filePath -Destination $toolDir - - # Check signature of all unzip files - Get-ChildItem -Path "$toolDir\*.{exe,dll}" | ForEach-Object { - VM-Assert-Signature $_.FullName - } -} catch { - # Remove files with invalid signature - Remove-Item $toolDir -Recurse -Force -ea 0 | Out-Null - VM-Write-Log-Exception $_ -} - -try { - $shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category - $shortcut = Join-Path $shortcutDir "$toolname.lnk" - $toolPath = Join-Path $toolDir "$toolName.exe" - Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $toolPath - VM-Assert-Path $shortcut -} catch { - VM-Write-Log-Exception $_ -} +VM-Install-From-Zip $toolName $category $zipUrl -zipSha256 $zipSha256 -consoleApp $false -innerFolder $false diff --git a/packages/sysinternals.vm/sysinternals.vm.nuspec b/packages/sysinternals.vm/sysinternals.vm.nuspec index f50d69e15..eb821024c 100644 --- a/packages/sysinternals.vm/sysinternals.vm.nuspec +++ b/packages/sysinternals.vm/sysinternals.vm.nuspec @@ -2,11 +2,12 @@ sysinternals.vm - 0.0.0.20240717 + 0.0.0.20241106 Mark Russinovich, Bryce Cogswell Sysinternals suite. - + +