Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

List tenants in az-ad collection uses different audience than the rest of the objects

未关闭 适合新手
#128 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
azure, go

调研方向

从 cmd/list-azure-ad.go 第 101-102 行附近开始,并将 client/tenants.go 第 61-69 行附近与其他 az-ad 收集请求进行比较。验证租户列表请求使用 Graph API audience,然后重现 PowerShell JWT 命令,并确认 az-ad 能够在没有 invalid-audience 错误的情况下列出租户。

由索引模型根据 Issue 内容生成。

描述

Summary

The az-ad collection tries to list tenants:

https://github.com/SpecterOps/AzureHound/blob/abfd482afac9353f421e6985f69e45a775e004e5/cmd/list-azure-ad.go#L101-L102

But the ListAzureADTenants function uses the resourceManager audience for its request:

https://github.com/SpecterOps/AzureHound/blob/abfd482afac9353f421e6985f69e45a775e004e5/client/tenants.go#L61-L69

This leads to an error when using JWT auth because the az-ad collection needs the Graph API audience.

2025-05-13T10:52:37-05:00 INF collecting azure ad objects...
2025-05-13T10:52:37-05:00 ERR unable to continue processing tenants error="invalid audience"

The rest of the collection steps in az-ad work as expected because they all have the Graph API audience.

Steps to reproduce

$env:GRAPH_JWT = (Get-AzAccessToken -ResourceUrl "https://graph.microsoft.com").Token
./AzureHound.exe --jwt $env:GRAPH_JWT --list az-ad --tenant "contoso.onmicrosoft.com" -o "./entraid.json"
主要语言
Go
星标
979
派生
150
平均合并
1 小时 45 分钟
30 天内合并 PR
1

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SpecterOps/AzureHound 的其他 Issue

查看 SpecterOps/AzureHound 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。