<?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 edit props.conf to line break modsecurity events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286916#M54811</link>
    <description>&lt;P&gt;trouble was in MAX_EVENTS, that's why i have truncated events&lt;/P&gt;</description>
    <pubDate>Mon, 26 Dec 2016 15:50:18 GMT</pubDate>
    <dc:creator>Shark2112</dc:creator>
    <dc:date>2016-12-26T15:50:18Z</dc:date>
    <item>
      <title>How to edit props.conf to line break modsecurity events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286912#M54807</link>
      <description>&lt;P&gt;Hey guys. I want modsecurity events in Splunk, but can't make right config.&lt;/P&gt;

&lt;P&gt;I have events like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;--d021db15-A--
[22/Dec/2016:12:46:22 +0300] WFug7n8AAAEAAAgUFKYAAABM 192.168.13.2 58507 192.168.13.141 80
--d021db15-B--
GET /?param=%3Cscript%3Ealert(1);%3C/script%3E HTTP/1.1
Host: 192.168.13.141
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
If-None-Match: "13-54429b1b62789"
If-Modified-Since: Wed, 21 Dec 2016 11:45:49 GMT

--d021db15-F--
HTTP/1.1 304 Not Modified
Last-Modified: Wed, 21 Dec 2016 11:45:49 GMT
ETag: "13-54429b1b62789"
Accept-Ranges: bytes
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html

--d021db15-E--

--d021db15-H--
Message: Warning. Pattern match "^[\\d.:]+$" at REQUEST_HEADERS:Host. [file "/usr/local/apache2/modsecurity.d/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf"] [line "793"] [id "920350"] [rev "2"] [msg "Host header i

r: ModSecurity for Apache/2.9.1 (http://www.modsecurity.org/); OWASP_CRS/3.0.0.
Server: Apache/2.4.23 (Unix) PHP/5.6.29
Engine-Mode: "DETECTION_ONLY"

--d021db15-Z--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so it's start from &lt;CODE&gt;--\w+-A--&lt;/CODE&gt; and end with &lt;CODE&gt;--\w+-Z--&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;my config:&lt;BR /&gt;
[modsec_audit]&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
category = Custom&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
LINE_BREAKER = --\w+-A--&lt;BR /&gt;
disabled = false&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
MUST_BREAK_AFTER = --\w+-Z--&lt;BR /&gt;
TRUNCATE = 0&lt;/P&gt;

&lt;P&gt;or BREAK_ONLY_BEFORE_DATE = true instead MUST_BREAK_AFTER.&lt;/P&gt;

&lt;P&gt;but it's all wrong and i see events like "Stopwatch: 1482404729925426 2897 (- - -)" for example, or starting from .&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286912#M54807</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2020-09-29T12:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit props.conf to line break modsecurity events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286913#M54808</link>
      <description>&lt;P&gt;I copied your data twice to a dummy log file and modified time to mark separate events. I was able to get two events just by adding &lt;STRONG&gt;BREAK_ONLY_BEFORE&lt;/STRONG&gt; condition on top of SHOULD_LINEMERGE=true&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[modsec_audit]
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
BREAK_ONLY_BEFORE=--d021db15-A--
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please let me know if this is what you expect.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/174421-splunk-answers-482630.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:11:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286913#M54808</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T12:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit props.conf to line break modsecurity events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286914#M54809</link>
      <description>&lt;P&gt;Something like this would work fine&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[modsec_audit]
category = Custom
LINE_BREAKER = ([\r\n]+)(?=--\w+-A-)
SHOULD_LINEMERGE = false
TRUNCATE = 0
TIME_PREFIX = \[
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
MAX_TIMESTAMP_LOOKAHEAD = 26
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Dec 2016 16:12:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286914#M54809</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-23T16:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit props.conf to line break modsecurity events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286915#M54810</link>
      <description>&lt;P&gt;I made separated index and add file with same sourcetype and all work fine, it's so strange. I will check the difference and write after.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 09:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286915#M54810</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-12-26T09:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit props.conf to line break modsecurity events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286916#M54811</link>
      <description>&lt;P&gt;trouble was in MAX_EVENTS, that's why i have truncated events&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 15:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-props-conf-to-line-break-modsecurity-events/m-p/286916#M54811</guid>
      <dc:creator>Shark2112</dc:creator>
      <dc:date>2016-12-26T15:50:18Z</dc:date>
    </item>
  </channel>
</rss>

