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. …
Auto-upgrade shells to PTY (auto-resize included)
Logging interaction with the targets
Download files from targets
Upload files to targets
Upload preset scripts to targets
Spawn backup shells
How to download and install the Penelope tool?
First, we need to download the Penelope tool so run the following command on your terminal.
git clone https://github.com/brightio/penelope.git
Now change the directory to Penelope so type the below command in your terminal.
Now permit to read write and execute of penelope.py python file so execute the below command
chmod +x penelope.py
After that execute the penelope.py python file to handle the shell’s
Sample Basic usage
penelope.py # Listening for reverse shells on 0.0.0.0:4444 penelope.py 5555 # Listening for reverse shells on 0.0.0.0:5555 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
use [sessionID|none] Select a session sessions [sessionID] Show active sessions. When followed by , interact with that session interact [sessionID] Interact with a session kill [sessionID|all] Kill a session download ... Download files and folders from the target open ... Download files and folders from the target and open them locally upload ... 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 or stop a Listener. When invoked without parameters, it shows the active Listeners. connect Connect to a bind shell hints Show sample commands to run on the targets to get reverse shell, based on the registered listeners reset Reset the local terminal history Show menu history help [command] Show menu help or help about specific command DEBUG Open debug console SET [ ] Set options. When invoked without parameters it shows current options exit|quit|q|Ctrl+D 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.