Ciscopack
This is the IOS binary image packing and unpacking program capable of calculating a correct checksum for these images. Cisco is using it's own modified version of the ZIP archivator, and if you don't have it, simply supplement the unpacked image body with an empty bit (0xff) in your favourite hex editor, if the image length is a fraction after packing with ZIP (see the length in the tool output in brackets before "words"). Then use ciscopack.pl to repack the image and the correct checksum would be calculated. Please read the --help output for the options available.
Requirements:
Perl
Installation:
tar -zxvf ciscopack.tar.gz Available from
here.
Execution: C:\ciscopack>perl ciscopack.pl ciscopack.pl, , V 0.1 This program was originally published for the book "Hacking Exposed: Cisco Networks" Authors Janis Vizulis, Arhont Ltd. (License GPL-2 ) Please send bugs and comments to info[dot]arhont.com
usage: ciscopack.pl [--unpack=imagename ]
Options: --upack Upack cisco IOS <mz> image --pack Pack new imagename --head Head (Self extractor) to pack --body Body (IOS body) to pack --readheader Read the file header --help This message Example Syntax: ./ciscopack.pl --unpack c2600-ik9o3s3-mz.123-6.bin ./ciscopack.pl --pack c2600-ik9o3s3-mz.123-6.bin.new --head c2600-ik9o3s3-mz.123 -6.bin.head --body C2600-IK.BIN
|