HomeLinuxPenelope - Advanced shell handler

Penelope – Advanced shell handler

Penelope is an advanced shell driver whose main purpose is to replace Netcat as the shell receiver when exploiting RCE vulnerabilities. It works on Linux and macOS and the only requirement is Python3. This is a scenario with no third-party dependencies, and hopefully, it will stay that way. …

Main Features

  1. Auto-upgrade shells to PTY (auto-resize included)

  2. Logging interaction with the targets

  3. Download files from targets

  4. Upload files to targets

  5. Upload preset scripts to targets

  6. Spawn backup shells

  7. Multiple sessions

  8. Multiple listeners

How to download and install the Penelope tool?

Step 1:

First, we need to download the Penelope tool so run the following command on your terminal.

					git clone https://github.com/brightio/penelope.git
Penelope – Advanced shell handler

Step 2:

Now change the directory to Penelope so type the below command in your terminal.

					cd penelope
Penelope – Advanced shell handler

Step 3:

Now permit to read write and execute of penelope.py python file so execute the below command 

					chmod +x penelope.py
Penelope – Advanced shell handler

Step 4:

After that execute the penelope.py python file to handle the shell’s

					python3 penelope.py
Penelope – Advanced shell handler

Sample Basic usage

					penelope.py                   # Listening for reverse shells on
penelope.py 5555              # Listening for reverse shells on
penelope.py 5555 -i eth0      # Listening for reverse shells on eth0:5555

penelope.py -c target 3333    # Connect to a bind shell on target:3333


Menu Options

					use [sessionID|none]
  Select a session

sessions [sessionID]
  Show active sessions. When followed by <sessionID>, interact with that

interact [sessionID]
  Interact with a session

kill [sessionID|all]
  Kill a session

download <glob>...
  Download files and folders from the target

open <glob>...
  Download files and folders from the target and open them locally

upload <glob|URL>...
  Upload files and folders to the target. If URL is specified then it is
  downloaded locally and then uploaded to the target

recon [sessionID]
  Upload preset reconnaissance scripts to the target

spawn [sessionID]
  Spawn a new session. Whether it will be reverse or bind, depends on
  the current session.

upgrade [sessionID]
  Upgrade the session's shell to "PTY". If it fails attempts to upgrade
  it to "Advanced". If this fail too, then falls back to "Basic" shell.

dir|. [sessionID]
  Open the session's local folder. If no session is selected, opens the
  base folder.

listeners [<add|stop> <Interface|IP> <Port>]
  Add or stop a Listener. When invoked without parameters, it shows the
  active Listeners.

connect <Host> <Port>
  Connect to a bind shell

  Show sample commands to run on the targets to get reverse shell, based
  on the registered listeners

  Reset the local terminal

  Show menu history

help [command]
  Show menu help or help about specific command

  Open debug console

SET [<param> <value>]
  Set options. When invoked without parameters it shows current options

  Exit penelope

Limitations of Penelope

1. Emojis don’t appear on mate-terminal (parrot OS)

2. Download command: path links are not clickable on the terminal (Kali Linux)

3. The menu commands and PTY authorize operate on the same socket. This could be an advantage but it has a side effect that for example if nano is open on target, then detaching the session and attempt a download, Penelope copes with that by sending Ctrl-Z -> Ctrl-E -> Ctrl-U. Then must run FG to get the process back. Maybe consider spawning an extra socket for controlling the session in the future. However, if before executing a menu command, the target’s terminal is left in a clear state, then there is no problem.


Leave A Reply

Please enter your comment!
Please enter your name here

Most Popular