-
Notifications
You must be signed in to change notification settings - Fork 164
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
Harden Windows Security Module v.0.2.1 #146
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Removed process mitigations that were already enforced system wide. Removed process mitigations that in some rare cases could cause Edge browser to crash
BitLocker category for non-OS drives now has a more elaborate code. Improved the messages displayed on the console for non-OS drives when they are already encrypted.
Updated the versions of the module and script files, removed an unnecessary commented code.
Added thorough explanations to each process mitigation in the CSV file, that will explain why they are used. This approach logically considers each use case of the mitigations and only implements them if either there are enough information about that process that guarantees it will work 100% with the mitigation and also it makes sense to apply that mitigation in terms of security while also considering usability. You can always find more info about them in here: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exploit-protection-reference Removed ForceRelocateImages and RequireInfo from all 1st party executables in the process mitigations list. The reason is because the former is already enabled by default system wide and the latter is only for older programs. They still exist for 3rd party programs such as Adobe Acrobat but for 1st party programs released by Microsoft they are removed because the RequireInfo mitigation is only for old programs and 1st party programs do not need it. Removed EnableExportAddressFilter and EnableExportAddressFilterPlus from some processes that might not be compatible with it. This mitigation is primarily an issue for applications such as debuggers, sandboxed applications, applications using DRM, or applications that implement anti-debugging technology. Those processes that used them are likely to fall in those categories so to prevent any possible issues or crashes in the future, removed them from the process mitigations. Import Address Filtering should ideally be used in conjunction with Export Address filtering in order for it to be effective. If an attacker knows you are using Import Address Filtering without Export Address Filtering, they "clould" use the export method to get the address(s) for their shellcode, and vice versa. Removed DisableNonSystemFonts from Edge browser process mitigations because it uses DirectWrite instead of GDI and this mitigation is not required for it. Removed EnableRopSimExec as it only applies to 32-bit applications only. quick Assist and Adobe Acrobat that were using it are 64-bit. Added Hardware Enforced Shadow Stack Protection Strict mode to Edge browser, also added them for Windows Sandbox processes.
UserShadowStack for Windows Sandbox process are removed after testing them in the previous commit.
HotCakeX
changed the title
Harden indows security module v.0.2.1
Harden Windows Security Module v.0.2.1
Oct 31, 2023
Updated the link for Microsoft Security baseline to point to the newly released 23H2 version
Improved the description of BlockRemoteImageLoads
Reduced the number of days the quarantined items will be kept to 1 day from the previous 3 days. Added missing items to the Readme along with link to their CSP that provides additional info. Group Policy update will be in another commit
With this change, whenever a new version of Microsoft Security Baseline or Security Baselines for Microsoft 365 Apps are released, only their links need to be updated in the code, no other change will be required. This change simplifies the maintenance of the code.
Updated the versions of the script and the version file to 2023.11.1, the target day for this release
Removed Enhanced PIN for BitLocker policy because Microsoft Security baselines already apply it. Removed disabling power states S1-S3 policies because Microsoft Security Baselines already apply it. Added new policy for ensuring network connectivity in standby state on modern standby capable devices. This allows Security updates for Microsoft Defender and Windows to be downloaded and installed automatically.
Removed options that are already applied by Microsoft Security baselines, such as PUA blocking and features of Enhanced phishing protection: Notify password reuse, Notify malicious, Notify unsafe app and Service enabled. Also set the number of days quarantined items are kept from 3 to 1. This commit includes group policy update as well as readme document changes to reflect them.
Removed the following 2 policies because they are applied by Microsoft Security Baselines. 1. Turn off downloading of print drivers over HTTP 2. Disable the LLMNR protocol (a.k.a Link Local Multicast Name Resolution) Improved the Readme to reflect the new changes. This commit also includes the updated Group policy objects.
Improved the ASR rules detection for compliance checking
Microsoft Security baselines now set HVCIMATRequired to 1 which is enabled. So for verification, the module also verifies that value. Changed the path for LSA with UEFI lock to the correct up to date path.
Full Device guard category, just like the Harden Windows Security Module would implement, is now applied by Microsoft Security Baselines. So it's no longer necessary to keep a device guard category, just use the Microsoft Security Baselines to apply it along with many other security measures. Also version update and improving variables
Since Device Guard is removed from the Readme because all of its features are now applied by Microsoft Security Baselines, moved its documentations to a separate wiki page https://github.com/HotCakeX/Harden-Windows-Security/wiki/Device-Guard-and-Virtualization-Based-Security-in-Windows
Microsoft Security Baselines 23H2 now implements the full features of the Device Guard in Windows just like the Harden Windows Security Module. Its documents are moved to a separate Wiki article found in here: https://github.com/HotCakeX/Harden-Windows-Security/wiki/Device-Guard-and-Virtualization-Based-Security-in-Windows This commit also contains updated Group policy objects with Device Guard removed Also updated Readme to reflect the changes
Removed Device Guard from module manifest description
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's New
Changes in Microsoft Defender Category
Changes in Device Guard Category
Changes in BitLocker Category
Changes in Windows Networking Category
Note
Confirm-SystemCompliance
cmdlet.What's New in Process Mitigations / Exploit Protections
Added thorough explanations to each process mitigation in the CSV file, that will explain why they are used.
This approach logically considers each use case of the mitigations and only implements them if there is enough information about that process that guarantees it will work 100% with the mitigation and also it makes sense to apply that mitigation in terms of security while also considering usability.
You can always find more info about them in here: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exploit-protection-reference
Removed
ForceRelocateImages
andRequireInfo
from all 1st party executables in the process mitigations list.RequireInfo
still exist for 3rd party programs such as Adobe Acrobat but for 1st party programs released by Microsoft it's removed, because 1st party programs do not need it and even if hypothetically some 1st party program was missingRequireInfo
, it still would do more harm than good by crashing that 1st party program.Removed
EnableExportAddressFilter
andEnableExportAddressFilterPlus
from some processes that might not be compatible with it.This mitigation is primarily an issue for applications such as debuggers, sandboxed applications, applications using DRM, or applications that implement anti-debugging technology.
Those processes that used them are likely to fall in the categories mentioned above, so to prevent any possible issues or crashes in the future, removed them from the process mitigations as a pre-emptive measure.
Import Address Filtering should ideally be used in conjunction with Export Address filtering in order for it to be effective. If an attacker knows you are using Import Address Filtering without Export Address Filtering, they "could" use the export method to get the address(s) for their shellcode, and vice versa.
Removed
DisableNonSystemFonts
from Edge browser process mitigations because it uses DirectWrite instead of GDI and this mitigation is not required for it.Removed
EnableRopSimExec
as it only applies to 32-bit applications. Quick Assist and Adobe Acrobat that were using it are 64-bit.Added Hardware Enforced Shadow Stack Protection Strict mode to Edge browser and Quick Assist.