This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Author: Jonthan Johnson (@jsecurity101) | |
if (-not ('ProtectedObjects.ProcessNativeMethods' -as [Type])) { | |
$TypeDef = @' | |
using System; | |
using System.Runtime.InteropServices; | |
namespace ProtectedObjects { | |
[Flags] | |
public enum ProcessAccess { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace System.Management.Automation.Language | |
param([string]$Path) | |
$Path = Resolve-Path $Path | % Path | |
function AnalyzeSelectObjectUsage | |
{ | |
param( | |
[Parameter(ValueFromPipelineByPropertyName)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### OR take a look at | |
### https://github.com/HotCakeX/Harden-Windows-Security |