Skip to main content

Simple reverse shell listener aimed at professionnals who want an almost built-in interactivity and systematic logging.

Project description

irevshell logo

Pypi version Python versions License

irevshell demo


💻 irevshell is a simple reverse shell listener aimed at professionals who want an almost built-in interactivity and systematic logging.

Did you ever press CTRL+C and accidentally killed your reverse shell? Tired of having to restart your listener when you lose connection? Someone is asking you precisely at what time you ran rm -rf --no-preserve-root on their server? You never remember the command to restore your terminal settings after fucking it up with stty raw -echo?

If your answer to any of these questions is yes, welcome.

Installation

pip install irevshell

Usage

Listen on specific interface and port: irevshell -i 192.168.1.10 -p 1234

Connect to bind shell: irevshell --ip 192.168.1.20 --port 1234 --bind

Create a listener compatible with ConPtyShell: irevshell --conpty

Important keybinds

  • CTRL+X switch between dumb and interactive mode, useful after pty spawn (shell upgrade).
  • CTRL+P in case you forgot to enable ConPty mode, might create artifacts if you didn't specify terminal size with the client.

Features

Almost built-in interactivity

If the remote connection displays a prompt, interactive mode is enabled. It allows for autocompletion, handling of CTRL+C, CTRL+Z SIGINT etc. To make sure full interactivity is enabled (sudo commands, file editing with vi etc.), a tty is mandatory. There are tons of ways to ensure that but this command can help you spawn one: python3 -c 'import pty; pty.spawn("/bin/bash")' || python -c 'import pty; pty.spawn("/bin/bash")' || script -qc /bin/bash /dev/null.

irevshell autocompletion

To put a cherry on top, with the correct parameter (--conpty or -c) you have ConPtyShell support for interactive reverse shells on Windows.

Systematic logging

By default, every single command made in the reverse shell is logged to a file. The filename and path can be customize as well as the level of debug log. Error traces are verbose in case something goes really wrong.

irevshell logfile

Automatic restart, graceful exit and restoration

Exiting a shell or losing the connection will automatically restart the listener. If you want to stop listening to incoming connection, once you have exited any ongoing shell, you can gracefully exit the program by pressing CTRL+C. This will restore terminal settings that were changed.

irevshell automatic restart

Credits

Inspired by this tool from Darren Martyn.
Upgrade command taken from IppSec.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irevshell-0.1.2.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irevshell-0.1.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file irevshell-0.1.2.tar.gz.

File metadata

  • Download URL: irevshell-0.1.2.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for irevshell-0.1.2.tar.gz
Algorithm Hash digest
SHA256 254edc14124b0776065510c7efa8d91d4b1e8589f765fdebcfd9367700211242
MD5 cf782a1c7d11c56199e92a4d993e0e58
BLAKE2b-256 b2f462af593ad6be93fc4229fc2e320af590c4c47d15be3305aca0102577f29b

See more details on using hashes here.

Provenance

The following attestation bundles were made for irevshell-0.1.2.tar.gz:

Publisher: python-publish.yml on Xenorf/irevshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file irevshell-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: irevshell-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for irevshell-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d467409e55a4968f53cc2433fa00ea0875357ffbe2b4ce8b26c11edd6cb82647
MD5 066f5d2d5f18057e36f7263510e83000
BLAKE2b-256 98a71af24b8c606194b6d85e63d20521f8a1f1a05c834ba428902c932c771cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for irevshell-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on Xenorf/irevshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page