zerodumb@hacking-journal:~/tools$

Tools, README

· 4 min read
enumerationreconlabsexploitspentestingscriptingbashpython

Tools Directory

This directory contains various security and penetration testing tools.

Scripts

decrypt_roundcube.py

A Python script for decrypting passwords stored in Roundcube webmail session data using DES3 encryption.

Features

  • Multiple Decryption Methods: Tests both ECB and CBC modes with different padding strategies
  • Common Key Testing: Automatically tests common Roundcube DES key variations
  • Flexible Input: Accepts encrypted passwords and DES keys via command line arguments
  • Comprehensive Analysis: Provides detailed analysis of decrypted data
  • Error Handling: Graceful handling of missing dependencies and invalid inputs

Installation

# Install required dependency
pip install pycryptodome

Usage

# Basic usage with default example
python decrypt_roundcube.py

# With custom encrypted password
python decrypt_roundcube.py "L7Rv00A8TuwJAr67kITxxcSgnIk25Am/"

# With custom encrypted password and DES key
python decrypt_roundcube.py "L7Rv00A8TuwJAr67kITxxcSgnIk25Am/" "rcmail-!24ByteDESkey*Str"

# Using named arguments
python decrypt_roundcube.py --encrypted "L7Rv00A8TuwJAr67kITxxcSgnIk25Am/" --key "rcmail-!24ByteDESkey*Str"

# Verbose output to see all attempts
python decrypt_roundcube.py --verbose

Command Line Options

  • encrypted_password: Base64 encoded encrypted password (default: example password)
  • des_key: DES3 key (default: common Roundcube key)
  • --encrypted, -e: Alternative way to specify encrypted password
  • --key, -k: Alternative way to specify DES key
  • --verbose, -v: Show verbose output including failed attempts
  • --help, -h: Show help message

Example Output

=== Roundcube Password Decryption Tool ===

Encrypted password: L7Rv00A8TuwJAr67kITxxcSgnIk25Am/
DES key: rcmail-!24ByteDESkey*Str

=== SUCCESSFUL DECRYPTIONS ===
Password: 28(6tJ5595mO8DmwGeD
Method: DES3 CBC mode with null IV
Analysis: PKCS#5 padding removed - UTF-8 printable text

Debug information:
Decoded data length: 24 bytes
Decoded data (hex): 2fb46fd3403c4eec0902bebb9084f1c5c4a09c8936e409bf
Data length is valid for DES3 (24 bytes = 3 blocks)

How It Works

  1. Base64 Decoding: Decodes the encrypted password from base64 format
  2. DES3 Decryption: Uses DES3 encryption with the provided key
  3. Multiple Modes: Tests both ECB and CBC encryption modes
  4. Padding Removal: Attempts various padding removal strategies
  5. Data Analysis: Analyzes decrypted data to determine if it’s valid
  6. Result Validation: Checks if results are printable and meaningful

Common Use Cases

  • Session Analysis: Decrypt passwords from Roundcube session dumps
  • Forensics: Extract credentials from captured session data
  • Testing: Verify encryption/decryption functionality
  • Research: Understand Roundcube’s password storage mechanism

Troubleshooting

Missing Dependencies

# Install pycryptodome
pip install pycryptodome

No Results Found

  • Check if the encrypted password format is correct
  • Verify the DES key is correct for your Roundcube installation
  • Try different encryption modes or padding strategies
  • Ensure the password isn’t encrypted with additional layers

Invalid Base64

  • Verify the encrypted password is properly base64 encoded
  • Check for any extra characters or formatting issues

Other Scripts

Additional scripts in this directory include:

  • roundcube-reverse-shell.sh: Manual Roundcube reverse shell exploitation
  • roundcube-reverse-shell-auto.sh: Automated Roundcube reverse shell exploitation
  • roundcube-reverse-shell-semi-auto.sh: Semi-automated Roundcube reverse shell exploitation
  • roundcube-reverse-shell-guide.md: Documentation for reverse shell scripts
  • roundcube-reverse-shell-auto-guide.md: Documentation for automated reverse shell script

Security Note

These tools are intended for authorized security testing and research purposes only. Always ensure you have proper authorization before using these tools against any systems.

Question loudly so others can learn quietly. Stay curious. Stay loud.

Don’t Be A Skid -Zero

Buy Me A Coffee @iamnotaskid