Let's cover a second example of using Hydra on our Web page.
So in the previous video, we noticed that the tool can get a little bit harder with the syntax, with
brute force to be warpage.
And now we're going to go with the DV w a page.
So we're already familiar with this login screen.
We know that the username is admin and that the password is admin.
But we want to see how we can get that username and password with the help, or of course, since this
is something that we do for the educational purposes and we want to prove that it works, we will be
adding the correct username and password in the users and in the passwords file.
So in the users file from the previous video, we already have the admin username and in the password
file we want to add the admin as a possibility right here.
So let's add admin.
And now once we craft our Hydra command, we should be able to get the correct credentials outputted
for us.
OK, time to craft a comment, which is the hard part of this talk.
As we remember from the previous video, the first thing that we do is we specify the IP address of
the target that we want to scan.
Once we do that, we determine whether the credentials are being submitted with post request or with
get request to do that, we can go to the page and go on page source.
Then once again, we want to find the form where the usernames and passwords are being submitted, and
here we will see that it is once again a post request.
OK, so we're using HTP form that post.
After we specified this, we open double quotes.
Now comes the hard part, we need to specify first the path to the page that we want to put forth.
So let's type in incorrect credentials, click on login and we get this path.
So, Steve, w a log in DOT.
Let's copy it.
And let's face it right here, this is our first parameter inside double quotes the path to the page.
Now comes the name of the username field, the name of the password field and the bottom name, as well
as what to do with the bot.
So once again, go back to the page source and find the code where the user name field is being labeled.
Here it is.
If we take a look right here, the name of the user name field is simply username, so we will type
that in username equals then we type URL user Pereiro and then decide to separate it from the password.
Now we want to find the password field.
Here it is right below the username field and the name for it is password.
So let's type that thing inside of our comment type.
Password equals Upper Arrow Pass Popper.
OK, awesome.
And last part which we once again separate put this sign is the button itself.
Let's go all the way down and here it's the button.
The name of the bottom is login and we submit it right here.
So we're going to specify that as login equals submit.
And this will once again tell our Hydra command to submit the username and password once it types them
in.
And at the end, we have a third option for our double quotes parameter, which is going to be the incorrect
message that we get for incorrect credentials since we typed in test and test his username and password.
We got this message down here that says log in failed.
So let's call it straight away and let's add it to the end of our comment based clipboard and close
the double quotes.
This should be enough for Hydra to be able to brute force the pitch and also determine which credentials
are correct and which are not.
At the end.
All were left to do is specify capital for the users and capital P for the passwords list.
And this is our entire command.
Let's give it a try.
If we run it, give it a couple seconds and it finishes the brute force once again in around one second
time.
We get the correct credentials right here, which are admin and admin, so we successfully brought forth
this page and if we want to, we can log in right here.
So we covered Hydra.
Now we are officially done with the brute force part of this course, but in the next video, I also
want to show you another possibility with Hydra that you can use besides brute forcing different Web
pages, it will be a short video and you might find it useful in your penetration tests nonetheless.
Thank you for watching and we'll see in the next lecture.