Skip to main content

Bloodhound Usage

 

 

BloodHound-Python
If you have access to DC, need admin creds - Github

Linux:


proxychains python3 bloodhound.py -d Steins.local -u admin -p p@$$W0rd! -c all -dc dc.steins.local -gc dc.steins.local -v -ns 10.10.10.10 --dns-tcp

Few files will appear in the same location, import them into bloodhound

Kali: apt-get install bloodhound
sudo neo4j console
go to localhost:7474
neo4j: neo4j #login in browser and change the password

bloodhound #bloodhoun login will pop-up, login with new creds

Windows:


Download this on Windows target: SharpHound.ps1


powershell -ep bypass
..\SharpHound.ps1
invoke-Bloodhound -CollectionMethod All -Domain Steins.local -ZipfileName file.zip

invoke-Bloodhound -CollectionMethod LoggedOn -Verbose

or

SharpHound.exe -c All -d Steins.local --zipfilename test.zip

OR
.\SharpHound.exe -d steins.local --domaincontroller 192.168.168.168 --ldapusername admin --ldappassword P@$$W0rd! --zipfilename domain.zip - c All

open the file in bloodhound --> click on upload --> select file


For Testing:

git clone https://github.com/BloodHoundAD/BloodHound-Tools
cd DBCreator
pip install neo4j-driver
sudo pip3 install neo4j
python3 DBCreator.py
sudo neo4j console
dbconfig

Invoke-BloodHound Commands 

#specify detailed collection methods
Invoke-BloodHound -CollectionMethod ACL,ObjectProps

#Change the frequency of the requests sent by BloodHound
Invoke-BloodHound -Throttle 1500 -Jitter 10

#increase the stealthiness of theBloodHound ingestor is to minimize its disk footprint.
Invoke-BloodHound -CompressData -RemoveCSV and –NoSaveCache
Bloodhound Ingestor - Linux/Python 

git clone https://github.com/dirkjanm/BloodHound.py
pip install
bloodhound-python -u UserName -p "P@SSW)RD!" -d steins.local -ns 10.10.10.10 -c All
Bloodhound Rust Ingestor 

git clone https://github.com/NH-RED-TEAM/RustHound.git

#install cargo
curl https://sh.rustup.rs -sSf | sh
. "$HOME/.cargo/env" 

#Compile RustHound
make install

#Run it 
rusthound -d domain.local -i 10.10.10.10 -u 'username@domain.local' -p 'P@ssw0rd!' -o . -z

# Kerberos authentication (Linux)
export KRB5CCNAME="/tmp/Username.ccache"
rusthound -d domain.local -f dc01.domain.local -k -z

Custom Queries

#Find AllowedToAct|AllowedToDelegate Permissions 
MATCH p=(n)-[r:AllowedToAct|AllowedToDelegate]->(m) RETURN p

#Find Accounts Trusted for Delegation
MATCH (n)-[r:TrustedForDelegation]->(m) RETURN n, r, m

#Find RBAC Paths
MATCH p=(n)-[r:AllowedToAct|AllowedToDelegate]->(m) RETURN p

#Find Accounts with SPN That allows Delegation
MATCH (n)-[r:HasSPN]->(m) WHERE n.TrustedToAuthForDelegation = True RETURN n, r, m
Custom Commands

Click on custom queries and edit the json file, we can add as many queries as required

Example 1

{
"name": "CUSTOM",
"queryList": [
{
"final": true,
"query": "MATCH (n:User) RETURN n"
}
]
}

List all Domain Admins


{
"name": "CUSTOM",
"queryList": [
{
"final": true,
"query": "MATCH (n:Group) WHERE n.name =~ \"(?i).*DOMAIN ADMINS.*\" WITH n MATCH (n)<-[r:MemberOf*1..]-(m) RETURN n,r,m"
}
]
}
 
Display all the users that are part of administrators group
{
"name": "CUSTOM",
"queryList": [
{
"final": true,
"query": "MATCH (u:User)-[MemberOf]->(g:Group {name: \"ADMINISTRATORS@ELS-CHILD.ELS.LOCAL\"}) RETURN u"
}
]
},

 

 

 

 

 

 

Comments

Popular posts from this blog

POC Links for CVE's

  Serach for a CVE here first - Trickest/cve Apache CVE-2024-38475 - CVE-2024-38475 #version less than 2.4.51 CVE-2021-44790 - h ttps://www.exploit-db.com/exploits/51193 #Apache HTTP Server 2.4.50 CVE-2021-42013 - https://www.exploit-db.com/exploits/50406 use https://github.com/mrmtwoj/apache-vulnerability-testing for below CVE's CVE-2024-38472: Apache HTTP Server on Windows UNC SSRF CVE-2024-39573: mod_rewrite proxy handler substitution CVE-2024-38477: Crash resulting in Denial of Service in mod_proxy CVE-2024-38476: Exploitable backend application output causing internal redirects CVE-2024-38475: mod_rewrite weakness with filesystem path matching CVE-2024-38474: Weakness with encoded question marks in backreferences CVE-2024-38473: mod_proxy proxy encoding problem CVE-2023-38709: HTTP response splitting EXIM #suppodily should work for versions below Exim 4.96.1 - is not accurate CVE-2023-42115 - https://github.com/AdaHop-Cyber-Security/Pocy/tree/main

Hash Extension Attacks

  #Install Dependencies sudo apt-get install libssl-dev #Download Hash Extender git clone https://github.com/iagox86/hash_extender.git cd hash_extender make #Run it /hash_extender --data 'username=admin' --secret 16 --append '&isLoggedIn=True' --signature d3a85d3b3087c7e841f84eb4316765c6e1f786074a1f1db996b2e0f8c96f197e2f55433920a630feb07daafadefbc13c947e5225fc509f8241f57f47a8df5311 --format sha512