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
MATCH p=shortestPath((n:User{domain:'SEVENKINGDOMS.LOCAL'})-[:Owns|GenericAll|GenericWrite|WriteOwner|WriteDacl|MemberOf|ForceChangePassword|AllExtendedRights|AddMember|HasSession|Contains|GPLink|AllowedToDelegate|TrustedBy|AllowedToAct|AdminTo|CanPSRemote|ExecuteDCOM|HasSIDHistory|AddSelf|DCSync|ReadLAPSPassword|ReadGMSAPassword|DumpSMSAPassword|SQLAdmin|AddAllowedToAct|WriteSPN|AddKeyCredentialLink|SyncLAPSPassword|WriteAccountRestrictions|GoldenCert|ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC5|ADCSESC6a|ADCSESC6b|ADCSESC7|ADCSESC9a|ADCSESC9b|ADCSESC10a|ADCSESC10b|ADCSESC13|DCFor*1..]->(m:Group {name:"ESX [email protected]"})) | |
RETURN p |
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
function ContextualEditDistance | |
{ | |
<# | |
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.600.3601&rep=rep1&type=pdf | |
https://github.com/chrislit/abydos/blob/344346a5fceb6acc631b3d24e16b73a303cece2c/abydos/distance/_higuera_mico.py | |
#> | |
[CmdletBinding()] | |
param( | |
[string] |
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
--- | |
title: T1208 - Kerberoasting | |
description: | |
header : | |
name : T1208 - Kerberoasting | |
colspan : 5 | |
background-color : #DCDCDC | |
rows: | |
- Row1 : | |
name : Tools |
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
function Collect-SOData | |
{ | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string] | |
$FilePath | |
) | |
$hostname = $env:COMPUTERNAME |
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
Add-Type -AssemblyName System.ServiceModel | |
$BF = [Reflection.BindingFlags]::NonPublic -bor [Reflection.BindingFlags]::Static | |
$C1 = [ServiceModel.PeerNode].Assembly.GetType('System.ServiceModel.Channels.AppContainerInfo') | |
$C2 = [ServiceModel.PeerNode].Assembly.GetType('System.ServiceModel.Activation.Utility') | |
$M1 = $C1.GetMethod('GetCurrentProcessToken', $BF) | |
$M2 = $C2.GetMethod('GetTokenInformation', $BF) | |
$hT = $M1.Invoke($null, @()) | |
$b = New-Object -TypeName byte[](28) | |
$M2.Invoke($null, @($hT, 25, [byte[]]$b)) | |
$IL = [Security.Principal.SecurityIdentifier]::new($b, 16).Value |
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-TypeData -TypeName Object -MemberType ScriptMethod -MemberName SizeOf -Value { | |
param() | |
if($this -is [type]) { | |
$SizeOf = [System.Runtime.InteropServices.Marshal].GetMethod('SizeOf',[type[]]@([type])) | |
} | |
else { | |
$SizeOf = [System.Runtime.InteropServices.Marshal].GetMethod('SizeOf',[type[]]@([Object])) | |
} | |
return $SizeOf.Invoke($null,@($this.psobject.BaseObject)) |
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
function ConvertFrom-EpochTime | |
{ | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[Double] | |
$EpochTime | |
) | |
$epochstart = Get-Date -Date 1/1/1970 |
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
function Add-ACERootCertificate | |
{ | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string] | |
$ServerIp, | |
[Parameter()] | |
[Int32] |
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
function Get-SOHostData | |
{ | |
begin | |
{ | |
try | |
{ | |
Get-System | |
} | |
catch | |
{ |
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
function Get-RegistryValue | |
{ | |
[CmdletBinding(DefaultParameterSetName = 'HKLM')] | |
param | |
( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[string[]] | |
$Key, | |
[Parameter()] |
NewerOlder