june-update

This commit is contained in:
Jake Barteaux
2021-07-01 15:47:10 -07:00
parent 4f04875d1c
commit 67a0cd1d8f
10 changed files with 500 additions and 118 deletions
+33 -3
View File
@@ -7,7 +7,7 @@
\/ \/ \/ \/ \/ \/
C O M P L E T E M A N D I A N T
O F F E N S I V E V M
Version 2020.2
Version 2021.2
commandovm@fireeye.com
_____________________________________________________
@@ -32,20 +32,50 @@ Installation (Install Script)
Requirements
------------
* Windows 10 1803, 1809, 1903, 1909, or 2004
* Windows 10 1803, 1809, 1903, 1909, 2004, 20H2, or 21H1
> Insider Preview editions of Windows are not supported
* 60 GB Hard Drive
* 2 GB RAM
Recommended
-----------
* Windows 10 2004
* Windows 10 21H1
* 80+ GB Hard Drive
* 4+ GB RAM
* 2 network adapters
Instructions
============
Pre-Install Procedures
----------------------
You MUST disable Windows Defender for a smooth install. The best way to accomplish this is through Group Policy
In Windows versions 1909 and higher, Tamper Protection was added.
**Tamper Protection must be disabled, otherwise Group Policy settings are ignored.**
1. Open Windows Security (type `Windows Security` in the search box)
2. Virus & threat protection > Virus & threat protection settings > Manage settings
3. Switch `Tamper Protection` to `Off`
> It is not necessary to change any other setting (`Real Time Protection`, etc.)
> **Important.** Tamper Protection must be disabled before changing Group Policy settings.
To permanently disable Real Time Protection
1. Open Local Group Policy Editor (type `gpedit` in the search box)
2. Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Real-time Protection
3. Enable `Turn off real-time protection`
4. **Reboot**
> Make sure to **reboot** before making the next change
To permanently disable Microsoft Defender:
1. Open Local Group Policy Editor (type `gpedit` in the search box)
2. Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus
3. Enable `Turn off Microsoft Defender Antivirus`
4. **Reboot**
[1]: https://stackoverflow.com/questions/62174426/how-to-permanently-disable-windows-defender-real-time-protection-with-gpo
Standard install
----------------
1. Create and configure a new Windows Virtual Machine
@@ -6,7 +6,7 @@
\/ \/ \/ \/ \/ \/
C O M P L E T E M A N D I A N T
O F F E N S I V E V M
Version 2020.2
Version 2021.2
[email protected]
_____________________________________________________
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>commandovm.win10.installer.fireeye</id>
<version>2.0.0.2</version>
<version>2.1.0.0</version>
<title>CommandoVM</title>
<authors>Jake Barteaux</authors>
<description>CommandoVM - Penetration Testing Distribution</description>
@@ -66,7 +66,10 @@
{"name": "x64dbg.fireeye"},
{"name": "windbg.fireeye"},
{"name": "windbg.kenstheme.flare"},
{"name": "proxycap.fireeye"},
{
"name": "proxycap.fireeye",
"args": "--ignorepackagecodes"
},
{"name": "windump.fireeye"},
{"name": "apimonitor.fireeye"},
{"name": "orca.fireeye"},
@@ -154,7 +157,6 @@
{"name": "PowerUpSQL.fireeye"},
{"name": "PowerView.fireeye"},
{"name": "Privesc.fireeye"},
{"name": "PrivExchange.fireeye"},
{"name": "PSAmsi.fireeye"},
{"name": "PSAttack.fireeye"},
{"name": "PSBits.fireeye"},
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>commandovm.win10.preconfig.fireeye</id>
<version>2.0.0.2</version>
<version>2.1.0.0</version>
<title>CommandoVM</title>
<authors>Jake Barteaux</authors>
<description>CommandoVM - Penetration Testing Distribution</description>
@@ -1,7 +1,7 @@
##########
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Default preset
# Author: Disassembler <[email protected]>
# Version: v3.9, 2020-04-02
# Version: v3.10, 2020-07-15
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
##########
@@ -10,12 +10,12 @@ RequireAdmin
### Privacy Tweaks ###
DisableTelemetry # EnableTelemetry
DisableCortana # EnableCortana
DisableWiFiSense # EnableWiFiSense
DisableSmartScreen # EnableSmartScreen
DisableWebSearch # EnableWebSearch
DisableAppSuggestions # EnableAppSuggestions
DisableActivityHistory # EnableActivityHistory
DisableBackgroundApps # EnableBackgroundApps
# DisableSensors # EnableSensors
DisableLocation # EnableLocation
DisableMapUpdates # EnableMapUpdates
@@ -23,7 +23,6 @@ DisableFeedback # EnableFeedback
DisableTailoredExperiences # EnableTailoredExperiences
DisableAdvertisingID # EnableAdvertisingID
DisableWebLangList # EnableWebLangList
DisableCortana # EnableCortana
# DisableBiometrics # EnableBiometrics
# DisableCamera # EnableCamera
# DisableMicrophone # EnableMicrophone
@@ -34,14 +33,32 @@ DisableWAPPush # EnableWAPPush
# EnableClearRecentFiles # DisableClearRecentFiles
# DisableRecentFiles # EnableRecentFiles
### UWP Privacy Tweaks ###
DisableUWPBackgroundApps # EnableUWPBackgroundApps
# DisableUWPVoiceActivation # EnableUWPVoiceActivation
# DisableUWPNotifications # EnableUWPNotifications
# DisableUWPAccountInfo # EnableUWPAccountInfo
# DisableUWPContacts # EnableUWPContacts
# DisableUWPCalendar # EnableUWPCalendar
# DisableUWPPhoneCalls # EnableUWPPhoneCalls
# DisableUWPCallHistory # EnableUWPCallHistory
# DisableUWPEmail # EnableUWPEmail
# DisableUWPTasks # EnableUWPTasks
# DisableUWPMessaging # EnableUWPMessaging
# DisableUWPRadios # EnableUWPRadios
# DisableUWPOtherDevices # EnableUWPOtherDevices
# DisableUWPDiagInfo # EnableUWPDiagInfo
# DisableUWPFileSystem # EnableUWPFileSystem
# DisableUWPSwapFile # EnableUWPSwapFile
### Security Tweaks ###
SetUACLow # SetUACHigh
# EnableSharingMappedDrives # DisableSharingMappedDrives
DisableAdminShares # EnableAdminShares
DisableFirewall # EnableFirewall
HideDefenderTrayIcon # ShowDefenderTrayIcon
DisableDefender # EnableDefender
DisableDefenderCloud # EnableDefenderCloud
# HideDefenderTrayIcon # ShowDefenderTrayIcon
# DisableDefender # EnableDefender
# DisableDefenderCloud # EnableDefenderCloud
# EnableCtrldFolderAccess # DisableCtrldFolderAccess
# EnableCIMemoryIntegrity # DisableCIMemoryIntegrity
# EnableDefenderAppGuard # DisableDefenderAppGuard
@@ -60,7 +77,7 @@ SetCurrentNetworkPrivate # SetCurrentNetworkPublic
SetUnknownNetworksPrivate # SetUnknownNetworksPublic
DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
# DisableHomeGroups # EnableHomeGroups
EnableSMB1
# DisableSMB1 # EnableSMB1
# DisableSMBServer # EnableSMBServer
# DisableNetBIOS # EnableNetBIOS
DisableLLMNR # EnableLLMNR
@@ -92,7 +109,6 @@ DisableAutorun # EnableAutorun
# DisableDefragmentation # EnableDefragmentation
# DisableSuperfetch # EnableSuperfetch
# DisableIndexing # EnableIndexing
# DisableSwapFile # EnableSwapFile
# DisableRecycleBin # EnableRecycleBin
EnableNTFSLongPaths # DisableNTFSLongPaths
# DisableNTFSLastAccess # EnableNTFSLastAccess
@@ -131,7 +147,7 @@ SetControlPanelSmallIcons # SetControlPanelLargeIcons # SetControlPanelC
DisableShortcutInName # EnableShortcutInName
# HideShortcutArrow # ShowShortcutArrow
SetVisualFXPerformance # SetVisualFXAppearance
# EnableTitleBarColor # DisableTitleBarColor
EnableTitleBarColor # DisableTitleBarColor
SetAppsDarkMode # SetAppsLightMode
# SetSystemLightMode # SetSystemDarkMode
# AddENKeyboard # RemoveENKeyboard
@@ -152,6 +168,7 @@ ShowEmptyDrives # HideEmptyDrives
ShowFolderMergeConflicts # HideFolderMergeConflicts
EnableNavPaneExpand # DisableNavPaneExpand
ShowNavPaneAllFolders # HideNavPaneAllFolders
# ShowNavPaneLibraries # HideNavPaneLibraries
# EnableFldrSeparateProcess # DisableFldrSeparateProcess
# EnableRestoreFldrWindows # DisableRestoreFldrWindows
# ShowEncCompFilesColor # HideEncCompFilesColor
@@ -182,9 +199,10 @@ HideVideosFromThisPC # ShowVideosInThisPC
HideVideosFromExplorer # ShowVideosInExplorer
Hide3DObjectsFromThisPC # Show3DObjectsInThisPC
Hide3DObjectsFromExplorer # Show3DObjectsInExplorer
HideIncludeInLibraryMenu # ShowIncludeInLibraryMenu
HideGiveAccessToMenu # ShowGiveAccessToMenu
HideShareMenu # ShowShareMenu
# HideNetworkFromExplorer # ShowNetworkInExplorer
# HideIncludeInLibraryMenu # ShowIncludeInLibraryMenu
# HideGiveAccessToMenu # ShowGiveAccessToMenu
# HideShareMenu # ShowShareMenu
# DisableThumbnails # EnableThumbnails
DisableThumbnailCache # EnableThumbnailCache
DisableThumbsDBOnNetwork # EnableThumbsDBOnNetwork
@@ -203,6 +221,7 @@ DisableEdgeShortcutCreation # EnableEdgeShortcutCreation
DisableIEFirstRun # EnableIEFirstRun
DisableFirstLogonAnimation # EnableFirstLogonAnimation
DisableMediaSharing # EnableMediaSharing
# DisableMediaOnlineAccess # EnableMediaOnlineAccess
EnableDeveloperMode # DisableDeveloperMode
# UninstallMediaPlayer # InstallMediaPlayer
# UninstallInternetExplorer # InstallInternetExplorer
@@ -1,3 +1,15 @@
## The project is archived
This project has been archived because I no longer use Windows. I grew tired with the system being unable to keep itself configured in the desired state, group policies randomly stopping working for hundreds of managed workstations at once, advertisements, unwanted tips and content popping up on various places throughout the user interface, and incompetent support even for enterprise products. Ultimately I have migrated virtually all my servers, workstations and laptops to linux. Even though there are areas where the open source products are still lacking, the transparency, configurability and reliability greatly outweighs the drawbacks for me.
I also lost faith in humanity throughout the years I was actively maintaining the project. The influx of pings, bumps, repeating questions already answered in FAQ, and various other unreasonable demands without any givebacks was just astounding. Please do not contact me regarding this project as I have no desire to invest any more time into it. As per MIT license, you're still free to use, modify, and distribute the code further, as long as you keep the license and copyright notice.
&nbsp;
---
&nbsp;
## Contents
- [Description](#description)
- [Usage](#usage)
@@ -84,7 +96,8 @@ The script supports command line options and parameters which can help you custo
| 1809 | Redstone 5 (RS5) | October 2018 Update | 17763 |
| 1903 | 19H1 | May 2019 Update | 18362 |
| 1909 | 19H2 | November 2019 Update | 18363 |
| 2004 | 20H1 | TBA | 19041 |
| 2004 | 20H1 | May 2020 Update | 19041 |
| 20H2 | 20H2 | October 2020 Update | 19042 |
&nbsp;
@@ -1,7 +1,7 @@
##########
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Main execution loop
# Author: Disassembler <[email protected]>
# Version: v3.9, 2020-04-02
# Version: v3.10, 2020-07-15
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
##########
@@ -1,7 +1,7 @@
##########
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Tweak library
# Author: Disassembler <[email protected]>
# Version: v3.9, 2020-04-02
# Version: v3.10, 2020-07-15
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
##########
@@ -54,6 +54,10 @@ Function DisableTelemetry {
Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
# Office 2016 / 2019
Disable-ScheduledTask -TaskName "Microsoft\Office\Office ClickToRun Service Monitor" -ErrorAction SilentlyContinue | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentFallBack2016" -ErrorAction SilentlyContinue | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentLogOn2016" -ErrorAction SilentlyContinue | Out-Null
}
# Enable Telemetry
@@ -76,6 +80,50 @@ Function EnableTelemetry {
Enable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
Enable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
Enable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
# Office 2016 / 2019
Enable-ScheduledTask -TaskName "Microsoft\Office\Office ClickToRun Service Monitor" -ErrorAction SilentlyContinue | Out-Null
Enable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentFallBack2016" -ErrorAction SilentlyContinue | Out-Null
Enable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentLogOn2016" -ErrorAction SilentlyContinue | Out-Null
}
# Disable Cortana
Function DisableCortana {
Write-Output "Disabling Cortana..."
If (!(Test-Path "HKCU:\Software\Microsoft\Personalization\Settings")) {
New-Item -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -Type DWord -Value 0
If (!(Test-Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore")) {
New-Item -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowCortanaButton" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" -Name "Value" -Type DWord -Value 0
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -Type DWord -Value 0
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Name "AllowInputPersonalization" -Type DWord -Value 0
Get-AppxPackage "Microsoft.549981C3F5F10" | Remove-AppxPackage
}
# Enable Cortana
Function EnableCortana {
Write-Output "Enabling Cortana..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowCortanaButton" -Type DWord -Value 1
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" -Name "Value" -Type DWord -Value 1
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Name "AllowInputPersonalization" -ErrorAction SilentlyContinue
Get-AppxPackage -AllUsers "Microsoft.549981C3F5F10" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
}
# Disable Wi-Fi Sense
@@ -204,7 +252,7 @@ Function EnableAppSuggestions {
}
# Disable Activity History feed in Task View
# Note: The checkbox "Let Windows collect my activities from this PC" remains checked even when the function is disabled
# Note: The checkbox "Store my activity history on this device" ("Let Windows collect my activities from this PC" on older versions) remains checked even when the function is disabled
Function DisableActivityHistory {
Write-Output "Disabling Activity History..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0
@@ -220,30 +268,6 @@ Function EnableActivityHistory {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -ErrorAction SilentlyContinue
}
# Disable Background application access - ie. if apps can download or update when they aren't used
# Cortana (resp. Search since 2004) is excluded as its inclusion breaks start menu search, ShellExperienceHost breaks toasts and notifications
Function DisableBackgroundApps {
Write-Output "Disabling Background application access..."
If ([System.Environment]::OSVersion.Version.Build -ge 19041) {
$exclude = "Microsoft.Windows.Search*", "Microsoft.Windows.ShellExperienceHost*"
} Else {
$exclude = "Microsoft.Windows.Cortana*", "Microsoft.Windows.ShellExperienceHost*"
}
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude $exclude | ForEach-Object {
Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
}
}
# Enable Background application access
Function EnableBackgroundApps {
Write-Output "Enabling Background application access..."
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object {
Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue
}
}
# Disable sensor features, such as screen auto rotation
Function DisableSensors {
Write-Output "Disabling sensors..."
@@ -351,43 +375,8 @@ Function EnableWebLangList {
Remove-ItemProperty -Path "HKCU:\Control Panel\International\User Profile" -Name "HttpAcceptLanguageOptOut" -ErrorAction SilentlyContinue
}
# Disable Cortana
Function DisableCortana {
Write-Output "Disabling Cortana..."
If (!(Test-Path "HKCU:\Software\Microsoft\Personalization\Settings")) {
New-Item -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -Type DWord -Value 0
If (!(Test-Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore")) {
New-Item -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" -Name "Value" -Type DWord -Value 0
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -Type DWord -Value 0
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Name "AllowInputPersonalization" -Type DWord -Value 0
}
# Enable Cortana
Function EnableCortana {
Write-Output "Enabling Cortana..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" -Name "Value" -Type DWord -Value 1
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" -Name "AllowInputPersonalization" -ErrorAction SilentlyContinue
}
# Disable biometric features in Windows. Note - it's recommended to create a password recovery disk, if you log on using biometrics.
# Disable biometric features
# Note: If you log on using biometrics (fingerprint, Windows Hello etc.) it's recommended to create a password recovery disk before applying this tweak.
Function DisableBiometrics {
Write-Output "Disabling biometric services..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics")) {
@@ -402,33 +391,35 @@ Function EnableBiometrics {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" -Name "Enabled" -ErrorAction SilentlyContinue
}
# Disable access to camera from ModernUI applications
# Disable access to camera
# Note: This disables access using standard Windows API. Direct access to device will still be allowed.
Function DisableCamera {
Write-Output "Disabling access to camera from ModernUI applications..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Force | Out-Null
Write-Output "Disabling access to camera..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCamera" -Type DWord -Value 2
}
# Enable access to camera in ModernUI applications
# Enable access to camera
Function EnableCamera {
Write-Output "Enabling access to camera from ModernUI applications..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -ErrorAction SilentlyContinue
Write-Output "Enabling access to camera..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCamera" -ErrorAction SilentlyContinue
}
# Disable access to microphone in ModernUI applications
# Disable access to microphone
# Note: This disables access using standard Windows API. Direct access to device will still be allowed.
Function DisableMicrophone {
Write-Output "Disabling access to microphone in ModernUI applications..."
Write-Output "Disabling access to microphone..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMicrophone" -Type DWord -Value 2
}
# Enable access to microphone in ModernUI applications
# Enable access to microphone
Function EnableMicrophone {
Write-Output "Enabling access to microphone from ModernUI applications..."
Write-Output "Enabling access to microphone..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMicrophone" -ErrorAction SilentlyContinue
}
@@ -575,6 +566,273 @@ Function EnableRecentFiles {
##########
#region UWP Privacy Tweaks
##########
# Universal Windows Platform (UWP) is an API for common application and device controls unified for all devices capable of running Windows 10.
# UWP applications are running sandboxed and the user can control devices and capabilities available to them.
# Disable UWP apps background access - ie. if UWP apps can download data or update themselves when they aren't used
# Until 1809, Cortana and ShellExperienceHost need to be explicitly excluded as their inclusion breaks start menu search and toast notifications respectively.
Function DisableUWPBackgroundApps {
Write-Output "Disabling UWP apps background access..."
If ([System.Environment]::OSVersion.Version.Build -ge 17763) {
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsRunInBackground" -Type DWord -Value 2
} Else {
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*", "Microsoft.Windows.ShellExperienceHost*" | ForEach-Object {
Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
}
}
}
# Enable UWP apps background access
Function EnableUWPBackgroundApps {
Write-Output "Enabling UWP apps background access..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsRunInBackground" -ErrorAction SilentlyContinue
Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object {
Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue
}
}
# Disable access to voice activation from UWP apps
Function DisableUWPVoiceActivation {
Write-Output "Disabling access to voice activation from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsActivateWithVoice" -Type DWord -Value 2
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsActivateWithVoiceAboveLock" -Type DWord -Value 2
}
# Enable access to voice activation from UWP apps
Function EnableUWPVoiceActivation {
Write-Output "Enabling access to voice activation from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsActivateWithVoice" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsActivateWithVoiceAboveLock" -ErrorAction SilentlyContinue
}
# Disable access to notifications from UWP apps
Function DisableUWPNotifications {
Write-Output "Disabling access to notifications from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessNotifications" -Type DWord -Value 2
}
# Enable access to notifications from UWP apps
Function EnableUWPNotifications {
Write-Output "Enabling access to notifications from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessNotifications" -ErrorAction SilentlyContinue
}
# Disable access to account info from UWP apps
Function DisableUWPAccountInfo {
Write-Output "Disabling access to account info from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessAccountInfo" -Type DWord -Value 2
}
# Enable access to account info from UWP apps
Function EnableUWPAccountInfo {
Write-Output "Enabling access to account info from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessAccountInfo" -ErrorAction SilentlyContinue
}
# Disable access to contacts from UWP apps
Function DisableUWPContacts {
Write-Output "Disabling access to contacts from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessContacts" -Type DWord -Value 2
}
# Enable access to contacts from UWP apps
Function EnableUWPContacts {
Write-Output "Enabling access to contacts from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessContacts" -ErrorAction SilentlyContinue
}
# Disable access to calendar from UWP apps
Function DisableUWPCalendar {
Write-Output "Disabling access to calendar from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCalendar" -Type DWord -Value 2
}
# Enable access to calendar from UWP apps
Function EnableUWPCalendar {
Write-Output "Enabling access to calendar from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCalendar" -ErrorAction SilentlyContinue
}
# Disable access to phone calls from UWP apps
Function DisableUWPPhoneCalls {
Write-Output "Disabling access to phone calls from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessPhone" -Type DWord -Value 2
}
# Enable access to phone calls from UWP apps
Function EnableUWPPhoneCalls {
Write-Output "Enabling access to phone calls from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessPhone" -ErrorAction SilentlyContinue
}
# Disable access to call history from UWP apps
Function DisableUWPCallHistory {
Write-Output "Disabling access to call history from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCallHistory" -Type DWord -Value 2
}
# Enable access to call history from UWP apps
Function EnableUWPCallHistory {
Write-Output "Enabling access to call history from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessCallHistory" -ErrorAction SilentlyContinue
}
# Disable access to email from UWP apps
Function DisableUWPEmail {
Write-Output "Disabling access to email from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessEmail" -Type DWord -Value 2
}
# Enable access to email from UWP apps
Function EnableUWPEmail {
Write-Output "Enabling access to email from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessEmail" -ErrorAction SilentlyContinue
}
# Disable access to tasks from UWP apps
Function DisableUWPTasks {
Write-Output "Disabling access to tasks from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessTasks" -Type DWord -Value 2
}
# Enable access to tasks from UWP apps
Function EnableUWPTasks {
Write-Output "Enabling access to tasks from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessTasks" -ErrorAction SilentlyContinue
}
# Disable access to messaging (SMS, MMS) from UWP apps
Function DisableUWPMessaging {
Write-Output "Disabling access to messaging from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMessaging" -Type DWord -Value 2
}
# Enable access to messaging from UWP apps
Function EnableUWPMessaging {
Write-Output "Enabling access to messaging from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMessaging" -ErrorAction SilentlyContinue
}
# Disable access to radios (e.g. Bluetooth) from UWP apps
Function DisableUWPRadios {
Write-Output "Disabling access to radios from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessRadios" -Type DWord -Value 2
}
# Enable access to radios from UWP apps
Function EnableUWPRadios {
Write-Output "Enabling access to radios from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessRadios" -ErrorAction SilentlyContinue
}
# Disable access to other devices (unpaired, beacons, TVs etc.) from UWP apps
Function DisableUWPOtherDevices {
Write-Output "Disabling access to other devices from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsSyncWithDevices" -Type DWord -Value 2
}
# Enable access to other devices from UWP apps
Function EnableUWPOtherDevices {
Write-Output "Enabling access to other devices from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsSyncWithDevices" -ErrorAction SilentlyContinue
}
# Disable access to diagnostic information from UWP apps
Function DisableUWPDiagInfo {
Write-Output "Disabling access to diagnostic information from UWP apps..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsGetDiagnosticInfo" -Type DWord -Value 2
}
# Enable access to diagnostic information from UWP apps
Function EnableUWPDiagInfo {
Write-Output "Enabling access to diagnostic information from UWP apps..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsGetDiagnosticInfo" -ErrorAction SilentlyContinue
}
# Disable access to libraries and file system from UWP apps
Function DisableUWPFileSystem {
Write-Output "Disabling access to libraries and file system from UWP apps..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary" -Name "Value" -Type String -Value "Deny"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\picturesLibrary" -Name "Value" -Type String -Value "Deny"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\videosLibrary" -Name "Value" -Type String -Value "Deny"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess" -Name "Value" -Type String -Value "Deny"
}
# Enable access to libraries and file system from UWP apps
Function EnableUWPFileSystem {
Write-Output "Enabling access to libraries and file system from UWP apps..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary" -Name "Value" -Type String -Value "Allow"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\picturesLibrary" -Name "Value" -Type String -Value "Allow"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\videosLibrary" -Name "Value" -Type String -Value "Allow"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess" -Name "Value" -Type String -Value "Allow"
}
# Disable UWP apps swap file
# This disables creation and use of swapfile.sys and frees 256 MB of disk space. Swapfile.sys is used only by UWP apps. The tweak has no effect on the real swap in pagefile.sys.
Function DisableUWPSwapFile {
Write-Output "Disabling UWP apps swap file..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "SwapfileControl" -Type Dword -Value 0
}
# Enable UWP apps swap file
Function EnableUWPSwapFile {
Write-Output "Enabling UWP apps swap file..."
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "SwapfileControl" -ErrorAction SilentlyContinue
}
##########
#endregion UWP Privacy Tweaks
##########
##########
#region Security Tweaks
##########
@@ -608,12 +866,14 @@ Function DisableSharingMappedDrives {
# Disable implicit administrative shares
Function DisableAdminShares {
Write-Output "Disabling implicit administrative shares..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareServer" -Type DWord -Value 0
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks" -Type DWord -Value 0
}
# Enable implicit administrative shares
Function EnableAdminShares {
Write-Output "Enabling implicit administrative shares..."
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareServer" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks" -ErrorAction SilentlyContinue
}
@@ -1385,19 +1645,6 @@ Function EnableIndexing {
Start-Service "WSearch" -WarningAction SilentlyContinue
}
# Disable Modern UI swap file
# This disables creation and use of swapfile.sys and frees 256 MB of disk space. Swapfile.sys is used only by Modern UI apps. The tweak has no effect on the real swap in pagefile.sys.
Function DisableSwapFile {
Write-Output "Disabling Modern UI swap file..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "SwapfileControl" -Type Dword -Value 0
}
# Enable Modern UI swap file
Function EnableSwapFile {
Write-Output "Enabling Modern UI swap file..."
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "SwapfileControl" -ErrorAction SilentlyContinue
}
# Disable Recycle Bin - Files will be permanently deleted without placing into Recycle Bin
Function DisableRecycleBin {
Write-Output "Disabling Recycle Bin..."
@@ -2309,12 +2556,27 @@ Function ShowNavPaneAllFolders {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "NavPaneShowAllFolders" -Type DWord -Value 1
}
# Hide all folders in Explorer navigation pane except the basic ones (Quick access, OneDrive, This PC, Network), some of which can be disabled using other tweaks
# Hide all folders from Explorer navigation pane except the basic ones (Quick access, OneDrive, This PC, Network), some of which can be disabled using other tweaks
Function HideNavPaneAllFolders {
Write-Output "Hiding all folders in Explorer navigation pane (except the basic ones)..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "NavPaneShowAllFolders" -ErrorAction SilentlyContinue
}
# Show Libraries in Explorer navigation pane
Function ShowNavPaneLibraries {
Write-Output "Showing Libraries icon in Explorer namespace..."
If (!(Test-Path "HKCU:\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}")) {
New-Item -Path "HKCU:\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" -Name "System.IsPinnedToNameSpaceTree" -Type DWord -Value 1
}
# Hide Libraries from Explorer navigation pane
Function HideNavPaneLibraries {
Write-Output "Hiding Libraries icon from Explorer namespace..."
Remove-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" -Name "System.IsPinnedToNameSpaceTree" -ErrorAction SilentlyContinue
}
# Enable launching folder windows in a separate process
Function EnableFldrSeparateProcess {
Write-Output "Enabling launching folder windows in a separate process..."
@@ -2772,6 +3034,18 @@ Function Show3DObjectsInExplorer {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Name "ThisPCPolicy" -ErrorAction SilentlyContinue
}
# Hide Network icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
Function HideNetworkFromExplorer {
Write-Output "Hiding Network icon from Explorer namespace..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\NonEnum" -Name "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" -Type DWord -Value 1
}
# Show Network icon in Explorer namespace
Function ShowNetworkInExplorer {
Write-Output "Showing Network icon in Explorer namespace..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\NonEnum" -Name "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" -ErrorAction SilentlyContinue
}
# Hide 'Include in library' context menu item
Function HideIncludeInLibraryMenu {
Write-Output "Hiding 'Include in library' context menu item..."
@@ -3312,7 +3586,7 @@ Function EnableFirstLogonAnimation {
# Disable Windows Media Player's media sharing feature
Function DisableMediaSharing {
Write-Output "Disabling media sharing..."
Write-Output "Disabling Windows Media Player media sharing..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Force | Out-Null
}
@@ -3321,10 +3595,34 @@ Function DisableMediaSharing {
# Enable Windows Media Player's media sharing feature
Function EnableMediaSharing {
Write-Output "Enabling media sharing..."
Write-Output "Enabling Windows Media Player media sharing..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventLibrarySharing" -ErrorAction SilentlyContinue
}
# Disable Windows Media Player online access - audio file metadata download, radio presets, DRM.
Function DisableMediaOnlineAccess {
Write-Output "Disabling Windows Media Player online access..."
If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer")) {
New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventCDDVDMetadataRetrieval" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventMusicFileMetadataRetrieval" -Type DWord -Value 1
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventRadioPresetsRetrieval" -Type DWord -Value 1
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WMDRM")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WMDRM" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WMDRM" -Name "DisableOnline" -Type DWord -Value 1
}
# Enable Windows Media Player online access
Function EnableMediaOnlineAccess {
Write-Output "Enabling Windows Media Player online access..."
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventCDDVDMetadataRetrieval" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventMusicFileMetadataRetrieval" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventRadioPresetsRetrieval" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WMDRM" -Name "DisableOnline" -ErrorAction SilentlyContinue
}
# Enable Developer Mode
Function EnableDeveloperMode {
Write-Output "Enabling Developer Mode..."
+25 -5
View File
@@ -224,7 +224,7 @@ Write-Host "| " -ForegroundColor Red -NoNewline; Write-Host " \/
Write-Host "| C O M P L E T E M A N D I A N T |" -ForegroundColor Red
Write-Host "| O F F E N S I V E V M |" -ForegroundColor Red
Write-Host "| |" -ForegroundColor Red
Write-Host "| Version 2020.2 |" -ForegroundColor Red
Write-Host "| Version 2021.2 |" -ForegroundColor Red
Write-Host "| [email protected] |" -ForegroundColor Red
Write-Host "|____________________________________________________________________________|" -ForegroundColor Red
Write-Host "| |" -ForegroundColor Red
@@ -277,6 +277,26 @@ if (-Not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Adm
Start-Sleep -Milliseconds 500
}
# Check to make sure Defender is disabled
Write-Host "[+] Checking if Windows Defender service is running.."
$defender = Get-Service -Name WinDefend
if ($defender.Status -eq "Running"){
Write-Host "`t[ERR] Please disable Windows Defender through Group Policy" -ForegroundColor Red
Write-Host "`t[+] Hint: https://stackoverflow.com/questions/62174426/how-to-permanently-disable-windows-defender-real-time-protection-with-gpo" -ForegroundColor Yellow
Write-Host "[-] Do you need to change this setting? Y/N " -ForegroundColor Yellow -NoNewline
$response = Read-Host
if ($response -eq "Y") {
Write-Host "[*] Exiting..." -ForegroundColor Red
exit
}
Write-Host "`tContinuing..." -ForegroundColor Green
}
}else {
Start-Sleep -Milliseconds 500
Write-Host "`tLooks good" -ForegroundColor Cyan
Start-Sleep -Milliseconds 500
}
if ($nochecks -eq $false) {
# Check to make sure Tamper Protection is off
@@ -310,6 +330,8 @@ if ($nochecks -eq $false) {
## Windows 10 Versions/Build Numbers
# https://github.com/Disassembler0/Win10-Initial-Setup-Script
# 21H1 19043
# 20H2 19042
# 2004 (TBD) 19041
# 1909 (November 2019 Update) 18363
# 1903 (May 2019 Update) 18362
@@ -318,8 +340,8 @@ if ($nochecks -eq $false) {
$osversion = (Get-WmiObject -class Win32_OperatingSystem).BuildNumber
if (-Not (($osversion -eq 18363) -or ($osversion -eq 18361) -or ($osversion -eq 17763) -or ($osversion -eq 17134) -or ($osversion -eq 19041) )){
Write-Host "`t[ERR] Windows version $osversion is not has not been tested, please use Windows 10 version 1803, 1809, 1903, 1909, or 2004." -ForegroundColor Yellow
if (-Not (($osversion -eq 18363) -or ($osversion -eq 18361) -or ($osversion -eq 17763) -or ($osversion -eq 17134) -or ($osversion -eq 19041) -or ($osversion -eq 19042) -or ($osversion -eq 19043) )){
Write-Host "`t[ERR] Windows version $osversion is not has not been tested, please use Windows 10 version 1803, 1809, 1903, 1909, 2004, 20H2, or 21H1." -ForegroundColor Yellow
Write-Host "[-] Do you still wish to proceed? Y/N " -ForegroundColor Yellow -NoNewline
$response = Read-Host
if ($response -ne "Y"){
@@ -446,8 +468,6 @@ Set-BoxstarterConfig -NugetSources "https://www.myget.org/F/fireeye/api/v2;https
# Set up the correct feed
$fireeyeFeed = "https://www.myget.org/F/fireeye/api/v2"
iex "choco sources add -n=fireeye -s $fireeyeFeed --priority 1"
iex "choco upgrade -y vcredist-all.flare"
iex "choco install -y powershell"
iex "refreshenv"
iex "choco install -y common.fireeye"
iex "refreshenv"