mirror of
https://github.com/itm4n/PrivescCheck
synced 2026-06-08 14:54:28 +00:00
Fix improper handling of read access errors on WMI object db file due to EDR denying access (issue #81)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
- False positive in IPv6 configuration check.
|
||||
- Improved handling of AppId and TypeLibId values when enumerating COM, so that parsing errors are properly handled and reported with warning messages (issue #78).
|
||||
- Errors caused by EDR denying access to the WMI object database file are now properly handled (issue #81).
|
||||
|
||||
## 2025-11-19
|
||||
|
||||
|
||||
@@ -774,6 +774,12 @@ function Get-SccmNetworkAccessAccountCredential {
|
||||
|
||||
if (-not $SanityCheck) { return }
|
||||
|
||||
$ReadAccess = Get-ObjectAccessRight -Name $Path -Type File -AccessRights @($script:FileAccessRight::ReadData)
|
||||
if ($null -eq $ReadAccess) {
|
||||
Write-Warning "Read access to file is not allowed: $($Path)"
|
||||
return
|
||||
}
|
||||
|
||||
$Candidates = Select-String -Path $Path -Pattern "$($BasePattern)`0`0$($PolicyPatternBegin)"
|
||||
if ($null -eq $Candidates) { return }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user