• This repository has been archived on 08/Sep/2021
  • Stars
    star
    246
  • Rank 164,726 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

generate reverse shell from CLI for linux and Windows.

rsh

Python Versions PEP8 Contributors Issues License: GPL v3 Maintenance

rsh in action

Introduction β€’ Usage β€’ Installation β€’ Gallery

rsh is a tool purely written in Python 3 to easily a generate reverse shell command for Linux as well as Windows.

Features

This tools makes it easy for you to quickly generate reverse shell commands supported in both Linux and Windows, in the following languages:

  • bash
    • Bash reverse shell
    • netcat
    • netcat OpenBSD
    • nc.traditional
  • Python
    • IPv4
    • IPv6
  • Ruby
  • Perl
  • PHP
  • Powershell
  • Node.JS
  • TCLSH
  • Awk
  • Java

Usage

usage: rsh [-h] [-sh SH] [-listen] lhost lport

positional arguments:
  lhost       Specify local host ip
  lport       Specify a local port

optional arguments:
  -h, --help  show this help message and exit
  -sh SH      Specify the language to generate the reverse shell
  -listen     Spawn a netcat listener for this shell.

Using rsh is very simple. All you need to do is provide an IP and port and the type of shell that is to be generated:

  • ./rsh 192.168.56.1 4444 -sh bash
  • ./rsh 192.168.56.1 4444 -sh php
  • ./rsh 192.168.56.1 4444 -sh powershell

You can also automatically catch the reverse shell by starting a listener when you are done. This uses netcat and listens on the port you specified for your reverse shell

  • ./rsh 192.168.56.1 4444 -sh powershell -listen

Installation

You need to have Python 3.5 or greater installed to run rsh. Both Linux and Windows are supported. Along with that rsh uses pyfiglet which you can install by running:

pip install -r requirements.txt

Gallery

  • Getting bash command

  • Options

  • Wrong IP πŸ˜„

  • Wrong PORT πŸ˜„

Contribution

  • Report a bug
  • Fix something and open a pull request
  • Add more reverse shells

In any case feel free to open an issue

Credits

All the shell command are taken from pentestmonkey

License

This project is licensed under the GPLv3 License - see the LICENSE file for details

Support

If you'd like you can buy me some coffee:

Buy Me A Coffee

More Repositories

1

liffy

Local file inclusion exploitation tool
Python
766
star
2

gtfo

Search gtfobins and lolbas files from your terminal
Python
455
star
3

slicer

A tool to automate the boring process of APK recon
Python
337
star
4

ctf-writeups

Writeups of Capture The Flag Competitions
Python
122
star
5

vulnhub-writeups

Writeups for Vulnhub's boot2root machines that I've done
SCSS
84
star
6

go-gtfo

gtfo, now with the speed of golang
Go
60
star
7

HackTheBox-writeups

Writeups for all the HTB machines I have done
Shell
58
star
8

takeover

A tool for testing subdomain takeover possibilities at a mass scale.
Go
46
star
9

notes

A miscellany of thoughts.
42
star
10

GSoC-Data

GSoC Data from 2005 to 2018 in JSON format.
Python
35
star
11

lswriteups

CLI tool to get the links of original writeups from ctftime.org
Python
32
star
12

jrnl-web

A web based frontend for jrnl: https://github.com/maebert/jrnl
Python
12
star
13

LiTour

Lichess + Tournaments = LiTour
Python
7
star
14

pgn2gif

Create GIFs from PGNs
Python
6
star
15

GitHub.html

Generate an overview of everything a GitHub user has done.
HTML
4
star
16

mzfr.github.io

My blog
CSS
3
star
17

99Problems

My solution for 99Problems in OCaml
OCaml
2
star
18

Competitive-coding

Some Competitive programming problems that I solved in my Final year.
Python
2
star
19

picoCTF-Data

Jupyter Notebook
1
star
20

Python-Scripts

Some scripts I've written in Python
Python
1
star
21

resume

My LaTeX based resume
TeX
1
star
22

Libot

Lichess + Bot = Libot
Python
1
star
23

cryptopals

My solutions for cryptopals challenges
Python
1
star
24

Latex-templates

Just some random latex template that I had to use over the years.
TeX
1
star
25

year-in-review

Analysis of all my chess games
Jupyter Notebook
1
star