
CVE-2008-5161 OpenSSH 4.7p1 Audit Helper Automates version checking and credential auditing of legacy OpenSSH 4.7p1 (Debian-8ubuntu1) targets by driving Metasploit’s auxiliary/scanner/ssh/ssh_login module from Python via pwntools.
Automates version checking and credential auditing of legacy OpenSSH 4.7p1 (Debian-8ubuntu1) targets by driving Metasploit’s auxiliary/scanner/ssh/ssh_login module from Python via pwntools.
This project is intended for research and authorized security testing only.
____ _____ _____ _ _
/ __ \ / ____/ ____| | | |
| | | |____ ___ _ __ | (___| (___ | |__| |
| | | | '_ \ / _ \ '_ \ \___ \\___ \| __ |
| |__| | |_) | __/ | | |____) |___) | | | |
\____/| .__/ \___|_| |_|_____/_____/|_| |_|
| |
|_|
OpenSSH_4.7p1 Debian-8ubuntu1.msfconsole quietly and runs:
auxiliary/scanner/ssh/ssh_loginRHOSTS, userpass_file, stop_on_success, threads, and verboseImportant note about CVE-2008-5161:
ssh_login module. Treat it as a helper/automation layer, not a standalone CVE exploit.msfconsole in PATH)pip install pwntools)user:pass file. The script references:
/usr/share/wordlists/metasploit/piata_ssh_userpass.txt
Adjust this path to a wordlist available on your system.Install Metasploit Framework
sudo apt install metasploit-frameworkmsfconsole -vInstall Python dependencies
python3 -m pip install --upgrade pippython3 -m pip install pwntoolsGet or create a user:password list
user1:password1Place the script (e.g., exploit_ssh.py) in your project directory.
Heads-up:
random.choice(...) to print the banner but doesn’t import random. Add import random at the top if you see NameError: name 'random' is not defined.python3 exploit_ssh.pyssh_login.Environment example:
SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1Note:
Debian-8ubuntu1.2) will not match. See “Customization” below to relax the check.Port:
ExploitSSH(ip, port=22).Wordlist path:
set userpass_file /path/to/your/userpass.txtThreads and behavior:
set threads 12 and set stop_on_success true can be tuned for your lab setup.Banner check:
io.recvuntil(b"SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1")"OpenSSH_4.7p1"recvuntil(...) with:
banner = io.recvline(timeout=5) and then search for substrings like "OpenSSH_4.7p1".msfconsole not found
msfconsole is in PATH.No module named pwn
python3 -m pip install pwntoolsScript hangs on banner check
recvuntil(...) may block if the banner differs.recvline(timeout=5) and check with substring logic.Wordlist file not found
userpass_file setting.Metasploit session handling
msf.interactive(), so lines after that may not execute until the session ends. If you prefer fully-automated session handling, remove interactive mode and parse sessions programmatically.ExploitSSH classargparse) instead of interactive inputAdd a LICENSE file to your repository. Common choices:
This project is for educational and authorized security testing only. The authors and contributors disclaim all liability for misuse or damage.