Skip to content

Commit 9d37117

Browse files
carlospolopgitbook-bot
authored andcommitted
GitBook: [#3719] No subject
1 parent bc521b2 commit 9d37117

36 files changed

+142
-108
lines changed

.gitbook/assets/image (1) (8).png

1.02 MB
Loading

.gitbook/assets/image (1).png

-123 KB
Loading

.gitbook/assets/image (2) (2) (3).png

37.3 KB
Loading

.gitbook/assets/image (2) (2).png

798 KB
Loading

.gitbook/assets/image (2).png

-697 KB
Loading
98.5 KB
Loading

.gitbook/assets/image (23) (2).png

-45 KB
Loading

.gitbook/assets/image (23).png

79.8 KB
Loading
127 KB
Loading

.gitbook/assets/image (24) (1).png

30.3 KB
Loading

.gitbook/assets/image (24).png

-83.7 KB
Loading
48.6 KB
Loading

.gitbook/assets/image (29) (1).png

307 KB
Loading

.gitbook/assets/image (29).png

-195 KB
Loading

.gitbook/assets/image (3) (2) (2).png

220 KB
Loading

.gitbook/assets/image (3) (2).png

583 KB
Loading

.gitbook/assets/image (3).png

-664 KB
Loading

.gitbook/assets/image (31) (2).png

36.8 KB
Loading

.gitbook/assets/image (31).png

102 KB
Loading

.gitbook/assets/image (4) (3) (1).png

135 KB
Loading

.gitbook/assets/image (4) (3).png

751 KB
Loading

.gitbook/assets/image (4).png

-828 KB
Loading

.gitbook/assets/image.png

-863 KB
Loading

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@
521521
* [OAuth to Account takeover](pentesting-web/oauth-to-account-takeover.md)
522522
* [Open Redirect](pentesting-web/open-redirect.md)
523523
* [Parameter Pollution](pentesting-web/parameter-pollution.md)
524+
* [Phone Number Injections](pentesting-web/phone-number-injections.md)
524525
* [PostMessage Vulnerabilities](pentesting-web/postmessage-vulnerabilities/README.md)
525526
* [Blocking main page to steal postmessage](pentesting-web/postmessage-vulnerabilities/blocking-main-page-to-steal-postmessage.md)
526527
* [Bypassing SOP with Iframes - 1](pentesting-web/postmessage-vulnerabilities/bypassing-sop-with-iframes-1.md)

emails-vulns.md

+15-79
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,29 @@
1-
1+
# Emails Vulnerabilities
22

33
<details>
44

5-
<summary><strong><a href="https://www.twitch.tv/hacktricks_live/schedule">🎙️ HackTricks LIVE Twitch</a> Wednesdays 5.30pm (UTC) 🎙️ - <a href="https://www.youtube.com/@hacktricks_LIVE">🎥 Youtube 🎥</a></strong></summary>
6-
7-
- Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
8-
9-
- Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
10-
11-
- Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
12-
13-
- **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
5+
<summary><a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ HackTricks LIVE Twitch</strong></a> <strong>Wednesdays 5.30pm (UTC) 🎙️ -</strong> <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
146

15-
- **Share your hacking tricks by submitting PRs to the [hacktricks repo](https://github.com/carlospolop/hacktricks) and [hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)**.
7+
* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
8+
* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
9+
* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
10+
* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
11+
* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).
1612

1713
</details>
1814

15+
##
1916

20-
# Payloads
21-
22-
## Ignored parts of an email
23-
24-
The symbols: **+, -** and **{}** in rare occasions can be used for tagging and ignored by most e-mail servers
25-
26-
27-
28-
**Comments between parentheses ()** at the beginning or the end will also be ignored
29-
30-
* E.g. john.doe(intigriti)@example.com → [email protected]
31-
32-
## Whitelist bypass
33-
34-
* inti(;[email protected];)@whitelisted.com
35-
* [email protected](@whitelisted.com)
36-
* inti+(@whitelisted.com;)@inti.io
37-
38-
## IPs
39-
40-
You can also use IPs as domain named between square brackets:
41-
42-
* john.doe@\[127.0.0.1]
43-
* john.doe@\[IPv6:2001:db8::1]
44-
45-
## Other vulns
46-
47-
![](<.gitbook/assets/image (296).png>)
48-
49-
# Third party SSO
50-
51-
## XSS
52-
53-
Some services like **github** or **salesforce allows** you to create an **email address with XSS payloads on it**. If you can **use this providers to login on other services** and this services **aren't sanitising** correctly the email, you could cause **XSS**.
54-
55-
## Account-Takeover
56-
57-
If a **SSO service** allows you to **create an account without verifying the given email address** (like **salesforce**) and then you can use that account to **login in a different service** that **trusts** salesforce, you could access any account.\
58-
_Note that salesforce indicates if the given email was or not verified but so the application should take into account this info._
59-
60-
# Reply-To
61-
62-
You can send an email using _**From: company.com**_** ** and _**Replay-To: attacker.com**_ and if any **automatic reply** is sent due to the email was sent **from** an **internal address** the **attacker** may be able to **receive** that **response**.
63-
64-
# **References**
65-
66-
* [**https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view**](https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view)
67-
68-
# Hard Bounce Rate
69-
70-
Some applications like AWS have a **Hard Bounce Rate** (in AWS is 10%), that whenever is overloaded the email service is blocked.
71-
72-
A **hard bounce** is an **email** that couldn’t be delivered for some permanent reasons. Maybe the **email’s** a fake address, maybe the **email** domain isn’t a real domain, or maybe the **email** recipient’s server won’t accept **emails**) , that means from total of 1000 emails if 100 of them were fake or were invalid that caused all of them to bounce, **AWS SES** will block your service.
73-
74-
So, if you are able to **send mails (maybe invitations) from the web application to any email address, you could provoke this block by sending hundreds of invitations to nonexistent users and domains: Email service DoS.**
75-
17+
##
7618

7719
<details>
7820

79-
<summary><strong><a href="https://www.twitch.tv/hacktricks_live/schedule">🎙️ HackTricks LIVE Twitch</a> Wednesdays 5.30pm (UTC) 🎙️ - <a href="https://www.youtube.com/@hacktricks_LIVE">🎥 Youtube 🎥</a></strong></summary>
80-
81-
- Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
82-
83-
- Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
21+
<summary><a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ HackTricks LIVE Twitch</strong></a> <strong>Wednesdays 5.30pm (UTC) 🎙️ -</strong> <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
8422

85-
- Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
86-
87-
- **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
88-
89-
- **Share your hacking tricks by submitting PRs to the [hacktricks repo](https://github.com/carlospolop/hacktricks) and [hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)**.
23+
* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
24+
* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
25+
* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
26+
* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
27+
* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).
9028

9129
</details>
92-
93-

generic-methodologies-and-resources/pentesting-network/eigrp-attacks.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Example:
6565
Inguz# show version
6666
```
6767

68-
<figure><img src="../../.gitbook/assets/image (3) (2).png" alt=""><figcaption></figcaption></figure>
68+
<figure><img src="../../.gitbook/assets/image (3) (2) (2).png" alt=""><figcaption></figcaption></figure>
6969

7070
> **However, don’t forget that the EIGRP routing domain can be protected by authentication. But you still have a chance to connect to the routing domain. When hello packets are sent out, they also contain cryptographic hashes. If you can extract these hashes from the traffic dump and reset the password, you can log on to the routing domain with this password.**
7171
@@ -97,7 +97,7 @@ During the establishment and maintenance of the neighborhood between EIGRP route
9797
* **100.100.100.0/24 via 10.10.100.100;**
9898
* **172.16.100.0/24 via 10.10.100.200**
9999

100-
<figure><img src="../../.gitbook/assets/image (29) (1).png" alt=""><figcaption></figcaption></figure>
100+
<figure><img src="../../.gitbook/assets/image (29) (1) (2).png" alt=""><figcaption></figcaption></figure>
101101

102102
Thus, after establishing the neighborhood, we know about the existence of these subnets, which makes it easier for us to pentest and save time. We can do without additional subnet scanning. Now we are in the EIGRP routing domain and we can develop some attack vectors. Let’s talk about them.
103103

network-services-pentesting/49-pentesting-tacacs+.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Now you need to run [Loki](https://c0decafe.de/svn/codename\_loki/trunk/). This
3939
sudo loki_gtk.py
4040
```
4141

