Before we jump into Lab 11, it's a good idea to get a better feel for the Python ‘requests’ library and how to use it to perform web server testing.
For this lab, you’ll need a Kali Linux machine.
When new programmers first learn Python, they start working with the print method. They use it without much thought or effort for the rest of their lives. It’s a foundational piece that you can’t live without as a Python programmer.
The requests library is to penetration testing what the print statement is to the average Joe Schmoe Python programmer. It’s also a foundational piece that, as a penetration tester you can’t live without. Much like someone new to Python programming will struggle to incorporate print statements correctly into simple programs, the requests library also requires a bit of time and effort to get used to. Once you get used to the syntax and functionality, integrating it into your workflow becomes just as easy.
As we progress through the course this year, we’ll use the Python requests library quite a bit. You’ll want to take some time to get familiar with it. A solid understanding of this library will make a big difference as the lessons become more complex.
In this lab, we’ll:
- Perform some basic enumeration using FFUF to discover a PHP webpage on 172.25.51.1.
- This is the same page we used in the last lab. It accepts both
GET and POST requests.
- We’ll use the Python requests library to send
GET and POST requests instead of Burp.
Enumeration First:
- Before we break out Python, let’s run FFUF reconnaissance against this web server.
- We’ll use
raft-small-words.txt
- There is another
.php file in the document root of this web server we need to find.
Any time a web server either has directory browsing disabled or has an index page set up (index.html or index.php, maybe), you’ll need to perform a couple of 10 thousand GET requests to see what other resources might be in the folder alongside the index file.
In order to do this, we’ll need a wordlist. Head over to Daniel Meissler’s GitHub Repo. (We’ll be grabbing raft-small-words.txt)
[<https://github.com/danielmiessler>](<https://github.com/danielmiessler>)
Once there, click on the ‘SecLists’ Repository. (This contains lots of wordlists.)

Next, Click on ‘Discovery’

Next, Click ‘Web-Content’

Find the raft-small-words.txt file.