BloodHoundAD / SharpHound2

The Old BloodHound C# Ingestor (Deprecated)
509 stars 113 forks source link

ComputerFile, no output to CSV? #15

Closed 6a7070 closed 6 years ago

6a7070 commented 6 years ago

Thank you for making this great tool. I really appreciate it.

I am looking to enumerate just a subset of the computers in a domain. I found the 'ComputeFile' parameter in Sharphound.ps1 and tried that.

Unfortunately, it did not save any output to CSV format when I used the CSVFolder parameter. Sharphound does successfully enumerate the hosts, because I see data in the Bloodhound.bin file. The only problem is that no csv file appears to be created.

Am I doing something wrong?

This is my command (after loading the Sharphound.ps1 script):

Invoke-BloodHound -CollectionMethod LoggedOn -ComputerFile computers.txt -CSVFolder 'C:\Data'

My computers.txt file contains the following:

hostname1
hostname2

Thank you!

6a7070 commented 6 years ago

I tried running the executable with the ComputerFile parameter and it worked great. Output in csv format worked. Will use that.

6a7070 commented 6 years ago

Unfortunately, now the exe version isn't outputing the csv file. I don't know what happened. I had to kill the executable prematurely because it started to do a full scan (my fault). When I went to try using ShareHound.exe again, no CSV output would be saved to disk. The bloodhound.bin file does exist with data, just no CSV file. Could you look into this?

By the way, I'm still using the ComputerFile parameter. If I do a full scan (no options), it does produce a CSV file.

Thanks.

6a7070 commented 6 years ago

reopening

rvazarkar commented 6 years ago

I'm looking into this. For some reason ping is failing when hostnames are resolved from a file...which makes no sense.

6a7070 commented 6 years ago

Thanks for replying to my post and figuring out the issue. What are the chances you think it will be fixed?

rvazarkar commented 6 years ago

Well it took a while, but I think this is finally fixed. The fix makes no sense to me, but it seems to be correct.

https://github.com/BloodHoundAD/SharpHound/commit/dc54f21886a51b86f92d27d3b4ffc1c63149935b

Try it and let me know

rvazarkar commented 6 years ago

Going to close this since theres been no response

6a7070 commented 6 years ago

Thanks for fixing this. I haven't tried the fix yet, but I did try your fix for using the 'no ping' flag and I was able to scan the target hosts.