Manually executing an LFI exploit

Let's begin by starting the Apache server:

service apache2 start

Let's try to browse the application manually and see where the vulnerability lies:

The browsed URL in the preceding screen is http://192.168.1.102/dvwa/vulnerabilities/fi/?page=include.php. As can be seen, the requested URL has a page parameter, which takes the page that is to be included as an argument. If we take a look at the source code of the application, we can see the implementation of the include() function as follows:

The preceding screenshot ...

Get Hands-On Penetration Testing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.