Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't retrieve function apps #72

Open
rt-tdf opened this issue Feb 2, 2024 · 0 comments
Open

can't retrieve function apps #72

rt-tdf opened this issue Feb 2, 2024 · 0 comments

Comments

@rt-tdf
Copy link

rt-tdf commented Feb 2, 2024

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant