illsk1lls / ZipRipper

A CMD script to crack password protected ZIP, RAR, 7z and PDF files, using JohnTheRipper.
171 stars 20 forks source link

"File is not password protected". #2

Closed Bonaf1de closed 3 months ago

Bonaf1de commented 3 months ago

Tried crack a zip-file but getting the message that the file is not password protected?

Perhaps I am understanding the functionality wrong? I got a zip-file that I can open but the files inside are protected via a password.

illsk1lls commented 3 months ago

Navigate to> %ProgramData%\JtR\run

then type zip2john "C:\FullPathToZip\File.zip" and see if it generates a hash, or gives an error message

(luckily the script leaves the temp folders in place when an "unencrypted" file is targeted, for possible debugging)

Would you happen to know how the zip was created?

Bonaf1de commented 3 months ago

Thanks for the reaction!

Error: "Did not find a Central Directory File Header at expected file offset 193582421"

The file was an autoplay executable that I renamed to .zip. I can then open the file (without a prompt for a password) and see the file structure.

illsk1lls commented 3 months ago

Unfortunately, zip2john, the tool used to create a hash for zip files, does not currently support sfx exe archives. I updated ZipRipper to reflect this.

I know renaming the file to zip will allow some compression tools to view the filenames etc, but it does have to be a real zip file for JohnTheRipper to process it.

I believe sfx rar files are supported, and possibly sfx 7z, but I'm not sure of the extent of support for either.

Bonaf1de commented 3 months ago

Doh, too bad. Thanks for helping me!

illsk1lls commented 3 months ago

No problem, I'm going to close the issue since the error wording has been corrected. As a side note, trying to track this issue down helped improve stability for ZIP and RAR file formats. ;) Totally worth it.

Also, as a last ditch attempt, don't forget to try renaming the file to .RAR or .7z to check compatibility before giving up, some SFX versions of these formats ARE compatible