<?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 Re: Cortex XQL help in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/592285#M6933</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/111040965"&gt;@elnur.abbasov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Not a direct answer to your question, but you may start with the one that I'm using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = xdr_data
//Event_type = 2 is referred to "NETWORK"
//Search for remote host that scan for specific ports
| filter event_type = 2 and action_network_is_server = True and action_remote_ip not in (null, "::1", "127.0.0.1") and causality_actor_process_image_path = "System" 
| comp count_distinct(action_local_ip) as connection_count, values(action_local_ip) as destination by action_remote_ip,action_local_port
| filter connection_count &amp;gt; 100

//Joining XDR endpoint dataset to validate the present of Cortex XDR agent on Remote IP
| join type=left conflict_strategy = right  (
    dataset=endpoints 
    | filter ip_address != null 
    | fields ip_address, endpoint_name
    | arrayexpand ip_address) as ep ep.ip_address = action_remote_ip
| filter endpoint_name = null
//Correlate hostname based on ip address. This information are obtained from NGFW. (Fairly reliable, but not 100% accurate - especially workstation's ip will change due to DHCP.)
| join type= left conflict_strategy = right (
    preset = network_story 
    | filter action_external_hostname != null
    | dedup action_local_ip
    | fields action_external_hostname as DNS_name, action_local_ip) as FWdata fwdata.action_local_ip = action_remote_ip 
| fields action_remote_ip as remote_ip, DNS_name, destination, connection_count, action_local_port as destination_port
| sort desc connection_count&lt;/LI-CODE&gt;
&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 08:07:05 GMT</pubDate>
    <dc:creator>Antony_Chan</dc:creator>
    <dc:date>2024-07-17T08:07:05Z</dc:date>
    <item>
      <title>Cortex XQL help</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/591845#M6909</link>
      <description>&lt;P&gt;Hello Dear Community, I want to count events based on specified time periods. For example I want to query hosts that scanned more than 50 hosts in 10 seconds. How can I write XQL in that case?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 13:24:01 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/591845#M6909</guid>
      <dc:creator>elnur.abbasov</dc:creator>
      <dc:date>2024-07-12T13:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cortex XQL help</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/592111#M6922</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/111040965"&gt;@elnur.abbasov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please confirm what kindly of events are you looking for and what type of scanning you have mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ashutosh&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 07:02:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/592111#M6922</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-07-16T07:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cortex XQL help</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/592285#M6933</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/111040965"&gt;@elnur.abbasov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Not a direct answer to your question, but you may start with the one that I'm using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = xdr_data
//Event_type = 2 is referred to "NETWORK"
//Search for remote host that scan for specific ports
| filter event_type = 2 and action_network_is_server = True and action_remote_ip not in (null, "::1", "127.0.0.1") and causality_actor_process_image_path = "System" 
| comp count_distinct(action_local_ip) as connection_count, values(action_local_ip) as destination by action_remote_ip,action_local_port
| filter connection_count &amp;gt; 100

//Joining XDR endpoint dataset to validate the present of Cortex XDR agent on Remote IP
| join type=left conflict_strategy = right  (
    dataset=endpoints 
    | filter ip_address != null 
    | fields ip_address, endpoint_name
    | arrayexpand ip_address) as ep ep.ip_address = action_remote_ip
| filter endpoint_name = null
//Correlate hostname based on ip address. This information are obtained from NGFW. (Fairly reliable, but not 100% accurate - especially workstation's ip will change due to DHCP.)
| join type= left conflict_strategy = right (
    preset = network_story 
    | filter action_external_hostname != null
    | dedup action_local_ip
    | fields action_external_hostname as DNS_name, action_local_ip) as FWdata fwdata.action_local_ip = action_remote_ip 
| fields action_remote_ip as remote_ip, DNS_name, destination, connection_count, action_local_port as destination_port
| sort desc connection_count&lt;/LI-CODE&gt;
&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 08:07:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xql-help/m-p/592285#M6933</guid>
      <dc:creator>Antony_Chan</dc:creator>
      <dc:date>2024-07-17T08:07:05Z</dc:date>
    </item>
  </channel>
</rss>

