FOOTHOLD Metodoloji Cheat-sheet
Enum ✓ EXAM-SAFE zor :88:389:445:636:7474:7687

BloodHound — Saldiri Yolu Analizi (Edge to Exploit Haritalama)

BloodHound CE/legacy kurulumu, bloodhound-python ve SharpHound ile veri toplama, ve toplanan grafikteki HER kenarin (GenericAll, WriteDacl, AllowedToAct, ReadLAPSPassword vb.) somut istismar tekniğine eslenmesi ile Domain Admins'e en kisa yolun bulunmasi.

Bilgi: ÖN KOŞULLAR
  • En az bir gecerli domain hesabi (USER + PASS veya NTHASH veya Kerberos TGT)
  • Docker veya neo4j + Java kurulumu (BloodHound CE icin)
  • DC'ye LDAP/SMB erisimi
┌──

Komutlar

docker ✓ EXAM-SAFE
curl -L https://ghst.ly/getbhce -o docker-compose.yml && docker compose up -d
BloodHound Community Edition'i Docker ile ayaga kaldirir (UI http://localhost:8080) BloodHound CE Docs - Quick Install
neo4j ✓ EXAM-SAFE user
sudo neo4j start && bloodhound --no-sandbox
Legacy BloodHound: neo4j (7474/7687) baslat, ardindan GUI ac BloodHound Legacy Docs - Installation
bloodhound-python ✓ EXAM-SAFE user
bloodhound-python -c All -u '{{USER}}' -p '{{PASS}}' -d {{DOMAIN}} -ns {{DC_IP}} --zip
Linux uzerinden tum collection metotlariyla toplama (JSON -> zip) bloodhound-python (BloodHound.py) GitHub README
bloodhound-python ✓ EXAM-SAFE user
bloodhound-python -c All,LoggedOn -u '{{USER}}' -p '{{PASS}}' -d {{DOMAIN}} -ns {{DC_IP}} -dc {{DC_HOST}} --kerberos
Kerberos kimlik dogrulamasi ile toplama (KRB5CCNAME bileti kullanir) bloodhound-python GitHub - Kerberos auth
bloodhound-python ✓ EXAM-SAFE user
bloodhound-python -c All -u '{{USER}}' --hashes :{{NTHASH}} -d {{DOMAIN}} -ns {{DC_IP}} --zip
NT hash (Pass-the-Hash) ile toplama bloodhound-python GitHub - hashes
SharpHound ✓ EXAM-SAFE user
SharpHound.exe -c All --zipfilename loot
Windows host uzerinde mevcut oturum baglaminda tum collection SharpHound Docs - Collection Methods
SharpHound ✓ EXAM-SAFE user
SharpHound.exe -c DCOnly --ldapusername '{{USER}}' --ldappassword '{{PASS}}'
Sadece DC'den (LDAP) toplama — host'lara dokunmaz, dusuk gurultu SharpHound Docs - DCOnly
SharpHound ✓ EXAM-SAFE user
SharpHound.exe -c All,LoggedOn -d {{DOMAIN}} --domaincontroller {{DC_IP}} --collectionmethod Session,ACL
Session/ACL odakli ek toplama (oturumlu kullanici-host eslesmesi) SharpHound Docs - Collection Methods
nxc ✓ EXAM-SAFE user
nxc ldap {{DC_IP}} -u '{{USER}}' -p '{{PASS}}' --bloodhound -c All --dns-server {{DC_IP}}
NetExec ile entegre BloodHound toplama NetExec Wiki - BloodHound module
cypher ✓ EXAM-SAFE user
MATCH p=shortestPath((u:User {owned:true})-[*1..]->(g:Group {name:'DOMAIN ADMINS@{{DOMAIN}}'})) RETURN p
Sahip olunan kullanicidan Domain Admins'e en kisa yol (custom cypher) BloodHound Docs - Cypher Query Reference
cypher ✓ EXAM-SAFE user
MATCH (u:User)-[r:GenericAll|GenericWrite|WriteDacl|WriteOwner|Owns]->(t) WHERE u.owned=true RETURN u,r,t
Sahip olunan principal'in dogrudan istismar edilebilir ACL kenarlari BloodHound Docs - ACL Edges
cypher ✓ EXAM-SAFE user
MATCH (c:Computer) WHERE c.unconstraineddelegation=true RETURN c.name
Unconstrained delegation host'lari (coerce+relay hedefi) BloodHound Docs - Delegation

