In a lesson of Computer Security our teacher showed us how to find out the password of a zip.
I tried his steps at home but now I'm stuck:
- Created 2 zip with same file:
plain_zip.zipwithout password andencrypted_zip.zipwith a 4 characters psw:1234 - Create another zip with another file:
plain_zip_2.zipandencrypted_zip_2.zip. - Show through terminal his header (I don't remember the command line) and see that both:
plain_*.zipandencrypted_*.ziphas similar lines - Through a
XOR operationbetween encrypted and plain zip find out the password. (He told us that's possible only if the password is 4 characters)
Now someone can tell me if these steps are correct? And moreover, how can see the header of a file? (I tried with: head -n 1 plain_zip.zip without success)