Hello everybody and welcome back.
And let us start off with the cross-eyed scripting attack which is also I believe after the actual injection
one of the most common attacks found on the website applications.
So what is the cross-eyed script an attack on ability.
Well basically your web browser is interpreter of code which uses HD AML and script code for showing
documents including texts pictures and videos for example.
Now what that means that it basically allows users to interact with dynamic elements including search
fields hyperlinks forms video audio controls and many other now besides the HD the AML code itself.
There is most likely going to be a script code that allows all of that.
Now the most commonly used script code would be the yellow scripts and it is used to make more your
website or basically any website on the Internet more dynamic.
Now why am I talking all of this.
Well basically when user input is used to determine the script code and the input isn't filtered well
enough you get the scrubs then you get the cross up scripting vulnerability.
Now what I mean by that.
Well for example let's say you have a Web site.
And basically what you mean when you click on something or when you type something in our thing pops
up on your screen or moves the left from right on the Web site or basically anything that makes a Web
site more dynamic to you.
That was caused by you can be used to make the cross up scripting vulnerability work there.
It happens when script code he said it in user input field and browser as executed as a code instead
of some kind of data.
For example you type in the user input in green and your screen turns green.
It is basically some kind of interaction with the Web site.
And if you type there are a script code and the user input is filtered as in these masculine command
objection.
An example injection each can be read as the script code as I said the mostly used script code is the
your script.
But it can also be some of the other examples such as the VBA scripts or any other script code.
Now the let me just open leave pad right here before I continue talking about this since this is a theoretical
part where you need to understand basically what am I saying.
So the most common access attack or cross scripting.
So basically exercise assesses the short for cross site scripting.
The most common attack would include something like this the attacker which performs the attack so the
attacker that performs the attack the one or both that application
the victim which uses that browser and some website that attacker once to for example redirect.
Let me just make this a proper English.
So the script can be used to redirect vulnerable websites.
And it is most commonly what you will see.
So for example when when you visit some kind of Web site let's say you with it again on online shop
or flowers and you click on a specific link that leads you to that shop and suddenly you are on some
Web site that sells cars for example.
You will know that it was done with the redirection using for example javascript.
Now since it is redirect from flowers to cars it is most likely it was most likely a part of the attack
from some of the hacker that redirected it to his own Web site or to someone's Web site that paid him
to do that.
That is the most common thing that you will do and you and someone as a victim that uses a browser.
He basically just goes to the Web flower shop and suddenly gets redirected to buy cars which makes no
sense at all.
But it happens now in order for us to show a simple example of cross-eyed scripting.
Let's just go to our virtual machine let me just close it and open the log in page once again.
I'm not really sure how the tie loaded with this IP address since my always to machine is in the dark
one up nine but it doesn't matter at the moment.
So but we want to do from here.
We want to go to the D the a DV w h so memorable Weber can go once again on there.
And once you go there it will lead you to the same page that we were before on with DSL injection and
command ejection.
This is taking a little bit slower.
Just check out the IP address for the.
I type the correct one so I have config that one but six it should load it any second right now
or yeah I could put my maybe have the bird suit on and the intercept on of course I always forget to
turn that off.
So let us slow the page right now.
It asks us for using the password that is in an admin admin click here on log in can save and you what
you want to go on is the accesses reflected and access is stored.
Now the stored access is basically how they say this The injected code is saved on the web server or
in the database an application will show it to every user that visits the page.
The goal of Starbucks says is to infect every visitor of the website.
It is the most dangerous type of the exercise.
Why is it the most dangerous because it is basically an attack on the website itself.
And if you send a code it will be saved on the website and it will send the same page to everyone who
requires that website.
Now the reason that is dangerous is because you as for example a victim could just be visiting that
website and run my your script code and basically I could exploit your browser or anything that I have
written in that code right there or it could be just a simple message that is usually left to let someone
know that they're vulnerable to the cross-eyed scripting attack not the reflected access in setting
instead of sending the script to the server as install attack the reflected attack is link with javascript
that we send to the victim so let me just show you what I mean by that.
So let us go to the exercise reflected and as we can see right here it will ask us What's your name.
Now this is the example of interactive web page.
So if we type here our name is John and we submit that.
You can see that right here if you type.
Hello John.
Now we can see the source of the code which of course on the normal Web sites you won't be able to see
it.
But we don't really need it right here.
You can test this on any website that you're testing to see if it is vulnerable to the cross scripting
attack.
And that would be simply to type here a script.
Let me just.
So this arrow in the script then you close the tower arrow then alert open parenthesis parentheses then
an apostrophe.
And then for example its type here.
Shallow then called the apostrophe.
Then of course the parenthesis then this error once again slashed and then script and then closed this
arrow.
So if we submit this and it you will see that it shows us a window that says hello and as easy as that.
We now know that this.
This page is vulnerable to the cross site scripting attack.
Since we were able to send a part of javascript code and the page interpreted it as the part of the
server code
so I'm not really sure let me just go right here and back to here.
Yeah.
It won't be showing us that once again.
So that was the sample.
The easy example of the reflected across a scripting attack.
Now you can do that.
You can run some malicious code but let's use the same code once again.
And once you click here submit you can copy this link right here and send it to anyone.
So let's just say for example this link and you send that to over an email or over messenger or any
other social media application and someone clips clicks on this link.
So they go I will just copy and paste it since I don't have anyone to send it to.
And they click the link you will notice that it will run the same window for them even though they didn't
type anything in here.
So basically anyone that uses this link will run this javascript code within their page.
Now this code is not malicious so it doesn't really do anything about it could be malicious for example
it could steal cookies for example and hijack a session with that.
Now you might say well this link right here looks really suspicious and that is true.
But there are lots of websites on the Internet that shorten the link or change the link so that you
cannot recognize anything in the link itself.
So that could be another option.
Now that's about it for the uh perfected process shipping attack and we'll continue with these cross-eyed
scripting in the next lecture.
I hope I see you there and take care of my.