Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Harden Windows Safely, Securely using Official Supported Microsoft methods and proper explanation | Always up-to-date and works with the latest build of Windows | Provides tools and Guides for Personal, Enterprise, Government and Military security levels | Read The Rationalehttps://github.com/HotCakeX/Harden-Windows-Security/blob/main/Rationale.md
License
HotCakeX/Harden-Windows-Security
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Hardening CategoriesHow To Use
Features
Related
Trust
Support
Security Recommendations
Resources
License
Wiki
Basic FAQs
Roadmap
Donation
Important
Here are the Access Points to Other Important Pages In This Repository
Note
Windows by default is secure and safe, this repository does not imply nor claim otherwise. Just like anything, you have to use it wisely and don't compromise yourself with reckless behavior and bad user configuration; Nothing is foolproof. This repository only uses the tools and features that have already been implemented by Microsoft in Windows OS to fine-tune it towards the highest security and locked-down state, using well-documented, supported, recommended and official methods. Continue reading for comprehensive info.
(irm'https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/Harden-Windows-Security.ps1')+'P'|iex
Check the Documentation for How to use and Complete Info
Click/Tap here for commands
Install-Module-Name'Harden-Windows-Security-Module'-Force
Install-Module-Name'Harden-Windows-Security-Module'-Force
Protect-WindowsSecurity-GUI# GUI Mode
Protect-WindowsSecurity# CLI Mode
Confirm-SystemCompliance# CLI Mode
Unprotect-WindowsSecurity# CLI Mode
AppControl Manager is available onthe Microsoft Store.This is the easiest and recommended way to install it.
PowerShell (latest version), Install it from🛍️ Microsoft Store or using Winget:
Winget install Microsoft.PowerShell
Any device that meets theWindows 11 hardware andVirtualization Based Security requirements.
Virtualization technology and Secure Boot enabled in your UEFI settings.Official guide - How to enable Secure Boot on:HP -Lenovo -Dell.
Latest available version of Windows installed.
Tip
Restart your device after applying the hardening measures.
Everything always stays up-to-date with the newest proactive security measures that are industry standards and scalable.
Everything is in clear text, nothing hidden, no 3rd party executable is involved.
No Windows functionality is removed/disabled against Microsoft's recommendations.
All of the links and sources are from official Microsoft websites, straight from the source. No bias, No FUD, No misinformation and definitely No old obsolete methods. That's why there are no links to 3rd party news websites, forums, made up blogs/articles, and such.
With the following exceptions
Link Count | Link | Reason |
---|---|---|
1 | Intel website | i7 13700k product page |
1 | state.gov | List of State Sponsors of Terrorism |
1 | orpa.princeton.edu | OFAC Sanctioned Countries |
2 | Wikipedia | TLS - providing additional information |
1 | UK Cyber Security Centre | TLS - providing additional information |
1 | Security.Stackexchange Q&A | TLS - providing additional information |
1 | browserleaks.com/tls | TLS - Browser test |
1 | clienttest.ssllabs.com | TLS - Browser test |
1 | scanigma.com/knowledge-base | TLS - providing additional information |
1 | cloudflare.com/ssl/reference/ | TLS - providing additional information |
1 | github.com/ssllabs/research/ | TLS - providing additional information |
1 | Wayback Machine | Providing additional information about Edge Browser |
The module primarily uses Group policies,the Microsoft recommended way of configuring Windows. It also uses PowerShell cmdlets where Group Policies aren't available, and finally usesa few registry keys to configure security measures that can neither be configured using Group Policies nor PowerShell cmdlets. This is why the module doesn't break anything or cause unwanted behavior.
This Readme page listsall of the security measures applied by the module.
When a hardening measure is no longer necessary because it's applied by default by Microsoft on new builds of Windows, it will also be removed from the module in order to prevent any problems and because it won't be necessary anymore.
The module can be run infinite number of times, it's made in a way that it won't make any duplicate changes.
Applying these hardening measures makes your PC compliant with Microsoft Security Baselines and Secured-core PC specifications (provided that you use modern hardware that supports the latest Windows security features) -See what makes a Secured-core PC -Check Device Guard category for more info
Secured-core – recommended for the most sensitive systems and industries like financial, healthcare, and government agencies. Builds on the previous layers and leverages advanced processor capabilities to provide protection from firmware attacks.
Since I originally created this repository for myself and people I care about, I always maintain it to the highest possible standard.
If you have multiple accounts on your device, you only need to apply the hardening measures 1 time with Admin privileges, that will make system-wide changes. Then you canoptionally run the module, without Admin privileges, for each standard user to apply theNon-Admin category.
Warning
For your own security, exercise caution when considering any other 3rd-party tools, programs, or scripts claiming to harden or modify Windows OS in any way. Verify their legitimacy thoroughly before use and after each release. Avoid blind trust in 3rd party Internet sources. Additionally, if they don't adhere to the rules mentioned above, they can cause system damage, unknown issues, and bugs.
- Read the Trust section to see how you can 100% Trust this repository.
- How are Group Policies for this module created and maintained?
Commands that require Administrator Privileges (click/tap on each of these to see in-depth info)
- Microsoft Security Baselines
- Microsoft 365 Apps Security Baselines
- Microsoft Defender
- Attack surface reduction rules
- Bitlocker Settings
- Device Guard
- TLS Security
- Lock Screen
- UAC (User Account Control)
- Windows Firewall
- Optional Windows Features
- Windows Networking
- Miscellaneous Configurations
- Windows Update configurations
- Edge Browser configurations
- Certificate Checking Commands
- Country IP Blocking
- Downloads Defense Measures
Commands that don't require Administrator Privileges
Indicator | Description |
---|---|
![]() | Security measure is applied using PowerShell cmdlets or Registry |
![]() | Security measure is applied using Group Policies |
![]() | CSP for the security measure |
![]() | Sub-category - prompts for additional confirmation |
A security baseline is a group of Microsoft-recommended configuration settings that explains their security implications. These settings are based on feedback from Microsoft security engineering teams, product groups, partners, and customers.
Continue reading in the official documentation
Optional Overrides for Microsoft Security Baselines
Highly recommended to apply these overrides, the module will ask you whether you want to apply them or not. Use Optional Overrides when applying the hardening measures on Azure VMs.
The security baseline for Microsoft 365 Apps for enterprise is published twice a year, usually in June and December.
Microsoft Security Baselines Version Matrix
Extends theCloud Security Scan time to the maximum amount of 60 seconds, by default it is 10 seconds. You need to be aware that this means actions like downloading and opening an unknown filewill make Microsoft Defender send samples of it to the Cloud for more advanced analysis and it can take a maximum of 60 seconds from the time you try to open that unknown file to the time when it will be opened (if deemed safe).
CSP
- Here is an example of the notification you will see in Windows 11 if that happens.
Configures the Cloud Block/Protection Level to themaximum level of Zero Tolerance andBlock At First Sight. No unknown file can run on your system without first being recognized by the Microsoft's Security Graph and otherglobally omniscient systems.
CSP
Configures the Microsoft Defender to send all samples automatically. Increasing protection by participating in the SpyNet / MAPS network.
CSP
Sets the SpyNet membership to Advanced, improving Cloud Protection.
CSP
Enables file hash computation;designed to allow admins to force the anti-malware solution to "compute file hashes for every executable file that is scanned if it wasn't previously computed" to "improve blocking for custom indicators in Microsoft Defender Advanced Threat Protection (Microsoft Defender ATP).
CSP
Clears Quarantined items after 1 day instead of the default behavior of keeping them indefinitely.
CSP
- Quarantine involves isolating potentially harmful files in a non-executable area of your system to prevent any risk of execution. To further minimize potential threats, quarantined files are automatically removed after 1 day, rather than being retained indefinitely. This precaution helps mitigate the possibility of these files exploiting unforeseen vulnerabilities in the future, ensuring a proactive approach to system security.
Allows Microsoft Defender to download security updates even on a metered connection.
CSP
Enables Microsoft Defender to scan mapped network drives during full scan.
CSP
Enables Microsoft Defender to scan emails. The engine will parse the mailbox and mail files.
CSP
Enables Microsoft Defender to scan Removable Drives.
CSP
Enables Microsoft Defender to scanReparse Points.
CSP
ForcesMicrosoft Defender to scan network files.
CSP
Sets the Signature Update Interval to every 3 hours instead of automatically.
CSP
Configure and validate Microsoft Defender Antivirus network connections
Security intelligence updates for Microsoft Defender Antivirus and other Microsoft antimalware
Paste the following PowerShell code to retrieve the latest available online versions of the Platform, Signatures, and Engine for Microsoft Defender
$X= irm"https://www.microsoft.com/security/encyclopedia/adlpackages.aspx?action=info"@{Engine=$X.versions.engine;Signatures=$X.versions.signatures.'#text';Platform=$X.versions.platform}| ft-AutoSize
Forces Microsoft Defender to check for new virus and spyware definitions before it runs a scan.
CSP
Makes Microsoft Defender runcatch-up scans for scheduled quick scans. A computer can miss a scheduled scan, usually because the computer is off at the scheduled time, but now after the computer misses two scheduled quick scans, Microsoft Defender runs a catch-up scan the next time someone logs onto the computer.
CSP
Makes sureAsync Inspection for Network protection of Microsoft Defender is turned on - Network protection now has a performance optimization that allows Block mode to start asynchronously inspecting long connections after they're validated and allowed by SmartScreen, which might provide a potential reduction in the cost that inspection has on bandwidth and can also help with app compatibility problems.
CSP
EnablesSmart App Control (if it's in Evaluation mode): adds significant protection from new and emerging threats by blocking apps that are malicious or untrusted. Smart App Control also helps to block potentially unwanted apps, which are apps that may cause your device to run slowly, display unexpected ads, offer extra software you didn't want, or do other things you don't expect.
Smart App Control is User-Mode (and enforces Kernel-Mode)App Control for Business,more infoin the Wiki. You can see its status inSystem Information and enable it manually from Microsoft Defender app's GUI. It is very important for Windows and Windows Defender intelligence updates to be always up-to-date in order for Smart App Control to work properly as it relies on live intelligence and definition data from the cloud and other sources to make a Smart decision about programs and files it encounters.
Smart App Control usesISG (Intelligent Security Graph). The ISG isn't a "list" of apps. Rather, it uses the same vast security intelligence and machine learning analytics that power Microsoft Defender SmartScreen and Microsoft Defender Antivirus to help classify applications as having "known good", "known bad", or "unknown" reputation. This cloud-based AI is based on trillions of signals collected from Windows endpoints and other data sources and processed every 24 hours. As a result, the decision from the cloud can change.
Smart App Control can block a program entirely from running or onlysome parts of it in which case your app or program will continue working just fine most of the time. It's improved a lot since it was introduced, and it continues doing so. Consider turning it on after clean installing a new OS and fully updating it.
Smart App Control enforces theMicrosoft Recommended Driver Block rules and theMicrosoft Recommended Block Rules
Once you turn Smart App Control off, it can't be turned on without resetting or reinstalling Windows.
Enables"Send optional diagnostic data" becauseit isrequired for Smart App Controlto operate when it's in evaluation mode or turned on, and for communication withIntelligent Security Graph (ISG). This setting will be automatically applied if Smart App Control is already turned on or you choose to turn it on.
CSP
EnablesControlled Folder Access. Ithelps protect your valuable data from malicious apps and threats, such as ransomware. Controlled folder access protects your data by checking apps against a list of known, trusted apps. Due to the recent wave of global ransomware attacks, it is important to use this feature to protect your valuables files, specially OneDrive folders.
CSP
If it blocks a program from accessing one of your folders it protects, and you absolutely trust that program, then you can add it to exclusion list using Microsoft Defender GUI or PowerShell. you can also query the list of allowed apps using PowerShell (commands below). with these commands, you can backup your personalized list of allowed apps, that are relevant to your system, and restore them in case you clean install your Windows.
The root of the OneDrive folders of all the user accounts will be added to the protected folders list of Controlled Folder Access, to provide Ransomware protection for the entire OneDrive folder.
CSP
# Add multiple programs to the exclusion list of Controlled Folder AccessAdd-MpPreference-ControlledFolderAccessAllowedApplications'C:\Program Files\App\app.exe','C:\Program Files\App2\app2.exe'
# Get the list of all allowed apps(Get-MpPreference).ControlledFolderAccessAllowedApplications
EnablesMandatory ASLR,It might cause compatibility issues only for somepoorly-made 3rd party programs, specially portable ones.
CSP
Automatically detects and excludes the Git executables of GitHub Desktop and Git (Standalone version) from mandatory ASLR if they are installed on the system.More info here
You can add Mandatory ASLR override for a trusted program using the PowerShell command below or in the Program Settings section of Exploit Protection in Microsoft Defender app.
Set-ProcessMitigation -Name "C:\TrustedApp.exe" -Disable ForceRelocateImages
AppliesExploit Protections/Process Mitigations fromthis list to the following programs:
CSP
All channels ofMicrosoft Edge browser
Quick Assist app
Some System processes
Microsoft 365 apps
More apps and processes will be added to the list over time once they are properly validated to be fully compatible.
Exploit Protection configurations are also accessible in XML formatwithin this repository. When implementing exploit protections using an XML file, the existing exploit mitigations will seamlessly integrate rather than being overwritten. Should there be pre-existing exploit protections applied to an executable on the system, and the XML file specifies different mitigations for the same executable, these protections will be merged and applied collectively.
Turns on Data Execution Prevention (DEP) for all applications, including 32-bit programs. By default, the output of
BCDEdit /enum "{current}"
(in PowerShell) for the NX bit isOptIn
but this module sets it toAlwaysOn
Check for the latest virus and spyware security intelligence on startup.
CSP
Specifies the maximum depth to scan archive files to the maximum possible value of
4,294,967,295
CSP
Defines the maximum size of downloaded files and attachments to be scanned and set it to the maximum possible value of
10,000,000 KB
or10 GB
.the default is20480 KB
or~20MB
CSP
Enables theEnhanced Phishing Protection service.
CSP
Enables notifying user of malicious and phishing scenarios in Microsoft Defender Enhanced Phishing Protection.
CSP
Enables the feature in Enhanced Phishing Protection in Microsoft Defender SmartScreen that warns users if they reuse their work or school password.
CSP
Enables warning users if they type their work or school passwords in unsafe apps.
CSP
Enables automatic data collection (formerly known as Capture Threat Window) of Enhanced Phishing Protection in Microsoft Defender SmartScreen for security analysis from a suspicious website or app.
CSP
Creates scheduled task for fast weekly Microsoft recommended driver block list update.. You won't see this prompt if the task already exists and is enabled or running.
Set MicrosoftDefender engine andplatform update channel to beta.
CSP
CSP
Defines the number of days before spyware security intelligence is considered out of date to 2. The default is 7.
CSP
Defines the number of days before virus security intelligence is considered out of date to 2. The default is 7.
CSP
Sets thedefault action for Severe and High threat levels to Remove, for Medium and Low threat levels to Quarantine.
CSP
Configures real-time protection and Security Intelligence Updates to be enabled during OOBE.
CSP
Enables a network protection setting that blocks malicious network traffic instead of displaying a warning.
CSP
Configures the Brute-Force Protection to use cloud aggregation to block IP addresses that are over 99% likely malicious
CSP
Configures the Brute-Force Protection to detect and block attempts to forcibly sign in and initiate sessions
CSP
Sets the internal feature logic to determine blocking time for the Brute-Force Protections
CSP
Configures the Remote Encryption Protection to use cloud intel and context, and block when confidence level is above 90%.
CSP
Configures the Remote Encryption Protection to detect and block attempts to replace local files with encrypted versions from another device
CSP
Sets the internal feature logic to determine blocking time for the Remote Encryption Protection
CSP
Extends the brute-force protection coverage in the Microsoft Defender Antivirus to block local network addresses.
CSP
EnablesECS Configurations in the Microsoft Defender. They improve product health and security byautomatically fixing any possible issues/bugs that may arise, in a timely manner.
Enables Network Protection to be configured into block or audit mode on Windows Server.
CSP
Attack surface reduction rules target certain software behaviors, such as:
CSP
- Launching executable files and scripts that attempt to download or run files
- Running obfuscated or otherwise suspicious scripts
- Performing behaviors that apps don't usually initiate during normal day-to-day work
Such software behaviors are sometimes seen in legitimate applications. However, these behaviors are often considered risky because they are commonly abused by attackers through malware. Attack surface reduction rules can constrain software-based risky behaviors and help keep your organization safe.
Reducing your attack surface means protecting your devices and network, which leaves attackers with fewer ways to perform attacks. Configuring attack surface reduction rules in Windows can help!
Tip
all 19 available Attack Surface Reduction rules shown in the official chart will be enabled. The Harden Windows Security application also allows you to individually configure each Attack Surface Reduction rule.
The module sets up and configures Bitlockerusing official documentation, with the most secure configuration and military grade encryption algorithm, XTS-AES-256, to protect the confidentiality and integrity of all information at rest.
CSP
CSP
It offers 2 security levels for OS drive encryption:Enhanced andNormal.
InNormal security level, the OS drive is encrypted with TPM and Startup PIN. This provides very high security for your data, specially with a PIN that's long, complicated (uppercase and lowercase letters, symbols, numbers, spaces) and isn't the same as your Windows Hello PIN.
InEnhanced security level, the OS drive is encrypted with TPM and Startup PIN and Startup key. This provides the highest level of protection by offering Multifactor Authentication. You will need to enter your PIN and also plug in a flash drive, containing a special BitLocker key, into your device in order to unlock it.Continue reading more about it here.
Once the OS drive is encrypted, for every other non-OS drive, there will be prompts for confirmation before encrypting it. The encryption will use the same algorithm as the OS drive and usesAuto-unlock key protector. Removable flash drives are skipped.
The recovery information of all of the drives are saved in a single well-formatted text file in the root of the OS drive
C:\BitLocker-Recovery-Info-All-Drives.txt
. It'svery important to keep it in a safe and reachable place as soon as possible, e.g., in OneDrive's Personal Vault which requires additional authentication to access. Seehere andhere for more info. You can use it to unlock your drives if you ever forget your PIN, lose your Startup key (USB Flash Drive) or TPM no longer has the correct authorization (E.g., after a firmware change).TPM hasspecial anti-hammering logic which prevents malicious user from guessing the authorization data indefinitely.Microsoft defines that maximum number of failed attempts in Windows is 32 and every single failed attempt is forgotten after 2 hours. This means that every continuous two hours of powered on (and successfully booted) operation without an event which increases the counter will cause the counter to decrease by 1. You can view all the details using thisPowerShell command:
Get-TPM
.Check outLock Screen category for more info about the recovery password and the 2nd anti-hammering mechanism.
BitLocker will bring you areal security against the theft of your device if you strictly abide by the following basic rules:
As soon as you have finished working, either Hibernate or shut Windows down and allow for every shadow of information to disappear from RAM within 2 minutes.This practice is recommended in High-Risk Environments.
Do not mix 3rd party encryption software and tools with Bitlocker. Bitlocker creates a secure end-to-end encrypted ecosystem for your device and its peripherals, this secure ecosystem is backed by things such as software, Virtualization Technology, TPM 2.0 and UEFI firmware, Bitlocker protects your data and entire device againstreal-life attacks and threats. You can encrypt your external SSDs and flash drives with Bitlocker too.
Important
AMD Zen 2 and 3 CPUs have a vulnerability in them, if you use one of them, make sure your Bitlocker Startup PIN is at least 16 characters long(max is 20).
Enables or disablesDMA protection from Bitlocker Countermeasures based on the status ofKernel DMA protection. Kernel DMA Protection isnot compatible with other BitLocker DMA attacks countermeasures. It is recommended to disable the BitLocker DMA attacks countermeasures if the system supports Kernel DMA Protection (this module does that exactly). Kernel DMA Protection provides higher security bar for the system over the BitLocker DMA attack countermeasures, while maintaining usability of external peripherals. you can check the status of Kernel DMA protectionusing this official guide.
CSP
- Kernel DMA Protection (Memory Access Protection) for OEMs page shows the requirements for Kernel DMA Protection. for Intel CPUs, support for requirements such as VT-X and VT-D can be found in each CPU's respective product page. e.g.Intel i7 13700K
Disallows standard (non-Administrator) users from changing the Bitlocker Startup PIN or password
CSP
(Only on Physical machines) Enables Hibernate and adds Hibernate to Start menu's power options.
CSP
- Devices that supportModern Standby have the most security because(S1-S3) power states which belong to thelegacy sleep modes are not available. In Modern Standby, security components remain vigilant and the OS stays protected. Applying Microsoft Security Baselines also automatically disables the legacy (S1-S3) sleep states.
Enables network connectivity in standby on modern standby-capable systems. This ensures security updates for Microsoft Defender and Windows will be installed automatically.
CSP
Refer to thisofficial documentation about the countermeasures of Bitlocker
Secure boot (without requiring DMA protection) for Virtualization-Based Security
CSP
This is in accordance withMicrosoft's recommendation. This option provides Secure Boot with as much protection as is supported by a given computer’s hardware. A computer with input/output memory management units (IOMMUs) will have Secure Boot with DMA protection. A computer without IOMMUs will simply have Secure Boot enabled.
Secure boot has 2 parts, part 1 is enforced using the Group Policy by this module, but for part 2, you need toenable Secure Boot in your UEFI firmware settingsif it's not enabled by default (which is the case on older hardware).
Virtualization-based protection of Code Integrity + UEFI Lock
CSP
Local Security Authority (LSA) process Protection + UEFI Lock
CSP
Enables Virtualization-based Security and Memory Integrity inMandatory mode.
- Special care should be used before enabling this mode, since, in case of any failure of the virtualization modules, the system will refuse to boot.
Tip
Most of the Device Guard and Virtualization-Based Security features are Automatically enabled by default on capable and modern hardware. The rest of them will be enabled and configured to the most secure state after you apply the Microsoft Security Baselines and the Harden Windows Security policies.
Important
About UEFI Lock
UEFI locked security measures are rooted inProof of Physical Presence and they can't be disabled by modifying Group Policy, registry keys or other Administrative tasks.The only way to disable UEFI locked security measures is to have physical access to the computer, reboot and access the UEFI settings, supply the credentials to access the UEFI, turn off Secure Boot, reboot the system and then you will be able to disable those security measures with Administrator privileges.
Note
Device Protection in Windows Security Gives You One of These 4 Hardware Scores
- Standard hardware security not supported
- This means that your device does not meet at least one of the requirements of Standard Hardware Security.
- Your device meets the requirements for Standard Hardware Security.
- Your device meets the requirements for Enhanced Hardware Security
- Your device has all Secured-core PC features enabled
Changes made by this category only affect things that useSchannel SSP: that includes IIS web server, built-in inbox Windows apps and some other programs supplied by Microsoft, including Windows network communications, but not 3rd party software that useportable stacks like Java, nodejs, python or php.
If you want to read more:Demystifying Schannel
Disables TLS 1 and TLS 1.1 security protocols that onlyexist for backward compatibility. All modern software should and do use
TLS 1.2
andTLS 1.3
.CSP
CSP
DisablesMD5 Hashing Algorithm that isonly available for backward compatibility
Disables the followingweak ciphers that areonly available for backward compatibility:
"DES 56-bit"
,"RC2 40-bit"
,"RC2 56-bit"
,"RC2 128-bit"
,"RC4 40-bit"
,"RC4 56-bit"
,"RC4 64-bit"
,"RC4 128-bit"
,"3DES 168-bit (Triple DES 168)"
Configures theTLS to only use thefollowing securecipher suites and in thisexact order:
CSP
TLS_CHACHA20_POLY1305_SHA256TLS_AES_256_GCM_SHA384TLS_AES_128_GCM_SHA256TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256TLS_DHE_RSA_WITH_AES_256_GCM_SHA384TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
Use theTLS for BattleNet sub-category if you have the BattleNet game client installed on your system. This client utilizes the
TLS_RSA_WITH_AES_256_CBC_SHA
cipher suite to establish connections with its servers. Since this cipher suite is less secure, it is excluded from the secure cipher-suites list by default. However, enabling this sub-category will include the required cipher suite, allowing you to use BattleNet without interruptions.
Configures TLS ECC Curves touse the following prioritized Curves order:
CSP
nistP521curve25519NistP384NistP256
- By default,in Windows, the order is this:
curve25519NistP256NistP384
Automatically locks device after X seconds of inactivity (just like mobile phones), which is set to 120 seconds (2 minutes) in this module, you can change that to any value you like.
CSP
RequiresCTRL+ALT+DEL on the lock screen, kernel protected set of key strokes. The reason and logic behind it is:
CSP
- A malicious user might install malware that looks like the standard sign-in dialog box for the Windows operating system and capture a user's password. The attacker can then sign into the compromised account with whatever level of user rights that user has.
Enablesa security anti-hammering feature that sets a threshold of5 for the number of failed sign-in attempts that causes the device to be locked by using BitLocker. Sign-in attempts include Windows password or Windows Hello authentication methods. This threshold means, if the specified maximum number of failed sign-in attempts is exceeded, the device will invalidate the Trusted Platform Module (TPM) protector and any other protector except the 48-digit recovery password, and then reboot. During Device Lockout mode, the computer or device only boots into the touch-enabled Windows Recovery Environment (WinRE) until an authorized user enters the recovery password to restore full access.
- This module (in the Bitlocker category) automatically saves the 48-digit recovery password of each drive in itself, the location of it will also be visible on the PowerShell console when you run it. It isvery important to keep it in a safe and reachable place, e.g. in OneDrive's Personal Vault which requires authentication to access. SeeHere andHere for more info about OneDrive's Personal Vault
Configures account lockout policy:Account lockout threshold, Sets the number of allowed failed sign-in attempts to5. In combination with other policies in this category, this means every 5 failed sign-in attempts will need a full day to pass before 5 more attempts can be made, otherwise Bitlocker will engage, system will be restarted and 48-digit Bitlocker code will be asked.This policy greatly prevents brute force attempts.
CSP
Configures account lockout policy: SetsAccount lockout duration to1440 minutes or 1 day. In combination with other policies in this category, this means every 5 failed sign-in attempts will need a full day to pass before 5 more attempts can be made, otherwise Bitlocker will engage, system will be restarted and 48-digit Bitlocker code will be asked.
CSP
Configures account lockout policy: SetsReset account lockout counter to1440 minutes or 1 day. In combination with other policies in this category, this means every 5 failed sign-in attempts will need a full day to pass before 5 more attempts can be made, otherwise Bitlocker will engage, system will be restarted and 48-digit Bitlocker code will be asked.
CSP
Hides email address of the Microsoft account on lock screen, if your device is in a trusted place like at home then this isn't necessary.
Don't display username at sign-in; If a user signs in as Other user, the full name of the user isn't displayed during sign-in. In the same context, if users type their email address and password at the sign-in screen and press Enter, the displayed text "Other user" remains unchanged, and is no longer replaced by the user's first and last name, as in previous versions of Windows 10. Additionally, if users enter their domain user name and password and click Submit, their full name isn't shown until the Start screen displays.
CSP
- Useful If you have devices that store sensitive data, with monitors displayed in unsecured locations, or if you have devices with sensitive data that are remotely accessed, revealing logged on user's full names or domain account names
Don't display last signed-in; This security policy setting determines whether the name of the last user to sign in to the device is displayed on the Secure Desktop. If this policy is enabled, the full name of the last user to successfully sign in isn't displayed on the Secure Desktop, nor is the user's sign-in tile displayed. Additionally, if the Switch user feature is used, the full name and sign-in tile aren't displayed. The sign-in screen requests both Username + Windows Hello credentials.
CSP
This feature can be useful to enable if you live inHigh-Risk Environments and you don't want anyone to get any information about your accounts when you aren't logged-in.
This policy will prevent you from using "Forgot my PIN" feature in lock screen or logon screen. If you forget your PIN, you won't be able to recover it.
If you use Windows Hello Face or Fingerprint, you can easily login using those credential providers without the need to supply username first.
Don't Display Network Selection UI on Lock Screen (like WIFI Icon); This setting allows you to control whether anyone can interact with available networks UI on the logon screen. Once enabled, the device's network connectivity state cannot be changed without signing into Windows. Suitable forHigh-Risk Environments.
CSP
Applies the followingPIN Complexity rules to Windows Hello
CSP. Please note that, by default, any character can be set as a PIN. However, the following policies ensure that certain characters are always included as a minimum requirement.
Expiresevery 180 days (default behavior is to never expire)
CSP
- Setting an expiration date ensures that, in the event of theft, a threat actor cannot indefinitely attempt to guess the PIN. After 180 days, the PIN expires, rendering it unusable even if guessed correctly. To reset the PIN, authentication via a Microsoft account or EntraID—likely inaccessible to the attacker—will be required. Combined with anti-hammering and BitLocker policies, this expiration guarantees that a threat actor cannot endlessly persist in guessing the PIN.
History of the1 most recent selected PIN is preserved to prevent the user from reusing it
CSP
Prompt for elevation of privilege on secure desktop for all binaries inAdministrator accounts, which presents the sign-in UI and restricts functionality and access to the system until the sign-in requirements are satisfied. Thesecure desktop's primary difference from the user desktop is that only trusted processes running as SYSTEM are allowed to run here (that is, nothing is running at the user's privilege level). The path to get to the secure desktop from the user desktop must also be trusted through the entire chain.
CSP
Default Behavior: Prompt for consent for non-Windows binaries: When an operation for a non-Microsoft application requires elevation of privilege, the user is prompted on the secure desktop to select either Permit or Deny. If the user selects Permit, the operation continues with the user's highest available privilege.
Harden Windows Security Behavior: When an operation requires elevation of privilege, the user is prompted on the secure desktop to select either Permit or Deny. If the user selects Permit, the operation continues with the user's highest available privilege.
Only elevate executables that are signed and validatedby enforcing cryptographic signatures on any interactive application that requests elevation of privilege. One of thePotential impacts of it is that it can prevent certain poorly designed programs from prompting for UAC.
CSP
Hides the entry points forFast User Switching.
CSP
- This policy will prevent you from using "Forgot my PIN" feature in lock screen or logon screen. If you forget your PIN, you won't be able to recover it.
Sets the behavior of the elevation prompt for Standard users to Prompt for Credentials on the Secure Desktop.
CSP
Configures the type ofAdmin Approval Mode to be Admin Approval Mode with enhanced privilege protection.
Sets the Network Location of all connections to Public;Public network means less trust to other network devices.
Enables notifications in all 3 profile types to be displayed to the user when an application is blocked from listening on a port.
CSP
CSP
CSP
Enables Windows Firewall logging for Domain, Private and Public profiles, sets the log file size for each of them to the max
32.767 MB
. Defines separate log files for each of the firewall profiles. Logs only dropped packets for Private and Public profiles, Logs both dropped and successful packets for Domain profile.CSP
CSP
CSP
CSP
CSP
CSP
CSP
CSP
CSP
DisablesMulticast DNS (mDNS) UDP-in Firewall Rules for all 3 Firewall profiles, This might interfere with Miracast screen sharing, which relies on the Public profile, and homes where the Private profile is not selected, but it does add an extra measure of security in public places, like a coffee shop.
- The domain name
.local
which is used in mDNS (Multicast DNS)is a special-use domain name reserved by the Internet Engineering Task Force (IETF) so that it may not be installed as a top-level domain in the Domain Name System (DNS) of the Internet.
- The domain name
The moduledisables the following rarely used features inWindows optional features (Control Panel):
PowerShell v2: because it's old and doesn't supportAMSI.
Work Folders client: not used when your computer is not part of a domain or enterprise network.
Internet Printing Client: used in combination with IIS web server,old feature, can be disabled without causing problems further down the road.
Windows Media Player (legacy): isn't needed anymore,Windows 11 has a modern media player app.
Microsoft Defender Application Guard, it'sdeprecated. Learn more aboutMicrosoft Edge Security Features here.
Uninstalls these optional features (Windows Settings -> Apps -> Optional Features):
Notepad (system): legacy Notepad program. Windows 11 has multi-tabbed modern Notepad app.
VBSCRIPT: a legacydeprecated scripting engine component,Microsoft does not recommend using this component unless and until it is really required.
Internet Explorer mode for Edge browser: It's only used by a few possible organizations that have very old internal websites.
WMIC: Old anddeprecated, not secure and is inMicrosoft recommended block rules.
WordPad: Old anddeprecated. None of the new features of Word documents are supported in it. Recommended to useWord Online, Notepad or M365 Word.
PowerShell ISE: Old PowerShell environment that doesn't support versions above 5.1. Highly recommended to useVisual Studio Code for PowerShell usage andlearning. You can even replicate theISE experience in Visual Studio Code. You can accessVisual Studio Code online in your browser without the need to install anything.
Steps Recorder: it'sdeprecated.
Enables these optional features (Control Panel):
Windows Sandbox: install, test and use programs in a disposable virtual operation system, completely separate from your main OS
Hyper-V: a great hybrid hypervisor (Type 1 and Type 2) to run virtual machines on.check out this Hyper-V Wiki page
Disables NetBIOS over TCP/IP on all network interfaces.
Disables Smart Multi-Homed Name Resolution because it uses NetBIOS and LLMNR,protocols that shouldn't be used anymore.
CSP
DisablesLMHOSTS lookup protocol on all network adapters, legacy feature that's not used anymore.
DisablesPrinting over HTTP because HTTP is not encrypted and it's an old feature that's not used anymore.
CSP
Clears all the entries inRemotely accessible registry paths.
Clears all the entries inRemotely accessible registry paths and subpaths.
Sets the minimum required SMB version forClient to
3.1.1
which is the latest available version at the moment and was introduced years ago with Windows 10.
Sets the minimum required SMB version forServer to
3.1.1
which is the latest available version at the moment and was introduced years ago with Windows 10.
Blocks NTLM completely. This sub-category applies the following 4 policies:
For all outgoing connections. -This can prevent you from using RDP (Remote Desktop) remotely via IP address which is insecure as it needs public exposed ports and uses NTLM. You can use Quick Assist orBastion for Azure VMs which are more secure alternatives. Local RDP such as for Hyper-V enhanced session is not affected.
Disables the RPC Endpoint Mapper Client Authentication policy.
CSP. It isrecommended to be disabled when NTLM is completely blocked.
Requires encryption for SMB client/workstation.
Enables encryption for SMB Server. Its status can be checked using the following PowerShell command:
(get-SmbServerConfiguration).EncryptData
. If the returned value is$True
then SMB Encryption is turned on.
EnablesQUIC for SMB Client.
EnablesQUIC for SMB Server.
Configures the Cipher Suites from the default value of
AES_128_GCM,AES_128_CCM,AES_256_GCM,AES_256_CCM
toAES_256_GCM,AES_256_CCM,AES_128_GCM,AES_128_CCM
for the SMB Client.CSP
Configures the Cipher Suites from the default value of
AES_128_GCM,AES_128_CCM,AES_256_GCM,AES_256_CCM
toAES_256_GCM,AES_256_CCM,AES_128_GCM,AES_128_CCM
for the SMB Server.CSP
SetsEarly launch antimalware engine's status to
8
which isGood only. The default value is3
, which allows good, unknown and 'bad but critical'. that is the default value, because setting it to8
can prevent your computer from booting if the driver it relies on is critical but at the same time unknown or bad.CSP
- By being launched first by the kernel, ELAM is ensured to be launched before any third-party software and is therefore able to detect malware in the boot process and prevent it from initializing. ELAM drivers must be specially signed by Microsoft to ensure they are started by the Windows kernel early in the boot process.
Disables location services (Location, Windows Location Provider, Location Scripting) system wide. Websites and apps won't be able to use your precise location, however they will still be able to detect your location using your IP address.
CSP
CSP
CSP
Enables
svchost.exe
mitigations. built-in system services hosted insvchost.exe
processes will have stricter security policies enabled on them. These stricter security policies include a policy requiring all binaries loaded in these processes to be signed by Microsoft, and a policy disallowing dynamically generated code.CSP
- Requires Business Windows licenses. e.g.,Windows 11 pro for Workstations,Enterprise orEducation.
Turns on Enhanced mode search for Windows indexer. The default is classic mode.
CSP
- This causes some UI elements in the search settings in Windows settings to become unavailable for Standard user accounts to view, because it will be a managed feature by an Administrator.
EnablesSMB/LDAP Signing
CSP
CSP
Enables Edge browser (stable/beta/dev channels) to download and install updates on any network, metered or not; because the updates are important and should not be suppressed.
Enables all Windows users to use Hyper-V and Windows Sandbox by adding all Windows users to the "Hyper-V Administrators" security group using itsSID. By default, only Administrators can use Hyper-V or Windows Sandbox.
Creates custom views forWindows Event Viewer to help keep tabs on important security events:
Sudden Shut down events (due to power outage)
Checks to make sureOther Logon/Logoff Events Audit is active
CSP
Failed Login attempts via PIN at lock screen
- Error/Status code
0xC0000064
indicates wrong PIN entered at lock screen
- Error/Status code
USB storage Connects & Disconnects (Flash drives, phones etc.)
EnablesWinVerifyTrust Signature Validation,a security feature related to WinVerifyTrust function that handles Windows Authenticode signature verification for portable executable (PE) files.
EnablesCommand line process auditing.
CSP
Enables a policy that requests claims and compound authentication for Dynamic Access Control and Kerberos armoring.
CSP
EnablesWindows Protected Print.
CSP
Configures theSSH client's configurations to use the following secure MACs (Message Authentication Codes):
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
.
Enables support forlong paths.
Force strong key protection for user keys stored on the computer. User is prompted when the key is first used.
Reduced Telemetry. This sub-category applies all of the policies mentioned below. They do not have any effect on security.
Disable Online Tips.
CSP
Disable Find My Device feature.
CSP
Disable Automatic Update of Speech Data.
CSP
Turn off the advertising ID.
CSP
Turn off cloud optimized content.
CSP
Do not show Windows tips.
CSP
Do not show feedback notifications.
CSP
Turn off Automatic Download and Update of Map Data.
CSP
Disable Message Service Cloud Sync for cellular text messages.
CSP
Disable support for web-to-app linking with app URI handlers.
CSP
Disable "Continue experiences on this device" feature.
CSP
Disable Font Providers.
CSP
Don't search the web or display web results in Search.
CSP
Do not allow web search.More Info
Windows updates are extremely important. They always should be installed as fast as possible to stay secure and if a reboot is required, it should be done immediately. Threat actors can weaponize publicly disclosed vulnerabilitiesthe same day their POC (Proof-Of-Concept) is released..
In Windows by default, devices will scan daily, automatically download and install any applicable updates at a time optimized to reduce interference with usage, and then automatically try to restart when the end user is away.
The following policies the module configures make sure the default behavior explained above is tightly enforced.
EnablesWindows Update to download and install updates on any network, metered or not; because the updates are important and should not be suppressed,that's what bad actors would want.
CSP
Enables "Notify me when a restart is required to finish updating".
CSP
Specifies the number of days before quality updates are installed on devices automatically to 1 day.
CSP
Specifies the number of days before feature updates are installed on devices automatically to 1 day.
CSP
Sets the number of grace period days before feature updates are installed on devices automatically to 1 day.
CSP
Sets the number of grace period days before quality updates are installed on devices automatically to 1 day.
CSP
Configures the automatic updates to happen every day, automatically be downloaded and installed, notify users for restart.
CSP
Enables features introduced via servicing that are off by default so that users will be able to get new features after having Windows Update settings managed by Group Policy as the result of running this category.
CSP
Block 3rd party cookies - Recommendatory policy
Allow devices using this hardening category to receive new features and experimentations like normal devices
Sets the share additional operating system region setting to never - Recommendatory policy
Policy that automatically denies the window management permission to sites by default. This limits the ability of sites to see information about the device's screens and use that information to open and place windows or request fullscreen on specific screens.
Policy that will keep support for Manifest V2 extensions enabled even after its depreciation. Manifest V2 extension support is vital for proper functioning of ublock origin (and similar extensions) which is beyond a simple adblocker and can provide lots of protection when browsing the web through its custom lists.
- Note that this is something being pushed by Google through their controlling power of Chromium, not Microsoft.
Policy that will prevent websites to even request access to the local connected USB devices.
Policy that will disable dynamic code in Edge browser which is a security feature that prevents the browser process from creating dynamic code. The default value of this policy is not explicitly defined, it could be enable or could be disabled. Setting it explicitly to enabled via this policy ensures that no dynamic code is created by the browser process.
TLS_RSA_WITH_AES_256_CBC_SHA Reason: NO Perfect Forward Secrecy, CBC, SHA1TLS_RSA_WITH_AES_128_CBC_SHA Reason: NO Perfect Forward Secrecy, CBC, SHA1TLS_RSA_WITH_AES_128_GCM_SHA256 Reason: NO Perfect Forward SecrecyTLS_RSA_WITH_AES_256_GCM_SHA384 Reason: NO Perfect Forward SecrecyTLS_ECDHE_RSA_WITH_AES_128_CBC_SHA Reason: CBC, SHA1TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA Reason: CBC, SHA1
Due to security reasons, many policies cannot be used when you are signed into Edge browser using personal Microsoft account. This module does not use any of those policies. When those policies are applied, they are ignored by the browser andedge://policy/
shows an error for them.
- You can view all of the policies being applied to your Edge browser by visiting this page:
edge://policy/
- You can find all of the available internal Edge pages in here:
edge://about/
- Useful links:
In this category, the module downloads and runssigcheck64.exe fromSysinternals, then lists valid certificates not rooted to theMicrosoft Certificate Trust List in theUser and Machine certificate stores.Except for some possible Microsoft certificates, Windows insider builds certificates or certificates that have your own computer's name, which are perfectly safe and should not be deleted, All other certificates that will be listed should be treated as dangerous and removed from your system immediately.
The module uses the newest range of
IPv4
andIPv6
addresses ofState Sponsors of Terrorism andOFAC Sanctioned Countries, directlyfrom official IANA sources repository, then creates 2 rules (inbound and outbound) for each list in Windows firewall, completely blocking connections to and from those countries.
Once you have those Firewall rules added, you canuse this method to see if any of the blocked connections were from/to those countries.
Note
Threat actors can use VPN, VPS etc. to mask their originating IP address and location. So don't take this category as the perfect solution for network protection.
To combat the threat of more sophisticated malware, a preemptive measure is taken by creating and deploying anApp Control policy on the system. This policy blocks the execution of executables andother potentially harmful file types in the Downloads folder.
This policy defends the system from malware that can launch itself automatically after being downloaded from the Internet and has the potential to protect against zero-click exploits. The user must ensure the file's safety and explicitly transfer it to a different folder before running it.
The App Control policy employs a wildcard pattern to prevent any file from running in the Downloads folder. Additionally, it verifies that the system downloads folder in the user directory matches the downloads folder in the Edge browser's settings. If there is a discrepancy, a warning message is displayed on the console.
Creates a customApp Control policy that blocks the execution of the following executables:
- wscript.exe
- mshta.exe
- cscript.exe
They areinsecure, unsandboxed script hosts that pose a security risk.
All of the policies can be easily removed using theUnprotect-WindowsSecurity orAppControl Manager.
You don't need Admin privileges to run this category, because no system-wide changes is made. Changes in this category only apply to the current user account that is running the PowerShell session.
Turns off safe search in Windows search, will enable +18 content to appear in searches; essentially toggles the button in: Windows settings > privacy and security > search permissions > safe search
Turns on "Multilingual text suggestions" for the current user, toggles the option in Windows settings
Azure DevOps Repository (mirror)
Harden Windows Security website
Official global IANA IP block for each country
Privacy, Anonymity and Compartmentalization
This repository uses effective methods that make it easy to verify:
Change log history is present on GitHub.(Despite some of my awkward documentation typos)
Artifact attestations are used to establish provenance for builds. Itguarantees that the package(s) you download from this repository are 100% created from the source code that exist in this repository.
SBOMs (Software Bill of Materials) are generated for the entire repository to comply with data protection standards and providing transparency. Together with attestation and isolation they provideSLSA L3 security level for the build process.
You can open the files inVisual Studio Code /Visual Studio Code Web /GitHub CodeSpace, and view them in a nice and easy to read environment, they are well formatted, commented and indented.
Commits are verified either with my GPG key or SSH key andVigilant mode is turned on in my GitHub account.
You can fork this repository, verify it until that point in time, then verify any subsequent changes/updates I push to this repository,at your own pace (using
Sync fork
andCompare
options on your fork), and if you are happy with the changes, allow it to be merged with your own copy/fork on your GitHub account.Explanations for some of the files used by the Harden Windows Security module, ask about any other file(s) if you have questions, they are all in clear text.
Registry.csv includes some of the security measures' registry data.
ProcessMitigations.csv includes the process mitigations data.
Default Security Policy.inf contains security policy data used during unprotect actions to restore defaults.
Registry resources.csv Includes the data used for compliance checking.
Harden-Windows-Security.ps1 is the boot-strapper for theHarden Windows Security module and theAppControl Manager.
How Are Group Policies Used by the Harden Windows Security Module?
How are Group Policies for this module created and maintained?
How to verify Security-Baselines-X directory and 100% trust it?
Tip
All files in this repository are zipped and automatically submitted to VirusTotal for scanning. Any available packages in the last release is also directly uploaded for scanning. It is done through aGitHub Action that is triggered every time a release is made or a PR is merged. Find the history of the uploaded files inmy Virus Total profile.
If you have any questions, requests, suggestions etc. about this GitHub repository and its content, please opena new discussion orIssue.
Reporting a vulnerability on this GitHub repository.
I can also be reached privately at:spynetgirl@outlook.com
Always download your operation system fromofficial Microsoft websites. Right now, Windows 11 is the latest version of Windows, its ISO file can be downloaded from thisofficial Microsoft server. One of the worst things you can do to your own security and privacy is downloading your OS, which is the root of all the active and passive security measures, from a 3rd party website claiming they have the official unmodified files. There are countless bad things that can happen as the result of it such as threat actors embedding malware or backdoors inside the customized OS, or pre-installing customized root CA certificates in your OS so that they can perform TLS termination and view all of your HTTPS and encrypted Internet data in plain clear text,even if you use VPN. Having a poisoned and compromised certificate store is the endgame for you, andthat's just the tip of the iceberg.
Whenever you want to install a program or app, first use theMicrosoft Store orWinget, if the program or app you are looking for isn't available in there, then download it from its official website.Somebody created a nice web interface for interacting with Winget CLIhere. Using Winget or Microsoft store provides many benefits:
Microsoft store UWP apps are secure in nature, digitally signed, inMSIX format. That means, installing and uninstalling them is guaranteed and there won't be any leftovers after uninstalling.
Microsoft store has Win32 apps too, they are traditional
.exe
installers that we are all familiar with. The store has a library feature that makes it easy to find the apps you previously installed.Both Microsoft and Winget check the hash of the files by default, if a program or file is tampered, they will warn you and block the installation, whereas when you manually download a program from a website, you will have to manually verify the file hash with the hash shown on the website, if any.
Use Secure DNS; Windows 11 natively supportsDNS over HTTPS andDNS over TLS.
- Use myWinSecureDNSMgr module to easily configure DNS over HTTPS in Windows
Only use Microsoft Edge for browser; It hasthe Highest-rated protection againstphishing andmalware, available by default on Windows OS, has tightly integrated valuable Security features such asMicrosoft Defender Application Guard,Microsoft Defender SmartScreen,Hardware Enforced Stack Protection,Arbitrary Code Guard (ACG),Control Flow Guard (CFG),Tracking Prevention andTrusted built-in Secure Network feature from Cloudflare just to name a few.
Always enable Two-Factor/Multi-Factor Authentication on websites, apps and services that you use. Preferably, useMicrosoft Authenticator app which has backup and restore feature, so you never lose access to your TOTPs (Time-Based One-Time Passwords) even if you lose your phone. Available forAndroid andIOS.
Make sure OneDrive backup for important folders (Desktop/Documents/Pictures) is enabled. It is fast, secure and works in any network condition and since it'sx64 (64-bit), it can handle a Lot of small and large files simultaneously.
When considering the use of a VPN, it is crucial to exercise discernment and only resort to it when absolutely necessary. A VPN can be a vital tool if you reside in a totalitarian, communist, or dictatorial regime, or in a nation where democratic principles are not upheld. However, if you live in a country that does not fall into these categories, it may be wise to reconsider the necessity of using a VPN. Your local ISP (Internet Service Provider) is likely more trustworthy than the ISP associated with a remote VPN server. By using a VPN, you are merely transferring the trust you place in your local ISP to an unknown entity—the ISP utilized by the VPN provider. It is important not to be swayed by the deceptive marketing tactics employed by VPN companies. The true identities, political affiliations, backgrounds, and loyalties of those behind these services often remain shrouded in mystery. In the permissive and open societies of the Western world, it is conceivable thata VPN service could be established by entities with questionable intentions, includingstate sponsors of terrorism or other hostile actors. Such services could be utilizedto gather intelligence, conduct data mining, and track users, posing significant risks to your privacy and security.
- There are situations where using VPN can provide security and privacy. For example, when using a public WiFi hotspot or basically any network that you don't have control over. In such cases, useCloudflare WARP whichuses WireGuard protocol,or as mentioned, useSecure Network in Edge browser that utilizes the same secure Cloudflare network. It's free, it's from an American company thathas global radar and lots of insight about countries in the world in real-time,at least 19.7% of all websites use it (2022). Safe to say it's one of thebackbones of the Internet.
Go passwordless with yourMicrosoft account and useWindows Hello authentication. In your Microsoft account which has Outlook service,you can create up to 10 Email aliases in addition to the 1 Email address you get when you made your Microsoft account, that means without creating a new account, you can have 11 Email addresses all of which will use the same inbox and account. You can specify which one of those Email aliases can be used to sign into your account,in the sign in preferences of your Microsoft account settings. So for example, when going passwordless, if you need you can give one of your Email aliases to others for communication or add it to a public profile of yours, then block sign in using that Email alias so nobody can send you authenticator notifications by entering that Email alias in the sign in page, and use the other 10 aliases that are private to sign into your Microsoft account with peace of mind. You cancreate a rule in your Outlook so that all of the Emails sent to your public Email alias will be stored in a different folder, apart from your other inbox emails. All of this can be done using free Microsoft account andOutlook webapp.
Set a strong password for the UEFI firmware of your device so that it will ask for password before allowing any changes to be made to firmware. You can also configure the password to be required on startup.
UseNTFS (which is the default Filesystem in Windows) orReFS (Resilient File System, newer). In addition to all their benefits, they support
Mark Of The Web
(MOTW) orzone.identifier
. When a file is downloaded to a device running Windows, Mark of the Web is added to the file, identifying its source as being from the internet.You can read all the information about it in here. If your USB flash drive is formatted asFAT32
, change it toNTFS
, becauseFAT32
does not keep theMOTW
of the files. If the file you are downloading is compressed in.zip
format, make sure you open/extract it using Windows built-in support for.zip
files because it keeps the MOTW of the files. If the compressed file you downloaded is in other formats such as.7zip
or.rar
, make sure you use an archive program that supports keeping the mark of the Web of files after extraction. One of those programs is NanaZip which is a fork of 7zip, available inMicrosoft Store andGitHub, compared to 7zip, it has better and modern GUI, and the application isdigitally signed. After installation, open it, navigate toTools
at the top then selectOptions
, setPropagate zone.id stream
toYes
. You can use thisPowerShell command to find all the info about the Zone Identifier of the files you downloaded from the Internet.
Get-Content<Path-To-File>-stream zone.identifier
When using Xbox, make sure youconfigure sign-in preference and set it to either
Ask for my PIN
orLock it down
. The latter is the most secure one since it will require authentication using Microsoft Authenticator app.Ask for my PIN
is recommended for the most people because it will only require a PIN to be entered using controller.
A few reminders about open source programs:
Unless you are a skilled programmer who can understand and verify every line of code in the source, and spends time to personally build the software from the source, and repeats all the aforementioned tasks for each subsequent version, then seeing the source code won't have any effect on you because you aren't able to understand nor verify it.
Do not assume that the entire Open Source community audits and verifies every line of code just because the source code is available, as we've seen in theXZ utility's backdoor by state sponsored actors, they can have backdoors implanted in them in broad daylight and nobody might notice it for a long time.
The majority ofopen source programs are unsigned, meaning they don't have a digital signature, their developers haven't bought and used a code signing certificate to sign their program. Among other problems, this might pose a danger to the end-users by making it harder to create trust for those programs in security solutions such as Application Control or App Whitelisting, and makes it hard to authenticate them.Read Microsoft's Introduction to Code Signing. UseAzure Trusted Signing which isaffordable.
Use Microsoft account (MSA) or Microsoft Entra ID to sign into Windows. Never use local administrators. Real security is achieved when there is no local administrator and identities are managed using Entra ID. You will be able to enforceMulti-factor unlock, for example use PIN + Fingerprint or PIN + Facial recognition, to unlock your device.
EnableRandom Hardware Addresses In Windows Settings -> Network & Internet -> WIFI. Currently, there is no Group Policy or associated registry key to automatically turn it on, that is why it is mentioned here in the security recommendations section. It has various security and privacy benefits such as your device cannot be uniquely identified by its hardware Mac address and the routers your connect to cannot uniquely identify you. You can set it to change daily in your WIFI network adapter's settings in Windows settings for even more benefits.
- Microsoft.com
- Microsoft Learn - Technical Documentation
- Germany Intelligence Agency - BND - Federal Office for Information Security
- Microsoft Tech Community - Official blogs and documentations
- Microsoft Security baselines - Security baselines from Microsoft
- Microsoft Security Response Center (MSRC) YouTube channel
- BlueHat Seattle 2019 || Guarding Against Physical Attacks: The Xbox One Story
- Security Update Guide: The Microsoft Security Response Center (MSRC) investigates all reports of security vulnerabilities affecting Microsoft products and services, and provides the information here as part of the ongoing effort to help you manage security risks and help keep your systems protected.
- Microsoft Security Response Center Blog
- Microsoft Security Blog
- Microsoft Podcasts
- Bug Bounty Program - With bounties worth up to
250,000
$ - Microsoft Active Protections Program
- Security Update Guide FAQs
- Microsoft On the Issues - Assessments, Investigations and Reports of APTs (Advanced Persistent Threats¹) and nation-sponsored cyberattack operations globally
- A high level overview paper by Microsoft (in
PDF
), framework for cybersecurity information sharing and risk reduction. - Microsoft Threat Modeling Tool - for software architects and developers
- Important events to monitor
- Windows Security portal
- Security auditing
- Microsoft SysInternals Sysmon for Windows Event Collection or SIEM
- Privileged Access Workstations
- Enhanced Security Administrative Environment (ESAE)
- New Zealand 2016 Demystifying the Windows Firewall – Learn how to irritate attackers without crippli
- Download Windows virtual machines ready for development
- UK National Cyber Security Centre Advice & guidance
- Global threat activity
- Microsoft Zero Trust
- Understanding malware & other threats, phrases
- Malware naming
- Microsoft Digital Defense Report
- Microsoft Defender for Individuals
- Submit a file for malware analysis
- Submit a driver for analysis
- Service health status
- Microsoft Defender Threat Intelligence
- Microsoft Virus Initiative
- Digital Detectives @Microsoft
- Australia's Essential Eight
- NIST 800-53
- DoD's CMMC (Cybersecurity Maturity Model Certification)
- ISO 27001
- DoD Cyber Stigs (Security Technical Implementation Guides)
- NIST SP 800-171 Rev. 2 - Protecting Controlled Unclassified Information in Nonfederal Systems and Organizations
- Clean source principle
- Windows Message Center
- Deprecated features for Windows client
- Microsoft Cybersecurity Reference Architectures
- BlueHat IL 2023 - David Weston - Default Security
- Windows Security best practices for integrating and managing security tools
- Microsoft Exploitability Index
- The Microsoft Incident Response Ninja Hub
- Understanding the Microsoft Pluton security processor
- Important Security Topics from Azure and Security MVPs
UsingMIT License. Free information without any paywall or things of that nature. The only mission of this GitHub repository is to give all Windows users accurate, up to date and correct facts and information about how to stay secure and safe in dangerous environments, and to stay not one, but Many steps, ahead of threat actors.
- Many of the icons are fromicons8
- Windows, Azure etc. are trademarks ofMicrosoft Corporation
If you would like to support my work financially, your generosity is greatly appreciated. You can donate using any of the following methods and then let me know viaX orDiscord or Teams/Email viaspynetgirl@outlook.com
so I can thank you personally.
Your support helps me continue to create and maintain this project.
bc1qa948wr4mg2qkx2us5g8rv5ca75ppyy2ngl8k4e
qrrj03927q90z4wg4nu2e3nf4y3qnun2ku7muv8rvm
0xF784a3D4F9A7CC5c26d69de41D7dD6480112114D
0xF784a3D4F9A7CC5c26d69de41D7dD6480112114D
About
Harden Windows Safely, Securely using Official Supported Microsoft methods and proper explanation | Always up-to-date and works with the latest build of Windows | Provides tools and Guides for Personal, Enterprise, Government and Military security levels | Read The Rationalehttps://github.com/HotCakeX/Harden-Windows-Security/blob/main/Rationale.md
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
- https://link.trustwallet.com/send?coin=0&address=bc1qa948wr4mg2qkx2us5g8rv5ca75ppyy2ngl8k4e
- https://link.trustwallet.com/send?coin=145&address=qrrj03927q90z4wg4nu2e3nf4y3qnun2ku7muv8rvm
- https://link.trustwallet.com/send?coin=60&address=0xF784a3D4F9A7CC5c26d69de41D7dD6480112114D
- https://link.trustwallet.com/send?coin=20000714&address=0xF784a3D4F9A7CC5c26d69de41D7dD6480112114D
Uh oh!
There was an error while loading.Please reload this page.