BloodHound icon indicating copy to clipboard operation
BloodHound copied to clipboard

EXE & PowerShell collectors issues

Open init5-SF opened this issue 2 years ago • 7 comments

Downloaded and tested the latest PowerShell collector, it doesn't seem to work for some reason.

PS C:\Users\Administrator\Desktop> Invoke-BloodHound -CollectionMethod all
Exception calling "Invoke" with "2" argument(s): "Method not found: '!!0[] System.Array.Empty()'."
At C:\Users\Administrator\Desktop\hound.ps1:642 char:88
+ ... nvoke($Null, @(,$passed))
+                    ~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : MissingMethodException

Tested again with the EXE collector and got this:

PS C:\Users\Administrator\Desktop> .\SharpHound.exe -c all

Unhandled Exception: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
   at Sharphound.Program.<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Sharphound.Program.<Main>(String[] args)

Test machines is Windows Server 2012 R2 & Microsoft Windows Server 2019 Datacenter, both fully updated.

init5-SF avatar Oct 06 '22 12:10 init5-SF

Just for information, He is not alone: I have same exact issue on a Windows Server 2012 R2. However, i do not controls the Server. (CTF-style environment)

MrHoz avatar Jan 06 '23 17:01 MrHoz

Will look into this

rvazarkar avatar Feb 06 '23 17:02 rvazarkar

Is this still an issue with the new sharphound v1.1.1?

JonasBK avatar May 24 '23 04:05 JonasBK

yes, the issue is still there

> PS C:\Users\user\Documents> .\SharpHound.ps1                                             
> Exception calling "Invoke" with "2" argument(s): "Method not found: '!!0[] System.Array.Empty()'."        
> At C:\Users\user\Documents\SharpHound.ps1:416 char:91 
> + ... nvoke($Null, @(,$passed))                                                                           
> +                    ~~~~~~~~                                                                             
>     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException                             
>     + FullyQualifiedErrorId : MissingMethodException           

ramus82 avatar Jul 25 '23 08:07 ramus82

Issue still here, can't run SharpHound (exe or ps1) in old systems since a few versions. We need another version of SharpHound for older Windows version (Windows 7, Windows Server 2008 R2 for example) that don't require the installation of newer frameworks.

In my case SharpHound from 3.0.5 version was working fine on those old systems but I couldn't load the files in the lastest BloodHound (compatibility problems).

I will be glad someone does it

wwwGeneral avatar Nov 15 '23 20:11 wwwGeneral

Is the issue being fixed ? Is it possible to run SharpHound on old WS2012 ?

image

lap012 avatar Feb 25 '24 23:02 lap012

Ran into the same issue, it seems its because of .Net version installed on the victim machine - v4.6 should fix this: https://stackoverflow.com/questions/31253747/method-not-found-0-system-array-empty

Victim's machine: image

One idea is to try older versions of SharpHound which were written according to v4.0 or less.

Anon-Exploiter avatar Apr 22 '24 09:04 Anon-Exploiter