Skip to content

Commit ce6db67

Browse files
committed
format sample queries
1 parent dbbd1f2 commit ce6db67

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

defender-xdr/advanced-hunting-aiagentsinfo-table.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ For information on other tables in the advanced hunting schema, [see the advance
6969
It is critical to identify agents that lack authentication mechanisms, as these may pose significant risks to the organization due to their public availability. Organizations should know about these agents so they can acknowledge any issues.
7070

7171
**Recommendations:**
72-
1. Confirm the agent's use case with the owner to determine if it is intended for public access.
73-
2. Review the Topics, Actions, and Knowledge sources to ensure there is no internal or sensitive information included.
72+
- Confirm the agent's use case with the owner to determine if it is intended for public access.
73+
- Review the Topics, Actions, and Knowledge sources to ensure there is no internal or sensitive information included.
7474

7575
```kusto
7676
AIAgentsInfo
@@ -84,8 +84,8 @@ It is critical to identify agents that lack authentication mechanisms, as these
8484
It is critical to identify agents that lack authentication requirements mechanisms, as these may pose significant risks to the organization due to their public availability. Organizations should know about these agents so they can acknowledge any issues.
8585

8686
**Recommendations:**
87-
1. Confirm the agent's use case with the owner to determine if it is intended for public access.
88-
2. Review the Topics, Actions, and Knowledge sources to ensure there is no internal or sensitive information included.
87+
- Confirm the agent's use case with the owner to determine if it is intended for public access.
88+
- Review the Topics, Actions, and Knowledge sources to ensure there is no internal or sensitive information included.
8989

9090
```kusto
9191
AIAgentsInfo
@@ -99,8 +99,8 @@ AIAgentsInfo
9999

100100
Identify agents that are published and are using the maker’s personal credentials in their authentication or integration flows. This practice increases the risk of credential exposure, privilege misuse, and weakens the separation of duties, potentially leading to compromised access.
101101

102-
**Recommendations:**
103-
1. Verify with the agent's owner if Author Authentication is necessary.
102+
**Recommendations:**
103+
- Verify with the agent's owner if Author Authentication is necessary.
104104

105105
```kusto
106106
let base = AIAgentsInfo
@@ -126,9 +126,10 @@ directActions
126126
### Agent shared with entire organization or multi-tenant
127127

128128
Identify agents that are shared with the entire organization or configured for multi-tenant access. Broad sharing increases the risk of unauthorized access by unintended users.
129+
129130
**Recommendations:**
130-
1. Confirm with the owner whether wide sharing is intentional and justified.
131-
2. Consider sharing to specific users or security groups, to avoid “organization-wide” sharing.
131+
- Confirm with the owner whether wide sharing is intentional and justified.
132+
- Consider sharing to specific users or security groups, to avoid “organization-wide” sharing.
132133

133134
```kusto
134135
AIAgentsInfo
@@ -141,10 +142,10 @@ AIAgentsInfo
141142
### Orphaned Agents
142143

143144
Identify agents whose owners are either disabled or removed from the organization. Having an owner for each agent is essential for governance and maintaining the agent.
145+
144146
**Recommendations:**
145-
1. Assign a new owner to the agent (Reassign an agent to a new owner - Microsoft Copilot Studio | Microsoft Learn).
146-
```
147-
147+
- Assign a new owner to the agent (Reassign an agent to a new owner - Microsoft Copilot Studio | Microsoft Learn).
148+
148149
**Option 1:**
149150
```kusto
150151
AIAgentsInfo
@@ -156,7 +157,6 @@ AIAgentsInfo
156157
) on $left.OwnerAccountUpns == $right.AccountUpn
157158
```
158159

159-
160160
**Option 2:**
161161
```kusto
162162
let EnabledAccountUpns =
@@ -172,6 +172,7 @@ AIAgentsInfo
172172
### Suspicious HTTP request to non-standard port
173173

174174
Identify agents that use HTTP actions on ports other than 443 or 80.
175+
175176
**Recommendations:**
176177
- Confirm with the agent owner whether it is necessary and inquire about the specific business use case.
177178

@@ -196,9 +197,9 @@ AIAgentsInfo
196197
### Suspicious HTTP request to non-standard schema
197198

198199
Identify agents that use HTTP actions to non https endpoints.
200+
199201
**Recommendations:**
200202
- Confirm with the agent owner whether it is necessary and inquire about the specific business use case.
201-
202203

203204
```kusto
204205
AIAgentsInfo
@@ -215,13 +216,12 @@ AIAgentsInfo
215216
| extend Scheme = tostring(ParsedUrl["Scheme"])
216217
| where isnotempty(Scheme) and Scheme != "https"
217218
| project-reorder AgentCreationTime ,AIAgentId, AIAgentName, ParsedUrl ,Url, AgentStatus, CreatorAccountUpn, OwnerAccountUpns, Topic
218-
219+
```
219220
### Suspicious HTTP request to connector endpoint
220221

