Az - Service Bus Post Exploitation

Tip

学习并练习 AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
学习并练习 GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
学习并练习 Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

支持 HackTricks

Service Bus

有关更多信息,请查看:

Az - Service Bus

Actions: Microsoft.ServiceBus/namespaces/Delete

具有此权限的攻击者可以删除整个 Azure Service Bus 命名空间。此操作会删除命名空间及所有相关资源,包括队列、主题、订阅及其消息,导致所有依赖系统和工作流的广泛中断和永久数据丢失。

az servicebus namespace delete --resource-group <ResourceGroupName> --name <NamespaceName>

Actions: Microsoft.ServiceBus/namespaces/topics/Delete

拥有此权限的攻击者可以删除 Azure Service Bus 主题。此操作会删除主题及其所有相关的订阅和消息,可能导致关键数据丢失,并干扰依赖于该主题的系统和工作流程。

az servicebus topic delete --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <TopicName>

Actions: Microsoft.ServiceBus/namespaces/queues/Delete

拥有此权限的攻击者可以删除 Azure Service Bus 队列。此操作会删除队列及其内所有消息,可能导致关键数据丢失,并干扰依赖于该队列的系统和工作流程。

az servicebus queue delete --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <QueueName>

Actions: Microsoft.ServiceBus/namespaces/topics/subscriptions/Delete

拥有此权限的攻击者可以删除 Azure Service Bus 订阅。此操作会删除订阅及其所有相关消息,可能会干扰依赖于该订阅的工作流程、数据处理和系统操作。

az servicebus topic subscription delete --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --topic-name <TopicName> --name <SubscriptionName>

Actions: Microsoft.ServiceBus/namespaces/queues/write (Microsoft.ServiceBus/namespaces/queues/read)

拥有创建或修改 Azure Service Bus 队列权限的攻击者(要修改队列,您还需要 Action:Microsoft.ServiceBus/namespaces/queues/read)可以利用这一点来拦截数据、干扰工作流程或启用未经授权的访问。他们可以更改关键配置,例如将消息转发到恶意端点、调整消息 TTL 以不当保留或删除数据,或启用死信处理以干扰错误处理。此外,他们还可以操纵队列大小、锁定持续时间或状态,以干扰服务功能或逃避检测,这使得这成为一个重要的后期利用风险。

az servicebus queue create --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <QueueName>
az servicebus queue update --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <QueueName>

Actions: Microsoft.ServiceBus/namespaces/topics/write (Microsoft.ServiceBus/namespaces/topics/read)

拥有在 Azure Service Bus 命名空间中创建或修改主题权限的攻击者可以利用这一点来干扰消息工作流、暴露敏感数据或启用未经授权的操作。使用诸如 az servicebus topic update 的命令,他们可以操纵配置,例如启用分区以滥用可扩展性、改变 TTL 设置以不当保留或丢弃消息,或禁用重复检测以绕过控制。此外,他们还可以调整主题大小限制、改变状态以干扰可用性,或配置快速主题以暂时存储拦截的消息,使主题管理成为后期利用缓解的关键焦点。

az servicebus topic create --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <TopicName>
az servicebus topic update --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --name <TopicName>

Actions: Microsoft.ServiceBus/namespaces/topics/subscriptions/write (Microsoft.ServiceBus/namespaces/topics/subscriptions/read)

拥有创建或修改订阅权限的攻击者(要修改订阅,您还需要操作:Microsoft.ServiceBus/namespaces/topics/subscriptions/read)可以利用这一点在 Azure Service Bus 主题中拦截、重定向或干扰消息工作流。使用诸如 az servicebus topic subscription update 的命令,他们可以操控配置,例如启用死信以转移消息,将消息转发到未经授权的端点,或修改 TTL 和锁定持续时间以保留或干扰消息传递。此外,他们可以更改状态或最大交付计数设置,以干扰操作或逃避检测,使订阅控制成为后期利用场景中的关键方面。

az servicebus topic subscription create --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --topic-name <TopicName> --name <SubscriptionName>
az servicebus topic subscription update --resource-group <ResourceGroupName> --namespace-name <NamespaceName> --topic-name <TopicName> --name <SubscriptionName>

操作: AuthorizationRules 发送和接收消息

请查看这里:

Az - Queue Storage Privesc

参考文献

Tip

学习并练习 AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
学习并练习 GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
学习并练习 Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

支持 HackTricks