Summary: Generate reverse shell one-liners for various languages.

Generating Reverse Shells

The revshell command is a powerful utility that generates reverse shell one-liners for various languages. It helps you quickly create payloads for command execution vulnerabilities.

How It Works

The command generates a clean, copy-pasteable payload string that you can use on a remote target.

Default IP and Port

The command uses the following logic to determine the listener IP and port:

  1. It uses the IP and port if you provide them directly (e.g., revshell php 10.0.0.1 9001).
  2. If not provided, it looks for $profile.lhost and $profile.lport in your global profile.
  3. If $profile.lhost is not set, it will attempt to auto-detect your local IP address.
  4. If $profile.lport is not set, it will default to port 1337.

It is still highly recommended to set these in your global profile for consistency.

Example: Setting up your profile

profile update lhost 192.168.49.128
profile update lport 4444

Core Commands

Generating a Payload

Simply specify the language. The command will use your profile settings.

revshell python3

Specifying IP and Port Manually

You can override the profile settings by providing the IP and port directly.

revshell php 10.10.14.2 9001