mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-08 19:30:51 -08:00
Translated ['src/pentesting-cloud/aws-security/aws-basic-information/REA
This commit is contained in:
@@ -1,34 +1,33 @@
|
||||
# Az - PostgreSQL Databases
|
||||
# Az - PostgreSQL データベース
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
## Azure PostgreSQL
|
||||
**Azure Database for PostgreSQL** は、**PostgreSQL** Community Edition に基づいた完全管理型の **リレーショナルデータベースサービス** です。スケーラビリティ、セキュリティ、柔軟性を提供し、多様なアプリケーションニーズに対応するよう設計されています。Azure MySQL と同様に、PostgreSQL には二つのデプロイメントモデルがあります:
|
||||
|
||||
* **Single Server** (引退パス中):
|
||||
* **Single Server** (退役パス上):
|
||||
- シンプルでコスト効果の高い PostgreSQL デプロイメントに最適化されています。
|
||||
- 自動バックアップ、基本的な監視、高可用性を特徴としています。
|
||||
- 予測可能なワークロードを持つアプリケーションに理想的です。
|
||||
- 予測可能なワークロードを持つアプリケーションに最適です。
|
||||
* **Flexible Server**:
|
||||
- データベース管理と構成に対するより大きな制御を提供します。
|
||||
- 同じゾーン内およびゾーン間での高可用性をサポートします。
|
||||
- 弾力的なスケーリング、自動メンテナンス、コスト削減機能を特徴としています。
|
||||
- コストを最適化するためにサーバーの開始と停止が可能です。
|
||||
|
||||
### Key Features
|
||||
### 主な機能
|
||||
|
||||
* **Custom Maintenance Windows**: 中断を最小限に抑えるために更新をスケジュールします。
|
||||
* **Active Monitoring**: データベースのパフォーマンスを追跡し改善するための詳細なメトリクスとログにアクセスします。
|
||||
* **Stop/Start Server**: ユーザーはサーバーを停止および開始できます。
|
||||
* **Automatic Backups**: 最大35日間の保持期間を設定可能な組み込みの毎日のバックアップ。
|
||||
* **Role-Based Access**: Azure Active Directory を通じてユーザー権限と管理アクセスを制御します。
|
||||
* **Security and Networking**: セキュアなデータベースアクセスのためにサーバーファイアウォールルールを管理し、必要に応じて仮想ネットワーク構成を切り離すことができます。
|
||||
* **カスタムメンテナンスウィンドウ**: 中断を最小限に抑えるために更新をスケジュールします。
|
||||
* **アクティブモニタリング**: 詳細なメトリクスとログにアクセスしてデータベースのパフォーマンスを追跡し、改善します。
|
||||
* **サーバーの停止/開始**: ユーザーはサーバーを停止および開始できます。
|
||||
* **自動バックアップ**: 最大35日間の保持期間を設定可能な組み込みの毎日のバックアップ。
|
||||
* **ロールベースのアクセス**: Azure Active Directory を通じてユーザー権限と管理アクセスを制御します。
|
||||
* **セキュリティとネットワーキング**: セキュアなデータベースアクセスのためにサーバーファイアウォールルールを管理し、必要に応じて仮想ネットワーク構成を切り離すことができます。
|
||||
|
||||
### 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,12 @@ Get-AzPostgreSqlFlexibleServerLocationBasedCapability -Location <location>
|
||||
Get-AzPostgreSqlServer -ResourceGroupName <resource-group-name>
|
||||
|
||||
```
|
||||
{% endcode %}
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
{{#endtab }}
|
||||
{{#endtabs }}
|
||||
|
||||
### 接続
|
||||
|
||||
拡張機能 rdbms-connect を使用すると、次のようにデータベースにアクセスできます:
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
拡張機能 rdbms-connect を使用すると、次のようにデータベースにアクセスできます:
|
||||
```bash
|
||||
az postgres flexible-server connect -n <server-name> -u <username> -p <password> --interactive
|
||||
|
||||
@@ -112,36 +106,31 @@ az postgres flexible-server execute \
|
||||
--querytext "SELECT * FROM <table-name>;"
|
||||
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
または
|
||||
{% code overflow="wrap" %}
|
||||
```bash
|
||||
psql -h testpostgresserver1994.postgres.database.azure.com -p 5432 -U adminuser <database-name>
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
## 参考文献
|
||||
|
||||
* [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)
|
||||
|
||||
## 権限昇格
|
||||
|
||||
{% 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}}
|
||||
|
||||
## ポストエクスプロイト
|
||||
|
||||
{% 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
|
||||
|
||||
* ad-adminでアクセスする方法を探して、これは権限昇格の手法であることを確認する
|
||||
* ad-adminでアクセスする方法を探して、権限昇格の手法であることを確認する
|
||||
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
Reference in New Issue
Block a user