In Lab 13, we built a webpage that does the following:

This lab aims to use the previous web application to create the type of CTF you might encounter in a competitive event.

Let’s build in a check to hackme.php that does the following:

Modify hackme.php to look like this:

Untitled

Let’s write the exploit code next.

First, you’ll want to create a folder on your Kali Linux VM called Lab_14 and a file called session_brute.py.

Copy raft-small-words.txt to this folder or grab it. (Directions here if needed)

Your lab_14 folder should look like this:

ls

Untitled

Any time you brute force a website that requires you to have an established session, you’ll want to identify the form fields that are being used when the user logs in to create that session. Here is what our index.php looks like if we ‘view page source’ in our web browser.

Untitled

Based on this, we know the following: