Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: FYI : Disable "Windows Defender Firewall" service also break Windows Sandbox. #364

Closed
Snowball-V opened this issue May 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Snowball-V
Copy link

Under Windows LTSC 21H2 updated as of May 15, 2024, the following setting breaks the use of Windows Sandbox. More precisely, this script indefinitely freezes Windows Sandbox on its blue startup splash screen.

Privacy over security
➜ Disable Microsoft Defender
➜  ➜ Disable Microsoft Defender firewall
➜  ➜  ➜ Disable Microsoft Defender Firewall services and drivers
➜  ➜  ➜  ➜ Disable "Windows Defender Firewall" service ❨breaks Microsoft Store, netsh advfirewall, winget❩

It should be noted that running the script Disable "Windows Defender Firewall" service ❨breaks Microsoft Store, netsh advfirewall, winget❩ in "revert" mode and restarting the PC fixes the issue, and Windows Sandbox launches again.

It's not really a bug because there's a warning that will breaking Microsoft Store, netsh advfirewall, winget, but perhaps it's good to explicitly explain that Windows Sandbox is affected by the breakage, or if a Batch script expert sees this message, maybe there's a way to combine the application of this script and the possibility of keeping Windows Sandbox functional?

Anyway, thanks for this masterpiece, very useful.

@Snowball-V Snowball-V added the bug Something isn't working label May 15, 2024
@undergroundwires
Copy link
Owner

Hi, great report/contribution thank you. You help many others that could not solve this in #115, #152.

Could you also test if this one (under same category) breaks it too:

Disable "Windows Defender Firewall Authorization Driver" service (breaks Microsoft Store, `netsh advfirewall`, `winget`)

Something like this:

  1. Run the script
  2. Restart the computer.
  3. Verify that it broke or not.
  4. Revert changes.
  5. Restart the computer.

Your feedback will be valuable and I will update the docs right away. The other script usually breaks the same stuff as the one you figured out.

I cannot test this as I do not have physical windows machine for the moment and I lose connection to my Windows VMs when I disable these.

This may resolve #115 where @CaptainFrosty also mentioned that he disabled some of defender stuff and mentioned that these can be the root cause in #152.

@Snowball-V
Copy link
Author

Snowball-V commented May 16, 2024

Hello August Strindberg! 📜

Thank you for your work and especially for your great availability in the « Issues ».

I made an AOMEI’s Backup just before applying the script which allows me to easily revert back for testing purposes.

Below is your request to help you update the documentation.
 

Case A) (driver)

1) Fresh installation without any trace of the script "https://privacy.sexy/"
2) Run the batch with ONLY:

   ➜  Privacy over security
   ➜  ➜ Disable Microsoft Defender
   ➜  ➜  ➜ Disable Microsoft Defender firewall
   ➜  ➜  ➜  ➜ Disable Microsoft Defender Firewall services and drivers
   ➜  ➜  ➜  ➜  ➜ Disable "Windows Defender Firewall Authorization Driver" service (breaks Microsoft Store, netsh advfirewall, winget)
 _(( Note: "$serviceQuery = 'mpsdrv'; ))
 (( "%SYSTEMROOT%\System32\drivers\mpsdrv.sys" ))_

3) Restart the computer.
4) Windows Sandbox is eternally stuck on the big blue icon of its splash screen.
5) Apply the batch from step 2 in "revert" mode.
6) Restart the computer.
7) Windows Sandbox is repaired and works (although a bit slow to start for my taste).
 
 
I AOMEI restore to reset the machine to its state before applying any script « https ://privacy. Sexy/».
 
 
Case B) (service)

