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.

Copy raft-small-words.txt to this folder or grab it from another folder you previously used. (Directions here if needed)

Your lab_14 folder should look like this:

ls

image.png

Any time you brute-force a website that requires an established session, you’ll want to identify the form fields 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: