<?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 Run Endpoint Script - registry_get in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541366#M4306</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I try to run registry_get in the action center, but always fails to run.&lt;/P&gt;
&lt;P&gt;I check the administrator guide&lt;/P&gt;
&lt;P&gt;and learned that doesn't seem to work when running&amp;nbsp;&lt;SPAN&gt;specific hives&amp;nbsp;(e.g. /&lt;/SPAN&gt;&lt;SPAN&gt;HKEY_CURRENT_USER/ )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I try to get&amp;nbsp;some registry information in \HKEY_LOCAL_MACHINE\SYSTEM\Cyvera,&amp;nbsp;the content of this script mentions support for accepting registry paths starting with 'COMPUTER\\', but no matter if I add "COMPUTER\\", the final execution result is a failure, then&amp;nbsp;the exception logs all show the following：&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Syntax error when running function ' run ' in script:
 Traceback (most recent call last):
  File "script_execution.py", line 463, in _execute_script
  File "C:\ProgramData\Cyvera\Administrators\Temp\payload_execution\26caf6\script.py", line 27, in run
    with winreg.OpenKey(map_key(registry_hkey), registry_key_path) as key:
  File "C:\ProgramData\Cyvera\Administrators\Temp\payload_execution\26caf6\script.py", line 61, in map_key
    return eval(f"winreg.{hkey}")
  File "&amp;lt;string&amp;gt;", line 1
    winreg.
          ^
SyntaxError: unexpected EOF while parsing
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;I would like to know&amp;nbsp;&lt;/SPAN&gt;what is the correct input method to execute this endpoint script (registry_get).&lt;BR /&gt;Is there some sample input and running results for reference?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2023 06:26:42 GMT</pubDate>
    <dc:creator>Chilla</dc:creator>
    <dc:date>2023-05-08T06:26:42Z</dc:date>
    <item>
      <title>Run Endpoint Script - registry_get</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541366#M4306</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I try to run registry_get in the action center, but always fails to run.&lt;/P&gt;
&lt;P&gt;I check the administrator guide&lt;/P&gt;
&lt;P&gt;and learned that doesn't seem to work when running&amp;nbsp;&lt;SPAN&gt;specific hives&amp;nbsp;(e.g. /&lt;/SPAN&gt;&lt;SPAN&gt;HKEY_CURRENT_USER/ )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I try to get&amp;nbsp;some registry information in \HKEY_LOCAL_MACHINE\SYSTEM\Cyvera,&amp;nbsp;the content of this script mentions support for accepting registry paths starting with 'COMPUTER\\', but no matter if I add "COMPUTER\\", the final execution result is a failure, then&amp;nbsp;the exception logs all show the following：&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Syntax error when running function ' run ' in script:
 Traceback (most recent call last):
  File "script_execution.py", line 463, in _execute_script
  File "C:\ProgramData\Cyvera\Administrators\Temp\payload_execution\26caf6\script.py", line 27, in run
    with winreg.OpenKey(map_key(registry_hkey), registry_key_path) as key:
  File "C:\ProgramData\Cyvera\Administrators\Temp\payload_execution\26caf6\script.py", line 61, in map_key
    return eval(f"winreg.{hkey}")
  File "&amp;lt;string&amp;gt;", line 1
    winreg.
          ^
SyntaxError: unexpected EOF while parsing
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;I would like to know&amp;nbsp;&lt;/SPAN&gt;what is the correct input method to execute this endpoint script (registry_get).&lt;BR /&gt;Is there some sample input and running results for reference?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 06:26:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541366#M4306</guid>
      <dc:creator>Chilla</dc:creator>
      <dc:date>2023-05-08T06:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Run Endpoint Script - registry_get</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541397#M4309</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/251009"&gt;@Chilla&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for writing to live community!&lt;/P&gt;
&lt;P&gt;registry_get script is looking for an individual value instead of the key/subkey name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example: To grab 'Security Health' value data under run once in Registry_Path look for that value name- "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SecurityHealth"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Please mark the response as "Accept as Solution" if it answers your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 10:22:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541397#M4309</guid>
      <dc:creator>PiyushKohli</dc:creator>
      <dc:date>2023-05-08T10:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Run Endpoint Script - registry_get</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541643#M4319</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/276269"&gt;@PiyushKohli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 03:33:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/run-endpoint-script-registry-get/m-p/541643#M4319</guid>
      <dc:creator>Chilla</dc:creator>
      <dc:date>2023-05-10T03:33:43Z</dc:date>
    </item>
  </channel>
</rss>