42-
<figure><img src="../.gitbook/assets/image (31).png" alt=""><figcaption></figcaption></figure>
42+
<figure><img src="../.gitbook/assets/image (31) (2).png" alt=""><figcaption></figcaption></figure>
4343

4444
You also need to specify the path to the dictionary in order to bruteforce the encrypted key. Be sure to uncheck the **Use Bruteforce** option, otherwise Loki will bruteforce the password without using the dictionary.
4545

@@ -61,7 +61,7 @@ Great, we managed to unlock the key, now we need to decrypt the TACACS traffic.
6161

6262
We see which banner was used.
6363

64-
<figure><img src="../.gitbook/assets/image (24) (1).png" alt=""><figcaption></figcaption></figure>
64+
<figure><img src="../.gitbook/assets/image (24) (1) (2).png" alt=""><figcaption></figcaption></figure>
6565

6666
We find the username of the user `admin`
6767

pentesting-web/email-injections.md

+70-12
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,51 @@ Get Access Today:
1010

1111
<details>
1212

13-
<summary><strong><a href="https://www.twitch.tv/hacktricks_live/schedule">🎙️ HackTricks LIVE Twitch</a> Wednesdays 5.30pm (UTC) 🎙️ - <a href="https://www.youtube.com/@hacktricks_LIVE">🎥 Youtube 🎥</a></strong></summary>
13+
<summary><a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ HackTricks LIVE Twitch</strong></a> <strong>Wednesdays 5.30pm (UTC) 🎙️ -</strong> <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
1414

1515
* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
1616
* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
1717
* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
1818
* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
19-
* **Share your hacking tricks by submitting PRs to the [hacktricks repo](https://github.com/carlospolop/hacktricks) and [hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)**.
19+
* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).
2020

2121
</details>
2222

23-
## Inject Cc and Bcc after sender argument
23+
## Inject in sent e-mail&#x20;
24+
25+
### Inject Cc and Bcc after sender argument
2426

2527
```
2628
2729
```
2830

2931
The message will be sent to the recipient and recipient1 accounts.
3032

31-
## Inject argument
33+
### Inject argument
3234

3335
```
3436
3537
```
3638

3739
The message will be sent to the original recipient and the attacker account.
3840

39-
## Inject Subject argument
41+
### Inject Subject argument
4042

4143
```
4244
From:[email protected]%0ASubject:This is%20Fake%20Subject
4345
```
4446

4547
The fake subject will be added to the original subject and in some cases will replace it. It depends on the mail service behavior.
4648

47-
## Change the body of the message
49+
### Change the body of the message
4850

4951
Inject a two-line feed, then write your message to change the body of the message.
5052

5153
```
5254
From:[email protected]%0A%0AMy%20New%20%0Fake%20Message.
5355
```
5456

55-
## PHP mail() function exploitation
57+
### PHP mail() function exploitation
5658

