Information Security

Crack Juniper Router Passwords, Juniper Password Hash Details

Recently I needed to find out information about a Juniper router password which is stored as a hash in the router configuration. The tricky part is while the password hash is technically a MD5 hash it is modified to make it unique and make it harder to crack. Luckily there is a way to crack the hash using JTR (John The Ripper) though it will require that you also have the username associated to the password as the username is used as part of the salt for the hash. Below there is first information on how to crack Juniper hashes which are the same as Netscreen hashes followed by more information about the hash itself.

Details
Information Security

Crack Cisco IOS Password Hashes, Crack Cisco Type 5 & Type 7 Password Hashes

Cisco devices running the Cisco IOS have three types of ways to display passwords in the device configuration which include Type 0, Type 5, and Type 7. Below we describe all three methods of storing passwords in the Cisco IOS device configuration and how to obtain the password from each method either by simply reading the password, by quickly converting the password from the Cisco defined encryption algorithm, or by cracking MD5 UNIX password hashes.

Details
Code Snippets

Perl Script To Decode Cisco Type 7 Password Hash

I spent a lot of time the other night trying to find a perl script that would decode Cisco type 7 password hashes and many of them did not work properly. At first I thought I was doing something wrong however I am pretty sure that most of the scripts were just broken. Anyhow I finally located the below script on some site and I can’t remember where I found it so I wanted to post it here mostly for reference however if someone else finds it useful then that would be great. Below is the actual script itself followed by an example of using the script.

Details
Technology Insights

Install Prolific USB To Serial Adapter Drivers On OSX Lion, PL-2303 Mac Drivers

Tonight I needed to console into a old Cisco 2900 switch to test a couple password related items and it was the first time that I would be using  USB to Serial adapter on my Macbook. Previously there had been a lot of issues with the adapter I have, which is a PL-2303, and getting the right drivers installed on Windows 7 64-bit so I was thinking there might not even be drivers available for OSX Lion. After a little research I cam across an article that purehate had written on QD however after following the instructions in the article the USB to Serial adapter still was not working. Below is information on installing newer drivers that will work on OSX Lion.

Details
Code Snippets

Bash Script That Deletes Directories Older Than X Days If Y Number Of Directories Exist

Earlier tonight I created a little script that will run in cron on a Linux server. The script counts the number of directories and files in a specific directory and if the count is above Y then it deletes directories and files older than X number of days. In the example script below the number of items (directories and files) that have to be located in the directory before the script to delete files older than a specific date is 10. If there are ten items then the script will delete items older than 90 days. Below the script is the entry made in a specific users cron on the Linux server.

Details