Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2020, 06:30
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 724
Rept. Given: 35
Rept. Rcvd 48 Times in 30 Posts
Thanks Given: 666
Thanks Rcvd at 1,053 Times in 478 Posts
chants Reputation: 48
Finding password protected files on system

Hi all,

I am wondering if anyone has any prebuilt batch scripts or the like to find in a recursive file search:
all password-protected encrypted rar/zip/7z archives
all password-protected encrypted PDF files

Probably some tricks to roll my own using 7-zips 7z.exe or WinRAR's rar.exe (does not handle 7z/zip files though only RAR files) but it seems challenging as information itself is not display but prompts and such depending if the filenames are encrypted or not (with 7z not zip), etc. As for PDFs I would suspect a special PDF information utility is needed to determine the security setting. Is there any easy option to do this? If I merely had a command line tool which gave the information in an easy to decipher format, rolling a batch script would be simply to do it recursively from any directory.

The only thing I have found is that for zip/7z files the following will work:
Quote:
7z t -p_ archive.7z >nul 2>nul
if errorlevel 1 echo Password exists
For rar/rar4 files the following is the best I could come up with:
Quote:
unrar vt -p_ archive.rar | find "Flags: encrypted" >nul 2>nul
if not errorlevel 1 echo Password exists

Ultimately I want to remove passwords as often years after I download something I cannot figure out what something is or its password. Adobe Acrobat can remove passwords from PDFs and WinRAR can extract and recompress without passwords so the solution to remove passwords is at least reasonably straight forward. Of course the filename could just append -password-... to the filename as an alternative. But its important to do this I have found.

Last edited by chants; 02-28-2020 at 06:53.
Reply With Quote
The Following User Says Thank You to chants For This Useful Post:
niculaita (02-29-2020)
  #2  
Old 02-28-2020, 15:10
DARKER DARKER is offline
VIP
 
Join Date: Jul 2004
Location: Somewhere Over the Rainbow
Posts: 454
Rept. Given: 15
Rept. Rcvd 119 Times in 51 Posts
Thanks Given: 11
Thanks Rcvd at 734 Times in 194 Posts
DARKER Reputation: 100-199 DARKER Reputation: 100-199
If you don't need script and you want do it just one time, you can try these tools that can find protected files:
Code:
https://www.passware.com/encryption-analyzer
https://www.passcape.com/search_protected_documents
Reply With Quote
The Following User Gave Reputation+1 to DARKER For This Useful Post:
chants (02-29-2020)
The Following 3 Users Say Thank You to DARKER For This Useful Post:
chants (02-28-2020), niculaita (02-29-2020), SinaDiR (03-01-2020)
  #3  
Old 02-28-2020, 21:34
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 724
Rept. Given: 35
Rept. Rcvd 48 Times in 30 Posts
Thanks Given: 666
Thanks Rcvd at 1,053 Times in 478 Posts
chants Reputation: 48
Wow that's a much nicer solution. I figured someone would know as this is a key forensic analysis tool. Plus why restrict to few formats when doc, xls, ppt, many things can be encrypted.

Just made life a lot easier
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Armadillo password protected EXE taos General Discussion 7 08-08-2007 13:53


All times are GMT +8. The time now is 23:43.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )