Azure Databases
Introduction
Azure SQL Databases offers just as the name suggests, MSSQL Databases hosted in Azure.
What are we going to cover?
In this chapter we will create MSSQL server and see what queries work and then look at identifying MSSQL servers on the Internet using Google searches
Creating a Azure SQL Database
Using OSINT to identify interesting sql database servers on the Internet
Steps to Setup a Azure SQL Database server
Click on
All services
and typeSQL databases
In the SQL Database dashboard, enter a database name, select a Resource Group and click Server
Click on
Create a new server
. This is the server on which MSSQL will runAdd a
Server name
. The final server endpoint will be<servername>.database.windows.net
Enter a server admin login. This is the SQL Identifier and cannot be
root
,sa
,admin
,administrator
etc. Enterdbuser
here to proceedEnter a password that meets password complexity requirements
Click
Select
to confirm the server setupSelect the
Configure database
and choose Basic. ClickCreate
to start the setup
Interacting with the SQL Server
Once the server is created, click on
Query Editor (preview)
and login using the credentials that were set for the serverRun common SQL queries here which as attackers are normally run to examine a MSSQL server
SELECT @@version;
select @@servername;
SELECT name FROM master..sysdatabases;
SELECT name, password_hash FROM master.sys.sql_logins;
MSSQL server (non Azure versions) allow administrators to run Operating System commands using an extended stored procedure called
xp_cmdshell
This is not available in Azure SQL DB alongwith several other variables and stored procedures that can be used to access information about the underlying operating system.
OSINT to find interesting Azure SQL Databases
The Azure SQL database server endpoint name will be of the form
??.database.windows.net
Performing searches on the Interenet for this particular string can yield interesting results. Essentially, database endpoint names and potential credentials can be found by using Google to search for:
Additional references
Last updated