Files
hacktricks-cloud/src/pentesting-cloud/azure-security/az-post-exploitation/az-table-storage-post-exploitation.md

2.6 KiB

Az - Table Storage Post Exploitation

{{#include ../../../banners/hacktricks-training.md}}

Table Storage Post Exploitation

テーブルストレージに関する詳細情報は、以下を確認してください:

{{#ref}} ../az-services/az-table-storage.md {{#endref}}

Microsoft.Storage/storageAccounts/tableServices/tables/entities/read

この権限を持つプリンシパルは、テーブルストレージ内のテーブルを一覧表示し、機密情報を含む可能性のある情報を読み取ることができます。

# List tables
az storage table list --auth-mode login --account-name <name>

# Read table (top 10)
az storage entity query \
--account-name <name> \
--table-name <t-name> \
--auth-mode login \
--top 10

Microsoft.Storage/storageAccounts/tableServices/tables/entities/write | Microsoft.Storage/storageAccounts/tableServices/tables/entities/add/action | Microsoft.Storage/storageAccounts/tableServices/tables/entities/update/action

この権限を持つプリンシパルは、テーブルにエントリを書き込み、上書きすることができ、これにより損害を引き起こしたり、特権を昇格させたりする可能性があります(例:アプリで使用される信頼されたデータを上書きし、いくつかのインジェクション脆弱性を悪用する)。

  • 権限 Microsoft.Storage/storageAccounts/tableServices/tables/entities/write はすべてのアクションを許可します。
  • 権限 Microsoft.Storage/storageAccounts/tableServices/tables/entities/add/action はエントリを追加することを許可します。
  • 権限 Microsoft.Storage/storageAccounts/tableServices/tables/entities/update/action は既存のエントリを更新することを許可します。
# Add
az storage entity insert \
--account-name <acc-name> \
--table-name <t-name> \
--auth-mode login \
--entity PartitionKey=HR RowKey=12345 Name="John Doe" Age=30 Title="Manager"

# Replace
az storage entity replace \
--account-name <acc-name> \
--table-name <t-name> \
--auth-mode login \
--entity PartitionKey=HR RowKey=12345 Name="John Doe" Age=30 Title="Manager"

# Update
az storage entity merge \
--account-name <acc-name> \
--table-name <t-name> \
--auth-mode login \
--entity PartitionKey=HR RowKey=12345 Name="John Doe" Age=30 Title="Manager"

*/delete

これにより、共有ファイルシステム内のファイルを削除でき、いくつかのサービスを中断させるか、クライアントが貴重な情報を失う可能性があります。

{{#include ../../../banners/hacktricks-training.md}}