This file contains hidden or 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
Set-StrictMode -Version 'Latest' | |
$ErrorActionPreference = 'Stop' | |
$VerbosePreference = 'Continue' | |
function fnCert2TemplateName { | |
[CmdletBinding()] | |
[OutputType([hashtable])] | |
Param( | |
[Parameter( Mandatory = $true )] |
This file contains hidden or 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
#Requires -Version 5.1 | |
Set-StrictMode -Version 'latest' | |
$ErrorActionPreference = 'stop' | |
$DirPathDrivers = @( | |
'C:\WINDOWS\inf' | |
'C:\WINDOWS\System32\drivers' | |
'C:\WINDOWS\System32\DriverStore\FileRepository' | |
) |
This file contains hidden or 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
hashcat.exe -I | |
hashcat (v6.2.6) starting in backend information mode | |
OpenCL Info: | |
============ | |
OpenCL Platform ID #1 | |
Vendor..: Intel(R) Corporation | |
Name....: Intel(R) OpenCL HD Graphics | |
Version.: OpenCL 3.0 |
This file contains hidden or 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
Set-StrictMode -Version 'latest' | |
$ErrorActionPreference = 'stop' | |
$ProcessStartInfo = [System.Diagnostics.ProcessStartInfo]::new() | |
$ProcessStartInfo.FileName = 'C:\Windows\System32\cmd.exe' | |
$ProcessStartInfo.Arguments = '/c echo normal boring standard out && echo this is the error message 1>&2' | |
$ProcessStartInfo.CreateNoWindow = $true | |
$ProcessStartInfo.UseShellExecute = $false | |
$ProcessStartInfo.RedirectStandardOutput = $true | |
$ProcessStartInfo.RedirectStandardError = $true |
This file contains hidden or 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
#Requires -RunAsAdministrator | |
Set-StrictMode -Version 'latest' | |
$ErrorActionPreference = 'stop' | |
<# | |
there's some weirdness here | |
running as Administrator and/or SYSTEM gets the same results | |
but this seems to get most of the way there | |
the remainder dont't show up in eventvwr.msc so guessing there's something special/weird about how they're setup, maybe security related | |
#> |
This file contains hidden or 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
# https://docs.microsoft.com/en-us/exchange/managing-database-availability-groups-exchange-2013-help | |
# !! *** this isn't a "script" you can just run *** !! | |
# more something to be ran manually in stages, with a human reading checking output before progressing | |
# assumes each DAG has 2 members, will need to tweak for >2 members | |
$ErrorActionPreference = 'stop' | |
Set-StrictMode -Version 'latest' | |
Add-PSSnapin -Name 'Microsoft.Exchange.Management.PowerShell.SnapIn' |
This file contains hidden or 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
<# block non-Exchange admins from PowerShell access in Exchange | |
ProxyNotShell | |
CVE-2022-41040 | |
CVE-2022-41082f | |
some bypasses have been found for the IIS block rules. | |
need to hard block PowerShell for those that don't **need** it. | |
Exchange allows PowerShell by default, block by exception. Not ideal, but workable. |