S3cur3Th1sSh1t / WinPwn

Automation for internal Windows Penetrationtest / AD-Security
BSD 3-Clause "New" or "Revised" License
3.36k stars 521 forks source link

Network Proxy not detecting accurately #30

Open sp00ks-git opened 3 years ago

sp00ks-git commented 3 years ago

I can see when running winpwn.ps1 that the proxy i have isnt being detected although it is in place.

Searching for network proxy... No proxy detected, continuing... Straight after the 'True' Statement from the amsi bypass i get:

Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."

I can confirm I have a proxy in place.

sp00ks-git commented 3 years ago

I can confirm by adding in my current credentials manually and get a 200 response.

$Wcl=New-Object System.Net.WebClient $Creds=Get-Credential $Wcl.Proxy.Credentials=$Creds Invoke-WebRequest http://www.google.co.uk

StatusCode : 200 StatusDescription : OK

S3cur3Th1sSh1t commented 3 years ago

Is the environment using PAC files for proxy distribution? You should be able to look this up in the IE config for example.

I never had the time so far to implement PAC-file support/parsing.

Greetings

sp00ks-git commented 3 years ago

Yes I can confirm the setup uses a PAC.