Saturday, April 12, 2008

Howto: Crack Rar, 7z, and zip files with RarCrack in Ubuntu Linux

Ever run into the problem where you created a password protected zip/rar file and you forgot the password or accidentally deleted it? Or just dont know the password at all? Well I have come across a nice solution for cracking zip/rar files. Its called rarcrack, If you forget your password for compressed archive (rar, 7z, zip), this program is the solution.
This program uses bruteforce algorithm to find correct password. You can specify which characters will be used in password generations.


Download RarCrack
wget http://superb-east.dl.sourceforge.net/sourceforge/rarcrack/rarcrack-0.2.tar.bz2
Install RarCrack
tar xvjf rarcrack-0.2.tar.bz2
cd rarcrack-0.2
sudo apt-get install libxml2-dev
make ; sudo make install
Using RarCrack:

rarcrack your_encrypted_archive.ext [--threads thread_num] [--type rar|zip|7z]
Everything in [] are optional, rarcrack default crack two threads and autodetect the archive type. If the detection wrong you can specify the correct file type with the type parameter. RarCrack currently crack maximum in 12 threads.

After the cracking started RarCrack will print the current status of cracking and save it's to a status file. If you want more specific password character set, you need to run RarCrack to create the XML status file (3 sec).

There will be a sample XML file, and you see there is a character set. If you want, you can modify this file and when you start RarCrack again the program will be use new variables.
Warning: Take care when you changing this file, make sure the current password don't have characters outside the abc[character set]!

Know of any other rar/zip/7z cracking tools worth mentioning?


More information on rarcrack can be found here

9 comments:

  1. wow, excellent post! I've been searching hi and low for a rar cracker. I'll be trying this the next time I run into one of those pests! Many thanks!

    ReplyDelete
  2. Official webpage:

    http://rarcrack.sourceforge.net/

    ReplyDelete
  3. It looks like lifehacker.com gave me some props for this here:
    http://lifehacker.com/380365/rarcrack-opens-protected-archives-without-passwords
    Thanks!

    ReplyDelete
  4. For some reason whenever I get to the compilation step, I get all sorts of errors. Do I not have the correct libraries?

    ReplyDelete
  5. In ubuntu you need to have the libxml2-dev package installed as well. You won't get any errors if that's installed as a dependency.

    Usually if make gives you an error in ubuntu, it's because the source package of a dependency is not installed. look at the files mentioned in the error for clues. In the case of rarcrack it said something about libxml/something.h which is obviously a c++ header file for libxml. When you check synaptic it says that libxml2 is already installed so when I tried installing libxml2-dev and recompiling it worked. Furthermore the README says it needs libxml2, but when compiling that means you need the source code files of the libxml2 which in ubuntu are the libxml2-dev packages

    ReplyDelete
  6. Help! I really appreciate the posts so far but I'm stuck. Any ideas why I am getting this? I do have the correct path and file name. Rarcrack worked on the test files also. Thanks...

    ERROR: The specified file (boo.zip) is not exists or you don't have a right permissions!

    ReplyDelete
  7. do sudo chown youruser:youruser boo.zip and then sudo chmod 755 boo.zip to fix the permissions

    ReplyDelete
  8. if that doesnt work try fcrackzip, sudo apt-get install fcrackzip
    note: its just for zip files not just rar, here is some info from the repo:
    password cracker for zip archives
    fcrackzip is a fast password cracker partly written in assembler.
    It is able to crack password protected zip files with brute
    force or dictionary based attacks, optionally testing with
    unzip its results.

    It can also crack cpmask'ed images.

    Homepage: http://www.goof.com/pcg/marc/fcrackzip.html

    ReplyDelete