Update zip-path-overwrite.yaml
parent
6f0d8062fe
commit
7246b17ecd
|
@ -4,7 +4,7 @@ info:
|
|||
name: Zip Path Overwrite
|
||||
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
||||
severity: info
|
||||
description: Insecure ZIP archive extraction can result in arbitrary path over write and can result in code injection.
|
||||
description: Insecure ZIP archive extraction can result in arbitrary path overwrite and can result in code injection.
|
||||
tags: file,nodejs
|
||||
|
||||
file:
|
||||
|
@ -14,15 +14,15 @@ file:
|
|||
matchers:
|
||||
- type: regex
|
||||
regex:
|
||||
- "\\$X = require\\('unzip'\\)"
|
||||
- "\\$X = require\\('unzipper'\\)"
|
||||
- "\\$Y\\.pipe\\(\\$UNZIP\\.Parse\\(...\\)\\)\\.on\\('entry', function $FUNC\\(...\\) {"
|
||||
- "\\$X = \\$FILENAME\\.indexOf\\(...\\)"
|
||||
- "\\$FUNC\\.pipe\\(\\$FS\\.createWriteStream\\(\\$FIL, ...\\)\\)"
|
||||
- "\\$FUNC\\.pipe\\(\\$FS\\.writeFile\\(\\$FIL, ...\\)\\)"
|
||||
- "\\$FUNC\\.pipe\\(\\$FS\\.writeFileSync\\(\\$FIL, ...\\)\\)"
|
||||
- "\\$UNZIP\\.Parse\\(...\\)\\.on\\('entry', function \\$FUNC\\(\\$ENTRY\\) {"
|
||||
- "\\$FS\\.createWriteStream\\(\\$FIL, ...\\)"
|
||||
- "\\$FS\\.writeFile\\(\\$FIL, ...\\)"
|
||||
- "\\$FS\\.writeFileSync\\(\\$FIL, ...\\)"
|
||||
- "require\\('unzip'\\)"
|
||||
- "require\\('unzipper'\\)"
|
||||
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.Parse\\([\\w\\W]*?\\)\\)\\.on\\('entry', function [\\w\\W]*?\\([\\w\\W]*?\\) \\{"
|
||||
- "[\\w\\W]+? = [\\w\\W]+?\\.indexOf\\([\\w\\W]*?\\)"
|
||||
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.createWriteStream\\([\\w\\W]*?\\)\\)"
|
||||
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.writeFile\\([\\w\\W]*?\\)\\)"
|
||||
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.writeFileSync\\([\\w\\W]*?\\)\\)"
|
||||
- "[\\w\\W]+?\\.Parse\\([\\w\\W]*?\\)\\.on\\('entry', function [\\w\\W]*?\\([\\w\\W]*?\\) \\{"
|
||||
- "[\\w\\W]+?\\.createWriteStream\\([\\w\\W]*?\\)"
|
||||
- "[\\w\\W]+?\\.writeFile\\([\\w\\W]*?\\)"
|
||||
- "[\\w\\W]+?\\.writeFileSync\\([\\w\\W]*?\\)"
|
||||
condition: or
|
||||
|
|
Loading…
Reference in New Issue