Files
hacktricks-cloud/src/pentesting-cloud/azure-security/az-post-exploitation/az-logic-apps-post-exploitation.md

121 lines
6.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Az - Logic Apps Post Exploitation
{{#include ../../../banners/hacktricks-training.md}}
## Logic Apps Database Post Exploitation
Logic Appsに関する詳細情報は、以下を参照してください
{{#ref}}
../az-services/az-logic-apps.md
{{#endref}}
### `Microsoft.Logic/workflows/read`, `Microsoft.Logic/workflows/write` && `Microsoft.ManagedIdentity/userAssignedIdentities/assign/action`
これらの権限を使用すると、Logic Appのワークフローを変更し、そのアイデンティティを管理できます。具体的には、システム割り当ておよびユーザー割り当てのマネージドアイデンティティをワークフローに割り当てたり、削除したりすることができ、これによりLogic Appは明示的な資格情報なしで他のAzureリソースに認証し、アクセスすることができます。
```bash
az logic workflow identity remove/assign \
--name <workflow_name> \
--resource-group <resource_group_name> \
--system-assigned true \
--user-assigned "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identity_name>"
```
### `Microsoft.Web/sites/read`, `Microsoft.Web/sites/write`
これらの権限を使用すると、App Service PlanにホストされているLogic Appsを作成または更新できます。これには、HTTPS強制の有効化または無効化などの設定の変更が含まれます。
```bash
az logicapp update \
--resource-group <resource_group_name> \
--name <logic_app_name> \
--set httpsOnly=false
```
### `Microsoft.Web/sites/stop/action`, `Microsoft.Web/sites/start/action` || `Microsoft.Web/sites/restart/action`
この権限を持つことで、App Service Plan上でホストされているLogic Appsを含むWebアプリを開始/停止/再起動できます。このアクションは、以前に停止されたアプリがオンラインに戻り、その機能を再開することを保証します。これにより、ワークフローが中断されたり、意図しない操作がトリガーされたり、Logic Appsが予期せずに開始、停止、または再起動されることによってダウンタイムが発生する可能性があります。
```bash
az webapp start/stop/restart \
--name <logic_app_name> \
--resource-group <resource_group_name>
```
### `Microsoft.Web/sites/config/list/action`, `Microsoft.Web/sites/read` && `Microsoft.Web/sites/config/write`
この権限を持つことで、App Service Plan上でホストされているLogic Appsを含むWebアプリの設定を構成または変更できます。これにより、アプリ設定、接続文字列、認証設定などの変更が可能になります。
```bash
az logicapp config appsettings set \
--name <logic_app_name> \
--resource-group <resource_group_name> \
--settings "<key>=<value>"
```
### `Microsoft.Logic/integrationAccounts/write`
この権限を使用すると、Azure Logic Appsの統合アカウントを作成、更新、または削除できます。これには、マップ、スキーマ、パートナー、合意などの統合アカウントレベルの構成の管理が含まれます。
```bash
az logic integration-account create \
--resource-group <resource_group_name> \
--name <integration_account_name> \
--location <location> \
--sku <Standard|Free> \
--state Enabled
```
### `Microsoft.Resources/subscriptions/resourcegroups/read` && `Microsoft.Logic/integrationAccounts/batchConfigurations/write`
この権限を持つことで、Azure Logic Appsの統合アカウント内でバッチ構成を作成または変更できます。バッチ構成は、Logic Appsがバッチ処理のために受信メッセージをどのように処理し、グループ化するかを定義します。
```bash
az logic integration-account batch-configuration create \
--resource-group <resource_group_name> \
--integration-account-name <integration_account_name> \
--name <batch_configuration_name> \
--release-criteria '{
"messageCount": 100,
"batchSize": 1048576,
}'
```
### `Microsoft.Resources/subscriptions/resourcegroups/read` && `Microsoft.Logic/integrationAccounts/maps/write`
この権限を持つことで、Azure Logic Apps インテグレーション アカウント内でマップを作成または変更できます。マップは、データをある形式から別の形式に変換するために使用され、異なるシステムやアプリケーション間のシームレスな統合を可能にします。
```bash
az logic integration-account map create \
--resource-group <resource_group_name> \
--integration-account-name <integration_account_name> \
--name <map_name> \
--map-type <Xslt|Xslt20|Xslt30> \
--content-type application/xml \
--map-content map-content.xslt
```
### `Microsoft.Resources/subscriptions/resourcegroups/read` && `Microsoft.Logic/integrationAccounts/partners/write`
この権限を持つことで、Azure Logic Apps 統合アカウント内のパートナーを作成または変更できます。パートナーは、ビジネス間 (B2B) ワークフローに参加するエンティティまたはシステムを表します。
```bash
az logic integration-account partner create \
--resource-group <resource_group_name> \
--integration-account-name <integration_account_name> \
--name <partner_name> \
--partner-type <partner-type> \
--content '{
"b2b": {
"businessIdentities": [
{
"qualifier": "ZZ",
"value": "TradingPartner1"
}
]
}
}'
```
### `Microsoft.Resources/subscriptions/resourcegroups/read` && `Microsoft.Logic/integrationAccounts/sessions/write`
この権限を持つことで、Azure Logic Appsの統合アカウント内でセッションを作成または変更できます。セッションはB2Bワークフローでメッセージをグループ化し、定義された期間にわたる関連する取引を追跡するために使用されます。
```bash
az logic integration-account session create \
--resource-group <resource_group_name> \
--integration-account-name <integration_account_name> \
--name <session_name> \
--content '{
"properties": {
"sessionId": "session123",
"data": {
"key1": "value1",
"key2": "value2"
}
}
}'
```
### "*/delete"
この権限を持つことで、Azure Logic Apps に関連するリソースを削除できます。
{{#include ../../../banners/hacktricks-training.md}}