In this video, we are going to see what is an SQL injection attack.
And we are going to solve the low difficulty SQL injection challenge on dam vulnerable web application.
SQL injection is a type of attack in which an attacker injects a malicious code into a website's SQL
statement and gains access to a sensitive information or performs malicious actions on the database.
This is typically done by manipulating input fields in a web application that is connected to a database
such as the login form or a search box.
In such a way as to trick the application into executing an intended SQL commands.
SQL injection attacks can allow attackers to bypass authentication, access, modify or delete sensitive
data, or even execute commands on the operating system.
They can also be used to create new user accounts with high privileges or to perform other malicious
actions.
So you should be on Kali Linux or Parrot OS in VMware virtual box or running natively on your PC.
When step one go to settings and set the difficulty to low.
If we put the following command in the box, it will list down all information in the specific category
we are using a single colon with or one is equal to one.
That will be true always.
We can manually use complex commands to list all the information, but we are going to use SQL map to
automate the process.
First of all, intercept a normal request with burp and save it in text document.
No large scale map with the following command, which will list down all databases.
Now to get more information about the tables of a particular database, we can use the command with
dash dash tables.
Flag.
Similarly, we can get column information of tables with the following command.
Dash, dash.
Column flag and we can dump the data with dash.
Dash, dump all flag.
Let's see the actual demonstration.
So on your application, open the SQL injection tab.
And type the command as shown on the screen.
It will list down all the entries.
No fire.
A burp.
While Burp is starting up, we can see that if we put any ID in the user ID field.
We get its information.
And if you use the command as shown on the screen, we get the information of all the users.
So in burp, turn the intercept on.
Captured the new request with burp.
Right click it and save it in a text document.
Now on your terminal, you can check the help of SQL map with dash H flag.
Which will list down all available options that you can use with Map.
We'll start map with the request document that you have saved.
And it will list down all available databases.
Now to get more information about database, we can use the dash dash tables flag.
And it will list down the two tables that are there.
You can also check the columns of the table.
Dash, dash.
Column.
Slag.
And we can get all the data with dash, dash, dash, all flag.
Skill map will also prompt if you want to crack the hashes and if you say yes, it will try to crack
all the hashes with default dictionary.
After a few moments, all the data will be displayed.