<?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: Detect where a process has been killed in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/531342#M3643</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/142551"&gt;@neelrohit&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks heaps for your detailed response and apologies for not responding sooner - I was on leave.&lt;/P&gt;
&lt;P&gt;I've tried putting in the BIOC and adding it a restriction profile but it does not seem to trigger.&lt;/P&gt;
&lt;P&gt;The restriction profile is indeed applying to my test endpoint, and I have verified my BIOC is applied in the restriction profile itself. I've done a check in on the agent multiple times but it does not seem to trigger. I'm just testing with Calculator for now.&lt;BR /&gt;&lt;BR /&gt;Excerpt from XDR Logs showing my BIOC has been applied, and a few screenshots with what I've set up in XDR:&lt;/P&gt;
&lt;P&gt;biocRuleName" : "&lt;BR /&gt;Killed by User",&lt;BR /&gt;"friendlyName" : "GlobalProtect Killed by User",&lt;BR /&gt;"tactic_id" : [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once this is working would there also be a way of capturing in this BIOC when it is killed from task manager rather than from CMD?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The XML query you provided is great (thanks), but I'm concerned that this would be inaccurate and capture system generated events such as upgrades or system restarts. In testing, regardless of who kills the process, XDR shows the user as "SYSTEM" because GlobalProtect (the software I'm trying to work with here) runs under the SYSTEM context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Shannon&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 03:15:02 GMT</pubDate>
    <dc:creator>SARowe_NZ</dc:creator>
    <dc:date>2023-02-16T03:15:02Z</dc:date>
    <item>
      <title>Detect where a process has been killed</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/530029#M3565</link>
      <description>&lt;P&gt;We have a scenario where users are able to kill a certain process to bypass security.&lt;/P&gt;
&lt;P&gt;How can we leverage XDR to detect where the specific process name has been killed and, ideally, prevent it?&lt;/P&gt;
&lt;P&gt;I thought maybe an IOC or BIOC but the IOC doesn't seem to have anything, and the BIOC is limited to execution/injection and doesn't cover termination of processes.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Shannon&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 00:11:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/530029#M3565</guid>
      <dc:creator>SARowe_NZ</dc:creator>
      <dc:date>2023-02-07T00:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Detect where a process has been killed</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/530119#M3578</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/58478"&gt;@SARowe_NZ&lt;/a&gt; &amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We do not capture event id 4689 specifically, but process termination events are monitored.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if your end users are killing processes using cmd or powershell, you can create command line rules to detect and prevent events as such.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the BIOC you can create a rule for target process cmd parameter as&amp;nbsp; *\taskkill* or *\Stop-Process* (eg.&lt;STRONG&gt;Process [ action type = execution AND target process cmd = *\taskkill*, *\Stop-Process* ]&lt;/STRONG&gt; &lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;)&amp;nbsp; and add it to restrictions profile.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&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;You can also monitor the events of process stop using the following XQL query if that works. Choose filter of your own choice and subfilters to create monitoring events. The query below is also a valid BIOC however, this can generate a lot of false positives. As a result recommendation would be to keep this query and rule as granular as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;dataset = xdr_data | filter event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_STOP and agent_os_type != ENUM.AGENT_OS_LINUX&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark the response as "Accept as Solution" if it answers your query. Hope it helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 15:47:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/530119#M3578</guid>
      <dc:creator>neelrohit</dc:creator>
      <dc:date>2023-02-07T15:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Detect where a process has been killed</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/531342#M3643</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/142551"&gt;@neelrohit&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks heaps for your detailed response and apologies for not responding sooner - I was on leave.&lt;/P&gt;
&lt;P&gt;I've tried putting in the BIOC and adding it a restriction profile but it does not seem to trigger.&lt;/P&gt;
&lt;P&gt;The restriction profile is indeed applying to my test endpoint, and I have verified my BIOC is applied in the restriction profile itself. I've done a check in on the agent multiple times but it does not seem to trigger. I'm just testing with Calculator for now.&lt;BR /&gt;&lt;BR /&gt;Excerpt from XDR Logs showing my BIOC has been applied, and a few screenshots with what I've set up in XDR:&lt;/P&gt;
&lt;P&gt;biocRuleName" : "&lt;BR /&gt;Killed by User",&lt;BR /&gt;"friendlyName" : "GlobalProtect Killed by User",&lt;BR /&gt;"tactic_id" : [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once this is working would there also be a way of capturing in this BIOC when it is killed from task manager rather than from CMD?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The XML query you provided is great (thanks), but I'm concerned that this would be inaccurate and capture system generated events such as upgrades or system restarts. In testing, regardless of who kills the process, XDR shows the user as "SYSTEM" because GlobalProtect (the software I'm trying to work with here) runs under the SYSTEM context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Shannon&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 03:15:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/531342#M3643</guid>
      <dc:creator>SARowe_NZ</dc:creator>
      <dc:date>2023-02-16T03:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Detect where a process has been killed</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/531345#M3644</link>
      <description>&lt;P&gt;Slight update/correction: The BIOC does work if CMD is run as the logged in user, however, it does not match if CMD is "Run as Administrator" which is what most users will do. Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 03:34:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/detect-where-a-process-has-been-killed/m-p/531345#M3644</guid>
      <dc:creator>SARowe_NZ</dc:creator>
      <dc:date>2023-02-16T03:34:26Z</dc:date>
    </item>
  </channel>
</rss>