5759
```bash
5860
# The function has the following definition:
@@ -70,7 +72,7 @@ Function [ <internal:standard> function mail ] {
7072
}
7173
```
7274
73-
### The 5th parameter ($additional\_parameters)
75+
#### The 5th parameter ($additional\_parameters)
7476
7577
This section is going to be based on **how to abuse this parameter supposing that an attacker controls it**.
7678
@@ -90,20 +92,76 @@ Here are a few examples of different man pages of sendmail command/interface:
9092
9193
Depending on the **origin of the sendmail** binary different options have been discovered to abuse them and l**eak files or even execute arbitrary commands**. Check how in [**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)
9294
95+
## Inject in the e-mail name
96+
97+
### Ignored parts of an email
98+
99+
The symbols: **+, -** and **{}** in rare occasions can be used for tagging and ignored by most e-mail servers
100+
101+
102+
103+
**Comments between parentheses ()** at the beginning or the end will also be ignored
104+
105+
* E.g. john.doe(intigriti)@example.com → [email protected]
106+
107+
### Whitelist bypass
108+
109+
<figure><img src="../.gitbook/assets/image (4).png" alt=""><figcaption></figcaption></figure>
110+
111+
### Quotes
112+
113+
<figure><img src="../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
114+
115+
### IPs
116+
117+
You can also use IPs as domain named between square brackets:
118+
119+
* john.doe@\[127.0.0.1]
120+
* john.doe@\[IPv6:2001:db8::1]
121+
122+
### Other vulns
123+
124+
![](<../.gitbook/assets/image (296).png>)
125+
126+
## Third party SSO
127+
128+
### XSS
129+
130+
Some services like **github** or **salesforce allows** you to create an **email address with XSS payloads on it**. If you can **use this providers to login on other services** and this services **aren't sanitising** correctly the email, you could cause **XSS**.
131+
132+
### Account-Takeover
133+
134+
If a **SSO service** allows you to **create an account without verifying the given email address** (like **salesforce**) and then you can use that account to **login in a different service** that **trusts** salesforce, you could access any account.\
135+
_Note that salesforce indicates if the given email was or not verified but so the application should take into account this info._
136+
137+
## Reply-To
138+
139+
You can send an email using _**From: company.com**_\*\* \*\* and _**Replay-To: attacker.com**_ and if any **automatic reply** is sent due to the email was sent **from** an **internal address** the **attacker** may be able to **receive** that **response**.
140+
141+
## Hard Bounce Rate
142+
143+
Some applications like AWS have a **Hard Bounce Rate** (in AWS is 10%), that whenever is overloaded the email service is blocked.
144+
145+
A **hard bounce** is an **email** that couldn’t be delivered for some permanent reasons. Maybe the **email’s** a fake address, maybe the **email** domain isn’t a real domain, or maybe the **email** recipient’s server won’t accept **emails**) , that means from total of 1000 emails if 100 of them were fake or were invalid that caused all of them to bounce, **AWS SES** will block your service.
146+
147+
So, if you are able to **send mails (maybe invitations) from the web application to any email address, you could provoke this block by sending hundreds of invitations to nonexistent users and domains: Email service DoS.**
148+
93149
## References
94150
95-
* [**https://resources.infosecinstitute.com/email-injection/**](https://resources.infosecinstitute.com/email-injection/)
96-
* [**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)
151+
* [https://resources.infosecinstitute.com/email-injection/](https://resources.infosecinstitute.com/email-injection/)
152+
* [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)
153+
* [https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view](https://drive.google.com/file/d/1iKL6wbp3yYwOmxEtAg1jEmuOf8RM8ty9/view)
154+
* [https://www.youtube.com/watch?app=desktop\&v=4ZsTKvfP1g0](https://www.youtube.com/watch?app=desktop\&v=4ZsTKvfP1g0)
97155
98156
<details>
99157
100-
<summary><strong><a href="https://www.twitch.tv/hacktricks_live/schedule">🎙️ HackTricks LIVE Twitch</a> Wednesdays 5.30pm (UTC) 🎙️ - <a href="https://www.youtube.com/@hacktricks_LIVE">🎥 Youtube 🎥</a></strong></summary>
158+
<summary><a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ HackTricks LIVE Twitch</strong></a> <strong>Wednesdays 5.30pm (UTC) 🎙️ -</strong> <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
101159
102160
* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
103161
* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
104162
* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
105163
* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
106-
* **Share your hacking tricks by submitting PRs to the [hacktricks repo](https://github.com/carlospolop/hacktricks) and [hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)**.
164+
* **Share your hacking tricks by submitting PRs to the** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **and** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud).
107165
108166
</details>
109167

0 commit comments

Comments
 (0)