<?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 Help me on developing XQL Query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/help-me-on-developing-xql-query/m-p/1250263#M9189</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Hi Community,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Please help me on creating XQL query for cortex XSIAM on the below requirement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;VPN Credential Abuse / Anomalous VPN Access&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN data-contrast="auto"&gt;Detect initial access via compromised VPN credentials, the primary entry vector used by&amp;nbsp;Handala&amp;nbsp;Hack. It looks for suspicious VPN authentication events such as first‑time logins from new geolocations, commercial VPN IP ranges, sudden admin elevation after VPN login, or anomalous remote access activity. By correlating authentication anomalies with VPN session metadata, the hunt surfaces early indicators of credential misuse and unauthorized access. This aligns with T1078 (Valid Accounts) and T1090 (Proxy).&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;</description>
    <pubDate>Mon, 16 Mar 2026 11:04:58 GMT</pubDate>
    <dc:creator>N.B238890</dc:creator>
    <dc:date>2026-03-16T11:04:58Z</dc:date>
    <item>
      <title>Help me on developing XQL Query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/help-me-on-developing-xql-query/m-p/1250263#M9189</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Hi Community,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Please help me on creating XQL query for cortex XSIAM on the below requirement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;VPN Credential Abuse / Anomalous VPN Access&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN data-contrast="auto"&gt;Detect initial access via compromised VPN credentials, the primary entry vector used by&amp;nbsp;Handala&amp;nbsp;Hack. It looks for suspicious VPN authentication events such as first‑time logins from new geolocations, commercial VPN IP ranges, sudden admin elevation after VPN login, or anomalous remote access activity. By correlating authentication anomalies with VPN session metadata, the hunt surfaces early indicators of credential misuse and unauthorized access. This aligns with T1078 (Valid Accounts) and T1090 (Proxy).&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;</description>
      <pubDate>Mon, 16 Mar 2026 11:04:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/help-me-on-developing-xql-query/m-p/1250263#M9189</guid>
      <dc:creator>N.B238890</dc:creator>
      <dc:date>2026-03-16T11:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help me on developing XQL Query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/help-me-on-developing-xql-query/m-p/1250273#M9192</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="392" data-start="0"&gt;To detect initial access via compromised VPN credentials and subsequent anomalous activity, you can utilize Cortex XSIAM's ability to query and correlate metadata from GlobalProtect and general authentication datasets. While a single, all-encompassing query for every objective may not exist, the following components can be used to build a comprehensive hunt for the behaviors you described.&lt;/P&gt;
