<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ai-Security on Eriteach | Microsoft Cloud Tech</title><link>https://blog.eriteach.com/en/tags/ai-security/</link><description>Recent content in Ai-Security on Eriteach | Microsoft Cloud Tech</description><generator>Hugo -- 0.155.1</generator><language>en</language><copyright>2024-2026 Robel Mehari. All rights reserved.</copyright><lastBuildDate>Sat, 13 Jun 2026 23:53:13 +0200</lastBuildDate><atom:link href="https://blog.eriteach.com/en/tags/ai-security/index.xml" rel="self" type="application/rss+xml"/><item><title>Local AI Agents in Microsoft Defender: visibility first, blocking later</title><link>https://blog.eriteach.com/en/posts/local-ai-agents-defender/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.eriteach.com/en/posts/local-ai-agents-defender/</guid><description>How to approach Microsoft Defender Local AI Agents with inventory, AgentsInfo validation, Audit mode pilots, and safe endpoint governance.</description><content:encoded><![CDATA[<p>Microsoft Defender is starting to give security teams better visibility into AI agents.</p>
<p>The area I looked at is:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Microsoft Defender portal &gt; Assets &gt; AI Agents
</span></span></code></pre></div><p>The interesting part for endpoint teams is <strong>Local agents</strong>.</p>
<p>A local AI agent is not just another SaaS app. It can run on a Windows endpoint with the user&rsquo;s permissions. Depending on the tool, it may read local files, inspect repositories, call tools, run commands, or connect to MCP servers.</p>
<p>That changes the risk model.</p>
<p>A browser-based AI chat is mostly a data governance problem. A local agent is also an endpoint governance problem.</p>
<h2 id="what-i-corrected-before-publishing">What I corrected before publishing</h2>
<p>I had an earlier draft that was too confident around the KQL.</p>
<p>The important correction is this:</p>
<p><code>AgentsInfo</code> is a real Microsoft Defender XDR Advanced Hunting table, but it is preview and may not be available in every tenant yet. It also depends on the relevant Microsoft Agent 365 / AI security capabilities and preview availability.</p>
<p>So I would not start by building a workbook around it. I would first validate that the table exists:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">AgentsInfo
</span></span><span class="line"><span class="cl">| take 10
</span></span></code></pre></div><p>If that fails, the tenant does not have the table available yet.</p>
<p>Also, KQL string comparisons need quoted strings. This is valid:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">| where LifecycleStatus != &#34;Deleted&#34;
</span></span></code></pre></div><p>This is not:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">| where LifecycleStatus != Deleted
</span></span></code></pre></div><p>Small detail, but important if people copy/paste queries from a blog post.</p>
<h2 id="what-microsoft-documents">What Microsoft documents</h2>
<p>Microsoft documents the AI agent inventory as a preview capability. It can include cloud agents and local agents discovered on endpoints.</p>
<p>For local agents, Microsoft Defender for Endpoint can discover supported local AI agents and MCP server configurations on onboarded devices. Runtime protection is a separate preview control that can audit or block supported prompt-injection-driven agent actions.</p>
<p>Microsoft also documents <code>AgentsInfo</code> as the current Advanced Hunting table for AI agent inventory and posture. The older <code>AIAgentsInfo</code> table is being transitioned to <code>AgentsInfo</code>.</p>
<h2 id="the-query-i-would-start-with">The query I would start with</h2>
<p>After confirming that <code>AgentsInfo</code> exists, this is the safer starting point:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">let Lookback = 30d;
</span></span><span class="line"><span class="cl">AgentsInfo
</span></span><span class="line"><span class="cl">| where Timestamp &gt; ago(Lookback)
</span></span><span class="line"><span class="cl">| summarize arg_max(Timestamp, *) by AgentId
</span></span><span class="line"><span class="cl">| where isempty(LifecycleStatus) or LifecycleStatus !in~ (&#34;Deleted&#34;, &#34;Uninstalled&#34;)
</span></span><span class="line"><span class="cl">| project
</span></span><span class="line"><span class="cl">    LastSeen = Timestamp,
</span></span><span class="line"><span class="cl">    AgentId,
</span></span><span class="line"><span class="cl">    AgentName,
</span></span><span class="line"><span class="cl">    Platform,
</span></span><span class="line"><span class="cl">    PublishedStatus,
</span></span><span class="line"><span class="cl">    LifecycleStatus,
</span></span><span class="line"><span class="cl">    Availability,
</span></span><span class="line"><span class="cl">    Owners,
</span></span><span class="line"><span class="cl">    SharedWith,
</span></span><span class="line"><span class="cl">    DeclaredTools,
</span></span><span class="line"><span class="cl">    McpServers,
</span></span><span class="line"><span class="cl">    Model,
</span></span><span class="line"><span class="cl">    Endpoints
</span></span><span class="line"><span class="cl">| order by LastSeen desc
</span></span></code></pre></div><p>I keep the query close to the documented schema. No guessed columns. No assumed device fields. No workbook logic until the table is proven in the tenant.</p>
<h2 id="why-local-agents-matter">Why local agents matter</h2>
<p>The risk is not simply &ldquo;AI is installed&rdquo;.</p>
<p>The risk is the agent loop:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Prompt, file, webpage or tool output
</span></span><span class="line"><span class="cl">-&gt; agent reasoning
</span></span><span class="line"><span class="cl">-&gt; tool call, file access, command or service call
</span></span><span class="line"><span class="cl">-&gt; action performed as the user
</span></span></code></pre></div><p>That is where prompt injection becomes relevant. A local agent can read content that contains hidden instructions. If the agent follows those instructions and has tool access, the endpoint becomes part of the attack path.</p>
<p>MCP servers make this even more important to review. They can expand what the agent can reach.</p>
<h2 id="my-preferred-rollout">My preferred rollout</h2>
<p>I would not block everything on day one.</p>
<p>A safer approach:</p>
<ol>
<li>Confirm whether the Defender AI agent inventory is available.</li>
<li>Confirm whether <code>AgentsInfo</code> works in Advanced Hunting.</li>
<li>Review discovered agents and MCP server configuration.</li>
<li>Separate expected IT, security and developer usage from unexpected endpoint usage.</li>
<li>Pilot Defender AI agent runtime protection in <strong>Audit</strong> mode.</li>
<li>Review alerts and workflow impact.</li>
<li>Move selected groups to <strong>Block</strong> only after validation.</li>
<li>Use App Control, AppLocker or WDAC separately if the software itself should not run.</li>
</ol>
<p>Runtime protection and application control are not the same thing.</p>
<p>Runtime protection can help audit or block supported unsafe agent actions. App Control, AppLocker or WDAC controls whether the agent executable is allowed to run.</p>
<h2 id="watch-outs">Watch-outs</h2>
<p>A few things I would be careful with:</p>
<ul>
<li>This is preview functionality. Expect changes.</li>
<li><code>AgentsInfo</code> may not exist in every tenant yet.</li>
<li>Inventory does not prove data loss. It proves discovery or representation.</li>
<li>Broad Block mode can break legitimate admin or developer workflows.</li>
<li>MCP server access should be reviewed like tool access, not harmless metadata.</li>
</ul>
<p>My practical takeaway:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Find -&gt; classify -&gt; audit -&gt; validate -&gt; block where justified
</span></span></code></pre></div><p>Defender is not magically solving local AI agent governance by itself. But it is starting to give endpoint and security teams a useful place to begin.</p>
<h2 id="microsoft-references">Microsoft references</h2>
<ul>
<li>Discover AI agents and assess security posture using Microsoft Defender</li>
<li>Local AI agent discovery with Microsoft Defender for Endpoint</li>
<li>AI agent runtime protection with Microsoft Defender for Endpoint</li>
<li>Set up AI agent runtime protection with Microsoft Defender for Endpoint</li>
<li>AgentsInfo table in the Microsoft Defender XDR Advanced Hunting schema</li>
</ul>
]]></content:encoded></item></channel></rss>