Open Source Reverse Shell

reverseshell
beginner
linux

(Matrix2600) #1

Ok, so I’ve coded a very basic reverse shell that I’ve now decided to allow any member to access and view the code, but before I post the code I gotta thank @0x00pf for his awesome tutorial and @Joe_Schmoe for STELF which inspired me to code this shell. I’m trying to add functionality to my shell, but I’m a 1337 Skid haxor. I’m still learning but thanks to this community and their patience especially @calchemist and of course @pry0cc plus many others which helped me and answered my really really really dull questions. I’ve learned a lot coding this shell especially how file descriptors and sockets work. Thank you all that have helped me out quite a bit!

Now the code is written in C and I’ve added comments to any that are interested in how it all works. To compile simply do,
gcc reverse_shell.c -o reverse_shell

and for the handler same thing,
gcc handler.c -o handler

The file named shell.c is actually a bind shell which I accidentally coded and just shows how stupid I can be, but I’ve decided to keep it just in case I and anyone else finds it useful. I hope this becomes useful for anyone that is interested. If anyone wants to help with the development of the shell please request access. Thank you!

Cheers!


(John) #2

Are we all reverse shelling in this place?


(Matrix2600) #3

Reverse Shell is more reliable than a bind shell because of Firewalls. Most Firewalls will actually not allow you to bind to the port that a bind shell needs which is why reverse shell are ideal because of the fact that they “call home”.


(John) #4

Oh man! If you like those concepts the reverse DNS and ICMP shells will get you wet…


#5

Awesome Stuff!! Thanks for sharing :slight_smile: