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

@@ -26,9 +26,8 @@
### Enumeration
{% tabs %}
{% tab title="az cli" %}
{% code overflow="wrap" %}
{{#tabs }}
{{#tab name="az cli" }}
```bash
# List servers in a resource group
az postgres flexible-server list --resource-group <resource-group-name>
@@ -64,11 +63,9 @@ az postgres flexible-server maintenance list --resource-group <resource-group-na
az postgres 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.PostgreSql
@@ -91,15 +88,13 @@ Get-AzPostgreSqlFlexibleServerLocationBasedCapability -Location <location>
Get-AzPostgreSqlServer -ResourceGroupName <resource-group-name>
```
{% endcode %}
{% endtab %}
{% endtabs %}
{{#endtab }}
{{#endtabs }}
### Connection
With the extension rdbms-connect you can access the database with:
{% code overflow="wrap" %}
```bash
az postgres flexible-server connect -n <server-name> -u <username> -p <password> --interactive
@@ -112,32 +107,29 @@ az postgres flexible-server execute \
--querytext "SELECT * FROM <table-name>;"
```
{% endcode %}
Or
{% code overflow="wrap" %}
```bash
psql -h testpostgresserver1994.postgres.database.azure.com -p 5432 -U adminuser <database-name>
```
{% endcode %}
## References
* [https://learn.microsoft.com/en-us/azure/postgresql/](https://learn.microsoft.com/en-us/azure/postgresql/)
* [https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/service-overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/service-overview)
* [https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/overview)
- [https://learn.microsoft.com/en-us/azure/postgresql/](https://learn.microsoft.com/en-us/azure/postgresql/)
- [https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/service-overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/service-overview)
- [https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/overview)
## Privilege Escalation
{% content-ref url="../az-privilege-escalation/az-postgresql-privesc.md" %}
[az-postgresql-privesc.md](../az-privilege-escalation/az-postgresql-privesc.md)
{% endcontent-ref %}
{{#ref}}
../az-privilege-escalation/az-postgresql-privesc.md
{{#endref}}
## Post Exploitation
{% content-ref url="../az-post-exploitation/az-postgresql-post-exploitation.md" %}
[az-postgresql-post-exploitation.md](../az-post-exploitation/az-postgresql-post-exploitation.md)
{% endcontent-ref %}
{{#ref}}
../az-post-exploitation/az-postgresql-post-exploitation.md
{{#endref}}
## ToDo