File | Date | Author | Commit |
---|---|---|---|
.github | 2023-07-31 |
![]() |
[3b438f] Delete FUNDING.yml |
Files | 2023-10-09 |
![]() |
[ab84d1] Update policies.json |
Dockerfile | 2023-06-07 |
![]() |
[65f2e5] Update Dockerfile |
LICENSE | 2023-05-04 |
![]() |
[76f1ac] Create LICENSE |
README.md | 2023-10-16 |
![]() |
[63ad17] Update README.md |
SECURITY.md | 2020-12-07 |
![]() |
[524db5] Update SECURITY.md |
sos-optimize-windows.ps1 | 2023-08-27 |
![]() |
[01ff27] Update sos-optimize-windows.ps1 |
windows-optimize-harden-debloat test docker container
Windows 10 and Windows 11 are invasive and insecure operating system out of the box.
Organizations like PrivacyTools.io, Microsoft, Cyber.mil, the Department of Defense, and the National Security Agency have recommended configuration changes to lockdown, harden, and secure the operating system. These changes cover a wide range of mitigations including blocking telemetry, macros, removing bloatware, and preventing many digital and physical attacks on a system. This script aims to automate the configurations recommended by those organizations.
WARNING:
This script should work for most, if not all, systems without issue. While @SimeonOnSecurity creates, reviews, and tests each repo intensively, we can not test every possible configuration nor does @SimeonOnSecurity take any responsibility for breaking your system. If something goes wrong, be prepared to submit an issue.
Do not run this script if you don't understand what it does. It is your responsibility to review and test the script before running it.
FOR EXAMPLE, THE FOLLOWING WILL BREAK IF YOU RUN THIS WITHOUT TAKING PREVENTATIVE STEPS:
Using the default administrator account named "Administrator" is disabled and renamed per DoD STIG
Does not apply to the default account created but does apply to using the Default Administrator account often found on Enterprise, IOT, and Windows Server Versions
Create a new account under Computer Management and set it as an administrator if you wish. Then copy the contents of the previous users folder into the new one after signing into the new user for the first time to work around this prior to running the script.
Signing in using a microsoft account is disabled per DoD STIG.
When trying to be secure and private, signing into your local account via a Microsoft Account is not advised. This is enforced by this repo.
Create a new account under Computer Management and set it as an administrator if you wish. Then copy the contents of the previous users folder into the new one after signing into the new user for the first time to work around this prior to running the script.
Account PINs are disabled per DoD STIG
PINs are insecure when used solely in place of a password and can be easily bypassed in a matter of hours or potentially even seconds or minutes
Remove the pin from the account and/or sign in using password after running the script.
Bitlocker defaults are changed and hardened due to DoD STIG.
Due to how bitlocker is implemented, when this changes occur and if you already have bitlocker enabled it will break the bitlocker implementation.
Disable bitlocker, run the script, then reenable bitlocker to workaround this issue.
This script adds, removes, and changes settings on your system. Please review the script before running it.
This is because we block signing into microsoft accounts. Microsoft's telemetry and identity association is frowned upon.
However, if you still wish to use these services see the following issue tickets for the resolution:
You may run into issues. There are multiple vulnerabilities assosiated with using Thunderbolt and advanced USB-C type devices. Because of this we have disabled it by default.
If you'd like to ignore this, please read:
- https://github.com/simeononsecurity/Windows-Optimize-Harden-Debloat/issues/60
Chocolatey's servers have issues supporting the latest, and most secure, TLS 1.3 Ciphers out there. These are fixed using some of the Windows category changes. However if you opt out of those, you may run into issues.
Keep in mind, this is primarily a Chocolatey issue, all fixes for this are just workarounds.
- https://github.com/simeononsecurity/Windows-Optimize-Harden-Debloat/issues/67
If you need to modify or change a setting, they are most likely configurable via GPO:
Import the ADMX Policy definitions from this repo into C:\windows\PolicyDefinitions on the system you're trying to modify.
Open gpedit.msc
on on the system you're trying to modify.
Download the latest release here, choose the options you want and hit execute.
Use this one-liner to automatically download, unzip all supporting files, and run the latest version of the script.
iwr -useb 'https://simeononsecurity.ch/scripts/windowsoptimizeandharden.ps1'|iex
If manually downloaded, the script must be launched from an administrative powershell in the directory containing all the files from the GitHub Repository
The script "sos-optimize-windows.ps1" includes several parameters that allow for customization of the optimization process. Each parameter is a boolean value that defaults to true if not specified.
An example of how to launch the script with specific parameters would be:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
Get-ChildItem -Recurse *.ps1 | Unblock-File
powershell.exe -ExecutionPolicy ByPass -File .\sos-optimize-windows.ps1 -cleargpos:$false -installupdates:$false