Exploitation Tools

Penelope – A Versatile Shell Handler For Exploiting RCE Vulnerabilities

Penelope is a shell handler designed to be easy to use and intended to replace netcat when exploiting RCE vulnerabilities. It is compatible with Linux and macOS and requires Python 3.6 or higher.

It is a standalone script that does not require any installation or external dependencies, and it is intended to remain this way.

Among the main features are:

  • Auto-upgrade shells to PTY (realtime resize included)
  • Logging interaction with the targets
  • Download files/folders from targets
  • Upload local/remote files/folders to targets
  • Run scripts on targets and get output on a local file in real time.
  • Spawn shells on multiple tabs and/or hosts
  • Maintain X amount of active shells per host no matter what
  • Multiple sessions
  • Multiple listeners
  • Serve files/folders via HTTP (-s switch)
  • Can be imported by python3 exploits and get shell on the same terminal (see Extras)

Penelope can work in conjunction with metasploit exploits by disabling the default handler with set DisablePayloadHandler True

One useful feature regarding Windows shells is that they can be automatically upgraded to meterpreter shells by running the “meterpreter” module.

Usage

Sample Typical Usage

./penelope.py                   # Listening for reverse shells on 0.0.0.0:4444
./penelope.py -a                # Listening for reverse shells on 0.0.0.0:4444 and show reverse shell payloads based on the current Listeners
./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 1111 2222 3333    # Listening for reverse shells on 0.0.0.0:1111, 0.0.0.0:2222, 0.0.0.0:3333
./penelope.py -c target 3333    # Connect to a bind shell on target:3333

Demonstrating Random Usage

As shown in the below video, within only a few seconds we have easily:

  1. A fully functional auto-resizable PTY shell while logging every interaction with the target
  2. Execute the lastest version of Linpeas on the target without touching the disk and get the output on a local file in realtime
  3. One more PTY shell in another tab
  4. Uploaded the latest versions of LinPEAS and linux-smart-enumeration
  5. Uploaded a local folder with custom scripts
  6. Uploaded an exploit-db exploit directly from URL
  7. Downloaded and opened locally a remote file
  8. Downloaded the remote /etc directory
  9. For every shell that may be killed for some reason, automatically a new one is spawned. This gives us a kind of persistence with the target

For more information click here.

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Cloudkicker – Implementing Basic Authentication ith .htaccess And htpasswd

There are a number of excellent tutorials. I recommend this one: Basically, you are going…

3 seconds ago

Pwnlook – A Deep Dive Into Outlook Email Exploitation

Pwnlook is an offensive postexploitation tool that will give you complete control over the Outlook…

5 mins ago

EDRenum-BOF : Compiling Insights On Endpoint Detection And Response

In the evolving landscape of cybersecurity, understanding and mitigating threats through advanced tools is paramount.…

10 mins ago

Vulnhuntr – Unleashing LLMs For Advanced Security Vulnerability Detection In Codebases

Vulnhuntr leverages the power of LLMs to automatically create and analyze entire code call chains…

1 day ago

LsassReflectDumping – A Deep Dive Into Secure Credential Extraction Techniques

This tool leverages the Process Forking technique using the RtlCreateProcessReflection API to clone the lsass.exe…

4 days ago

CVE-2024-30090 : LPE Proof Of Concept Detailed

In the evolving landscape of cybersecurity, understanding the mechanisms behind vulnerabilities is crucial for both…

4 days ago