Skip to content

Commit

Permalink
Updated TLS Cipher Suites, ECC Curves and a new TopSecurity item
Browse files Browse the repository at this point in the history
Added Untrusted Font Blocking Mitigation to the Top Security category
Configured TLS category by removing the insecure CBC TLS Cipher Suites, Please view GitHub Readme TLS section for more info.
Configured TLS ECC Curves to utilize more secure curves.
  • Loading branch information
HotCakeX committed May 30, 2023
2 parents a4c5040 + 8a96920 commit 5b5be1f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Binary file modified Payload/Security-Baselines-X.zip
Binary file not shown.
29 changes: 16 additions & 13 deletions README.md
Expand Up @@ -156,13 +156,17 @@ Install-Script -Name Harden-Windows-Security
| Link Count| Link | Reason |
|:----:|:-----------------------------:|:----------------------------------------------------------:|
| 1 | Intel website | i7 13700k product page |
| 2 | Wikipedia | providing further information for the reader |
| 1 | UK National Cyber Security Centre | providing further information for the reader about TLS |
| 1 | Security.Stackexchange Q&A | providing logic and reasoning for certain actions |
| 1 | state.gov | List of State Sponsors of Terrorism |
| 1 | orpa.princeton.edu | OFAC Sanctioned Countries |
| 1 | browserleaks.com/tls | Browser TLS test |
| 1 | clienttest.ssllabs.com | Browser TLS test |
| 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 | Security.Stackexchange Q&A | TLS - providing additional information |
| 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 |

</details>

Expand All @@ -181,7 +185,7 @@ Install-Script -Name Harden-Windows-Security
<img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/Shiny.gif" width="27" alt="Features Item"> Applying this script 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](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-highly-secure#what-makes-a-secured-core-pc) - <a href="#device-guard">Check Device Guard category for more details.</a>
> [Secured-core](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-highly-secure) – 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.
<img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/Shiny.gif" width="27" alt="Features Item"> There are 4 items tagged with **#TopSecurity** <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> that can cause some inconvenience but increase security even further. When you run this script, you will have an option to enable them if you want to. Press `Control + F` and search for `#TopSecurity` on this page to find those security measures.
<img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/Shiny.gif" width="27" alt="Features Item"> There are 5 items tagged with **#TopSecurity** <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> that can cause some inconvenience but increase security even further. When you run this script, you will have an option to enable them if you want to. Press `Control + F` and search for `#TopSecurity` on this page to find those security measures.

<img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/Shiny.gif" width="27" alt="Features Item"> Since I originally created this repository for myself and people I care about, I always maintain it to the highest possible standard.

