[Day 12] 2. Cracking ZIP file password using fcrackzip
1. Prepare Your Environment
-
Install
:fcrackzip-
is pre-installed on most Kali Linux distributions. If not, install it:
fcrackzipbashsudo apt update sudo apt install fcrackzip
-
-
Create a Password-Protected ZIP File (Optional):
-
If you want to test on your own ZIP file:
bashzip -e test.zip testfile.txt -
You will be prompted to set a password for the ZIP file.
-
2. Locate or Create a Wordlist
-
Use an Existing Wordlist:
-
Kali Linux includes popular wordlists, like
:rockyou.txtbash/usr/share/wordlists/rockyou.txtIf it’s compressed, decompress it:
bashgunzip /usr/share/wordlists/rockyou.txt.gz
-
-
Create a Custom Wordlist (Optional):
-
Generate a small wordlist for testing:
bashcrunch 4 4 0123456789 -o custom_wordlist.txt
-
3. Brute Force Attack on ZIP File
-
Run
with the wordlist:fcrackzipbashfcrackzip -u -D -p /path/to/wordlist.txt /path/to/zipfile.zip- : Test unzipping the file to verify the password.
-u - : Use a dictionary attack.
-D - : Specify the path to the wordlist.
-p
-
Example Command:
bashfcrackzip -u -D -p /usr/share/wordlists/rockyou.txt test.zip
You can use -v
4. Analyze the Results
-
If the password is cracked, it will appear in the output:
PASSWORD FOUND!!!!: pw == <password>
Tips:
- Optimize Wordlists: Use relevant wordlists based on the target ZIP file.
- Understand ZIP Encryption: works on files encrypted with legacy ZIP algorithms. It may not work on modern ZIP formats (e.g., AES-encrypted ZIPs).
fcrackzip - Testing Environment: Always use these techniques on files you own or have explicit permission to test.
Read Next
[Day 12] 3. DoS using msfconsole
#### **1. Prepare Your Environment** 1. **Target Setup:** - Identify the target machine's IP address: ```bash...
[Day 12] 4. Nessus
### **What is Nessus?** Nessus is a vulnerability scanner developed by Tenable, available in multiple editions: 1. **Nessus Essentials:** Free v...