Amac

BloodHound, AD’yi bir graf olarak modeller: dugumler (User, Computer, Group, GPO, OU, Domain) ve kenarlar (iliskiler). Bir saldirgan icin deger, sahip olunan dusuk yetkili bir principal’dan Domain Admins’e giden en kisa yolu ve her adimdaki somut istismari gormektir.

Kurulum

BloodHound CE (guncel, onerilen): curl -L https://ghst.ly/getbhce -o docker-compose.yml && docker compose up -d. UI 8080’de, Postgres+neo4j konteynerde. Ilk parolayi konteyner loglarindan al. Legacy: neo4j servisini (bolt 7687, http 7474) baslatip Electron GUI’yi acarsiniz. CE, SharpHound/bhce-python JSON formatini bekler; legacy ile zip formatlari %100 uyumlu olmayabilir — toplayiciyi BloodHound surumune esle.

Toplama (Collection)

  • Linux: bloodhound-python -c All (LDAP+SMB). LoggedOn icin host’lara erisim sart, gurultu uretir.
  • Windows: SharpHound.exe -c All. Stealth icin -c DCOnly (sadece LDAP, hicbir host’a oturum sorgusu yok).
  • Kerberos: --kerberos ile KRB5CCNAME bileti kullanilir; saat skew’i 5 dk’yi gecmemeli.

Kenar -> Istismar Eslemesi (Kritik Tablo)

Kenar (Edge)AnlamIstismar
GenericAll (user)Nesne uzerinde tam kontrolForceChangePassword veya targeted Kerberoast (SPN ekle)
GenericAll (computer)Tam kontrolRBCD kur (msDS-AllowedToActOnBehalfOfOtherIdentity) veya LAPS oku
GenericAll (group)Tam kontrolGruba kendini ekle (AddMember)
GenericWriteBelirli nitelik yazmatargeted Kerberoast (servicePrincipalName yaz) / logon script
WriteDaclDACL degistirmeKendine GenericAll/DCSync ekle (aclpwn/dacledit)
WriteOwnerSahip degistirmeSahibi yap -> WriteDacl -> tam kontrol
OwnsNesne sahibiWriteOwner gibi DACL’i degistir
AddMemberGruba uye eklemeYuksek yetkili gruba katil
ForceChangePasswordParola sifirlamaHedefin parolasini degistir, hesabini ele gecir
AllowedToDelegate (constrained)KCDS4U2Proxy ile hedef SPN’e impersonate
AllowedToAct (RBCD)Resource-based KCDS4U ile bilgisayara Administrator olarak gel
ReadLAPSPasswordms-Mcs-AdmPwd okuYerel admin parolasini oku (bkz. ad-laps)
ReadGMSAPasswordgMSA parola blobgMSA NT hash’ini cek (gMSADumper)
CanPSRemotePSRemotingevil-winrm/Enter-PSSession ile shell
AdminToYerel adminPtH/PsExec ile SYSTEM, LSASS dump
HasSessionAktif oturumHost’u ele gecirip token/cred calma
DCSync (GetChanges)Replikasyon hakkisecretsdump ile tum NTDS hash’leri

Ozel Cypher Sorgulari

shortestPath ile owned:true principal’dan DOMAIN ADMINS grubuna yol cek. Owned isaretlemek icin UI’da node’a sag tikla -> Mark as Owned. Toplu ACL avi icin yukaridaki GenericAll|GenericWrite|WriteDacl|... sorgusu sahip olunan hesabin tum dogrudan istismarlarini tek seferde verir.

Gotchalar

  • --dns-server/-ns DC IP’sine isaret etmezse bloodhound-python isim cozumleyemez ve toplama bos doner.
  • CE ve legacy JSON semasi farkli: yanlis toplayici -> bos graf. Toplayici surumunu BloodHound surumune esle.
  • SharpHound Session toplamasi anliktir; kullanici cikis yaptiysa kacirilir, tekrarli toplama gerekebilir.
┌──

Kaynaklar

0/15 set