Andy Ful
From Hard_Configurator Tools
Thread author
Verified
Honorary Member
Top Poster
Developer
Well-known
- Dec 23, 2014
- 8,592
Andy, great work, bravo
Maybe a suggestion to add 'Signed' as option to both windows scripts and powerscripts?
Signed scripts
Signature Verification Policy
Microsoft Windows 2000 Scripting Guide - Enforcing the Use of Signed Scripts
AllSigned execution policy of PowerScript
Change Execution Policy in the Registry
Please add 16 bits hardening in this section for 32 bits systems
Prevent access to 16-bit applications | Windows security encyclopedia
I have done some research about signed scripts.
Windows Script Host JS,JSE,VBS,VBE,WSF,WSH scripts:
Registry settings for running only signed scripts (the second key is for 32Bit Windows Script Host in 64Bit system):
***********************************************************************
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings]
"UseWINSAFER"="0"
"Enabled"=dword:00000001
"TrustPolicy"=dword:00000002
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Script Host\Settings
"UseWINSAFER"="0"
"Enabled"=dword:00000001
"TrustPolicy"=dword:00000002
***********************************************************************
In Windows 64Bit there are two Windows Script Hosts (32Bit and 64Bit).
If UseWINSAFER is set to 1 (default value), Windows will ignore the TrustPolicy setting.
If UseWINSAFER is set to 0 Windows Script Host will not call into Software Restriction Policies to apply software restriction policies to scripts that are being run. So, the above scripts can be blocked only by extension like for example PowerShell scripts (no big issue for home users).
All system 'Windows Script Host' scripts are not signed (gatherNetworkInfo.vbs , slmgr.vbs, SyncAppvPublishingServer.vbs, winrm.vbs, manage-bde.wsf).
Most scripts (maybe all) from Microsoft Script Center (Powershell, VB Script, SQL and JavaScript - TechNet IT Pro's and Scripting Guys) are not signed.
The local scripts can be signed by hash in SRP.
I think that an advantage of using signed scripts may be evident only in enterprises.
PowerShell Scripts.
Registry settings for running only signed scripts (the second key is for 32Bit Powershell in 64Bit system):
************************************************************************************
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
"ExecutionPolicy"="AllSigned"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
"ExecutionPolicy"="AllSigned"
************************************************************************************
In Windows 64Bit there are two PowerShell Hosts (32Bit and 64Bit).
All numerous (c:\Windows\diagnostics\) system PowerShell scripts are signed.
Most scripts from Microsoft Script Center (Powershell, VB Script, SQL and JavaScript - TechNet IT Pro's and Scripting Guys) are not signed.
The local scripts can be signed by hash in SRP.
There's an advantage of using signed scripts, while doing system maintenance.
Which is better: RemoteSigned or AllSigned, that is the question.
RemoteSigned blocks only unsigned scripts downloaded from the Internet (added 'Mark of the Web'), and does not touch local scripts.
Any ideas would be welcomed.
@WindowsSecurity, thanks for pointing out the potential usability of signed scripts option.
Last edited: