Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharpHound.ps1 does not produce output #260

Closed
Pri3st opened this issue Dec 7, 2023 · 4 comments
Closed

SharpHound.ps1 does not produce output #260

Pri3st opened this issue Dec 7, 2023 · 4 comments
Labels
bug Something isn't working triage This issue requires triaging

Comments

@Pri3st
Copy link
Contributor

Pri3st commented Dec 7, 2023

Description:

Many times the PowerShell script will not produce the designated output file. The .exe ingestor works perfectly every time. Sometimes, the problem is resolved when I use the -OutputDirectory option.

@Pri3st Pri3st added bug Something isn't working triage This issue requires triaging labels Dec 7, 2023
@rvazarkar
Copy link
Contributor

I'm not really sure how we would go about debugging this, especially since the .ps1 script is just wrapping the .exe, so functionally there shouldn't be any real difference other than how its delivered into memory. Can you isolate a reproduction of this in a specific scenario?

@leechristensen
Copy link

It could potentially be due to PowerShell tracking the current directory differently than what the .NET libs see:
image

@StephenHinck
Copy link
Collaborator

Closing this issue as we've not heard any updates. We can always re-open with more info!

@robertstrom
Copy link

robertstrom commented Mar 28, 2024

Not sure if this is going to be seen since this issue is closed but giving it a try anyway. I have run into the same issue as described above.

In my case I opened a PowerShell shell from another shell using the runas /user:<domain>\<user> powershell.exe command. When the PowerShell shell opened it opened in C:\Windows\System32. I navigated to the directory where the Sharphound.ps1 file was located and ran the commands to collect from the domain (twice because I did not see any results).

Then I ran a search for *bloodhound.zip and found that the collection files are in the C:\Windows\System32 directory. I believe that @leechristensen hit the nail on the head here.

Sharphound.ps1 / Invoke-Bloodhound run from the C:\users\rstrom\Downloads\SharpHound-v2.3.3 directory

image

Resulting files are located in the C:\Windows\System32 directory

image

The cache file ended up in System32 also

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue requires triaging
Projects
None yet
Development

No branches or pull requests

5 participants