Az - Queue Storage Post Exploitation
Reading time: 8 minutes
tip
AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE)
Azureハッキングを学び、実践する:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricksをサポートする
- サブスクリプションプランを確認してください!
- **💬 Discordグループまたはテレグラムグループに参加するか、Twitter 🐦 @hacktricks_liveをフォローしてください。
- HackTricksおよびHackTricks CloudのGitHubリポジトリにPRを提出してハッキングトリックを共有してください。
Queue
詳細については、次を確認してください:
DataActions: Microsoft.Storage/storageAccounts/queueServices/queues/messages/read
この権限を持つ攻撃者は、Azure Storage Queueからメッセージを覗き見ることができます。これにより、攻撃者はメッセージの内容を処理済みとしてマークしたり、その状態を変更したりすることなく表示できます。これにより、機密情報への不正アクセスが可能になり、データの流出やさらなる攻撃のための情報収集が行われる可能性があります。
az storage message peek --queue-name <queue_name> --account-name <storage_account>
潜在的な影響: キューへの不正アクセス、メッセージの露出、または不正なユーザーやサービスによるキューの操作。
DataActions: Microsoft.Storage/storageAccounts/queueServices/queues/messages/process/action
この権限を持つ攻撃者は、Azure Storage Queueからメッセージを取得して処理することができます。これは、メッセージの内容を読み取り、処理済みとしてマークすることを意味し、実際のシステムから隠すことになります。これにより、機密データが露出したり、メッセージの処理方法に混乱が生じたり、メッセージを意図したユーザーに利用できなくすることで重要なワークフローが停止する可能性があります。
az storage message get --queue-name <queue_name> --account-name <storage_account>
DataActions: Microsoft.Storage/storageAccounts/queueServices/queues/messages/add/action
この権限を持つ攻撃者は、Azure Storage Queueに新しいメッセージを追加できます。これにより、悪意のあるまたは不正なデータをキューに注入し、意図しないアクションを引き起こしたり、メッセージを処理する下流サービスを妨害したりする可能性があります。
az storage message put --queue-name <queue-name> --content "Injected malicious message" --account-name <storage-account>
DataActions: Microsoft.Storage/storageAccounts/queueServices/queues/messages/write
この権限により、攻撃者はAzure Storage Queueに新しいメッセージを追加したり、既存のメッセージを更新したりすることができます。これを使用することで、攻撃者は有害なコンテンツを挿入したり、既存のメッセージを変更したりすることができ、キューに依存するアプリケーションを誤解させたり、システムに望ましくない動作を引き起こす可能性があります。
az storage message put --queue-name <queue-name> --content "Injected malicious message" --account-name <storage-account>
#Update the message
az storage message update --queue-name <queue-name> \
--id <message-id> \
--pop-receipt <pop-receipt> \
--content "Updated message content" \
--visibility-timeout <timeout-in-seconds> \
--account-name <storage-account>
Actions: Microsoft.Storage/storageAccounts/queueServices/queues/delete
この権限により、攻撃者はストレージアカウント内のキューを削除できます。この機能を利用することで、攻撃者はキューとその関連メッセージを永久に削除し、ワークフローに重大な混乱を引き起こし、影響を受けたキューに依存するアプリケーションにとって重要なデータ損失をもたらすことができます。このアクションは、システムの重要なコンポーネントを削除することでサービスを妨害するためにも使用できます。
az storage queue delete --name <queue-name> --account-name <storage-account>
DataActions: Microsoft.Storage/storageAccounts/queueServices/queues/messages/delete
この権限を持つ攻撃者は、Azure Storage Queueからすべてのメッセージを削除できます。このアクションはすべてのメッセージを削除し、ワークフローを妨げ、キューに依存するシステムのデータ損失を引き起こします。
az storage message clear --queue-name <queue-name> --account-name <storage-account>
Actions: Microsoft.Storage/storageAccounts/queueServices/queues/write
この権限により、攻撃者はストレージアカウント内のキューとそのプロパティを作成または変更できます。これを使用して、不正なキューを作成したり、メタデータを変更したり、アクセス制御リスト(ACL)を変更してアクセスを許可または制限したりできます。この機能は、ワークフローを妨害したり、悪意のあるデータを注入したり、機密情報を抽出したり、さらなる攻撃を可能にするためにキュー設定を操作したりする可能性があります。
az storage queue create --name <new-queue-name> --account-name <storage-account>
az storage queue metadata update --name <queue-name> --metadata key1=value1 key2=value2 --account-name <storage-account>
az storage queue policy set --name <queue-name> --permissions rwd --expiry 2024-12-31T23:59:59Z --account-name <storage-account>
参考文献
- https://learn.microsoft.com/en-us/azure/storage/queues/storage-powershell-how-to-use-queues
- https://learn.microsoft.com/en-us/rest/api/storageservices/queue-service-rest-api
- https://learn.microsoft.com/en-us/azure/storage/queues/queues-auth-abac-attributes
tip
AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE)
Azureハッキングを学び、実践する:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricksをサポートする
- サブスクリプションプランを確認してください!
- **💬 Discordグループまたはテレグラムグループに参加するか、Twitter 🐦 @hacktricks_liveをフォローしてください。
- HackTricksおよびHackTricks CloudのGitHubリポジトリにPRを提出してハッキングトリックを共有してください。