This commit is contained in:
Jimmy
2025-02-10 12:22:24 +01:00
parent 3f01e5e4fa
commit 3757efbd43
34 changed files with 238 additions and 387 deletions

View File

@@ -23,9 +23,8 @@ Azure Database for MySQL is a fully managed relational database service based on
### Enumeration
{% tabs %}
{% tab title="az cli" %}
{% code overflow="wrap" %}
{{#tabs }}
{{#tab name="az cli" }}
```bash
# List all flexible-servers
az mysql flexible-server db list --resource-group <resource-group-name>
@@ -55,11 +54,9 @@ az mysql flexible-server maintenance list --resource-group <resource-group-name>
az mysql flexible-server server-logs list --resource-group <resource-group-name> --server-name <server_name>
```
{% endcode %}
{% endtab %}
{{#endtab }}
{% tab title="Az PowerShell" %}
{% code overflow="wrap" %}
{{#tab name="Az Powershell" }}
```bash
Get-Command -Module Az.MySql
@@ -95,15 +92,13 @@ Get-AzMySqlFlexibleServerMaintenanceWindow -ResourceGroupName <resource-group-na
# List log files for a server
Get-AzMySqlFlexibleServerLog -ResourceGroupName <resource-group-name> -ServerName <server_name>
```
{% endcode %}
{% endtab %}
{% endtabs %}
{{#endtab }}
{{#endtabs }}
### Connection
With the extension rdbms-connect you can access the database with:
{% code overflow="wrap" %}
```bash
az mysql flexible-server connect -n <server-name> -u <username> -p <password> --interactive
@@ -116,17 +111,13 @@ az mysql flexible-server execute \
--querytext "SELECT * FROM <table-name>;"
```
{% endcode %}
Or with the MySQL native extension plugin
{% code overflow="wrap" %}
```bash
mysql -h <server-name>.mysql.database.azure.com -P 3306 -u <username> -p
```
{% endcode %}
Also you can execute queries with github but the password and user are also needed. You need to set up a sql file with the query to run and then:
{% code overflow="wrap" %}
```bash
# Setup
az mysql flexible-server deploy setup \
@@ -145,19 +136,18 @@ az mysql flexible-server deploy run \
--action-name <action-name> \
--branch <branch-name>
```
{% endcode %}
## Privilege Escalation
{% content-ref url="../az-privilege-escalation/az-mysql-privesc.md" %}
[az-mysql-privesc.md](../az-privilege-escalation/az-mysql-privesc.md)
{% endcontent-ref %}
{{#ref}}
../az-privilege-escalation/az-mysql-privesc.md
{{#endref}}
## Post Exploitation
{% content-ref url="../az-post-exploitation/az-mysql-post-exploitation.md" %}
[az-sql-mysql-exploitation.md](../az-post-exploitation/az-mysql-post-exploitation.md)
{% endcontent-ref %}
{{#ref}}
../az-post-exploitation/az-mysql-post-exploitation.md
{{#endref}}
## ToDo