Urchin
:shell::collision: Python socket remote shell that lets you connect to others computers through the shell when they run the client.
Install / Use
/learn @keeganjk/UrchinREADME
urchin
| | | ,--` ,--` | | --- ,--`
\ * / | | | | | | | | | |
-*+*- | | |--, | |--| | | |
/ * \ | | | \ | | | | | |
| `__, | \ `__, | | --- | |
Developer : keeganjk
Version : v1.4 (Pickelhelm)
Reverse shell that lets you connect to other devices through the shell when they run the client.
Supported platforms:
<h5>Windows</h5> <h5>MacOS</h5> <h5>Linux</h5
Contents
What is it? <a id="what-is-it">
Urchin is a reverse shell that is writen in Python 2. It uses socket to send commands over the Internet. Urchin is a reverse-shell, meaning that a server can host a server and get the client to run the client script. The client will connect the user to the server, which will grant the server shell access to the client's computer.
How to use it <a id="use">
<hr>1. Run
urchin.py<a id="run-urchin">To run
urchin.py, the process is different depending on your operating system. On Windows:
- Click on
urchin.pyand Python will run it.On MacOS/Linux:
- Open the terminal.
- Navigate to
urchin.py- Type
chmod +x *to allow execution of all files in the directory.- You will have to remove the
.pyextension or replace it with.command.- You can run
urchinby any of the below methods:
- Click on
urchin- Run
./urchin- Run
python urchin<br/><i><b>If you have an error when opening
urchin, kill anyPythonbackground processes with Task Manager on Windows orkillin Unix.</b></i>
2. Build client <a id="build">
Once you ran
urchin.py, type0toBuild client file. It will ask you for the server's (mostly likey your) IP Address. If theclientis on the same network as you, open a terminal and typeifconfig(ipconfigif you are on Windows) and it will output some text. Your local IP should start with192.168.,172.16., or10.. If theclientis not on the same network as you, use the address found onicanhazip.com. You can choose to generate a Python file or a BASh/nc "blind" file. The Python file will work on any OS if Python 2 is installed or if you compile it for their device with PyInstaller. BASh/nc should work on Mac/Linux and instead of the person connecting to you, you connect to them, but you can't see the output of any commands. Next, it will ask for a filename. Enter the name you want theclientfile to be called. If you are using the Python file, you can edit theclient.pyfile. Find the line that sayshost = '127.0.0.1'. Replace'127.0.0.1'with the server's IP Address surrounded by single quotes. If you're using the BASh/nc method, you can simply uselistener.command.Here are the steps to install PyInstaller: <a id="dipyinstaller">
Windows:
- Open CMD
- Enter the following commands:
cd C:\Python27\Scripts
pip install --upgrade pip
pip install pyinstaller
<hr>MacOS: 0. Log into admin profile or any profile in
/etc/sudoers
- Open Terminal
- Enter
sudo python -m easy_install pipand type your password- Enter
sudo python -m pip install pyinstallerLinux: 0. Log into admin profile or any profile in
/etc/sudoers
- Open Terminal
- Enter
sudo python -m pip install pyinstallerIf the client is using MacOS, they have
Python 2installed already. You can use PyInstaller (instructions above) or package theclientinto an app like so:<br/>
- Open the terminal and type
chmod +x filename<br/>- Put the file in a folder<br/>
- Open Disk Utility.<br/>
- From the top menu, select
File>New Image>Image from Folder...<br/>- A DMG will be generated.<br/>
If the client is on Linux, they probably have
Pythoninstalled already. You can use PyInstaller anyway. <br />Using PyInstaller: <a id="piuse"> To use PyInstaller, type this into Terminal/CMD<sup>0</sup><sup>1</sup><sup>2</sup>:
pyinstaller -F filename<sup>0</sup> If you are using Windows, use
C:\Python27\Scripts\pyinstaller.exe -F filename<br/> <sup>1</sup> If you are using Windows or MacOS, you can use--nowindowedafter-Fto make no console window appear. <br/> <sup>2</sup> The executable will be held in thedistfolder which is created if it doesn't exist.
3. Allow connections and give the file to the client. <a id="listen">
If using the Python method, select 1 or 2. Once listening for connections, give the client the file: email, FTP, USB, etc. should work. If you can't send the file, put it in a
ZIPfile. If the user is on Windows, you can make the connection persist like so:
- Press Windows Key + R and enter
shell:startup.- If you get the
clientfile in the directory thtat opens up, it will start every time the user logs in.Once the
<a id="custom-cmd">clienthas connected, you will be notified and you will have a command prompt of$. From here, you can enter commands to run on the client. There are also custom commands which only exist inUrchin, listed below.
<code>bash</code> : Opens a BASh shell if possible <br/> <code>browser</code> : Allows you to open a web browser on clients machine(s) <br/> <code>exit</code> or <code>quit</code> : Closes connection <br/> <code>flood</code> : Allows you to flood a specified URL with GET requests <br/> <code>help</code> : Displays help menu <br/> <code>info</code> : Finds info about target, including OS, node, and processor <br/> <code>list</code> : Lists connected machines <br/> <code>python</code> : Opens a Python shell <br/>
If using the BASh/nc method, select 3. From here, it is simply a blind BASh shell. The listener will have had to run the listener before you connect. You can give the file with email, FTP, USB, etc. should work. If you can't send the file, you can put it in a
ZIPfile.
Download and Install <a id="dli">
<hr>1. Download <a id="dl">
Firstly, on any OS, you would navigate to https://github.com/keeganjk/urchin. Once on this page, click the button that says "Clone or Download" and then "Download as ZIP". <br />
<br /> If you are on Unix (Linux, macOS, or BSD), you can type <code>git clone https://github.com/keeganjk/urchin</code> into the terminal to clone this repository and then <code>mv</code> into the directory. If you do this, skip to step 3.
<hr>2. Extract files <a id="extract">
Nextly, extract the ZIP file and then move into the
urchinfolder.
3. Download and install
Python 2if not already installed <a id="dlipy">Navigate to Python Downloads and download
Python 2for your OS.
<br /> If you are on Unix (Linux, macOS, or BSD), you can type <code>git clone https://github.com/keeganjk/urchin</code> into the terminal to
clone this repository and then <code>mv</code> into the directory. If you do this, skip to step 3.