Hiado: Cross-projects Repository permissions enumeration Tool for Azure DevOps
Hiado
Cross-projects Repository permissions enumeration Tool for Azure DevOps
What does Hiado do?
Hiado is a Python script that helps you enumerate information about the repositories your organization manages within Azure DevOps. Particular focus is given to the enumeration of the permissions a specific user has, these can be:
- Bypass policies when completing pull requests
- Bypass policies when pushing
- Contribute
- Contribute to pull requests
- Create branch
- Create tag
- Delete or disable the repository
- Edit policies
- Force push
- Manage permissions
- Read
- Remove others lock
- Rename repository
Hiado also supports extra checks/filter:
- the repository is used by a given pipeline
- enumeration of the “trigger” and “azureSubscription” parameters. An example output is:
How does Hiado do this?
Hiado makes use of some “undocumented” Azure DevOps APIs. These APIs are used by Azure DevOps web, hence after I spent some time proxying HTTP requests, I could figure out a chain of calls that would give me the list of the permissions an authenticated user has on a specific repository:
Install
git clone https://github.com/oldboy21/Hiado.git
cd Hiado
pip3 install -r requirements.txt
Use
The permissions can be checked against three different lists (option -ip) defined as follows:
Be sure you use a valid UserAuthentication cookie, you can find it in your browser after you have successfully authenticated. Unfortunately, the “undocumented” APIs do not support authentication via PAT (personal access token)
Copyright (C) 2024 oldboy21
Source: https://github.com/oldboy21/