Penetration Testing with Kali Linux
PWK - Copyright © 2023 OffSec Services Limited. All rights reserved.
251
While it is important to understand how to exploit Directory Traversal vulnerabilities, it is also
crucial that we can identify them. We should always check for vulnerabilities by hovering over all
buttons,
checking all links, navigating to all accessible pages, and (if possible)
examining the
page’s source code. Links can be an especially valuable source of information,
providing
parameters or other data about the application.
For example, if we find the following link, we can extract vital information from it.
https://example.com/cms/login.php?language=en.html
Listing 132 - Example of a link
First, login.php tells us the web application uses PHP. We can use this information to develop
assumptions about how the web application works, which is helpful for the exploitation phase.
Second, the URL contains a
language
parameter with an HTML page as its value. In a situation
like this, we should try to navigate to the file directly (https://example.com/cms/en.html). If we
can successfully open it, we can confirm that en.html is a file on the server, meaning we can use
this parameter to try other file names. We should always examine parameters closely when they
use files as a value.
Third, the URL contains a directory called cms. This is important information indicating that the
web application is running in a subdirectory of the web root.
Let’s review a case study next. We’ll begin by examining the
Mountain Desserts
web application.
To access it, we’ll need to update the /etc/hosts file on our Kali machine to use the DNS name.
We should be aware the assigned IP address for the target machine may change in the labs.
127.0.0.1 localhost
127.0.1.1 kali
Yüklə
Dostları ilə paylaş: