Skip to content

Commit

Permalink
Improved method summaries
Browse files Browse the repository at this point in the history
Also added force strong key protection to the GUI as optional feature
  • Loading branch information
HotCakeX committed Nov 4, 2024
1 parent dd84495 commit cbf0278
Show file tree
Hide file tree
Showing 27 changed files with 101 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ await Task.Run(() =>
MiscellaneousConfigurations.MiscellaneousConfigurations_LongPathSupport();
}

if (GUIProtectWinSecurity.SelectedSubCategories.Contains("MiscellaneousConfigurations_StrongKeyProtection"))
{
MiscellaneousConfigurations.MiscellaneousConfigurations_StrongKeyProtection();
}

break;
}
case "WindowsUpdateConfigurations":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static class AttackSurfaceReductionRules
{
/// <summary>
/// Applies Attack Surface Reduction rules
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ namespace HardenWindowsSecurity
{
public static class BitLockerSettings
{
// Applies all Bitlocker settings hardening category
/// <summary>
/// Applies all Bitlocker settings hardening category
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ namespace HardenWindowsSecurity
{
public static class CertificateCheckingCommands
{
/// <summary>
/// Checks the certificates of the system and displays ones that don't come by default in Windows
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.WorkingDir is null || !Directory.Exists(GlobalVars.WorkingDir))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace HardenWindowsSecurity
{
public static partial class CountryIPBlocking
{
/// <summary>
/// Performs country IP blocking operations
/// </summary>
public static void Invoke()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace HardenWindowsSecurity
{
public static partial class CountryIPBlocking
{
/// <summary>
/// Blocks IP address of the countries in the OFAC list
/// </summary>
public static void CountryIPBlocking_OFAC()
{
Logger.LogMessage("Blocking IP ranges of countries in OFAC sanction list", LogTypeIntel.Information);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class DownloadsDefenseMeasures
{
/// <summary>
/// Blocks certain dangerous script hosts using AppControl policy
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void DangerousScriptHostsBlocking()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace HardenWindowsSecurity
{
public static partial class DownloadsDefenseMeasures
{
/// <summary>
/// Prevents executables originating from the Downloads folder from running, using AppControl policy
/// </summary>
public static void Invoke()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace HardenWindowsSecurity
{
public static class EdgeBrowserConfigurations
{
/// <summary>
/// Applies Microsoft Edge policies
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class LockScreen
{
/// <summary>
/// Applies the LockScreen category policies
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class LockScreen
{
/// <summary>
/// Will require CTRL + ALT + DEL keys to be pressed on lock screen during logon
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void LockScreen_CtrlAltDel()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class LockScreen
{

/// <summary>
/// Will not display who last signed into the device on lock screen
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void LockScreen_LastSignedIn()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace HardenWindowsSecurity
{
public static partial class MicrosoftDefender
{
/// <summary>
/// Sets Microsoft Defender Engine and Platform update channels to beta
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void MSFTDefender_BetaChannels()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class MicrosoftDefender
{
/// <summary>
/// Enables diagnostic data to ensure security components of the OS will be able to work as expected and communicate with the services
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void MSFTDefender_EnableDiagData()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class MicrosoftDefender
{
/// <summary>
/// Creates a scheduled task for Microsoft Recommended Drivers Block Rules auto update
/// </summary>
/// <exception cref="InvalidOperationException"></exception>
public static void MSFTDefender_ScheduledTask()
{
Logger.LogMessage("Creating scheduled task for fast weekly Microsoft recommended driver block list update", LogTypeIntel.Information);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ namespace HardenWindowsSecurity
{
public static partial class MiscellaneousConfigurations
{
/// <summary>
/// Applies the Miscellaneous category security measures
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class MiscellaneousConfigurations
{
/// <summary>
/// Enables support for long paths in Windows for programs
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void MiscellaneousConfigurations_LongPathSupport()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class MiscellaneousConfigurations
{
/// <summary>
/// Enables strong key protection for saved certificates with private keys
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void MiscellaneousConfigurations_StrongKeyProtection()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class MiscellaneousConfigurations
{
/// <summary>
/// Only lets printers who are compatible with the new secure drivers to work
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void MiscellaneousConfigurations_WindowsProtectedPrint()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace HardenWindowsSecurity
{
public static partial class NonAdminCommands
{
/// <summary>
/// Applies Non-Admin security measures
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static partial class WindowsNetworking
{
/// <summary>
/// Blocks usage of NTLM
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void WindowsNetworking_BlockNTLM()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace HardenWindowsSecurity
{
public static class WindowsUpdateConfigurations
{
/// <summary>
/// Applies Windows Update category
/// </summary>
/// <exception cref="ArgumentNullException"></exception>
public static void Invoke()
{
if (GlobalVars.path is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

namespace HardenWindowsSecurity
{
// Class to represent a policy with various attributes
/// <summary>
/// Class to represent a policy with various attributes
/// </summary>
public sealed class CiPolicyInfo
{
public string? PolicyID { get; set; } // Unique identifier for the policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace HardenWindowsSecurity
{
// a class to hold the properties of the current culture
/// <summary>
/// a class to hold the properties of the current culture
/// </summary>
public sealed class CultureInfoProperties
{
public string? Parent { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace HardenWindowsSecurity
{
/// <summary>
/// Microsoft Defender Update channel names for Platform and Engine
/// </summary>
public static class DefenderPlatformUpdatesChannels
{
public static readonly Dictionary<ushort, string> Channels = new()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Hardening Category results used by the Confirm-SystemCompliance cmdlet

#nullable enable

namespace HardenWindowsSecurity
{
/// <summary>
/// A class that defines a single compliance check result
/// </summary>
public sealed class IndividualResult
{
public string? FriendlyName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

namespace HardenWindowsSecurity
{
// Class that contains the results of TPM status checks
/// <summary>
/// Class that contains the results of TPM status checks
/// </summary>
public sealed class TpmResult
{
public bool IsEnabled { get; set; }
Expand Down

0 comments on commit cbf0278

Please sign in to comment.