the_open_door
coffee
ESEN
← Back to index

Cisco Type 7 Password Decode

Cisco type 7 password decode instantly recovers passwords marked 7 in a Cisco device's configuration, because they are not a hash but a reversible Vigenère cipher with a known key. They show up under service password-encryption and give a false sense of security.

Why it works. Cisco has several types: 5 (MD5), 8 (PBKDF2) and 9 (scrypt) are real hashes; type 7 is obfuscation, not cryptography. It uses an XOR/Vigenère key published decades ago, so anyone with a 7 08... string reverses it to plaintext with no brute force. Those configs are obtained via SNMP, TFTP, a backup or a config file read from the device itself.

The abuse. You take the type 7 string and decode it with any tool or script.

# typical line in the config:  username admin password 7 08701E1D5D4C5341
# decode offline
git clone https://github.com/theevilbit/ciscot7 && python3 ciscot7.py -d -p 08701E1D5D4C5341
cisco_decrypt 08701E1D5D4C5341                       # binary shipped with Kali
msfconsole -q -x "irb"                               # then in irb: require 'cisco7'; Cisco7.decrypt('08701E...')

Requirements. Have a config with a type 7 password (pulled via SNMP RW, TFTP, backup or file read). If the device uses type 8/9, this doesn't apply and you must crack a real hash.

How to detect it. Decoding is offline and instant, so the signal is in access to the device configs: TFTP downloads, show running-config over SNMP, or reads of network backups. A spike of SNMP RW traffic or TFTP transfers to an unknown host is suspicious.

Defence. Never use type 7: move to type 8/type 9, don't treat service password-encryption as security, restrict SNMP RW and protect backups. It feeds credential hunting and credential reuse; it is a cousin of reversible password storage.

Machines where it's used