2020-02-08 16:06:06 -05:00
|
|
|
function Invoke-BloodHound{
|
|
|
|
|
<#
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Runs the BloodHound C# Ingestor using reflection. The assembly is stored in this file.
|
|
|
|
|
.DESCRIPTION
|
|
|
|
|
Using reflection and assembly.load, load the compiled BloodHound C# ingestor into memory
|
|
|
|
|
and run it without touching disk. Parameters are converted to the equivalent CLI arguments
|
|
|
|
|
for the SharpHound executable and passed in via reflection. The appropriate function
|
|
|
|
|
calls are made in order to ensure that assembly dependencies are loaded properly.
|
|
|
|
|
.PARAMETER CollectionMethod
|
|
|
|
|
Specifies the CollectionMethod being used. Possible value are:
|
|
|
|
|
Group - Collect group membership information
|
|
|
|
|
LocalGroup - Collect local group information for computers
|
|
|
|
|
LocalAdmin - Collect local admin users for computers
|
|
|
|
|
RDP - Collect remote desktop users for computers
|
|
|
|
|
DCOM - Collect distributed COM users for computers
|
2020-04-02 21:32:39 -05:00
|
|
|
PSRemote - Collected members of the Remote Management Users group for computers
|
2020-02-08 16:06:06 -05:00
|
|
|
Session - Collect session information for computers
|
|
|
|
|
SessionLoop - Continuously collect session information until killed
|
|
|
|
|
Trusts - Enumerate domain trust data
|
|
|
|
|
ACL - Collect ACL (Access Control List) data
|
|
|
|
|
Container - Collect GPO/OU Data
|
|
|
|
|
ComputerOnly - Collects Local Admin and Session data
|
|
|
|
|
GPOLocalGroup - Collects Local Admin information using GPO (Group Policy Objects)
|
|
|
|
|
LoggedOn - Collects session information using privileged methods (needs admin!)
|
|
|
|
|
ObjectProps - Collects node property information for users and computers
|
2020-04-02 21:32:39 -05:00
|
|
|
SPNTargets - Collects SPN targets (currently only MSSQL)
|
2020-02-08 16:06:06 -05:00
|
|
|
Default - Collects Group Membership, Local Admin, Sessions, and Domain Trusts
|
|
|
|
|
DcOnly - Collects Group Membership, ACLs, ObjectProps, Trusts, Containers, and GPO Admins
|
2020-04-02 21:32:39 -05:00
|
|
|
All - Collect all data except GPOLocalGroup
|
2020-02-08 16:06:06 -05:00
|
|
|
This can be a list of comma seperated valued as well to run multiple collection methods!
|
|
|
|
|
.PARAMETER Stealth
|
|
|
|
|
Use stealth collection options, will sacrifice data quality in favor of much reduced
|
|
|
|
|
network impact
|
2020-04-02 21:32:39 -05:00
|
|
|
.PARAMETER Domain
|
|
|
|
|
Specifies the domain to enumerate. If not specified, will enumerate the current
|
|
|
|
|
domain your user context specifies.
|
|
|
|
|
.PARAMETER WindowsOnly
|
|
|
|
|
Limits computer collection to systems that have an operatingssytem attribute that matches *Windows*
|
2020-02-08 16:06:06 -05:00
|
|
|
.PARAMETER ComputerFile
|
|
|
|
|
A file containing a list of computers to enumerate. This option can only be used with the following Collection Methods:
|
|
|
|
|
Session, SessionLoop, LocalGroup, ComputerOnly, LoggedOn
|
2020-04-02 21:32:39 -05:00
|
|
|
.PARAMETER LdapFilter
|
|
|
|
|
Append this ldap filter to the search filter to further filter the results enumerated
|
|
|
|
|
.PARAMETER SearchBase
|
|
|
|
|
DistinguishedName to start LDAP searches at. Equivalent to the old --OU option
|
|
|
|
|
.PARAMETER OutputDirectory
|
|
|
|
|
Folder to output files too
|
|
|
|
|
.PARAMETER OutputPrefix
|
|
|
|
|
Prefix to add to output files
|
|
|
|
|
.PARAMETER PrettyJSON
|
|
|
|
|
Output "pretty" json with formatting for readability
|
|
|
|
|
.PARAMETER CacheFilename
|
|
|
|
|
Name for the cache file dropped to disk (default: unique hash generated per machine)
|
|
|
|
|
.PARAMETER RandomFilenames
|
|
|
|
|
Randomize file names completely
|
|
|
|
|
.PARAMETER ZipFilename
|
|
|
|
|
Name for the zip file output by data collection
|
|
|
|
|
.PARAMETER NoSaveCache
|
|
|
|
|
Don't write the cache file to disk. Caching will still be performed in memory.
|
|
|
|
|
.PARAMETER EncryptZip
|
|
|
|
|
Encrypt the zip file with a random password
|
|
|
|
|
.PARAMETER NoZip
|
|
|
|
|
Do NOT zip the json files
|
|
|
|
|
.PARAMETER InvalidateCache
|
|
|
|
|
Invalidate and rebuild the cache file
|
|
|
|
|
.PARAMETER LdapFilter
|
|
|
|
|
Append this ldap filter to the search filter to further filter the results enumerated
|
2020-02-08 16:06:06 -05:00
|
|
|
.PARAMETER DomainController
|
2020-04-02 21:32:39 -05:00
|
|
|
Domain Controller to connect too. Specifiying this can result in data loss
|
2020-02-08 16:06:06 -05:00
|
|
|
.PARAMETER LdapPort
|
2020-04-02 21:32:39 -05:00
|
|
|
Port LDAP is running on. Defaults to 389/686 for LDAPS
|
|
|
|
|
.PARAMETER SecureLDAP
|
|
|
|
|
Connect to LDAPS (LDAP SSL) instead of regular LDAP
|
|
|
|
|
.PARAMETER DisableKerberosSigning
|
|
|
|
|
Disables keberos signing/sealing, making LDAP traffic viewable
|
|
|
|
|
.PARAMETER LdapUsername
|
|
|
|
|
Username for connecting to LDAP. Use this if you're using a non-domain account for connecting to computers
|
|
|
|
|
.PARAMETER LdapPassword
|
|
|
|
|
Password for connecting to LDAP. Use this if you're using a non-domain account for connecting to computers
|
|
|
|
|
.PARAMETER SkipPortScan
|
|
|
|
|
Skip SMB port checks when connecting to computers
|
|
|
|
|
.PARAMETER PortScanTimeout
|
|
|
|
|
Timeout for SMB port checks
|
|
|
|
|
.PARAMETER ExcludeDomainControllers
|
|
|
|
|
Exclude domain controllers from enumeration (usefult o avoid Microsoft ATP/ATA)
|
2020-02-08 16:06:06 -05:00
|
|
|
.PARAMETER Throttle
|
2020-04-02 21:32:39 -05:00
|
|
|
Throttle requests to computers (in milliseconds)
|
|
|
|
|
.PARAMETER Jitter
|
|
|
|
|
Add jitter to throttle
|
|
|
|
|
.PARAMETER OverrideUserName
|
|
|
|
|
Override username to filter for NetSessionEnum
|
|
|
|
|
.PARAMETER NoRegistryLoggedOn
|
|
|
|
|
Disable remote registry check in LoggedOn collection
|
|
|
|
|
.PARAMETER DumpComputerStatus
|
|
|
|
|
Dumps error codes from attempts to connect to computers
|
|
|
|
|
.PARAMETER RealDNSName
|
|
|
|
|
Overrides the DNS name used for API calls
|
|
|
|
|
.PARAMETER CollectAllProperties
|
|
|
|
|
Collect all string LDAP properties on objects
|
|
|
|
|
.PARAMETER StatusInterval
|
|
|
|
|
Interval for displaying status in milliseconds
|
|
|
|
|
.PARAMETER Loop
|
|
|
|
|
Perform looping for computer collection
|
|
|
|
|
.PARAMETER LoopDuration
|
|
|
|
|
Duration to perform looping (Default 02:00:00)
|
|
|
|
|
.PARAMETER LoopInterval
|
|
|
|
|
Interval to sleep between loops (Default 00:05:00)
|
2020-02-08 16:06:06 -05:00
|
|
|
.EXAMPLE
|
|
|
|
|
PS C:\> Invoke-BloodHound
|
|
|
|
|
Executes the default collection options and exports JSONs to the current directory, compresses the data to a zip file,
|
|
|
|
|
and then removes the JSON files from disk
|
|
|
|
|
.EXAMPLE
|
2020-04-02 21:32:39 -05:00
|
|
|
PS C:\> Invoke-BloodHound -Loop -LoopInterval 00:01:00 -LoopDuration 00:10:00
|
2020-02-08 16:06:06 -05:00
|
|
|
Executes session collection in a loop. Will wait 1 minute after each run to continue collection
|
|
|
|
|
and will continue running for 10 minutes after which the script will exit
|
|
|
|
|
.EXAMPLE
|
|
|
|
|
PS C:\> Invoke-BloodHound -CollectionMethod All
|
|
|
|
|
Runs ACL, ObjectProps, Container, and Default collection methods, compresses the data to a zip file,
|
|
|
|
|
and then removes the JSON files from disk
|
|
|
|
|
.EXAMPLE (Opsec!)
|
|
|
|
|
PS C:\> Invoke-BloodHound -CollectionMethod DCOnly --NoSaveCache --RandomFilenames --EncryptZip
|
2020-04-02 21:32:39 -05:00
|
|
|
Run LDAP only collection methods (Groups, Trusts, ObjectProps, ACL, Containers, GPO Admins) without outputting the cache file to disk.
|
2020-02-08 16:06:06 -05:00
|
|
|
Randomizes filenames of the JSON files and the zip file and adds a password to the zip file
|
|
|
|
|
#>
|
2018-10-16 17:53:02 +02:00
|
|
|
param(
|
|
|
|
|
[String[]]
|
|
|
|
|
$CollectionMethod = [string[]] @('Default'),
|
|
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$Stealth,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
|
|
|
|
$Domain,
|
|
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$WindowsOnly,
|
|
|
|
|
[String]
|
|
|
|
|
$ComputerFile,
|
|
|
|
|
[ValidateScript({ Test-Path -Path $_ })]
|
|
|
|
|
[String]
|
|
|
|
|
$OutputDirectory = $(Get-Location),
|
|
|
|
|
[ValidateNotNullOrEmpty()]
|
|
|
|
|
[String]
|
|
|
|
|
$OutputPrefix,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$PrettyJson,
|
|
|
|
|
[String]
|
|
|
|
|
$CacheFileName,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$RandomizeFilenames,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$ZipFilename,
|
|
|
|
|
[Switch]
|
|
|
|
|
$NoSaveCache,
|
|
|
|
|
[Switch]
|
|
|
|
|
$EncryptZip,
|
|
|
|
|
[Switch]
|
|
|
|
|
$InvalidateCache,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$LdapFilter,
|
2018-10-16 17:53:02 +02:00
|
|
|
[string]
|
|
|
|
|
$DomainController,
|
|
|
|
|
[int]
|
|
|
|
|
$LdapPort,
|
|
|
|
|
[Switch]
|
|
|
|
|
$SecureLdap,
|
|
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$DisableKerbSigning,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$LdapUsername,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$LdapPassword,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$SkipPortScan,
|
|
|
|
|
[ValidateRange(50,5000)]
|
2018-10-16 17:53:02 +02:00
|
|
|
[int]
|
2020-04-02 21:32:39 -05:00
|
|
|
$PortScanTimeout = 2000,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$ExcludeDomainControllers,
|
2018-10-16 17:53:02 +02:00
|
|
|
[ValidateRange(0,100)]
|
|
|
|
|
[int]
|
|
|
|
|
$Jitter,
|
|
|
|
|
[int]
|
|
|
|
|
$Throttle,
|
|
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$OverrideUsername,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$NoRegistryLoggedOn,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$DumpComputerStatus,
|
2018-10-16 17:53:02 +02:00
|
|
|
[String]
|
2020-04-02 21:32:39 -05:00
|
|
|
$RealDNSName,
|
2018-10-16 17:53:02 +02:00
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$CollectAllProperties,
|
2018-10-16 17:53:02 +02:00
|
|
|
[ValidateRange(500,60000)]
|
|
|
|
|
[int]
|
|
|
|
|
$StatusInterval,
|
|
|
|
|
[Switch]
|
2020-04-02 21:32:39 -05:00
|
|
|
$Loop,
|
|
|
|
|
[String]
|
|
|
|
|
$LoopDuration,
|
|
|
|
|
[String]
|
|
|
|
|
$LoopInterval
|
2018-10-16 17:53:02 +02:00
|
|
|
)
|
|
|
|
|
$vars = New-Object System.Collections.Generic.List[System.Object]
|
|
|
|
|
$vars.Add("-c")
|
|
|
|
|
foreach ($cmethod in $CollectionMethod){
|
|
|
|
|
$vars.Add($cmethod);
|
|
|
|
|
}
|
|
|
|
|
if ($Domain){
|
2020-04-02 21:32:39 -05:00
|
|
|
$vars.Add("--Domain");
|
2018-10-16 17:53:02 +02:00
|
|
|
$vars.Add($Domain);
|
|
|
|
|
}
|
|
|
|
|
if ($Stealth){
|
|
|
|
|
$vars.Add("--Stealth")
|
|
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($WindowsOnly){
|
|
|
|
|
$vars.Add("--WindowsOnly")
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
|
|
|
|
if ($ComputerFile){
|
|
|
|
|
$vars.Add("--ComputerFile");
|
|
|
|
|
$vars.Add($ComputerFile);
|
|
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($OutputDirectory){
|
|
|
|
|
$vars.Add("--OutputDirectory");
|
|
|
|
|
$vars.Add($OutputDirectory);
|
|
|
|
|
}
|
|
|
|
|
if ($OutputPrefix){
|
|
|
|
|
$vars.Add("--OutputPrefix");
|
|
|
|
|
$vars.Add($OutputPrefix);
|
|
|
|
|
}
|
|
|
|
|
if ($PrettyJson){
|
|
|
|
|
$vars.Add("--PrettyJson");
|
|
|
|
|
}
|
|
|
|
|
if ($CacheFileName){
|
|
|
|
|
$vars.Add("--CacheFileName");
|
|
|
|
|
$vars.Add($CacheFileName);
|
|
|
|
|
}
|
|
|
|
|
if ($RandomFilenames){
|
|
|
|
|
$vars.Add("--RandomizeFilenames");
|
|
|
|
|
}
|
|
|
|
|
if ($ZipFileName){
|
|
|
|
|
$vars.Add("--ZipFileName");
|
|
|
|
|
$vars.Add($ZipFileName);
|
|
|
|
|
}
|
|
|
|
|
if ($NoSaveCache){
|
|
|
|
|
$vars.Add("--NoSaveCache");
|
|
|
|
|
}
|
|
|
|
|
if ($EncryptZip){
|
|
|
|
|
$vars.Add("--EncryptZip");
|
|
|
|
|
}
|
|
|
|
|
if ($NoZip){
|
|
|
|
|
$vars.Add("--NoZip");
|
|
|
|
|
}
|
|
|
|
|
if ($InvalidateCache){
|
|
|
|
|
$vars.Add("--InvalidateCache");
|
|
|
|
|
}
|
|
|
|
|
if ($LdapFilter){
|
|
|
|
|
$vars.Add("--LdapFilter");
|
|
|
|
|
$vars.Add($LdapFilter);
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
|
|
|
|
if ($DomainController){
|
|
|
|
|
$vars.Add("--DomainController");
|
|
|
|
|
$vars.Add($DomainController);
|
|
|
|
|
}
|
|
|
|
|
if ($LdapPort){
|
|
|
|
|
$vars.Add("--LdapPort");
|
|
|
|
|
$vars.Add($LdapPort);
|
|
|
|
|
}
|
|
|
|
|
if ($SecureLdap){
|
|
|
|
|
$vars.Add("--SecureLdap");
|
|
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($DisableKerberosSigning){
|
|
|
|
|
$vars.Add("--DisableKerberosSigning");
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($LdapUsername){
|
|
|
|
|
$vars.Add("--LdapUsername");
|
|
|
|
|
$vars.Add($LdapUsername);
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($LdapPassword){
|
|
|
|
|
$vars.Add("--LdapPassword");
|
|
|
|
|
$vars.Add($LdapPassword);
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($SkipPortScan){
|
|
|
|
|
$vars.Add("--SkipPortScan");
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($PortScanTimeout){
|
|
|
|
|
$vars.Add("--PortScanTimeout")
|
|
|
|
|
$vars.Add($PortScanTimeout)
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($ExcludeDomainControllers){
|
|
|
|
|
$vars.Add("--ExcludeDomainControllers")
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($Throttle){
|
|
|
|
|
$vars.Add("--Throttle");
|
|
|
|
|
$vars.Add($Throttle);
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($Jitter){
|
|
|
|
|
$vars.Add("--Jitter");
|
|
|
|
|
$vars.Add($Jitter);
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($OverrideUserName){
|
|
|
|
|
$vars.Add("--OverrideUserName")
|
|
|
|
|
$vars.Add($OverrideUsername)
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($NoRegistryLoggedOn){
|
|
|
|
|
$vars.Add("--NoRegistryLoggedOn")
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($DumpComputerStatus){
|
|
|
|
|
$vars.Add("--DumpComputerStatus")
|
2020-02-08 16:06:06 -05:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($RealDNSName){
|
|
|
|
|
$vars.Add("--RealDNSName")
|
|
|
|
|
$vars.Add($RealDNSName)
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($CollectAllProperties){
|
|
|
|
|
$vars.Add("--CollectAllProperties")
|
2018-10-16 17:53:02 +02:00
|
|
|
}
|
|
|
|
|
if ($StatusInterval){
|
|
|
|
|
$vars.Add("--StatusInterval")
|
|
|
|
|
$vars.Add($StatusInterval)
|
2020-02-08 16:06:06 -05:00
|
|
|
}
|
2020-04-02 21:32:39 -05:00
|
|
|
if ($Loop){
|
|
|
|
|
$vars.Add("--Loop")
|
|
|
|
|
}
|
|
|
|
|
if ($LoopDuration){
|
|
|
|
|
$vars.Add("--LoopDuration")
|
|
|
|
|
$vars.Add($LoopDuration)
|
|
|
|
|
}
|
|
|
|
|
if ($LoopInterval){
|
|
|
|
|
$vars.Add("--LoopInterval")
|
|
|
|
|
$vars.Add($LoopInterval)
|
2020-02-08 16:06:06 -05:00
|
|
|
}
|
2018-10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KezLSGHWRKYxMirpvjWZklgdJMbLAg2iMHOpBPhJAVnmQtxhZ60F+yMhVHuRRRm7xILcy8o6Hw0sZ2eyJcwYjY2IuchIje3iQwxgpe5C5Mi0PMm0LxGTkxZibelYMlVhoC+TTAJDfeei8zUgg7iI/YqTVgzzOSN6DfJORHg9yJSMLPMhZjKzyICsZucKDHMHIIx5kX0be8CDTGfnEgxQYmZpwkSZGlnmQKCM3epC/Yrxd+pUH+S0j6aSL/JSRGR7kKUbWepBvMfKsB7mGkU88yLmMhGscJF8JliZ7vMcHSwd7vIeSsnm884Ollz3eGcHS3zze8VQra13vqGBpocebCpau9niDwcyC4L6ZwSBGeeaucqhMY1ahzdN4js8Q1m4YVe6Onz0wXM236Nae9gg5EeEJERHBdITObl0OO385YOircjRwTbqTDjye5/GnoXX20o+aJ9mbnjEnraC1NwiITKftn0O/r/DUAYap1lyee1iPGHp2A88pJCKFaMSap96LdMo8rCa6cYdu6UXKuKQdyiQHlg2EO+ixWPOGckpJe0AsU5LxJroJIpwSDEUY0SLZ8nxE3gc/GBcn5Rtq/sKUcxYNDVp4Ek+ntWjbz9TCO7L7MC1TkjjkQON3LTFUDpHsOuRwW8JYRYPZ5rjO/HUqmVI/gQkco7wv8uCnqFsLUNI+iv5Mr6rjPCphgh4pAGaft11GQyS3NZGhfEDzFKJZO1z5ZBTyKwdxUnJjFSLCbCet6xwauTBasMck0evl/cBJShvMTsEkzQS7kDozMl/3EA914AFTWjqEOLKTTCz79YLIduopnvvTC5GINRIJjkySWVlHMaD0NbFCQ6y0S53qmwv0fgzTRnoyv5coHQS8g3zpkBEqhkYm8zsaoZJVJ6ck8
|
|
|
|
|
$DeflatedStream = New-Object IO.Compression.DeflateStream([IO.MemoryStream][Convert]::FromBase64String($EncodedCompressedFile),[IO.Compression.CompressionMode]::Decompress)
|
|
|
|
|
$UncompressedFileBytes = New-Object Byte[](832512)
|
|
|
|
|
$DeflatedStream.Read($UncompressedFileBytes, 0, 832512) | Out-Null
|
|
|
|
|
$Assembly = [Reflection.Assembly]::Load($UncompressedFileBytes)
|
|
|
|
|
$BindingFlags = [Reflection.BindingFlags] "Public,Static"
|
|
|
|
|
$a = @()
|
|
|
|
|
$Assembly.GetType("Costura.AssemblyLoader", $false).GetMethod("Attach", $BindingFlags).Invoke($Null, @())
|
|
|
|
|
$Assembly.GetType("SharpHound3.SharpHound").GetMethod("InvokeSharpHound").Invoke($Null, @(,$passed))
|
|
|
|
|
}
|