1) Fresh installation without any trace of the script "https://privacy.sexy/"
2) Run the batch with ONLY:

   ➜  Privacy over security
   ➜  ➜ Disable Microsoft Defender
   ➜  ➜  ➜ Disable Microsoft Defender firewall
   ➜  ➜  ➜  ➜ Disable Microsoft Defender Firewall services and drivers
   ➜  ➜  ➜  ➜  ➜ Disable "Windows Defender Firewall" service (breaks Microsoft Store, netsh advfirewall, winget)
 _(( Note: "$serviceQuery = 'MpsSvc'; ))
 (( "%WINDIR%\System32\mpssvc.dll" ))_

3) Restart the computer.
4) Windows Sandbox is eternally stuck on the big blue icon of its splash screen.
5) Apply the batch from step 2 in "revert" mode.
6) Restart the computer.
7) Windows Sandbox is repaired and works (although a bit slow to start for my taste).

Conclusion:

Whether we remove only the Drivers or the service, in both cases it breaks Windows Sandbox. Obviously, if we apply both at the same time, it's not any better.

I want to specify that in both cases, the script in « revert » mode repairs Windows Sandbox but ONLY AFTER restarting Windows.

So, by analogy and based on tests in reality: if we apply both scripts that break Windows Sandbox and then apply both scripts in « revert » mode, we repair Windows Sandbox again.

I'm talking about Windows LTSC 2021 and on clean installations of Windows.

I hope this helps.

@undergroundwires
Copy link
Owner

Hi @Snowball-V,

Thank you so much. It helps a lot. This was the information missing to take action on three issues and I'm sure your findings will be valuable for so many.

In new patch I will add:

  • Explicit documentation in script title that these break Windows Sandbox, Docker and WSL.
  • Documentation in caution section with reference to this issue explaining the breaking behavior further.
  • Suggest system reboot after running the script (in script docs and terminal output)

Removing these FW scripts would make my life as maintainer easier as they break a lot of stuff. But I think privacy.sexy should consider its public as "consenting adults" (as Python folks would say) and give them a choice with documented implications of their actions. We cannot document this without community report as you did, community testing is only way to create a collective documentation. However, it's too easy to break things now. There will be features such as adding colors for breaking stuff #342, showing warnings for double checking #330 etc. to make it harder to break stuff.

Thank you again and have a nice summer, reading books have become a legacy thing of past but Röda rummet is worth it 🙂.

undergroundwires added a commit that referenced this issue May 26, 2024
This commit updates documentation to clarify the impacts of disabling
firewall services, specifically how they affect Windows Sandbox, Docker
and WSL.

This update responds to user feedback from issues #115, #152, #364. The
documentation now guides users more clearly on the consequences of their
actions, potentially preventing unintended service disruptions.

Changes include:

- Expand the caution notes to explicitly mention the impact on
  virtualization and isolation features like Windows Sandbox, Docker and
  WSL.
- Expand script titles to briefly mention affects on these features.
- Expand documentation to suggest system restart.
- Add an informative message to restart the computer in terminal outputs
  after service changes to ensure the settings are applied.
undergroundwires added a commit that referenced this issue May 26, 2024
This commit updates documentation to clarify the impacts of disabling
firewall services, specifically how they affect Windows Sandbox, Docker
and WSL.

This update responds to user feedback from issues #115, #152, #364. The
documentation now guides users more clearly on the consequences of their
actions, potentially preventing unintended service disruptions.

Changes include:

- Expand the caution notes to explicitly mention the impact on
  virtualization and isolation features like Windows Sandbox, Docker and
  WSL.
- Expand script titles to briefly mention affects on these features.
- Expand documentation to suggest system restart.
- Add an informative message to restart the computer in terminal outputs
  after service changes to ensure the settings are applied.
@undergroundwires
Copy link
Owner

0.13.4 is just released 🎉. It improves the documentation:

  • Expand the caution notes to explicitly mention the impact on virtualization and isolation features like Windows Sandbox, Docker and WSL.
  • Expand script titles to briefly mention affects on these features.
  • Expand documentation to suggest system restart.
  • Add an informative message to restart the computer in terminal outputs after service changes to ensure the settings are applied.

Thank you @Snowball-V.

Please create new issues for further ideas/problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants