Saturday, March 3, 2018

PowerShell Constrained Language

PowerShell Constrained Language is a language mode of PowerShell designed to restrict access to sensitive language elements that can be used to invoke arbitrary Windows APIs.

To view current parameter level, use the command:

$ExecutionContext.SessionState.LanguageMode

image

To set Constrained Language, use the command:

$ExecutionContext.SessionState.LanguageMode = "ConstrainedLanguage"

image

To set the parameter for future sessions, use the following command within an elevated prompt:

[Environment]::SetEnvironmentVariable('__PSLockdownPolicy', '4', 'Machine')

image

https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/

https://itfordummies.net/2015/06/01/powershell-constrained-mode/

https://adsecurity.org/?p=2921

Pi-hole

Pi-hole is an application for Linux that is a DNS black hole.  It can be used to block Internet advertisements on a network level.

https://pi-hole.net/

https://github.com/pi-hole/pi-hole/

Strict Site Isolation with Google Chrome

Starting with version 63, Chrome has a new security feature named Strict Site Isolation.  Below is an explanation of this feature:

Google’s site isolation feature improves security for Chrome browser users. When you enable site isolation, content for each open website in the Chrome browser is always rendered in a dedicated process, isolated from other sites. This creates an additional security boundary between websites.

To enable this option, use the URL chrome://flags/#enable-site-per-process and click the enable button.

image

To use a command-line shortcut, use the switch "--site-per-process".

image

CompactGUI

CompactGUI is a visual interface for the Windows 10 Compact function.

https://github.com/ImminentFate/CompactGUI

https://www.howtogeek.com/342016/how-to-shrink-your-pc-game-files-with-compactgui-and-save-drive-space/

How to uninstall a driver within Windows using pnputil

Windows has an utility named pnputil to list or uninstall installed drivers.  To create a list of current drivers, use the following command within an elevated command prompt.

pnputil.exe –e > c:\temp\driverexport.txt

image

image

To remove an existing driver, use the following command.

pnputil.exe –d oem_number.inf

image

If an error is returned, add a –f switch.

pnputil.exe –f –d oem_number.inf

In addition to finding the OEM number value within the .TXT file, the same value can be found via Device Manager –> Properties –> Details tab –> INF Name drop-down value.

image

Malware Museum

The Malware Museum is a collection of malware programs from the 1980’s and 1990’s.

https://archive.org/details/malwaremuseum

Automatic backup path for Microsoft Edge bookmarks

Starting with Windows 10 version 1709, a backup is made of Microsoft Edge bookmarks or favorites on a regular basis.  The path to this backup is:

%UserProfile%\MicrosoftEdgeBackups\backups

The file format is a .HTML file.

image

How to disable Apple Music within iOS

To disable Apple Music within the Music app within iOS, access Settings –> Music and disable the “Show Apple Music” option.

image