221222
Identify agents that use HTTP actions to an endpoint with available Power Platform connector.
222223

223224
**Recommendations:**
224-
225225
- Verify with the agent owner if it's necessary and ask about the business use case. Consider using a connector instead.
226226

227227
```kusto
@@ -265,11 +265,11 @@ AIAgentsInfo
265265
### Sending email to external mailbox
266266

267267
Identify agents where a topic or action is configured to send emails to external mailboxes (outside the organization’s domains). This can potentially lead to sensitive or internal data being exfiltrated or leaving the organization's boundaries.
268+
268269
**Recommendations:**
269-
1. Verify with the agent owner whether sending external emails is necessary for the business scenario, what data will be sent, and if the external domain is authorized to receive that data.
270+
- Verify with the agent owner whether sending external emails is necessary for the business scenario, what data will be sent, and if the external domain is authorized to receive that data.
270271

271272
```kusto
272-
273273
// Identify agents where a topic or action is configured to send emails to external mailboxes (outside the organization's domains)
274274
let OrgDomains =
275275
IdentityInfo
@@ -316,14 +316,12 @@ FromActions
316316

317317
### Published dormant agent (30d) (Runtime Rule)
318318

319-
320319
Identify published agents that have not being used by any user in the organization for the last X days.
321320

322321
**Recommendations:**
323322
- Confirm with the agent owner if this behavior is expected. Otherwise, consider removing the agent to mitigate any potential risks.
324323

325324
```kusto
326-
327325
//Identify published agents that have not being used by any user in the organization for the last X days.
328326
let ActiveAgents =
329327
CloudAppEvents
@@ -350,10 +348,9 @@ AIAgentsInfo
350348
Identify agents that are not published and have not been modified in the last 30 days.
351349

352350
**Recommendations:**
353-
1. Confirm with the agent owner if the agent is still needed. Otherwise, consider removing the agent to mitigate any potential risks.
351+
- Confirm with the agent owner if the agent is still needed. Otherwise, consider removing the agent to mitigate any potential risks.
354352

355353
```kusto
356-
357354
//Identify agents that are not published and have not been modified in the last 30 days.
358355
AIAgentsInfo
359356
| summarize arg_max(Timestamp, *) by AIAgentId
@@ -364,12 +361,12 @@ AIAgentsInfo
364361
### Hard-coded credentials in Topics or Actions
365362

366363
Agents with hard-coded credentials in Topics or Actions can expose clear-text credentials to unintended entities.
364+
367365
**Recommendations:**
368366
- Consider keeping the credentials in Azure Key Vault and retrieve in in runtime using Environment Variables (Use environment variables for Azure Key Vault secrets - Power Apps | Microsoft Learn)
369367
- If not possible, make sure secured input option are enabled (Manage sensitive input like passwords in Power Automate - Power Automate | Microsoft Learn).
370368

371369
```kusto
372-
373370
//Find Agents with hard-coded credentials in Topics or Actions can expose clear-text credentials to unintended entities.
374371
let suspicious_patterns = @"(AKIA[0-9A-Z]{16})|(AIza[0-9A-Za-z_\-]{35})|(xox[baprs]-[0-9a-zA-Z]{10,48})|(ghp_[A-Za-z0-9]{36,59})|(sk_(live|test)_[A-Za-z0-9]{24})|(SG\.[A-Za-z0-9]{22}\.[A-Za-z0-9]{43})|(\d{8}:[\w\-]{35})|(eyJ[A-Za-z0-9_\-]+\.[A-Za-z0-9_\-]+\.[A-Za-z0-9_\-]+)|(Authorization\s*:\s*Basic\s+[A-Za-z0-9=:+]+)|([A-Za-z]+:\/\/[^\/\s]+:[^\/\s]+@[^\/\s]+)";
375372
AIAgentsInfo
@@ -383,7 +380,6 @@ AIAgentsInfo
383380
| project-reorder AgentCreationTime ,AIAgentId, AIAgentName, AgentStatus, CreatorAccountUpn, OwnerAccountUpns, SuspiciousMatchTool, SuspiciousMatchTopic
384381
```
385382

386-
387383
### Dormant Author Authentication connection in Agent (Runtime rule)
388384
Identify published agents that contain an action that runs with Author Authentication and not been used/invoked in the last 30 days.
389385

@@ -455,8 +451,9 @@ AIAgentsInfo
455451

456452
### Agents with MCP tool configured
457453
Find agents with MCP tool configured
454+
458455
**Recommendations:**
459-
1. Confirm with the agent owner if the MCP tool is still needed. Otherwise, consider removing it to mitigate any potential risks.
456+
- Confirm with the agent owner if the MCP tool is still needed. Otherwise, consider removing it to mitigate any potential risks.
460457

461458
```kusto
462459
//Find agents with MCP tool configured

0 commit comments

Comments
 (0)