<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Please help me on developing xql query for cortex xsiam in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/please-help-me-on-developing-xql-query-for-cortex-xsiam/m-p/1250267#M9190</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me on developing the xql query for cortex xsiam on the below objective.&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;RDP Lateral Movement Burst&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Objective&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN data-contrast="auto"&gt;Detect&amp;nbsp;high‑velocity RDP lateral movement,&amp;nbsp;It detects multiple RDP connections (logon type 7/10) from the same account within&amp;nbsp;short time&amp;nbsp;spans, lateral movement to multiple hosts, and privilege misuse associated with hands‑on‑keyboard activity. This aligns with T1021.001 (RDP).&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2026 11:56:15 GMT</pubDate>
    <dc:creator>N.B238890</dc:creator>
    <dc:date>2026-03-16T11:56:15Z</dc:date>
    <item>
      <title>Please help me on developing xql query for cortex xsiam</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/please-help-me-on-developing-xql-query-for-cortex-xsiam/m-p/1250267#M9190</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me on developing the xql query for cortex xsiam on the below objective.&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;RDP Lateral Movement Burst&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Objective&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN data-contrast="auto"&gt;Detect&amp;nbsp;high‑velocity RDP lateral movement,&amp;nbsp;It detects multiple RDP connections (logon type 7/10) from the same account within&amp;nbsp;short time&amp;nbsp;spans, lateral movement to multiple hosts, and privilege misuse associated with hands‑on‑keyboard activity. This aligns with T1021.001 (RDP).&lt;/SPAN&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;201341983&amp;quot;:2,&amp;quot;335559739&amp;quot;:120,&amp;quot;335559740&amp;quot;:240}"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 11:56:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/please-help-me-on-developing-xql-query-for-cortex-xsiam/m-p/1250267#M9190</guid>
      <dc:creator>N.B238890</dc:creator>
      <dc:date>2026-03-16T11:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me on developing xql query for cortex xsiam</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/please-help-me-on-developing-xql-query-for-cortex-xsiam/m-p/1250272#M9191</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/924691441"&gt;@N.B238890&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings for the day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="225" data-start="0"&gt;To detect high-velocity RDP lateral movement (T1021.001) in Cortex XSIAM, you can construct an XQL query targeting Windows Event ID 4624 (Successful Logon) and filtering for Logon Types 7 (Unlock) and 10 (Remote Interactive).&lt;/P&gt;
