SpecterOps / SpecterOps/AzureHound
Refresh command with tokens from single page applications error out with code 7000
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 961
- Forks
- 148
- Avg merge
- 22h 26m
- Merged PRs (30d)
- 4
Description
azurehound version v2.1.9
Refresh tokens from single page applications (like the azure portal) error out with error code AADSTS7000.
Command: azurehound -r "<refresh_token>" list --tenant "example.onmicrosoft.com" -o output.json
Tested the same command with a MSgraph refresh token and that did work.
I assume the issue lies in the fact that it needs the origin key in the header of the request.
MS documentation: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow#redirect-uris-for-single-page-apps-spas
Perhaps something across the lines of (in the http.go, NewRequest function):
req.Header.Set("Origin", "example.com")
Curious to hear any thoughts.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the refresh-token path used by azurehound -r and inspect the NewRequest function in http.go. Reproduce the AADSTS7000 failure with a single-page-application refresh token, then compare it with the working MSGraph token flow and the linked Microsoft documentation. Done means the reported SPA-token command completes successfully and its output is written to output.json.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100