Thursday, August 4, 2016

Verify Cisco IOS against MD5 / SHA hash

I'm not sure if this is exactly a problem:

2911-2 uptime is 2 years, 42 weeks, 3 days, 21 hours, 7 minutes

but it seems sensible to update IOS once every few years (yes I am joking, a actual maintenance cycle of six monthly or whenever there's a critical security patch) just for the many security patches that will have occurred.  Now as this box is a long way from me and I don't have the time or money to travel to it I wanted to actual verify the bits I'd installed on the flash were good.  

To verify Cisco IOS image is valid against it's internal SHA hash:

2911-2#verify flash0:/c2900-universalk9-mz.SPA.154-3.M4.bin
Starting image verification
Hash Computation:    100% Done!
Computed Hash   SHA2: 4363F1CFF3EF05BB32E48BB49C9E03B3
                      5D7C9D91F351C095E94E82267DCC5719
                      7C5D1CC1669184B20A37CF9DD710806B
                      7388298DB7DD5B18581330D3F388B77A
                     
Embedded Hash   SHA2: 4363F1CFF3EF05BB32E48BB49C9E03B3
                      5D7C9D91F351C095E94E82267DCC5719
                      7C5D1CC1669184B20A37CF9DD710806B
                      7388298DB7DD5B18581330D3F388B77A
                     
CCO Hash        MD5 : 9F652984B1DBB1146AF25DCD5F6F5020

Digital signature successfully verified in file flash0:/c2900-universalk9-mz.SPA.154-3.M4.bin


verify /md5 (flash0:/c2900-universalk9-mz.SPA.154-3.M4.bin) = 9f652984b1dbb1146af25dcd5f6f5020



In both cases reassuringly the same, which made me feel better about scheduling a reboot and not waiting up for it to happen at 2:00 AM.

No comments:

Post a Comment