Skip to content

Commit

Permalink
Rebased on #2606, swapped legacy admonitions
Browse files Browse the repository at this point in the history
  • Loading branch information
dngray committed Jul 28, 2024
1 parent 4328038 commit 885f067
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 89 deletions.
1 change: 0 additions & 1 deletion docs/os/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ The articles marked with a :material-star: are our more mature articles.
- [macOS Overview](macos-overview.md)
- [Qubes Overview](qubes-overview.md) :material-star:
- [Windows Overview](windows/index.md)

133 changes: 89 additions & 44 deletions docs/windows/hardening.md → docs/os/windows/hardening.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/os/windows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ You can enhance your privacy and security on Windows without downloading any thi

- Initial Installation (coming soon)
- [Group Policy Settings](group-policies.md)
- Privacy Settings (coming soon)
- Application Sandboxing (coming soon)
- Security Hardening (coming soon)
- [Privacy Settings](privacy.md)
- [Application Sandboxing](sandboxing.md)
- [Security Hardening](hardening.md)

<div class="admonition example" markdown>
<p class="admonition-title">This section is new</p>
Expand Down
7 changes: 4 additions & 3 deletions docs/windows/privacy.md → docs/os/windows/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It’s worth noting that according to [this study](https://www.autoriteitpersoon

You should log in to that specific app only if you need to.

or
or

Create another standard user account and connect it to Microsoft account if you are required for School or Work and keep the apps to that account alone. By restricting other data drive access, it is fully isolated from other profiles.

Expand All @@ -30,7 +30,8 @@ If you read this article - [https://www.softscheck.com/en/blog/windows-10-enterp
Disabling full telemetry or sending basic data to Microsoft is totally upto the user's threat model.

- [ ] Disable `Automatic Sample Submission` in Windows Defender, as the feature will send your files as a sample for Signature Database and might leak your data. You can do it via the below Group Policy so to not prompt you again and again constantly.
```

```text
Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > MAPS > Send file samples when further analysis is required to Never Send.
```
Expand Down Expand Up @@ -82,4 +83,4 @@ Press, ++win+r++, Then type `certmgr.msc`, Under `Personal` > `Certificates`. Cl
To import in another device, simply open and install this certificate in that device and choose the above location. Then you can access EFS encrypted files in other system too.
*[EFS]: Encrypted File System
*[EFS]: Encrypted File System
48 changes: 28 additions & 20 deletions docs/windows/sandboxing.md → docs/os/windows/sandboxing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ UWAs are processes that operate within the `AppContainer` is an application sand

#### Win32 Apps

Win32 is the application platform of choice for developing and running classic Windows applications, that
is, Win32 applications, that require direct access to Windows and hardware.
Win32 is the application platform of choice for developing and running classic Windows applications, that
is, Win32 applications, that require direct access to Windows and hardware.

The core of Win32 is the Win32 API implemented in the Windows SubDLLs (DLLs) and the ntdll.dll library file. With the combination of `SubDLLs` and `ntdll.dll`, the Win32 application has direct access to full system resources.

Expand All @@ -25,12 +25,11 @@ The core of Win32 is the Win32 API implemented in the Windows SubDLLs (DLLs) and
| UWAs | Windows |
| :--------- | :---------------------------------- |
|UWAs run as restricted, containerized `AppContainer` processes that run by accessing the WinRT API, a subset of COM functionalities and the Win32 API. They have specific properties that define process restrictions in terms of the system resources that processes can access.| Win32 applications run as Windows native, traditional processes that run by accessing the Win32 API and COM functionalities to their full extent and a subset of the WinRT API to directly access all system resources. They do not run as restricted processes, all system functionalities are by design directly available to them.|
|Only a single instance of a given UWA may run at a given time. | Any number of instances of a given Win32 application may run simultaneously.
|UWAs are distributed as application packages, archive files with a pre-defined format and required content that is necessary for the deployment and operation of UWAs |The way in which Win32 applications are distributed is not restricted by the operating system. It is defined by the application vendors.
|Only a single instance of a given UWA may run at a given time. | Any number of instances of a given Win32 application may run simultaneously. |
|UWAs are distributed as application packages, archive files with a pre-defined format and required content that is necessary for the deployment and operation of UWAs |The way in which Win32 applications are distributed is not restricted by the operating system. It is defined by the application vendors. |

The above comparison gives a clear cut that UWA/UWP apps are the best ones to use in terms of sandboxing the app.


### Choosing the way to install software

UWA apps are primarily distributed through Microsoft store and are counter-signed by Microsoft while as third party UWA's are signed by the vendor without Microsoft's signature.
Expand All @@ -51,22 +50,28 @@ When you see an app in store and scroll down to *Additional Information* sectio

![UWP in store](/assets/img/windows/UWP-in-MS-Store.webp)

If the Win32 App, Microsoft store will explicitly state that it is`Provided and Updated by `****` ` and `Uses all System resources` as in the image below:
If the Win32 App, Microsoft store will explicitly state that it is Provided and Updated by `****` and `Uses all System resources` as in the image below:

![Win32 in store](/assets/img/windows/Win32-in-MS-Store.webp)

!!! note "Un-sandboxed UWP apps"
Some UWP apps in the store due to the lift of restrictions in Microsoft store developers can submit the app with a property named `runFullTrust` which disables sandboxing of that UWP application and shows that `Uses all System Resources` in *Additional Information* section such as Firefox. By this you can know if a UWP app is sandboxed or not.
<div class="admonition note" markdown>
<p class="admonition-title">Un-sandboxed UWP apps</p>

If it is sandboxed, it will show only certain permissions in *Additional Information* section.
Some UWP apps in the store due to the lift of restrictions in Microsoft store developers can submit the app with a property named `runFullTrust` which disables sandboxing of that UWP application and shows that `Uses all System Resources` in *Additional Information* section such as Firefox. By this you can know if a UWP app is sandboxed or not.

!!! abstract "Note"
Most apps will ask that if the app needs to be used for all users or just for your user account. It is best you keep the app to your user Account. So, We achieve better sandboxing between different user accounts.
If it is sandboxed, it will show only certain permissions in *Additional Information* section.
</div>

##### Another way to find
<div class="admonition abstract" markdown>
<p class="admonition-title">Note</p>

[rg-adguard.net](https://store.rg-adguard.net/) is a third party Microsoft store app which can be used to download `.appx` files (Installer for UWP) and install UWP apps. You can use this site to download Age Restricted apps in store and Install it. **Note** that paid apps don't work unless you connect a Microsoft Account.
Most apps will ask that if the app needs to be used for all users or just for your user account. It is best you keep the app to your user Account. So, We achieve better sandboxing between different user accounts.

</div>

#### Another way to find

[rg-adguard.net](https://store.rg-adguard.net/) is a third party Microsoft store app which can be used to download `.appx` files (Installer for UWP) and install UWP apps. You can use this site to download Age Restricted apps in store and Install it. **Note** that paid apps don't work unless you connect a Microsoft Account.

## Using Winget to Install Sofware

Expand All @@ -88,7 +93,7 @@ If you understood about Winget, then this tool - [https://winstall.app/](https:/

Note : Be sure to install via Winget or using MSI installer to upgrade the app easily.

#### Benefits of winget
### Benefits of winget

There are general advantages in having a package manager regardless of the operating system.

Expand All @@ -105,7 +110,6 @@ The sandbox is temporary like TailsOS running on a USB drive. When it's closed,

You can know more from the Official [Documentation](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview).


**Use case of Sandbox:** The Windows Sandbox can be used to run unknown software or if you want to isolate your Workspace from the host with only Specific set of apps, etc.

### Using Sandbox
Expand All @@ -116,16 +120,20 @@ So, when opening the file, sandbox opens with the Configurations you had set up

If you do not understand the documentation, you can use [Windows Sandbox Editor](https://github.com/damienvanrobaeys/Windows_Sandbox_Editor) instead. It is a GUI application that can be used to create configuration files easily.

??? note "Regarding Windows Sandbox Editor"
The repository doesn't provide a package. So, you need to download the whole codebase. After, extracting the zip Windows Defender or other Antivirus software may flag the [exe](https://github.com/damienvanrobaeys/Windows_Sandbox_Editor/tree/master/EXE) file as a malware. So, it is recommended to install it via the [Powershell Script](https://github.com/damienvanrobaeys/Windows_Sandbox_Editor/tree/master/Install%20on%20desktop%20(in%20case%20of%20issue%20with%20EXE)) they provide.
<div class="admonition note" markdown>
<p class="admonition-title">Regarding Windows Sandbox Editor</p>

The repository doesn't provide a package. So, you need to download the whole codebase. After, extracting the zip Windows Defender or other Antivirus software may flag the [exe](https://github.com/damienvanrobaeys/Windows_Sandbox_Editor/tree/master/EXE) file as a malware. So, it is recommended to install it via the [Powershell Script](https://github.com/damienvanrobaeys/Windows_Sandbox_Editor/tree/master/Install%20on%20desktop%20(in%20case%20of%20issue%20with%20EXE)) they provide.

By default, You cannot execute Scripts in Powershell and it is restricted to commands only. It is recommend you allow the Terminal to `Unrestricted` mode and use it to install the editor via Script after that change it back to `Restricted` [execution policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2) to prevent accidental execution of malicious scripts in the future.

By default, You cannot execute Scripts in Powershell and it is restricted to commands only. It is recommend you allow the Terminal to `Unrestricted` mode and use it to install the editor via Script after that change it back to `Restricted` [execution policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2) to prevent accidental execution of malicious scripts in the future.
</div>

### Run programs instantly in Sandbox

[Run in Sandbox](https://github.com/damienvanrobaeys/Run-in-Sandbox) is a tool to quickly run files in Windows Sandbox with a right click.

We recommend you to use this software as it is convenient and easy to use and even credited by Microsoft.
We recommend you to use this software as it is convenient and easy to use and even credited by Microsoft.

A full guide on How to use it can be found here: [https://www.systanddeploy.com/2021/11/run-in-sandbox-quick-way-to-runextract.html](https://www.systanddeploy.com/2021/11/run-in-sandbox-quick-way-to-runextract.html)

Expand All @@ -144,4 +152,4 @@ Use this at your own Risk !
*[SubDLLs]: Subsystem Dynamic link libraries
*[ntdll.dll]: A core Windows library file that implements functions for interaction with the kernel.
*[WinRT]: Windows Runtime
*[COM]: Component Object Model
*[COM]: Component Object Model
46 changes: 32 additions & 14 deletions docs/os/windows-overview.md → docs/os/windows/windows-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ Over the years, Microsoft has demonstrated a lot of privacy-invasive behaviour w

Windows 10 was [criticized](https://www.theguardian.com/technology/2015/jul/31/windows-10-microsoft-faces-criticism-over-privacy-default-settings) for having default settings that sent a lot of data and telemetry back to Microsoft, including:

!!! quote "[Criticism of Microsoft - Wikipedia](https://en.wikipedia.org/wiki/Criticism_of_Microsoft#Telemetry_and_data_collection)"
User's contacts and calendar events, location data and history, "telemetry" (diagnostics data) ... and "advertising ID", as well as further data when the Cortana assistant is enabled.
<div class="admonition quote" markdown>
<p class="admonition-title">[Criticism of Microsoft - Wikipedia](https://en.wikipedia.org/wiki/Criticism_of_Microsoft#Telemetry_and_data_collection)</p>

User's contacts and calendar events, location data and history, "telemetry" (diagnostics data) ... and "advertising ID", as well as further data when the Cortana assistant is enabled.

</div>

At launch, telemetry could not be disabled in non-enterprise editions of Windows 10. Only after [criticism](https://www.theverge.com/2016/7/21/12246266/france-microsoft-privacy-windows-10-cnil) from the France data protection commission, the [Electronic Frontier Foundation](https://www.eff.org/deeplinks/2016/08/windows-10-microsoft-blatantly-disregards-user-choice-and-privacy-deep-dive) and the [European Union](https://www.reuters.com/article/us-microsoft-dataprotection-eu-idUSKBN15Z1UI), Microsoft changed the way they collect telemetry, allowing users to choose between "Basic" (now renamed as `Required`) and "Full", with "Basic" mode collecting [much less telemetry](https://www.extremetech.com/computing/243079-upcoming-windows-update-reduces-spying-microsoft-still-mum-data-collects). Along with that, Microsoft collects a [lot more data from Windows 10](https://web.archive.org/web/20210711143017/https://privacytools.io/operating-systems/#win10).

Expand All @@ -32,13 +36,13 @@ While using Windows, it is better to select either Windows **Enterprise** Editio

If you cannot get the above editions, you should opt for **Professional** Edition.

#### Editions to avoid
### Editions to avoid

- It is not recommended to use forks or modified versions of Windows such as Windows AME. It should be avoided at all cost. Since modified versions of Windows, such as AME, don't get updates, antivirus programs like Defender can fall out of date or be disabled entirely, opening you up to attacks.

- Windows **Home** edition is **not** recommended as it does not have many advantages that Professional edition provides such as BitLocker Drive Encryption, Hyper-V, Windows Sandbox, etc. It also uploads Bitlocker Encryption keys to Microsoft servers which actually defies the aspect of the encryption implemented as the key was supposed to be hold by the user.

##### Recommendations
#### Recommendations

We recommend you choose Windows 11 over Windows 10 as it is the latest version and brings many security-related improvements with it by default such as [Secure Boot](https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-secure-boot), [VBS](https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs), [HVCI](https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/device-guard-and-credential-guard), etc. Windows 10 will stop getting updates after [October 14, 2025](https://docs.microsoft.com/en-us/lifecycle/products/windows-10-home-and-pro).

Expand All @@ -53,16 +57,22 @@ To download the ISO. Follow these steps :
- Download Media Creation tool under `Windows 11 Installation Media`
- Open a Command prompt terminal in the directory where `mediacreationtool.exe` is downloaded.
- And Input the following Command :
```

```text
mediacreationtool.exe /Eula Accept /Retail /MediaArch x64 /MediaLangCode en-US /MediaEdition Enterprise
```
- If it asks for Activation key, Use this Generic Key `XGVPP-NMH47-7TTHJ-W3FW7-8HV2C`. This will just allow you to download the ISO but activation is totally upon the user.
- Accept the UAC prompt
- Download the ISO file or flash to a USB as you wish
!!! info "Note"
- The ISO will consists **only** of Professional, Education & Enterprise editions with a size of ~4.2 GB (Instead of >5.5GB when you download the Multi-Edition ISO). When you download using the above way, no other editions such as Home are included in it.
- If you want to change the language of the ISO file, Just change the `en-US` part with the appropriate language and country code as per your needs.
<div class="admonition note" markdown>
<p class="admonition-title">Note</p>
- The ISO will consists **only** of Professional, Education & Enterprise editions with a size of ~4.2 GB (Instead of >5.5GB when you download the Multi-Edition ISO). When you download using the above way, no other editions such as Home are included in it.
- If you want to change the language of the ISO file, Just change the `en-US` part with the appropriate language and country code as per your needs.
</div>
### Activating Windows
Expand All @@ -72,16 +82,24 @@ For activating Professional edition, you can buy the license key from resellers
If you are currently using Pro and want to upgrade to Enterprise. Then, Follow the guide [here](https://www.kapilarya.com/how-to-upgrade-windows-11-pro-to-enterprise-edition)
!!! abstract "Note"
This guide will be mostly on Windows 11 but some of the recommendations can be applied to Windows 10 too.
<div class="admonition abstract" markdown>
<p class="admonition-title">Note</p>
This guide will be mostly on Windows 11 but some of the recommendations can be applied to Windows 10 too.
</div>
<div class="admonition danger" markdown>
<p class="admonition-title">Warning</p>
If you are going to install Windows 11, then install it only on supported devices. It is not recommended to use tools/scripts that are available online to bypass the requirements which would break the security of Windows 11 which it is aimed for.
!!! danger "Warning"
If you are going to install Windows 11, then install it only on supported devices. It is not recommended to use tools/scripts that are available online to bypass the requirements which would break the security of Windows 11 which it is aimed for.
**Never** download *Pirated* ISO Files
**Never** download *Pirated* ISO Files
</div>
*[GP]: Group Policy
*[VBS]: Virtualization-Based Security
*[HVCI]: Hypervisor-Protected Code Integrity
*[AME]: Ameliorated
*[P2P]: Peer-to-Peer
*[P2P]: Peer-to-Peer
4 changes: 0 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,6 @@ nav:
- "android/obtaining-apps.md"
- "desktop.md"
- "router.md"
- !ENV [WINDOWS, "Windows"]:
- "windows/privacy.md"
- "windows/hardening.md"
- "windows/sandboxing.md"
- !ENV [NAV_ADVANCED, "Advanced"]:
- "alternative-networks.md"
- "device-integrity.md"
Expand Down

0 comments on commit 885f067

Please sign in to comment.