<?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: How to create two different fields using regex from one fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619673#M215368</link>
    <description>&lt;P&gt;That is what the rex expression is doing - the first part between the first &amp;lt;span&amp;gt; and &amp;lt;/span&amp;gt; goes in callflaw and the second part goes in remediation.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 15:29:49 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-11-04T15:29:49Z</dc:date>
    <item>
      <title>How to create two different fields using regex from one fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619463#M215293</link>
      <description>&lt;P&gt;&amp;lt;span&amp;gt;This call to java.lang.Runtime.exec() contains a command injection flaw. The argument to the function is constructed using untrusted input. If an attacker is allowed to specify all or part of the command, it may be possible to execute commands on the server with the privileges of the executing process. The level of exposure depends on the effectiveness of input validation routines, if any. The first argument to exec() contains tainted data from the variables (new String\[...\]). The tainted data originated from an earlier call to AnnotationVirtualController.vc_annotation_entry.&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;Validate all untrusted input to ensure that it conforms to the expected format, using centralized data validation routines when possible. When using blocklists, be sure that the sanitizing routine performs a sufficient number of iterations to remove all instances of disallowed characters. Most APIs that execute system commands also have a "safe" version of the method that takes an array of strings as input rather than a single string, which protects against some forms of command injection.&amp;lt;/span&amp;gt; &amp;lt;span&amp;gt;References: &amp;lt;a href="&lt;A href="https://cwe.mitre.org/data/definitions/78.html" target="_blank" rel="noopener"&gt;https://cwe.mitre.org/data/definitions/78.html&lt;/A&gt;"&amp;gt;CWE&amp;lt;/a&amp;gt; &amp;lt;a href="&lt;A href="https://owasp.org/www-community/attacks/Command_Injection" target="_blank" rel="noopener"&gt;https://owasp.org/www-community/attacks/Command_Injection&lt;/A&gt;"&amp;gt;OWASP&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&lt;/P&gt;
&lt;P&gt;This fields value from where I need to create 2 separate fields&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First field call flaw extract&amp;nbsp; from &amp;lt;span&amp;gt; "This call to java.lang.Runtime.exec() contains a command injection flaw. The argument to the function is constructed using untrusted input. If an attacker is allowed to specify all or part of the command, it may be possible to execute commands on the server with the privileges of the executing process. The level of exposure depends on the effectiveness of input validation routines, if any. The first argument to exec() contains tainted data from the variables (new String\[...\]). The tainted data originated from an earlier call to AnnotationVirtualController.vc_annotation_entry.&amp;nbsp; "&amp;lt;\span&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;second fields call rededication start from&lt;/P&gt;
&lt;P&gt;&amp;lt;span&amp;gt;&amp;nbsp;Validate all untrusted input to ensure that it conforms to the expected format, using centralized data validation routines when possible. When using blocklists, be sure that the sanitizing routine performs a sufficient number of iterations to remove all instances of disallowed characters. Most APIs that execute system commands also have a "safe" version of the method that takes an array of strings as input rather than a single string, which protects against some forms of command injection.&amp;lt;\span&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 16:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619463#M215293</guid>
      <dc:creator>karu0711</dc:creator>
      <dc:date>2022-11-03T16:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: I need help with regex? How do I create two different fields using regex from one fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619484#M215300</link>
      <description>&lt;P&gt;The easiest way to extract two fields from a complex string like that is by using two different rex commands.&lt;/P&gt;&lt;P&gt;The first might be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "contains a (?&amp;lt;flaw&amp;gt;.*?) flaw"&lt;/LI-CODE&gt;&lt;P&gt;The second would be similar, but I don't have an example because it's not clear where the "call redirection" is in the data.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 15:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619484#M215300</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-03T15:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two different fields using regex from one fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619487#M215301</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "&amp;lt;span&amp;gt;(?&amp;lt;callflaw&amp;gt;.+)&amp;lt;/span&amp;gt;\s*&amp;lt;span&amp;gt;(?&amp;lt;rededication&amp;gt;.+)&amp;lt;/span&amp;gt;"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Nov 2022 16:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619487#M215301</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-03T16:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two different fields using regex from one fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619638#M215357</link>
      <description>&lt;P class="lia-align-justify"&gt;This regex creating field where it includes callflaw and remediation in one field. Is it possible to separate those into seprate fields?&lt;/P&gt;&lt;P class="lia-align-justify"&gt;callflaw&lt;/P&gt;&lt;P class="lia-align-justify"&gt;"This call to java.lang.Runtime.exec() contains a command injection flaw. The argument to the function is constructed using untrusted input. If an attacker is allowed to specify all or part of the command, it may be possible to execute commands on the server with the privileges of the executing process. The level of exposure depends on the effectiveness of input validation routines, if any. The first argument to exec() contains tainted data from the variables (new String\[...\]). The tainted data originated from an earlier call to AnnotationVirtualController.vc_annotation_entry. "&lt;/P&gt;&lt;P class="lia-align-justify"&gt;Remediation&lt;/P&gt;&lt;P class="lia-align-justify"&gt;"Validate all untrusted input to ensure that it conforms to the expected format, using centralized data validation routines when possible. When using blocklists, be sure that the sanitizing routine performs a sufficient number of iterations to remove all instances of disallowed characters. Most APIs that execute system commands also have a "safe" version of the method that takes an array of strings as input rather than a single string, which protects against some forms of command injection."&lt;/P&gt;&lt;P class="lia-align-justify"&gt;Like this?&lt;/P&gt;&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 12:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619638#M215357</guid>
      <dc:creator>karu0711</dc:creator>
      <dc:date>2022-11-04T12:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two different fields using regex from one fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619673#M215368</link>
      <description>&lt;P&gt;That is what the rex expression is doing - the first part between the first &amp;lt;span&amp;gt; and &amp;lt;/span&amp;gt; goes in callflaw and the second part goes in remediation.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 15:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-two-different-fields-using-regex-from-one-fields/m-p/619673#M215368</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-04T15:29:49Z</dc:date>
    </item>
  </channel>
</rss>

