Hey, guys, welcome back to another episode on How to Hack, and today we'll be discussing a CROSSEYED
requests forgeries.
So what does cross site request forgery stand for?
And of course, over here we have Web gote.
So Web goat is a vulnerable Web application system for us to Tassell, different kind of vulnerabilities
associated with Web application systems.
And of course, in Web Goetze case, we have O.W. Aspe, which stands for Open Web Application Security
Project Top 10, and of course, under a eight under request forgeries.
We have cross site request forgery.
So it is a slightly more technical term and we will break it down word by word.
So cross site, cross site stands for running from different sites across sites and request forgeries,
meaning that we are trying to send a request on behalf of somebody else.
So that is the meaning of request forgery, sending requests on behalf of someone else.
And one very simple example is that if your log in to, say, an e-commerce website and you got a link
and someone gave you a link and you click onto the link, it is coming from an SMS or a social media
message or or even your email.
So you click onto the link that brings you to the correct website.
So it is the e-commerce website that you already have an account on.
You are already locked in, OK, and when you click onto the link, it creates and runs certain instructions
on your behalf because you already have a session running.
And this brings us back to one of the earlier topics, which is on cookies.
So every time you have a session into a Web application system, for example, on a social media platform,
on an e-commerce site, on your bank account, and what happens is that you login for the first time
using your username and password.
And once you log in, you have the function of saving your login details.
And as you see the login details, you are able to maintain that Sacheen, inside the Web application
system.
And as you maintain session and as you click onto those links, it will run certain instructions over
here.
So, again, Web gold is a wonderful platform for you to download, install, running and educate yourself
about Web application vulnerability.
So kudos to the Web development team and the people who have built this wonderful educational platform
for us to learn about Web application vulnerabilities.
So over here.
All right.
So it exploits you use the site's trusted identity.
It involves sites that rely on a user's identity by checking on your kookiest information and then running
those instructions to come into the URL.
All right.
So moving to the second lesson.
All right.
So, for example, over here we have a particular you, Earling.
All right.
So this is a XHTML.
We have a picture.
Yes.
So let me zoom a little more so it's easier for you to see.
And of course, we can see you over here.
We have a link.
So the link goes to a bank and it transfer money from the existing account to another account and the
amount of a hundred thousand dollars.
And over here view my picture.
OK.
And it closes the Eurail link.
So as a result of that, when you click onto the link, once you click onto the link, you will run
those instructions because of the instruction over here transfer followed by the account number from
and the account number two follow by the amount.
OK, so it will rondos instruction, especially if you are ready to log in to the site.
All right.
So that's how it's able to run.
So, for example, over here we have a submission of query.
All right.
So cross site request forgery exercice.
All right.
So we can trigger the form below from an external source while locked in.
The response will include a flag, a numeric value.
So once you click submit query, it says over here.
So again, we are looking at the normal way of running things into customer journey.
This is what we clicked on.
So we see over here it is a flag is null and we've success is false.
And a message that appears to request came from the original host.
So we can go back here.
All right.
And we can try to craft our own HTML.
All right.
To be able to get those flag.
So this exactly how it's done.
Right.
Sort of hackers.
What they will do is they will create a fake website and fake website could be saying click here to
get a million dollars, click here to unlock your account and so on, so forth.
So, again, what you're doing is trying to trick us into clicking those links.
And once you click onto those links, those instructions will be sent to the websites that we already
have a session on.
And once it is run, it could run those instructions.
Right.
For example, checking out from a shopping cart, adding items to a shopping cart, transferring money,
which is saw earlier as part of the example.
OK, so what we would do is we can do a right click.
All right.
We can do it right click and we can click under Inspect Element.
OK, so you can do this for Firefox.
So we're here having Mozilla Firefox running so you can click on.
OK, and this was show us, all right, the form ID.
OK, so what we can do is just do a right click under the form ID.
So again, it's very important for us to understand about how to create and HTML sites, including forms.
So over here we have to form ID and we have the input name which is of course hidden and we have to
input type submit name is submit.
So.
Right, click on this.
All right.
Click on copy and then click under Alter.
All right.
So going to click on that and this would copy everything inside is particular form.
So open up any of your favorite editor.
Of course, over here we have the editor and we can paste it very, very quickly into the set up.
So I'm going to pass over here.
So there are some slight differences that we need to amend in order for our form to work.
So in this case, we have this form.
So everything is on the top is actually the one that has been amended for us to actually send over to
the user.
And once the user clicks on it, it will be able to hijack your session.
OK, so over here we have the following.
So we need to enter the action.
So remember to put in, for example, over here http I followed by the IP address on the website domain
name followed by the number if any.
So in case we have point number of eight zero eight zero followed by Web go see SRF Basic Desh Get Desh
FLAC.
All right, so we have all these data over here.
So once you have this running, all right, you can go in, save it, save it into a dot html file.
So over here I've saved it into web.
Good C srf dot gml and you can see that, save it into the desktop.
So let us go ahead and go into the desktop.
And of course here I have the web gote C.
S RF dash dot html.
So you see all of the files that you've done previously.
We've done so many different tutorials, so very important for you to subscribe if you want to keep
abreast to be kept abreast of all these cybersecurity.
Turrell's.
So go ahead, double click on it.
All right.
So for example, we can open with Firefox, so go and open it up and over here.
Right.
So we are pointing to a fall, as you can see from the URL.
And of course, if you click onto some query, OK, and immediately says true, congratulations appears
you made the request from a separate host.
So we manage to create a form that allow us the ability to actually help do a cross site request forgery
on behalf of the existing session.
And we have to flag over here five seven zero seven seven.
So let's go back to Web Gote and we can close the web developer and we can enter five seven zero seven
seven.
Right.
So this is five seven zero seven seven as to flag.
Go ahead and click submit and it says congratulations.
You made the request from your local machine.
So once again, I hope you learned something valuable in today's tutorial.
And if you've any questions, feel free to leave a comment below and I'll try my best to answer any
of your queries.
And we'd like share and subscribe to the channel so that you can be kept abreast of the latest cybersecurity.
Tara, thank you so much once again for watching.