New Update Simple Windows Hardening

Andy Ful

From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,510
Post updated in September 2024.
SWH works with Windows 10 and 11 (all versions including 24H2)

SWH ver. 2.1.1.1 - July 2023 (added support for Windows 11 ver. 22H2)


SWH ver. 2.0.0.1 - August 2022 (no support for Windows 11 ver. 22H2)​

https://github.com/AndyFul/Hard_Configurator/raw/master/Simple Windows Hardening/SimpleWindowsHardening_2001.zip

Windows 11 ver. 22H2 (fresh installation) turns off by default Software Restriction Policies. So, SimpleWindowsHardening ver. 2.0.0.1 (and prior) cannot use the SWH options related to SRP. This issue is corrected in version 2.1.1.1. It can also work with enabled Smart App Control.

Microsoft documentation for Software Restriction Policies (July 2021):
This documentation was made for Windows Server (2012-2022), but SRP works the same on Windows 7, 8, 8.1, 10, and 11. From Windows 11, one has to pay attention to AppLocker policies.

Overview
Simple Windows Hardening (SWH) works on Windows Home and Pro editions. It is a portable application that allows configuring Windows built-in features to support antivirus and prevent fileless malware. SWH is adjusted to the home environment. After the initial configuration, it can be closed and all protection comes from the Windows built-in features.

SWH is based on Software Restriction Policies (SRP) and some useful Windows Policies. Users on Windows 11 should bear in mind that Microsoft stopped the development of SRP a few years ago. One cannot exclude the possibility that some problems related to SRP may arise in the future on Windows 11. It is also possible that Microsoft will remove SRP on Windows 12. SWH is tested via the Windows Insider program, so any possible problem is recognized in advance and reported on the Dev. Website.

The security setup is adjusted to keep usability and prevent fileless malware in the home environment. So, the EXE and MSI files are not restricted in SWH, except when executed from archives and email clients. But non-executable files like scripts, shortcuts, and other files with unsafe extensions are restricted. Such a setup can be very efficient because nowadays, many initial vectors of attack are performed via non-executable files.

The more sophisticated attack, the fewer chances that AV can detect it, but the greater chances that SWH can prevent it.

The restrictions made by SWH can be switched OFF/ON by using two switches on the right of the green buttons: <Software Restriction Policies> and <Windows Hardening>. In the OFF position, the restrictions are remembered and next removed - Windows default settings are applied for previously restricted features. When switching ON, the remembered settings are restored. Furthermore, in the ON position, the configurable settings can be changed by the user from the Settings menu.

1652994197094.png



# THE EXE / MSI 0-DAY MALWARE

The SWH application does not apply restrictions to EXE and MSI files, because these files are often used to install/update applications. Nowadays, many antivirus solutions have very good detection of such files, as compared to the detection of scripts. But still, the antivirus proactive features can have a problem with 0-day malware. In the home environment, the main delivery vectors of 0-day malware are spam emails and flash drives (USB drives).

The user has to be very careful when running EXE/MSI files originating from:
  • Internet web links embedded in the emails.
  • Attachments embedded in the emails.
  • Flash drives (USB drives) shared with other people.
When using SWH restrictions, the user can consider the RunBySmartScreen tool. It allows checking any EXE/MSI file against the Microsoft SmartScreen Application Reputation service in the cloud. Many such files are accepted by SmartScreen, and this is the best way to avoid the 0-day malware. If the EXE/MSI file is not recognized by SmartScreen as safe or malicious, then the simplest method is to wait a minimum one day before running the unsafe file. After one day most of the malicious links are dead and most of the 0-day malware samples are properly detected by a good antivirus.
RunBySmartscreen is available as a part of Hard_Confugurator Hardening Tools (together with ConfigureDefender and FirewallHardening): ConfigureDefender/H_C_HardeningTools at master · AndyFul/ConfigureDefender


# QUICK CONFIGURATION
  1. Run SWH - the restrictions are automatically configured.
  2. Log OFF the account or reboot is required, depending on what restrictions were applied in SWH.
  3. If MS Office (or Adobe Acrobat Reader) is installed, then it is recommended to apply additional hardening by using the DocumentsAntiExploit tool. More info can be found in the "DocumentsAntiExploit tool - Manual".
Please keep updating your system/software. Use SWH on the default settings for some time, until you are accustomed to it. Most users will probably not see any difference, but rarely a legal script or file with an unsafe extension will be blocked by SWH settings. You can use blue buttons <View Blocked Events> and <Manage the Whitelist> to recognize and whitelist the blocked files. Please be careful, if you are not certain that the blocked file is safe, then wait one day or two before whitelisting it.



