Bloodhound / Sharphound - How is this used?

Hi forum, I am working through the starting point and am up to machine named Pathfinder.

Working through the walkthrough I see that a tool called bloodhound is used. Unable to get this to run at first but after some fiddling about managed to get the neo4j DB running and then finally got bloodhound to also run its GUI so it appears to be setup right.

The next stage is to get the json files and import them into bloodhound for analysis. The command wouldn’t execute on my system probably because I am using bloodhound 3 rather than bloodhound 2. The command is:

bloodhound-python -d megacorp.local -u sandra -p “Password1234!” -gc pathfinder.megacorp.local -c all -ns 10.10.10.30

Some further research on this tool draws my attention to sharphound.exe or sharphound.ps1 which is found here:

So it seems that I should be using SharpHound3 to gather the json files but they don’t seem to some in a linux executable format. I would prefer to not run this on my Windows pc if possible.

Has anyone any experience with SharpHound?
Am I heading down the correct rabbit hole?

ta,
Neo

Hey man,

So… when you run sharphound.exe it should spit out a .zip file, drag and drop that zip file into the blood hound application window, that should import the data.

So speaking of Bloodhound it’s just a domain mapping tool, and sharphound is the tool to collect information when running in the victim’s machine to map the domain as this is complex for beginners to use, ppl made a new ingestor which is in python which will run the attacker machine itself to collect the mapping data, but when i was doing pathfinder, i tried the python bloodhound but it dint work(the json were created but couldnt map it), so i went old school

Type your comment> @Lycist said:

Hey man,

So… when you run sharphound.exe it should spit out a .zip file, drag and drop that zip file into the blood hound application window, that should import the data.

Yeah he is right!

I really don’t want to be running sharphound on my windows PC so it looks like I will need to run it on one of the other machines that I rooted. Working on that now.

Luckily I have another Windows machine that is rooted so I can do this. If I didn’t have a rooted windows machine, all I had was user creds to get into AD and my Kali laptop how would I do this?

Essentially all I need is those JSON files and the ability to get them from my Kali machine

@NeoCortex2000 said:

I really don’t want to be running sharphound on my windows PC so it looks like I will need to run it on one of the other machines that I rooted. Working on that now.

Luckily I have another Windows machine that is rooted so I can do this. If I didn’t have a rooted windows machine, all I had was user creds to get into AD and my Kali laptop how would I do this?

Just to make sure, because I have a feeling you haven’t quite got that right: The SharpHound.exe will be executed on the Windows machine you want to root, not on your local machine or any other Windows machine

Then im stuck…

How can I export the json files for analysis from the domain controller with only a username and password for a domain user?

I just can’t get this command to work:

bloodhound-python -d megacorp.local -u sandra -p “Password1234!” -gc pathfinder.megacorp.local -c all -ns 10.10.10.30

It gives me ImportError: cannot import name PyAsn1UnicodeDecodeError

I generally use the PS1 version or the EXE version to avoid dependency issues like that. Also might not want to include passwords here, even if they are publicly available.

Passwords, noted.

The PS1 version and the EXE version need to run on the windows target machine whereas the command above can be run from the attacker (linux machine) but it doesn’t work.

ahh ok I figured it out.

I needed to install the the Python based ingestor for bloodhound which can be found here:

The after running the pip install I now can use the bloodhound-python command. Lets see if it works!

Turns out my install of Kali is borked. It didn’t work. Had to spin up a phresh Kali VM and run it from there. Worked fine. Python is a pain in the ■■■■ when it doesn’t work.

Type your comment> @NeoCortex2000 said:

Turns out my install of Kali is borked. It didn’t work. Had to spin up a phresh Kali VM and run it from there. Worked fine. Python is a pain in the ■■■■ when it doesn’t work.

I’ve installed ldap3, impacket, and dnspython and I for some reason cannot get this bloodhound-python command to work. at first it was just “required digestmod” error and now it gives me import errors “:cannot import name PyAsn1UnicodeDecodeError”

I was getting that digestmod error as well. I can’t really help you with fixing it other than to deploy a whole new VM and build of Kali. I have about 6 or 7 versions of python installed and something is screwed in the python config. Sometimes other python apps have issues as well.

Im left marginally frustrated with this as I want one machine (my laptop) to be able to do everything I need.

If you fix it please do share the solution as I am faced with rebuilding the laptop if a solution doesn’t come along.

I recommend doing/following along the box “Forest”. There is a video online where someone uses it to work through a box and they give a pretty good explanation on what it does.

Would love to see a walkthrough of this box WITHOUT using bloodhound…

Type your comment> @Ja4V8s28Ck said:

So speaking of Bloodhound it’s just a domain mapping tool, and sharphound is the tool to collect information when running in the victim’s machine to map the domain as this is complex for beginners to use, ppl made a new ingestor which is in python which will run the attacker machine itself to collect the mapping data, but when i was doing pathfinder, i tried the python bloodhound but it dint work(the json were created but couldnt map it), so i went old school
When you say you went old school; what did you do?
I am having no luck with Bloodhound, fresh install of kali and getting “Missing required parameter ‘digestmod’”

there is an known Python 3 problem Issue 33604: HMAC default to MD5 marked as to be removed in 3.6 - Python tracker which has probably impact on bloodhound.py. I checked with python 2.7 on Kali and it works.

How do you switch over or manually use Python 2.7 with blood-hound?
Tried the git clone, then installing with pip3 install ., it downgraded to bloodhound 1.0.4 from 1.0.5
Try to run after using python2 and it reports no module named ldap3
Try to install (pip3 install ldap3) and it reports ‘requirements already satisfied’

As a workaround, python3.7 does work with bloodhound.
To change the default python version (current Kali build comes with 3.7 and 3.8) run the following commands (may require sudo/su):

rm /usr/bin/python3

ln -s /usr/bin/python3.7 /usr/bin/python3

this deletes the symbolic link to python3.8 and defaults any call to python3 to using python3.7