For this lab you’ll need

In this lab, we will:

If you pay attention to IPPSEC’s methodology when he approaches web applications on HackTheBox, you’ll find that one of the earliest checks he’ll perform against user-controlled webpage forms is to see whether or not SQL error messages can be generated.

If you are comfortable with the processes demonstrated in this lab, you should be able to eyeball any pertinent questions on the Security+ exam related to SQL injection or the sqlmap program.

Let’s start with a simple login form. Create a webpage in /var/www/html called login.html and paste the following:

cd /var/www/html
pico login.html
<form method="post" action="action.php">
Your Username:
<br>
<input type="text" name="username">
<br>
Your Password:
<br>
<input type="text" name="password">
<br>
<input type="submit" value="Submit">
<br>

Here, we have a form that allows the user to type a username/password (both visible in plaintext), and it submits the information via a POST request to action.php.

Untitled

Our action.php will need to do the following: