Crack Password Protected zip, rar, 7z, and pdf files in Linux

Posted on May 12th, 2008 in Cracking by admin


Crack Password Protected Zip Files with fcrackzip

Why, the hell, another zip cracker? fcrackzip isnt just any other file cracker, it is quiet old (born in 1998) and I believe the last version was from 2004. However it is simple mentioned for being the first open-sourced zip-cracker out there.

fcrackzip searches each zipfile given for encrypted files and tries to guess the password. All files must be encrypted with the same password, the more files you provide, the better.

FCrackZip is The Ultimate 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
How to Install:

sudo apt-get install fcrackzip

If not in your distro’s repo’s:

You can always download the latest version here, nowhere else. Source:

Linux binary (glibc2.1+pgcc+pentiumpro):

Examples:
fcrackzip -c a -p aaaaaa sample.zip

checks the encrypted files in sample.zip for all lowercase 6 character passwords (aaaaaa … abaaba … ghfgrg … zzzzzz).

fcrackzip --method cpmask --charset A --init AAAA test.ppm

checks the obscured image test.ppm for all four character passwords. -TP fcrackzip -D -p passwords.txt sample.zip check for every password listed in the file passwords.txt.

Source

Crack Rar, 7z, and zip files with 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 wich characters will be used in password generations.

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 (or on openSuse sudo zypper in 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]!

More information on rarcrack can be found here

Source

Source #2


Crack Password Protected Pdf Files with Linux

Dont you hate when you run into a locked down pdf on the web? I search google all the time for title filetype:pdf and some are locked, this is the solution! PDFCrack is a GNU/Linux (other POSIX-compatible systems should work too) tool for recovering passwords and content from PDF-files. It is small, command line driven without external dependencies. The application is Free Software licensed under the GPL.

Features

* Supports the standard security handler (revision 2 and 3) on all known PDF-versions
* Supports cracking both owner and userpasswords
* Both wordlists and bruteforcing the password is supported
* Simple permutations (currently only trying first character as Upper Case)
* Save/Load a running job
* Simple benchmarking
* Optimised search for owner-password when user-password is known

Install pdfcrack

sudo aptitude install pdfcrack

If not in your distro’s repo’s:

http://sourceforge.net/project/showfiles.php?group_id=168561&package_id=191906&release_id=596146


pdfcrack Syntax

pdfcrack -f filename [options]

pdfcrack Options

-b, - -bench - Perform benchmark and exit.
-c, - -charset=STRING - Use the characters in STRING as charset.
-m, - -maxpw=INTEGER - Stop when reaching INTEGER as password length.
-n, - -minpw=INTEGER - Skip trying passwords shorter than INTEGER.
-l, - -loadState=FILE - Continue from the state saved in FILENAME.
-o, - -owner - Work with the ownerpassword.
-p, –password=STRING - Uses STRING as userpassword to speed up breaking ownerpassword (implies -o).
-q, - -quiet - Run quietly.
-s, - -permutate - Try permutating the passwords (currently only supports switching
first character to uppercase).
-u, - -user - Work with the userpassword (default).
-v, - -version - Print version and exit.
-w, - -wordlist=FILE - Use FILE as source of passwords to try.

pdfcrack Example

pdfcrack mylocked.pdf

Source

11 Responses to 'Crack Password Protected zip, rar, 7z, and pdf files in Linux'

