Web application penetration testing, before we can start talking about that, we need to understand
what is a website.
And just like I said before, a Web site is just an application and installed on a computer.
That computer probably just has better specs than your computer, but it fundamentally works exactly
just like another computer.
So it has an operating system and it also has a number of applications to allow it to act as a Web server.
So the main two applications that it probably has is a Web server and a database.
A Web server is like a Apache and the database is like MySQL.
And these are the Web server basically understands and executes the Web application.
So your Web application would be written in or Python and any programming language.
Really, the only thing is that the Web server needs to be able to understand and execute this Web application.
The database contains the data used by the Web application.
So all of this is stored on a computer called the server.
The computer's connected to the Internet and it has a real IP address so anybody can access that computer
and can pick it.
So the Web, the Web application.
Is executed by the Web server, which is installed by which is installed on your server, on your target.
Therefore, any time you request a page or you run the Web application, it's actually executed on the
Web server and it's not executed at the client's computer.
It gets executed at the Web server and then it sends a hash HTML page, which is ready to read for the
target person or for for the client's.
So let's have a look on an example and let's say you're on the phone or on your computer and you want
it to go to Facebook dot com, so you type in Facebook dot com into your URL.
This will be translated using at the NSA server to an IP address.
So there is a server that translates every name, dot com, dot edu or any website with a name with
a domain name.
So this is a domain name to it's relevant IP address.
So your request, Facebook dot com, the request goes to a DNS server.
It translates Facebook dot com to the IP where Facebook is stored.
And then you go it will go to Facebook, to the IP address of Facebook.
It will execute the page that you wanted using all of the applications that we spoke about and then
just give you ready HTML.
So what you get back is just a markup written in HTML, which is a markup language of the result of
executing the program.
So the program gets executed on the server and then you just only get the result.
This is very important because in the future, if we wanted to get anything executed on the Web server,
if we wanted to get a shell, a reverse shell or a virus executed on the target computer, then we need
to send it into a language that the Web server understands.
So, for example.
And once you execute it there, it will be executed on that computer, not on your computer.
So regardless of the person, the accesses the page, the this the web show that you're going to send,
if it's written in a language that the server understands it's going to be executed on the server and
not on your computer.
Therefore, it'll give you access to the server and not access to the person who accessed that server.
JavaScript, on the other hand, there is some websites use JavaScript and JavaScript is applying side
language.
So if you manage to find a website that allow you to run JavaScript code, then the code will be executed
by the clients.
So even though the code might be injected into the Web server, it will be executed on the client side
and it'll give you.
It will allow you to do things to the client computer and not to the server, so it's very important
to separate between a client side language and the server side language.