Expand Down Expand Up @@ -475,7 +479,7 @@ If you want to read more: [Demystifying Schannel](https://techcommunity.microsof

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/roratinggem.gif" width="28" alt="Rotating pink gem denoting registry or cmdlet"> Disables the following [weak ciphers](https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices) that are **only 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)"`

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> Configures the [TLS](https://www.ncsc.gov.uk/guidance/using-tls-to-protect-data) to only use the following secure [cipher suites](https://learn.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-11) and in this exact order:
- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> Configures the [TLS](https://www.ncsc.gov.uk/guidance/using-tls-to-protect-data) to only use the following secure [cipher suites](https://learn.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-11) and in this exact order: [<img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/ExcMark.gif" width="20" alt="Rotating pink gem denoting registry or cmdlet"> ¹](https://developers.cloudflare.com/ssl/reference/cipher-suites/recommendations/) [<img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/ExcMark.gif" width="20" alt="Rotating pink gem denoting registry or cmdlet"> ²](https://scanigma.com/knowledge-base)

```
TLS_CHACHA20_POLY1305_SHA256
Expand All @@ -485,17 +489,14 @@ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
```

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> [Configures](https://learn.microsoft.com/en-us/windows-server/security/tls/manage-tls) TLS ECC Curves to use the following prioritized Curves order:

```
nistP521
curve25519
NistP384
NistP256
Expand Down Expand Up @@ -565,7 +566,7 @@ NistP384
- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> Changes the [behavior of the elevation prompt for standard users](https://learn.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings#user-account-control-behavior-of-the-elevation-prompt-for-standard-users) from "prompt for credentials" to "prompt for credentials on the secure desktop".
- **#TopSecurity** <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> behavior: Automatically deny all UAC prompts on Standard accounts. **Highly recommended to be used on sensitive critical machines.** Only use Standard account for regular everyday tasks, and if you want to perform administrative tasks such as intalling a program system-wide or changing system settings, completely log out of the Standard account and log into an Administrator account, perform the tasks, then completely log out and log back into the Standard account to continue your work. No [fast user switching](https://learn.microsoft.com/en-us/windows/win32/shell/fast-user-switching) and **absolutely no UAC on Standard accounts.**

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> *#TopSecurity* <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> Hides the entry points for [Fast User Switching](https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-windowslogon).
- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> **#TopSecurity** <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> Hides the entry points for [Fast User Switching](https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-windowslogon).

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/roratinggem.gif" width="28" alt="Rotating pink gem denoting registry or cmdlet"> **(Requires additional confirmation to run):** [Asks for a strong password for the built-in Administrator account and then enables it.](https://github.com/HotCakeX/Harden-Windows-Security/discussions/30#discussioncomment-5627737)

Expand Down Expand Up @@ -773,6 +774,8 @@ These are configurations that are typically *recommended in High-Risk Environmen

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/roratinggem.gif" width="28" alt="Rotating pink gem denoting registry or cmdlet"> Enables **WinVerifyTrust Signature Validation**, [a security feature related to WinVerifyTrust function that handles Windows Authenticode signature verification for portable executable (PE) files.](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2013-3900)

- <img src="https://raw.githubusercontent.com/HotCakeX/Harden-Windows-Security/main/images/Gifs/bluemark.gif" width="25" alt="Blue Check mark denoting Group Policy"> [Blocking Untrusted Fonts](https://learn.microsoft.com/en-us/windows/security/threat-protection/block-untrusted-fonts-in-enterprise) <img src="https://github.com/HotCakeX/Harden-Windows-Security/raw/main/images/Gifs/200iq.gif" width="28" alt="TopSecurity"> **#TopSecurity**

<p align="right"><a href="#menu-back-to-top">💡 (back to categories)</a></p>

<br>
Expand Down Expand Up @@ -981,7 +984,7 @@ This repository uses the simplest possible, yet effective, methods that make it

<br>

<!-- Security-Baselines-X-VT:START --><a href='https://www.virustotal.com/gui/file/8211b54effde5640ba75522cb3cdaf28ea9c5035fb42b66669323a03ea85de20'>Virus Total scan results of Security-Baselines-X.zip</a><!-- Security-Baselines-X-VT:END -->
<!-- Security-Baselines-X-VT:START --><a href='https://www.virustotal.com/gui/file/9e53b56e25d5e30e3277b8be1b3b77967fb70feffa995e6fec9ec6a70c1b3a56'>Virus Total scan results of Security-Baselines-X.zip</a><!-- Security-Baselines-X-VT:END -->

<br>

Expand Down

13 comments on commit 5b5be1f

@HotCakeX
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: #42

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to https://safecurves.cr.yp.to/, curve25519 is (more) safe than NIST curves, so IMHO curve25519 should have higher priority.

@HotCakeX
Copy link
Owner Author

@HotCakeX HotCakeX commented on 5b5be1f Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to https://safecurves.cr.yp.to/, curve25519 is (more) safe than NIST curves, so IMHO curve25519 should have higher priority.

I set nistP521 first because it's available in FIPS mode and also has a bigger bit length compared to curve25519

image

https://learn.microsoft.com/en-us/windows/win32/secauthn/tls-elliptic-curves-in-windows-10-1607-and-later

https://www.rfc-editor.org/rfc/rfc9142.html

image

@HotCakeX
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafalfitt Sorry I couldn't find where in the page you linked to it says curve25519 is safer than nistP521, could you show me a screenshot? thank you

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If you're looking for a 128-bit security level, then anything in the TLS 1.3 list should be sufficient except ffdhe2048. If you're looking for a 192-bit security level, then you'll need ffdhe8192, x448, secp384r1, or secp521r1. Note that in some implementations, while secp256r1, x25519, and x448 are constant time, secp384r1 and secp521r1 are not, so you should make sure that your implementation only configures elliptic curves that are implemented in a constant-time manner. This is the main reason I prefer the non-NIST curves: because they're easier to implement in a constant-time way and as a result almost always are."
https://crypto.stackexchange.com/questions/87648/which-diffie-hellman-groups-does-tls-1-3-support-and-should-we-use-tls-1-3-as-a

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Ed25519 is a safe default choice for most applications where a digital signature is appropriate, for many reasons"

"NIST P-521 (ECDSA, secp521r1)
Biggest curve is best curve! — the clueless"

https://soatok.blog/2022/05/19/guidance-for-choosing-an-elliptic-curve-signature-algorithm-in-2022/

@HotCakeX
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Ed25519 is a safe default choice for most applications where a digital signature is appropriate, for many reasons"

"NIST P-521 (ECDSA, secp521r1) Biggest curve is best curve! — the clueless"

https://soatok.blog/2022/05/19/guidance-for-choosing-an-elliptic-curve-signature-algorithm-in-2022/

Thanks, it was a very interesting read 🙂

Based on that article, NIST P-521 is the most secure one, and it's FIPS approved. They claim it's overkill but it's the best we've got for Harvest Now, Decrypt Later scenarios.

Plus, prioritizing it at the top doesn't mean it will be 100% guaranteed to be used. It's just prioritizing it, so if the server/client/software supports it then it will use it, if not then they will use curve25519 and if that is not supported then NistP384 and finally NistP256.

I really don't see any problem with the current configuration, the most secure one is prioritized but it obviously comes with performance penalties, but that's what this repository is aiming for, highest possible security, and as mentioned earlier, there is Quantum computers problem, rouge countries harvesting bulk data now and decrypting them later when they have access to Quantum computation.

Despite NIST P-521 being prioritized, in Wireshark i often see other curves being used.

None of the websites you linked to state that NIST P-521 is less secure than curve25519, they either fail to even talk about it or only talk about curve25519. but never said that Nist one is less secure, on the contrary, they say it's more secure but refer to it as overkill.

NistP521 uses 521 bit key size and offers 256 bit security level. Curve25519 uses 256 bit key size and offers 128 bit security level.

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HotCakeX
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just asking: have you seen https://cr.yp.to/talks/2013.05.31/slides-dan+tanja-20130531-4x3.pdf ?

Yes, I read that too, written by the same person who released curve25519 and includes some delusional comments about how Nist curves include NSA backdoors, seen a bunch of those comments made in forums. EVEN if that's true, NSA isn't the organization we need to worry about. Only people who need to worry about those things are adversaries such as Russia, China, North Korea, Iran and such countries.

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about the last slide: NIST curves are missing some several important (not sure - I am a newbie) features.

@HotCakeX
Copy link
Owner Author

@HotCakeX HotCakeX commented on 5b5be1f Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about the last slide: NIST curves are missing some several important (not sure - I am a newbie) features.

I am a newbie too in cryptography and verifying their deeper details, I think we should open a new question in https://crypto.stackexchange.com/ and ask which one is more secure, regardless of being developed by NSA and ignoring the performance penalties.

need opinion of people that are not biased against NIST, I say opinion because if we wanted to verify their answers we'd need to have deeper knowledge of cryptography and mathematical calculations related to them.

@rafalfitt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough ;-)

Please sign in to comment.