Web Hacking
◾
349
Enumerating All Available Tables in the Database
Now that we have found or targeted database “dvwa,” we would extract all the tables in the cur-
rent database.
Syntax
http://localhost/index.php?support=yes’ and 1=0 UNION select 1,2,3,table_name,5,6 from infor-
mation_schema.tables where table_schema=“dvwa”--±
Table_name is a column present in information_schema.tables table that holds the informa-
tion of all the tables. So we have asked the database to return all the tables present in the infor-
mation_schema.tables table. However, we have limited our search to return tables only from the
“dvwa” database.
This query was executed, and we have found two table names in the “dvwa” database, which
happen to be “users” and “guestbook”.
Dostları ilə paylaş: