Az - Table Storage
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
- 查看 subscription plans!
- 加入 💬 Discord group 或者 telegram group 或 关注 我们的 Twitter 🐦 @hacktricks_live.
- 通过向 HackTricks 和 HackTricks Cloud github 仓库 提交 PRs 来分享 hacking tricks。
基本信息
Azure Table Storage 是一个 NoSQL 键值存储,旨在存储大量结构化的非关系数据。它提供高可用性、低延迟和可扩展性,以高效处理大数据集。数据组织成表格,每个实体通过分区键和行键进行标识,从而实现快速查找。它支持如静态加密、基于角色的访问控制和共享访问签名等功能,适合广泛应用的安全管理存储。
表存储 没有内置备份机制。
键
PartitionKey
- PartitionKey 将实体分组到逻辑分区。具有相同 PartitionKey 的实体被一起存储,从而提高查询性能和可扩展性。
- 示例:在存储员工数据的表中,
PartitionKey可能表示一个部门,例如"HR"或"IT"。
RowKey
- RowKey 是分区内实体的唯一标识符。与 PartitionKey 结合使用时,确保表中每个实体具有全球唯一标识符。
- 示例:对于
"HR"分区,RowKey可能是员工 ID,例如"12345"。
其他属性(自定义属性)
- 除了 PartitionKey 和 RowKey,实体还可以具有额外的 自定义属性来存储数据。这些是用户定义的,类似于传统数据库中的列。
- 属性以 键值对 的形式存储。
- 示例:
Name、Age、Title可以是员工的自定义属性。
枚举
# Get storage accounts
az storage account list
# List tables
az storage table list --account-name <name>
# Read table
az storage entity query \
--account-name <name> \
--table-name <t-name> \
--top 10
# Write table
az storage entity insert \
--account-name <STORAGE_ACCOUNT_NAME> \
--table-name <TABLE_NAME> \
--entity PartitionKey=<PARTITION_KEY> RowKey=<ROW_KEY> <PROPERTY_KEY>=<PROPERTY_VALUE>
# Write example
az storage entity insert \
--account-name mystorageaccount \
--table-name mytable \
--entity PartitionKey=HR RowKey=12345 Name="John Doe" Age=30 Title="Manager"
# Update row
az storage entity merge \
--account-name mystorageaccount \
--table-name mytable \
--entity PartitionKey=pk1 RowKey=rk1 Age=31
Note
默认情况下,
azcli 将使用帐户密钥来签名密钥并执行操作。要使用 Entra ID 主体权限,请使用参数--auth-mode login。
Tip
使用参数
--account-key指定要使用的帐户密钥
使用参数--sas-token通过 SAS 令牌访问
Privilege Escalation
与存储权限提升相同:
Post Exploitation
Az - Table Storage Post Exploitation
Persistence
与存储持久性相同:
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
- 查看 subscription plans!
- 加入 💬 Discord group 或者 telegram group 或 关注 我们的 Twitter 🐦 @hacktricks_live.
- 通过向 HackTricks 和 HackTricks Cloud github 仓库 提交 PRs 来分享 hacking tricks。
HackTricks Cloud