&lt;H4 data-end="459" data-start="399" data-section-id="2ozj9d"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4 data-end="459" data-start="399" data-section-id="2ozj9d"&gt;1. Detecting VPN Access from Commercial/Hosting IP Ranges&lt;/H4&gt;
&lt;P data-end="762" data-start="461"&gt;Cortex XSIAM automatically enriches source IP data with Autonomous System (AS) information from providers such as Spur and MaxMind GeoLite2. You can identify commercial VPN or proxy usage by filtering for Autonomous System Names (ASNs) associated with hosting providers such as DigitalOcean or Amazon.&lt;/P&gt;
&lt;P data-end="762" data-start="461"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="844" data-start="764"&gt;Use the following query structure to identify logins from hosting provider ASNs:&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=""&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 vpn_service = "GlobalProtect" and auth_outcome = "SUCCESS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields _time, auth_identity, action_local_ip, xdm.source.asn.as_name, xdm.source.asn.as_number&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter xdm.source.asn.as_name in ("DigitalOcean", "Amazon", "Google", "Microsoft") // Hosting providers often used by commercial VPNs&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 data-end="1409" data-start="1179"&gt;&lt;STRONG data-end="1188" data-start="1179"&gt;Note:&lt;/STRONG&gt; Specific direct XDM boolean flags for Spur-provided VPN metadata (for example &lt;CODE data-end="1286" data-start="1267"&gt;xdm.source.is_vpn&lt;/CODE&gt;) may vary depending on the schema version. Review the latest XDM Schema Guide or inspect available fields in your dataset.&lt;/P&gt;
&lt;H4 data-end="1470" data-start="1416" data-section-id="11t6ihh"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4 data-end="1470" data-start="1416" data-section-id="11t6ihh"&gt;2. Identifying VPN Logins from Unusual Geolocations&lt;/H4&gt;
&lt;P data-end="1615" data-start="1472"&gt;You can monitor successful connections originating from unexpected countries by filtering on geographic metadata associated with the source IP.&lt;/P&gt;
&lt;P data-end="1615" data-start="1472"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="1680" data-start="1617"&gt;Example query to find logins outside a designated home country:&lt;/P&gt;
&lt;P data-end="1680" data-start="1617"&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=""&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 case_sensitive = false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| dataset = xdr_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter vpn_service = "GlobalProtect" and vpn_event_description = "gateway-auth" and action_location != null and auth_outcome = "SUCCESS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter country_code = json_extract(to_json_string(action_location), "$.country")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter country_code not contains "[HOME_COUNTRY_CODE]" // Replace with your standard country code (e.g., "US")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields _time, agent_hostname, auth_identity, action_local_ip, country_code, auth_outcome&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 data-end="2391" data-start="2170"&gt;For &lt;STRONG data-end="2217" data-start="2174"&gt;first-time logins from new geolocations&lt;/STRONG&gt;, Cortex XSIAM includes built-in analytics alerts such as &lt;EM data-end="2324" data-start="2275"&gt;“A user connected to a VPN from a new country.”&lt;/EM&gt; These alerts rely on historical baselining of user login behavior.&lt;/P&gt;
&lt;H4 data-end="2466" data-start="2398" data-section-id="lxz3ob"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4 data-end="2466" data-start="2398" data-section-id="lxz3ob"&gt;3. Monitoring for Administrative Elevation and Anomalous Activity&lt;/H4&gt;
&lt;P data-end="2615" data-start="2468"&gt;After a suspicious VPN login, you should monitor for potential privilege escalation or lateral movement. Examples of activity to watch for include:&lt;/P&gt;
&lt;UL data-end="2748" data-start="2617"&gt;
&lt;LI data-end="2677" data-start="2617" data-section-id="p34r74"&gt;
&lt;P data-end="2677" data-start="2619"&gt;&lt;STRONG data-end="2644" data-start="2619"&gt;Windows Event ID 4624&lt;/STRONG&gt; – Successful interactive logon&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-end="2748" data-start="2678" data-section-id="1kk13c8"&gt;
&lt;P data-end="2748" data-start="2680"&gt;&lt;STRONG data-end="2705" data-start="2680"&gt;Windows Event ID 4768&lt;/STRONG&gt; – Kerberos authentication ticket request&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-end="2888" data-start="2750"&gt;These events occurring shortly after a VPN login may indicate that compromised credentials are being used to pivot within the environment.&lt;/P&gt;
&lt;H4 data-end="2950" data-start="2895" data-section-id="2upryy"&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4 data-end="2950" data-start="2895" data-section-id="2upryy"&gt;4. Detecting Unauthorized Remote Access Tools (RATs)&lt;/H4&gt;
&lt;P data-end="3117" data-start="2952"&gt;If stolen credentials are used to deploy or execute remote access tools such as TeamViewer, you can detect them through process execution or file activity telemetry.&lt;/P&gt;
&lt;P data-end="3117" data-start="2952"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="3190" data-start="3119"&gt;Example query to identify TeamViewer execution and the associated user:&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=""&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 actor_process_image_path contains "TeamViewer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields _time, actor_effective_username, action_file_path, action_remote_ip, agent_hostname&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 data-end="3412" data-start="3372"&gt;TeamViewer also generates local logs at:&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;C:\Program Files (x86)\TeamViewer\TVNetwork.log&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-end="3580" data-start="3471"&gt;These artifacts can be correlated with user activity and endpoint telemetry stored in the &lt;CODE data-end="3571" data-start="3561"&gt;xdr_data&lt;/CODE&gt; dataset.&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:09:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/help-me-on-developing-xql-query/m-p/1250273#M9192</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2026-03-16T14:09:36Z</dc:date>
    </item>
  </channel>
</rss>

