# 非法同意

```
攻击者创建一个在 Azure 注册的应用程序，请求访问联系信息、电子邮件或文档等数据。然后，攻击者诱使最终用户同意应用程序，以便攻击者可以访问目标用户有权访问的数据。
检查是否允许用户同意应用：PS AzureADPreview> (GetAzureADMSAuthorizationPolicy).PermissionGrantPolicyIdsAssignedToDefaultUserRole

禁用用户同意：用户不能授予应用程序权限。
用户可以同意来自经过验证的发布者或您的组织的应用程序，但仅限于您选择的权限：所有用户只能同意由经过验证的发布者发布的应用程序和在您的租户中注册的应用程序
用户可以同意所有应用程序：允许所有用户同意任何不需要管理员同意的权限，
自定义应用同意政策
```

**注册申请**

```
登录到https://portal.azure.com > Azure Active Directory
点击应用注册>新注册
输入我们的应用程序的名称
在支持帐户类型下选择“任何组织目录中的帐户（任何 Azure AD 目录 - 多租户）”
输入重定向 URL。此 URL 应指向我们将托管的 365-Stealer 应用程序，用于托管我们的网络钓鱼页面。确保端点是https://<DOMAIN/IP>:<PORT>/login/authorized.
单击注册并保存应用程序 ID
```

**配置应用程序**

```
点击Certificates & secrets
单击New client secret然后输入描述，然后单击添加。
保存secret的值。
单击 API 权限 > 添加权限
单击 Microsoft Graph >委派权限
搜索并选择下面提到的权限，然后单击添加权限
Contacts.Read
Mail.Read / Mail.ReadWrite
邮件.发送
笔记.阅读.全部
邮箱设置.ReadWrite
文件.ReadWrite.All
User.ReadBasic.All
用户读
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.heresecurity.wiki/yun-an-quan/azure/fei-fa-tong-yi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