# RECOMMENDED SETTINGS

1653080690834.png


The above settings are installed by default. They are recommended if MS Office and Adobe Acrobat Reader are not installed.
If MS Office and Adobe Acrobat Reader DC are installed then additional hardening is recommended via the DocumentsAntiExploit tool.
  1. Recommended settings for Microsoft Defender with ConfigureDefender HIGH Protection Level:

    1653081203691.png


  2. Otherwise:

    1653081292321.png


# SOFTWARE INCOMPATIBILITIES
  1. Software Restriction Policies (SRP) used in SWH may conflict with SRP introduced via Group Policy Object (GPO), available in Windows Pro, Education, and Enterprise editions. Before using SWH, the SRP has to be removed from GPO.
  2. Caution is required when applying policies via GPO on Windows 11 - this can turn OFF the SRP. So, after each GPO session, it is necessary to run and close SWH, which will automatically turn ON the SRP again (Windows restart is required).
  3. SWH can also conflict with any software that uses SRP, but such applications are rare (CryptoPrevent, SBGuard, AskAdmin). Before using SWH, the conflicting application should be uninstalled.
  4. It is not recommended to use SWH alongside WindowsHybridHardening and Hard_Configurator. These applications share several settings, which can lead to misconfigurations.
  5. Windows built-in Software Restriction Policies (SRP) are incompatible with AppLocker. Any active AppLocker rule introduced via GPO or MDM WMI Bridge, turns off SRP. When running SWH, it checks for active AppLocker rules and alerts about the issue.
  6. The Child Account activated via Microsoft Family Safety also uses AppLocker (via MDM), so SRP cannot work with it. This issue is persistent even after removing the Child Account because (due to a bug) the AppLocker rules are not removed. To recover SRP functionality, one must remove the AppLocker rules manually from the directory %Windir%\System32\AppLocker.

SWH vs. ATTACKS IN THE WILD (examples of how SWH works):
In most cases, SWH blocks the attacks at the delivery stage, before the final payload could be dropped/executed.
Nobelium: Q&A - Simple Windows Hardening
Zloader: Q&A - Simple Windows Hardening
Log4Shell: Q&A - Simple Windows Hardening
GootLoader: Q&A - Simple Windows Hardening
Emotet: Q&A - Simple Windows Hardening
Warzone and AgentTesla: Q&A - Simple Windows Hardening
AsyncRAT: Q&A - Simple Windows Hardening
Shuckworm RATS: Q&A - Simple Windows Hardening
Muddywater: Q&A - Simple Windows Hardening
SolarMarker: Q&A - Simple Windows Hardening
BazarLoader: Q&A - Simple Windows Hardening
PPAM attack: Q&A - Simple Windows Hardening
HTML ---> ISO ---> scripts: Q&A - Simple Windows Hardening
Hermetic Wiper: Q&A - Simple Windows Hardening
Asylum Ambuscade spear-phishing: Q&A - Simple Windows Hardening
Quakbot: Q&A - Simple Windows Hardening
Vidar infostealer: Q&A - Simple Windows Hardening (RunBySmartscreen)
Emotet: Q&A - Simple Windows Hardening
IceID (Cobalt Strike, Quantum ransomware): Q&A - Simple Windows Hardening
Fileless RAT (CHM file): Q&A - Simple Windows Hardening
SocGholish: Q&A - Simple Windows Hardening
TA551 phishing campaigns: Q&A - Simple Windows Hardening
GuLoader: Q&A - Simple Windows Hardening (RunBySmartscreen)
Follina exploit: Q&A - Simple Windows Hardening
AstraLocker 2.0: Q&A - Simple Windows Hardening
Raspberry Robin worm: Q&A - Simple Windows Hardening
Magniber (CPL variant): Q&A - Simple Windows Hardening
Batloader (MSI PowerShellScriptInline custom action): Question - Simple Windows Hardening
 

Attachments

  • 1652994317930.png
    1652994317930.png
    27.3 KB · Views: 295
Last edited:

Gandalf_The_Grey

Level 83
Verified
Honorary Member
Top Poster
Content Creator
Well-known
Apr 24, 2016
7,256
Hello Andy,

I get the following error when launching SimpleWindowsHardening.exe:
Aantekening 2020-07-03 122637.png

After clicking OK the tool works as expected.

Is it an idea to bundle this tool with H_C_HardeningTools ?

I'm now using ConfigureDefender + RunBySmartscreen + SimpleWindowsHardening.
 
Last edited by a moderator:

Andy Ful

From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,510
Hello Andy,

I get the following error when launching SimpleWindowsHardening.exe:
View attachment 243779
After clicking OK the tool works as expected.

Is it an idea to bundle this tool with H_C_HardeningTools ?

I'm now using ConfigureDefender + RunBySmartscreen + SimpleWindowsHardening.
Ha, ha. It is an innocent artefact from the H_C code - just ignore it. I will kill this message box in the next version.
Simple Windows Hardening will be a part of H_C_HardeningTools, so it can be used together with RunBySmartScreen, FirewallHardening (for Windows Firewall), DocumentsAntiExploit (for MS Office or Adobe Reader XI/DC), and ConfigureDefender (if one uses WD).
The GUI should be acceptable also with font rescaling up to 150%, even if the rescaling does not work properly.
 
Last edited:

jetman

Level 10
Verified
Well-known
Jun 6, 2017
477
I tried Hard Configurator once but was a little worried about the concequences of changing some settings, as I didn't understand them all.

This simplified version might suit me better and I shall give it a try.

How does it compare with the No Virus Thanks SysHardner utility ? Do they both do the same thing ?
 

Andy Ful

From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,510
I tried Hard Configurator once but was a little worried about the concequences of changing some settings, as I didn't understand them all.

This simplified version might suit me better and I shall give it a try.

How does it compare with the No Virus Thanks SysHardner utility ? Do they both do the same thing ?
  • SysHardener shares a similar idea (reducing the attack surface), but uses other methods that do not support whitelisting.
  • SWH allows us to see what has been silently blocked (<View Blocked Events>).
  • SWH is more restrictive (smaller attack surface), but allows whitelisting (<Manage the Whitelist>).
  • SWH displays the current restrictions (important if one has more than one computer).
  • Changing or turning OFF/ON the settings in SysHardener requires rebooting. In SWH one can change or switch OFF/ON the settings in a second - no need to reboot or Log OFF the user account (only changes to SMB protocols require rebooting).
Generally, one can use SysHardener on default settings as a basic hardening. On many computers, it will work as a "set and forget" setup.
If one wants something stronger, then SysHardener has to be tweaked and this will often block something. The user can have a problem because SysHardener does not show if something has been blocked and what has been blocked. Furthermore, one blocked legal script can force the user to skip some important SysHardener features and weaken the overall security.
In the case above, one can use Simple Windows Hardening for stronger and more configurable protection.
 
Last edited:

HarborFront

Level 72
Verified
Top Poster
Content Creator
Oct 9, 2016
6,140
@Andy Ful

Your quote

SWH is incompatible with SRP introduced via Group Policies Object (GPO) available in Windows Pro, Education, and Enterprise editions. GPO refresh feature will overwrite the SWH settings related to SRP. So, before installing SWH, the SRP has to be removed from GPO.

Unquote

So what and where to find the SRPs in GPO to disable in order not to conflict with SWH?

BTW, this SWH doesn't comes with FirewallHardening (for Windows Firewall), right?

Thanks
 

Andy Ful

From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,510
...
So what and where to find the SRPs in GPO to disable in order not to conflict with SWH?
...
If you could run SWH without alerts about tampering SRP by another application, then you do not need to worry.

SRP_tampering.png


Edit.
Now I can see that the info about tampering has to be corrected (Hard_Configurator ---> Simple Windows Hardening.):(
After correction, it will look as follows:

SRP_tampering.png
 
Last edited:

Tutman

Level 12
Verified
Top Poster
Well-known
Apr 17, 2020
542
SWH is incompatible with SRP introduced via Group Policies Object (GPO) available in Windows Pro, Education, and Enterprise editions. GPO refresh feature will overwrite the SWH settings related to SRP. So, before installing SWH, the SRP has to be removed from GPO.
How does one remove the Software Restriction Policies from the GPO?
 

Andy Ful

From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,510
How does one remove the Software Restriction Policies from the GPO?
gpedit.msc >> Computer Configuration >> Windows Settings >> Security Settings >> Software Restriction Policies

If software restriction policies have already been created for a Group Policy Object (GPO), the New Software Restriction Policies command does not appear on the Action menu. To delete the software restriction policies that are applied to a GPO, in the console tree, right-click Software Restriction Policies, and then click Delete Software Restriction Policies.


You can also use secpol.msc >> Security Settings >> Software Restriction Policies
and follow the above instructions.
 
Last edited:

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top