Subscribe to comments with RSS or TrackBack to 'Crack Password Protected zip, rar, 7z, and pdf files in Linux'.

  1. fsdaily.com said,

    on May 12th, 2008 at 8:53 am

    Story added…

    This story has been submitted to fsdaily.com! If you think this story should be read by the free software community, come vote it up and discuss it here:

    http://www.fsdaily.com/EndUser/Crack_Password_Protected_zip_rar_7z_and_pdf_files_in_Linux...


  2. on May 13th, 2008 at 10:27 am

    [...] Read more at Tux Training [...]

  3. Adam Kosmin said,

    on May 13th, 2008 at 11:25 am

    I think you mean to say “Free Software” rather than “Open Source”. As you surely know, the most important job of language is to convey ideas. Therefore, it is our responsibility to choose our words carefully. When we choose to use the term “Open Source” over “Free Software”, we’re promoting the values of that community over the values of the Free Software Community. Basically, we’re pitching a distributed development model instead of freedom.

    In closing, please use the term “Free Software” instead. More information here:

    http://www.gnu.org/philosophy/open-source-misses-the-point.html

  4. SnowCrashv5 said,

    on May 13th, 2008 at 12:23 pm

    No offense meant, but I don’t like to get up in the politically correct semantics of the FOSS community. I might prefer the FSF/GPL direction of software, but it’s not a religion to me.

    Thanks for the link though :-)

  5. Adam Kosmin said,

    on May 13th, 2008 at 3:59 pm

    That’s great but nobody is talking about religion. We’re talking about language and its effect of communicating ideas and concepts. Do you value your freedom? Do you value my freedom? If so, then let’s help educate our listeners by chosing our words carefully.

  6. SnowCrashv5 said,

    on May 13th, 2008 at 11:12 pm

    I think you misunderstood my comment. I used the term religion, as many FOSS advocates that follow the FSF/Stallman camp can argue points, which I feel have an insignifigant impact to those who already understand the discussion (such as yourself, or myself).

    I agree basically with the link provided. I actually whole heartedly do, but in the “community” I rarely if ever see anyone use the terminology “open source” and not mean either exactly or darned close what Stallman means by Free Software. People tend to use them interchangeably, while still intending the focus to be on the “free” as in Freedom. Culture has defined how we use these words, as much as the creators of the terms intended them to be used.

    Another good example of this is the word “yuppie”. The word was originally created to mean someone who was a rising young professional, culture has taken it differently and twisted it into a derogatory term to insult a certain dress style or consumerist demographic.

    It’s when you have company’s such as Microsoft promoting “open source” software, with intentional half-effort “open” licenses, that the terminology gets easily confused on an enterprise level or within industry.

    I was merely stating it’s “semantics” nine times out of ten, the intent is the same, regardless of Stallman’s take on the literal use of words and the impact these meanings can take on.

    It reminds me a bit of getting into the feminism debate and noticing that many will assign gender pro-nouns such as “he” or “she” when talking about a person, say a scientist, which you may know in name only and because you have a gender association with the job role, but you don’t know the gender, the human mind already assumes what that gender is. Most people make this assumption without even thinking about it.

    This in turn shapes children on a subconscious level to fulfill in many ways, gender roles. I agree who heartedly with the feminist concern in this regard, much like I do Stallman, but I’m not crazy about enforcing it. Most intelligent people, in both examples, follow along just fine and don’t fall victim to it’s trappings.

    I think most people entering in the open source/free software discussion are intelligent enough (most of the times) to understand intent (much like you did).

    That being said, consider the blog editted :)

  7. rock said,

    on May 15th, 2008 at 6:37 pm

    Article is a bit misleading, rar and 7z use strong forms of encryption, if the password is something more complicated than “kitty”, it may tike several lifetimes for these programs to brute force the password on practical home user hardware.

  8. rar file said,

    on May 16th, 2008 at 5:02 am

    [...] not notify you what that password is? No sweat, here’s several ways to unlock password protected comhttp://tuxtraining.com/2008/05/12/crack-password-protected-zip-rar-7z-and-pdf-files-in-linux/Public Advisory: 02.26.08 // iDefense LabsIf the service is sent a malformed rar file, the service [...]


  9. on May 18th, 2008 at 3:14 am

    [...] not notify you what that password is? No sweat, here’s several ways to unlock password protected comhttp://tuxtraining.com/2008/05/12/crack-password-protected-zip-rar-7z-and-pdf-files-in-linux/Open rar file or Extract rar files under Linux or UNIXOpen rar file or Extract rar files under linux [...]

  10. Victor said,

    on May 26th, 2008 at 10:24 pm

    Adam, get over it dude. In the scope of ideas, these two concepts are 99% the same.

  11. Dee said,

    on May 27th, 2008 at 9:47 pm

    Victor, dude, it is misinformed people such as yourself that Adam’s original post is aimed at. If you truly think that the ideas are that similar, then the Microsoft queue forms to the right (please have your credit card ready).

Post a comment