<?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 XQL query to pull USB plug-in  statistic in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582769#M6463</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to generate the USB plug-in statistic to build case around it. Hence the following 2 XQL queries were built. The only issue is I'm not sure which one is the more accurate data as i found both results are not even close.&lt;BR /&gt;Does anyone know the difference between "ENUM.DEVICE.PLUG" and "ENUM.MOUNT_DRIVE_MOUNT"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;config case_sensitive = false
| preset = device_control  
| filter event_sub_type = ENUM.DEVICE_PLUG 
| alter date = format_timestamp("%Y/%m/%d", _time) 
| filter action_device_class_name = "disk"
| comp count(action_device_class_name) as TotalMountingEvents by action_device_class_name
| view graph type = single subtype = standard xaxis = TotalMountingEvents yaxis = TotalMountingEvents headerfontsize = 18 &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;config case_sensitive = false
| dataset = xdr_data 
| filter event_sub_type = ENUM.MOUNT_DRIVE_MOUNT 
| alter date = format_timestamp("%Y/%m/%d", _time) 
| fields date, agent_hostname as hostname, action_mount_device_info as mount_info
| alter serial_number = json_extract(mount_info, "$.storage_device_serial_number")
| alter drivetype = json_extract(mount_info, "$.storage_device_drive_type")
| alter vendor_id = json_extract(mount_info, "$.storage_device_vendor_id")
| alter product_id = json_extract(mount_info, "$.storage_device_product_id")
| alter class_name = json_extract(mount_info, "$.storage_device_class_name")
| filter drivetype = "2"
| comp count(drivetype) as TotalMountingEvents by drivetype
| view graph type = single subtype = standard xaxis = TotalMountingEvents yaxis = TotalMountingEvents headerfontsize = 18 &lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 09:01:57 GMT</pubDate>
    <dc:creator>Antony_Chan</dc:creator>
    <dc:date>2024-04-05T09:01:57Z</dc:date>
    <item>
      <title>XQL query to pull USB plug-in  statistic</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582769#M6463</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to generate the USB plug-in statistic to build case around it. Hence the following 2 XQL queries were built. The only issue is I'm not sure which one is the more accurate data as i found both results are not even close.&lt;BR /&gt;Does anyone know the difference between "ENUM.DEVICE.PLUG" and "ENUM.MOUNT_DRIVE_MOUNT"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;config case_sensitive = false
| preset = device_control  
| filter event_sub_type = ENUM.DEVICE_PLUG 
| alter date = format_timestamp("%Y/%m/%d", _time) 
| filter action_device_class_name = "disk"
| comp count(action_device_class_name) as TotalMountingEvents by action_device_class_name
| view graph type = single subtype = standard xaxis = TotalMountingEvents yaxis = TotalMountingEvents headerfontsize = 18 &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;config case_sensitive = false
| dataset = xdr_data 
| filter event_sub_type = ENUM.MOUNT_DRIVE_MOUNT 
| alter date = format_timestamp("%Y/%m/%d", _time) 
| fields date, agent_hostname as hostname, action_mount_device_info as mount_info
| alter serial_number = json_extract(mount_info, "$.storage_device_serial_number")
| alter drivetype = json_extract(mount_info, "$.storage_device_drive_type")
| alter vendor_id = json_extract(mount_info, "$.storage_device_vendor_id")
| alter product_id = json_extract(mount_info, "$.storage_device_product_id")
| alter class_name = json_extract(mount_info, "$.storage_device_class_name")
| filter drivetype = "2"
| comp count(drivetype) as TotalMountingEvents by drivetype
| view graph type = single subtype = standard xaxis = TotalMountingEvents yaxis = TotalMountingEvents headerfontsize = 18 &lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 09:01:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582769#M6463</guid>
      <dc:creator>Antony_Chan</dc:creator>
      <dc:date>2024-04-05T09:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: XQL query to pull USB plug-in  statistic</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582828#M6468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/202190"&gt;@Antony_Chan&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The "ENUM.DEVICE.PLUG" is the event of any device pluged on the system, can be a usb disk drive, bluetooth headset, or any other kind of device. This is usually used to query the usb devices inserted and take the serial or guid to create device control rules.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The "ENUM.MOUNT_DRIVE_MOUNT" is an action made by the operating system to mount any drive to a directory folder, this can be a usb drive, or sometimes the OS mount drivers internally to take snapshots or backups automatically, or for some application functions. This action is more common in Linux and MacOs systems.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can see in this doc more information about the event types:&amp;nbsp;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XQL-Schema-Reference-Guide/Action-Actor" target="_blank"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XQL-Schema-Reference-Guide/Action-Actor&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post answers your question, please mark it as the solution.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 20:59:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582828#M6468</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-04-05T20:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: XQL query to pull USB plug-in  statistic</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582876#M6469</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310428"&gt;@jmazzeo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sharing the information and the link. &lt;BR /&gt;The doc is definitely new to me. However, I couldn't locate the said information in the doc, am I missing something here?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 02:26:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-query-to-pull-usb-plug-in-statistic/m-p/582876#M6469</guid>
      <dc:creator>Antony_Chan</dc:creator>
      <dc:date>2024-04-08T02:26:36Z</dc:date>
    </item>
  </channel>
</rss>

