4.3 Bruteforcing ZIP Passwords with Python Part 3

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
1 hour 12 minutes
Difficulty
Intermediate
Video Transcription
00:00
Hello and welcome to this ethical hacking tools with by phone video
00:04
In today's quick lesson, we're going to test the zip password. Brute force. Sir, we've coded over the course of the previous two lessons. So if you don't know what this is all about, please go on, watch those two videos to get you back on track.
00:17
Okay, so our little program has been written with the purpose of trying to break into a password protected zip archive.
00:25
For that, you obviously need a password protected zip archive. And you also need a file containing the passwords You want to try against this archive,
00:35
and I have these Resource is ready for you Now accompany this video. There will be an archive dot zip On. Also a past list are t X T file that will allow you to successfully test the program. I then provided the final version of the zip, password, brute force or bite on file in there.
00:54
Please also make sure to look into the guy than resource is document that comes along with the this video for further instructions.
01:03
Now, let me open up a command prompt. If you are in windows, do the same. But if you're in linen is open up a terminal window and I'm going to navigate to the folder word. The archive, the text file with passwords and the Python script are so CD into desktop CD into scripts
01:22
and CD into zip route,
01:25
and I'm going to type dirt to see these files.
01:29
Okay, so the archive the list with the passwords, and we can just do a more past list that t x t to actually read the file in the terminal
01:42
and we can see that there are a bunch of bass words there.
01:46
Okay, um,
01:48
and let's actually see this folder. So I'm gonna type the Explorer
01:53
followed by a dot to actually open a Windows Explorer window in the current directory. And if I open the zip archive to extract the fall, that's inside.
02:08
If I try to extract it over here, I'm prompted for a password. So providing the wrong password and hitting enter
02:16
um, leads to an error and no file being extracted. Now let's go back to the terminal and run our zip of password brute force of python script. So we'll say fine, fine
02:29
zip brew that B Y minus Z the archive
02:32
and minus B the password list. And then we're hitting Enter
02:38
quickly enough. We get a message with the correct password.
02:42
And if we look into the contents of the folder again with the ther command,
02:46
we have the important dot d x d fall extracted
02:52
in windows. Like I said, we can read it in the command prompt with the more command so more important dot t x t
03:00
um, so good job. You have successfully completed this module, and if your linens you'd be using cat the can't command important dot t X t, and that's it. That's how you write and test a simple zip password. Brute force, sir, in python.
03:16
Now you could further develop the stool toe, extend its brute forcing capabilities to other types of archives like dot Brar
03:24
seven zip BZ two and so on. Think about it.
03:30
All right, Before we finish off, let's do a quick knowledge check.
03:36
So, what command prompt command Did we used to opening Windows Explorer window in the current folder
03:43
was it explorer dot
03:46
open dot
03:47
or execute? Dodd.
03:50
So this is very simple. If you type open or execute in a command prompt.
03:55
You'll get a, um if we type open,
04:00
we execute here, we get a command not recognized.
04:05
So it's not B or C. And as I've shown you just a few moments ago, the correct answer in this case is a
04:14
so explorer, followed by a dot.
04:17
So what did we do in today's this lesson? Well, I gave you the falls necessary for successfully testing our little program. And then I give you a demonstration of how this is the *** brute force. It works.
04:31
And the next lesson we're going to conclude this course and I am going to provide some additional resource is for you to check out.
04:39
My name is Christian, and I'm looking forward to seeing you in the next video.
Up Next