Skip to content

Commit

Permalink
Checkfiddler proxy (#236)
Browse files Browse the repository at this point in the history
* still working on it.

* Fiddler Proxy Check

* changes made for Fiddler proxy check

* Make proxy check work on multiple registry entries

---------

Co-authored-by: Suruchi Maini <[email protected]>
  • Loading branch information
MaximeKjaer and MainiSuruchi authored Oct 3, 2024
1 parent e93a09a commit dac72ba
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion AzFilesHybrid/AzFilesHybrid.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3842,6 +3842,7 @@ function Debug-AzStorageAccountEntraKerbAuth {
"CheckAdminConsent" = [CheckResult]::new("CheckAdminConsent");
"CheckWinHttpAutoProxySvc" = [CheckResult]::new("CheckWinHttpAutoProxySvc");
"CheckIpHlpScv" = [CheckResult]::new("CheckIpHlpScv");
"CheckFiddlerProxy" = [CheckResult]::new("CheckFiddlerProxy");
"CheckEntraJoinType" = [CheckResult]::new("CheckEntraJoinType")
}
#
Expand Down Expand Up @@ -4121,6 +4122,56 @@ function Debug-AzStorageAccountEntraKerbAuth {
}

}
#
#Check if Fiddler Proxy is cleaned up
#
if (!$filterIsPresent -or $Filter -match "CheckFiddlerProxy")
{
try
{
$checksExecuted += 1;

$ProxysubFolder = Get-ChildItem `
-Path Registry::HKLM\SYSTEM\CurrentControlSet\Services\iphlpsvc\Parameters\ProxyMgr `
-ErrorAction SilentlyContinue

$success = $true
foreach ($folder in $ProxysubFolder)
{
$properties = $folder | Get-ItemProperty
if (($null -ne $properties.StaticProxy) -and ($properties.StaticProxy.Contains("https=127.0.0.1:")))
{
# If this is the first failure detected, print "FAILED"
if ($success)
{
$checks["CheckFiddlerProxy"].Result = "Failed"
Write-Error "CheckFiddlerProxy - FAILED"
$success = $false
}

# Report the registry path every time a failure is detected
Write-Error "Fiddler Proxy is set, you need to delete any registry nodes under '$($folder.Name)'."
}
}

if ($success)
{
$checks["CheckFiddlerProxy"].Result = "Passed"
Write-Verbose "CheckFiddlerProxy - SUCCESS"
}
else
{
Write-Error "To prevent this issue from re-appearing in the future, you should also uninstall Fiddler."
}
}
catch
{
$checks["CheckFiddlerProxy"].Result = "Failed"
$checks["CheckFiddlerProxy"].Issue = $_
Write-Error "CheckFiddlerProxy - FAILED"
}
}

#
#Check if the machine is HAADJ or AADJ
#
Expand Down Expand Up @@ -4157,7 +4208,6 @@ function Debug-AzStorageAccountEntraKerbAuth {
Write-Error "CheckEntraJoinType - FAILED"
Write-Error $_
}

}

SummaryOfChecks -filterIsPresent $filterIsPresent -checksExecuted $checksExecuted
Expand Down

0 comments on commit dac72ba

Please sign in to comment.