I have a batch script that disables Wpad (A security messaure)


  1. Posts : 472
    Windows 10 Pro x64
       #1

    I have a batch script that disables Wpad (A security messaure)


    Hi all. I found this batch file to render wpad useless or prevent the danger with wpad. I want you to give me advice on what you think of it, and if it's something that is a legit concern even in 2023. And feel free to use it for yourself for security if you find it legit prevention. I read about it and it is?/was a legit concern.

    Here it is below:
    "I have tested removing proxy from computers by renaming the WPAD key and rebooting.
    You can also use IEAK11 to create a GPO to remove "Automatically detect settings" and that is why the script uses gpupdate to apply the GPO as well. If you already applied the change to a computer this script won't do changes and will exit. The basic script is bellow.

    Even when you turn on in Internet Explorer "Automatically detect settings" proxy is not used and WPAD key is recreated but with no proxy. This setting is no longer recommended as makes your computer vulnerable (Disable WPAD Now or Have Your Accounts Compromised, Researchers Warn - Slashdot) ."

    SCRIPT BELOW:


    REM Script to delete the cached proxy configuration, clear IE cache, flushdns, rename WPAD key and delete the original; reboot is required

    gpupdate

    reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad.bad" >nul
    if %ERRORLEVEL%==0 goto END

    ELSE
    (
    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v "DefaultConnectionSettings" /f
    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v "SavedLegacySettings" /f

    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

    ipconfig /flushdns

    reg copy "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad" "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad.bad"

    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad" /f

    echo n | gpupdate /force /wait:0

    shutdown.exe /r /t 30 )

    :END
    I have a batch script that disables Wpad (A security messaure) Attached Files
      My Computer


  2. Posts : 42,991
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    prevent the danger with wpad.
    Please define the danger.... I'm worried now...
      My Computers


  3. Posts : 472
    Windows 10 Pro x64
    Thread Starter
       #3

    dalchina said:
    Please define the danger.... I'm worried now...
    Click the link above and it will take you there to explain :)

    - - - Updated - - -

    I'll just share it here anyway, no need to click the link.

    It's enabled by default on Windows (and supported by other operating systems) -- but now security researchers are warning that "Man-in-the-middle attackers can abuse the WPAD protocol to hijack people's online accounts and steal their sensitive information even when they access websites over encrypted HTTPS or VPN connections," according to CSO. Slashdot reader itwbennett writes:
    Their advice: disable WPAD now. "No seriously, turn off WPAD!" one of their presentation slides said. "If you still need to use PAC files, turn off WPAD and configure an explicit URL for your PAC script; and serve it over HTTPS or from a local file"... A few days before their presentation, two other researchers named Itzik Kotler and Amit Klein independently showed the same HTTPS URL leak via malicious PACs in a presentation at the Black Hat security conference. A third researcher, Maxim Goncharov, held a separate Black Hat talk about WPAD security risks, entitled BadWPAD.
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #4

    I just checked this on mine and there is NO Value Data set . . .

    I have a batch script that disables Wpad (A security messaure)-image.png
      My Computer


  5. Posts : 472
    Windows 10 Pro x64
    Thread Starter
       #5

    Paul Black said:
    I just checked this on mine and there is NO Value Data set . . .

    I have a batch script that disables Wpad (A security messaure)-image.png
    Hi. They say that just turning it off or not having it set in registry, is not enough apparently hence the Wpad script to disable it 100%.
      My Computer


  6. Posts : 6,850
    22H2 64 Bit Pro
       #6

    That article is dated 2016. The issue has likely been patched.

    https://support.microsoft.com/en-us/...9-a974d1af385e
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #7

    Callender said:
    That article is dated 2016. The issue has likely been patched.

    > MS16-077: Security update for WPAD: June 14, 2016
    I found similar information when investigating. It appears that it was identified and patched quite quickly.
      My Computer


  8. Posts : 472
    Windows 10 Pro x64
    Thread Starter
       #8

    That's great news! Thanks!
      My Computer


  9. Posts : 352
    Windows 11 Home (x64) Version 23H2
       #9

    This has been patched quiet some time ago ! Marked Safe !
      My Computer


  10. Posts : 15,486
    Windows10
       #10

    BlackVen0m said:
    That's great news! Thanks!
    Mind you 2016 was a pretty good year - no covid, no high energy costs, no Ukraine War, eggs were cheap, Argentina had not won world cup
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:40.
Find Us




Windows 10 Forums