SpecterOps / SpecterOps/AzureHound
can't retrieve function apps
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 961
- Forks
- 148
- Avg merge
- 22h 26m
- Merged PRs (30d)
- 4
Description
Hi,
We found a bug in the code that doesn't retrieve Function Apps using AzureHound list function-apps.
The problem concern the API management.azure.com that return the kind "functionapp,linux" :
{
"value": [
{
"id": "/subscriptions/[subID]/resourceGroups/production/providers/Microsoft.Web/sites/myfunction",
"name": "myfunction",
"type": "Microsoft.Web/sites",
"kind": "functionapp,linux",
"location": "West Europe",
"tags": {
"hidden-link: /app-insights-resource-id": "/subscriptions/[subID]/resourceGroups/production/providers/microsoft.insights/components/AzureFuncProdAppInsights"
}
},...
]
...
}
However, line 100 in file cmd/list-function-apps.go : if functionApp.Kind == "functionapp" can't match the value returned by Azure Management API.
The possible fix that we found is to search a substring that match "functionapp" :
if strings.Contains(functionApp.Kind,"functionapp"), we tested it and we could retrieve the function apps. But the fix need to import "strings".
The import and processing of data succeded using Docker BloodHound.
There is possibly more Azure Resources that are concerned by this problem. We only tested Azure Function Apps.
We will continue to contribute by testing other resources.
Best Regards,
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 in cmd/list-function-apps.go at line 100 and compare the Function App kind returned by the Azure Management API with the current match condition. Verify that list-function-apps retrieves Function Apps whose kind includes functionapp, including functionapp,linux, and check whether the change affects other Azure resource kinds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 57/100