Saturday, May 16, 2015

Bash Script and References to Cracking 7z, zip or rar Password Protected Files

I found an old bash script that I wrote to conduct a dictionary attack against a 7z file.  Thought I would post it and then a few references of better ways of cracking zip passwords:

# The script will conduct a dictionary attack on a 7z file.  It will delete the temporary file that it creates when the file fails to extract.
while read line
     7z x file.7z -p $line &> /dev/null
     fileSize = `stat -c %s file.7z
     if [ $fileSize -lt 5000 ]; then
          rm -f file.txt
          exit 0

done < dictionary.file

A great blog post about using John the Ripper to crack Zip and rar files is located here.

Another tool that you can use is fcrackzip.  Here are a couple of references:

No comments:

Post a Comment

Powershell - Gather Mapped Drives from a List of Computer Names

I created the following Powershell script to gather remotely the mapped drives that users had in their profiles.  I had to create the script...