&lt;P data-end="225" data-start="0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="426" data-start="227"&gt;The query logic identifies bursts by grouping these logon events within short time windows (using the &lt;CODE data-end="334" data-start="329"&gt;bin&lt;/CODE&gt; stage) and calculating the number of unique destination hosts accessed by a single account.&lt;/P&gt;
&lt;P data-end="426" data-start="227"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 data-end="478" data-start="428" data-section-id="1pok3nf"&gt;XQL Query: RDP Lateral Movement Burst Detection&lt;/H4&gt;
&lt;P data-end="525" data-start="480"&gt;Use the following query in the Query Builder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="relative w-full mt-4 mb-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"&gt;
&lt;DIV class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"&gt;
&lt;DIV class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="pe-11 pt-3"&gt;
&lt;DIV class="relative z-0 flex max-w-full"&gt;
&lt;DIV id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj" dir="ltr"&gt;
&lt;DIV class="cm-scroller"&gt;
&lt;DIV class="cm-content q9tKkq_readonly"&gt;&lt;SPAN&gt;config timeframe = 24h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| dataset = xdr_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Filter for Windows Logon Success events&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Extract LogonType, Target User, and Source IP from the event data fields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter logon_type = json_extract_scalar(action_evtlog_data_fields, "$.LogonType"),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; target_user = json_extract_scalar(action_evtlog_data_fields, "$.TargetUserName"),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; source_ip = json_extract_scalar(action_evtlog_data_fields, "$.IpAddress")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Filter specifically for RDP (Type 10) and Session Unlock (Type 7)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter logon_type in ("7", "10") and source_ip != "-" and source_ip != "127.0.0.1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Define the burst window (e.g., 15 minutes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| bin _time span = 15m&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Count unique destination hosts and total connections per account and source IP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| comp count_distinct(agent_hostname) as unique_targets, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; count(event_id) as total_connections &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; by _time, target_user, source_ip&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Threshold for burst detection: user connecting to 3 or more unique hosts in 15 mins&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter unique_targets &amp;gt;= 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| sort desc unique_targets&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H4 data-end="1648" data-start="1617" data-section-id="1ivnzef"&gt;Key Components of the Query&lt;/H4&gt;
&lt;P data-end="1776" data-start="1650"&gt;&lt;STRONG data-end="1662" data-start="1650"&gt;Dataset:&lt;/STRONG&gt;&lt;BR data-end="1665" data-start="1662" /&gt;Uses &lt;CODE data-end="1680" data-start="1670"&gt;xdr_data&lt;/CODE&gt;, which contains normalized telemetry from the XDR agent, including ingested Windows Event Logs.&lt;/P&gt;
&lt;P data-end="1933" data-start="1778"&gt;&lt;STRONG data-end="1799" data-start="1778"&gt;Field Extraction:&lt;/STRONG&gt;&lt;BR data-end="1802" data-start="1799" /&gt;Uses &lt;CODE data-end="1828" data-start="1807"&gt;json_extract_scalar&lt;/CODE&gt; to pull attributes such as &lt;CODE data-end="1867" data-start="1856"&gt;LogonType&lt;/CODE&gt; and &lt;CODE data-end="1883" data-start="1872"&gt;IpAddress&lt;/CODE&gt; from the &lt;CODE data-end="1920" data-start="1893"&gt;action_evtlog_data_fields&lt;/CODE&gt; JSON object.&lt;/P&gt;
&lt;P data-end="2132" data-start="1935"&gt;&lt;STRONG data-end="1951" data-start="1935"&gt;Burst Logic:&lt;/STRONG&gt;&lt;BR data-end="1954" data-start="1951" /&gt;The &lt;CODE data-end="1963" data-start="1958"&gt;bin&lt;/CODE&gt; stage segments events into 15-minute windows, while &lt;CODE data-end="2048" data-start="2016"&gt;count_distinct(agent_hostname)&lt;/CODE&gt; identifies when a single account connects to multiple endpoints within that period.&lt;/P&gt;
&lt;P data-end="2132" data-start="1935"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 data-end="2159" data-start="2134" data-section-id="ypghk6"&gt;Alternative Detection:&lt;/H4&gt;
&lt;P data-end="2340" data-start="2161"&gt;You can also monitor RDP activity using the &lt;CODE data-end="2219" data-start="2205"&gt;USER_SESSION&lt;/CODE&gt; event type or by monitoring network activity on port 3389. To view all user sessions regardless of log ingestion status:&lt;/P&gt;
&lt;DIV class="relative w-full mt-4 mb-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"&gt;
&lt;DIV class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"&gt;
&lt;DIV class="pe-11 pt-3"&gt;
&lt;DIV class="relative z-0 flex max-w-full"&gt;
&lt;DIV id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj" dir="ltr"&gt;
&lt;DIV class="cm-scroller"&gt;
&lt;DIV class="cm-content q9tKkq_readonly"&gt;&lt;SPAN&gt;dataset = xdr_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter event_type = ENUM.USER_SESSION&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P data-is-only-node="" data-is-last-node="" data-end="2592" data-start="2410"&gt;For continuous monitoring, you can save this query as a &lt;STRONG data-end="2486" data-start="2466"&gt;Correlation Rule&lt;/STRONG&gt; in Cortex XSIAM to automatically generate incidents when burst activity matching these conditions occurs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you feel this has answered your query, please let us know by clicking like and on&amp;nbsp;&lt;STRONG&gt;"mark this as a Solution".&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;S. Subashkar Sekar&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 14:03:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/please-help-me-on-developing-xql-query-for-cortex-xsiam/m-p/1250272#M9191</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2026-03-16T14:03:09Z</dc:date>
    </item>
  </channel>
</rss>

