Activity Feed
- Posted Re: Split up multiline values on Splunk Search. 03-05-2024 01:40 PM
- Posted Split up multiline values on Splunk Search. 03-05-2024 01:19 PM
- Tagged Split up multiline values on Splunk Search. 03-05-2024 01:19 PM
- Tagged Split up multiline values on Splunk Search. 03-05-2024 01:19 PM
- Got Karma for Re: Optimize Regex. 03-01-2024 09:46 AM
- Posted Re: Optimize Regex on Splunk Search. 03-01-2024 09:25 AM
- Posted Optimize Regex on Splunk Search. 02-29-2024 04:52 PM
- Tagged Optimize Regex on Splunk Search. 02-29-2024 04:52 PM
- Posted Re: Help with Field Extraction on Splunk Search. 01-29-2024 10:58 AM
- Posted Re: Help with Field Extraction on Splunk Search. 01-29-2024 10:20 AM
- Posted Re: Help with Field Extraction on Splunk Search. 01-29-2024 09:19 AM
- Posted Re: Help with Field Extraction on Splunk Search. 01-26-2024 03:03 PM
- Posted Re: Help with Field Extraction on Splunk Search. 01-26-2024 01:26 PM
- Posted Help with Field Extraction on Splunk Search. 01-26-2024 11:45 AM
- Karma Re: Help parsing incoming data for richgalloway. 12-27-2023 11:49 AM
- Posted Re: Help parsing incoming data on Getting Data In. 12-27-2023 11:22 AM
- Posted Re: Help parsing incoming data on Getting Data In. 12-22-2023 08:55 AM
- Karma Re: Help parsing incoming data for richgalloway. 12-22-2023 08:54 AM
- Posted Help parsing incoming data on Getting Data In. 12-22-2023 07:23 AM
- Posted Re: How to stats count but get all values? on Splunk Search. 06-01-2023 12:59 PM
Topics I've Started
Subject | Karma | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |
03-05-2024
01:19 PM
I am trying to run the following search: index=tripwire LogCategory="Audit Event" AND "/etc/pki/rpm-gpg/RPM-GPG-KEY-shibboleth-7" AND "myserver.mydomain.com" | rex max_match=0 field=_raw "(?<lineData>[^\n]+)" | rex field=Msg "'(?<FilePath>.*)' accessed by" | rex field=_raw "accessed\sby\s'(?<Audit_UserName>.*)'.\sType" | table _time, FilePath, Audit_UserName However, the way I am splitting the multiline data doesn't appear to be working with this data. Here is a sample of the data as viewed in Notepad++ with symbols; Every line ends in CR LF However, in Splunk it isn't splitting up the events. What am I missing here? I have had this work with similar data but unsure what is different in this situation. TIA!
... View more
Labels
- Labels:
-
field extraction
02-29-2024
04:52 PM
I am getting an error when using the following regex (?<=on\s)(.*)(?=\sby Firewall Settings) The error is "Error in 'rex' command: regex="(?<=on\s)(.*)(?<HostName>.*)(?=\sby Firewall Settings)" has exceeded configured match_limit, consider raising the value in limits.conf." Is there a better way to do this, I am trying to find all text between "on " and " by Firewall Settings. It works in regex101.com, but I get that error in Splunk. TIA!
... View more
- Tags:
- search
01-29-2024
10:58 AM
Oh wait these have to be in order, what if I wanted to grab a field that is 10 fields before this. Expanded Sample Data; dvchost=asdf.ghi.com NodeType=Windows Server NodeTypeLabel=Node Type Rule=Critical System Settings RuleLabel=Rule RuleType=Windows Registry Rule RuleTypeLabel=Rule Type fname=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer|NoWebServices ChangeType=Added ChangeTypeLabel=Change Type SeverityName=High SeverityNameLabel=Tripwire Severity Name VersionOID=-1y2p0ij32e8cf:-1y2p0iizs0ilf VersionOIDLabel=Version OID SeverityNumber=10000 SeverityNumberLabel=Tripwire Severity Number sproc=C:\Windows\System32\svchost.exe licurl=https://abcd.ghi.com/console/lic.search.cmd?lic=true&managerId=nodeManager&pageId=nodeManager.elementFinderPage&searchCriteria=%7B%22search.element.nodeGroup.selectedObject%22%3A%22-1y2p0ij32e8bm%3A-1y2p0ij02lp4k%22%2C%22search.element.name.op%22%3A1%2C%22search.element.name%22%3A%22HKEY_LOCAL_MACHINE%5C%5CSoftware%5C%5CMicrosoft%5C%5CWindows%5C%5CCurrentVersion%5C%5CPolicies%5C%5CExplorer|NoWebServices%22%2C%22selectedSearchType%22%3A%22element%22%2C%22search.element.ruleGroup.selectedObject%22%3A%22-1y2p0ij32e7p1%3A-1y2p0ij32bgh0%22%2C%22criteria.searchExecuted%22%3Atrue%7D start=Jan 07 2024 06:07:45 duser=NT AUTHORITY\SYSTEM dvc=10.10.10.10 rt=Jan 29 2024 04:41:24 dhost=abcd.ghi.com SHA-1=Not available MD5=Not available Size=Not available content=0x00000001 (1) contentLabel=Current Version Content timezone=Pacific Standard Time timezoneLabel=Time Zone elementOID=-1y2p0ij32e8ca:-1y2p0ij02lo5f elementOIDLabel=Element OID blVersion=false blVersionLabel=Is baseline version hardCodedIP=10.10.10.10 Say I wanted the fields NodeType, RuleType, fname, duser, sproc? Thanks
... View more
01-29-2024
09:19 AM
duser=NT AUTHORITY\SYSTEM dvc=10.10.10.10 rt=Jan 29 2024 04:41:24 dhost=abcd.efgh.com SHA-1=Not available MD5=Not available Size=Not available content=0x00000001 (1) contentLabel=Current Version Content timezone=Pacific Standard Time I want to be able to pull out the duser, dvc, dhost etc. Focusing on the duser ATM because it is giving me the most grief because of the space in the value. If I can get one to work, I can get the rest working. The search so far is simple; index="abc" | rex field=_raw "duser=(?P<User>.*?) dvc" | table User
... View more
01-26-2024
03:03 PM
When I put in my search like this | rex field=_raw "duser=(?<User>.*?) dvc" I get a new field called UserNameLabel with the value of 'User' not the user field data
... View more
01-26-2024
01:26 PM
When I put in my search like this | rex field=_raw "duser=(?<User>.*?) dvc" I get a new field called UserNameLabel with the value of User
... View more
01-26-2024
11:45 AM
Here is my sample data; start=Dec 30 2023 06:07:47 duser=NT AUTHORITY\SYSTEM dvc=10.163.142.37 I need to extract the full duser information. Splunk only grabs NT and not the remaining of the string I have the following Regex via regex101 that works....I am grabbing whatever is between 'duser=' and ' dvc' (?<=duser=)(.*?)(?= dvc) I just don't quite understand how the field extraction part is supposed to work... I have tried... | rex field=_raw "'(?<User>(?<=duser=)(.*?)(?= dvc))'" and | rex field=_raw "duser=\s+(?<User>[^\\]*)" No errors, just not getting any data in a User field. Thanks in advance.
... View more
12-22-2023
08:55 AM
@richgalloway The data is coming from a FIM product called Tripwire. Here is the raw data; Dec 22 02:30:34 10.62.32.10 1 2023-12-22T10:30:34.771Z servernameTW_ES - - - CEF:0|Tripwire|Enterprise|5.5|6|Audit Event|1|UserName=NT AUTHORITY\NETWORK SERVICE UserNameLabel=User Name ElementName=null ElementNameLabel=Element Name VersionTimeStamp=null VersionTimeStampLabel=Version Timestamp Message='C:\Windows\System32\Tasks\Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask' accessed by 'NT AUTHORITY\NETWORK SERVICE'. Type 'Set Security'. Application: 'C:\Windows\System32\svchost.exe' Details: DACL Category=Audit Event CategoryLabel=Category rt=12/22/23 2:25 AM Level=Information LevelLabel=level dhost=trip.cs.ad.domain.com I don't have any props or transforms yet because I am not sure where to start with this. Thanks
... View more
12-22-2023
07:23 AM
We have data coming in that we need to alert on, however because of the formatting of the data, this is very hard to do. The data is coming in as key value pairs but the values are not encapsulated in quotes and is being truncated. For example _Raw - filepath=c:\program files\abc123\ What we end up getting is Parsed - filepath=c:\program Everything after the space is ignored. If I wanted to find all occurrences where the path was c:\program files\abc123, I can't. We are sending the data via syslog to the splunk servers Thanks in advance!
... View more
Labels
- Labels:
-
field extraction
06-01-2023
12:56 PM
Oh yeah, that is exactly what I am seeing now, when I try your search, I still only see the unique values. I will take a look at list
... View more
06-01-2023
10:29 AM
Here is the search I am trying to do and I hope I can explain this correctly....I am searching for dlp events where there are x events within a period of time for my testing I am using 1 hour...
index=epp "content threat" Policy="Content Aware Protection - Content Threat Detected"
`comment("Creating buckets of 10 minutes")`
| bin _time span=1h | stats count values(MatchedItem) by _time ClientUser, DestinationDetails, MatchedItem
| eval PotentialLeak=if(count >= 10, 1, 0)
| search PotentialLeak = 1
What I am trying to get out of this is a table of the following;
_time, ClientUser, DestinationDetails, MatchedItem etc
However, I only see one MatchedItem, not all of them for one user I know there is 12 but only see one of them.
Hope that explains it well enough and appreciate your help.
... View more
05-04-2023
08:38 AM
Ok, I am an idiot and apologize, I am building my experience in Splunk still. I was outputting the results to a table but when I went to look at the raw data I see that the following is actually working! index=wineventlog eventtype="msad-dns-debuglog" | rex mode=sed "s/\(.*?\)/./g s/^\.+(\s+)?// s/\.$//" I am getting .www.google.com in the raw data which is a lot closer than I thought I was. I am unsure why I am still getting that leading dot, but this is something. you are right, I want to catch this in indexing but wanted to verify my sed logic was accurate before I did that.
... View more
05-03-2023
04:03 PM
Ok, using the original data, here is a result that works..... | makeresults | eval _raw="(3)www(6)google(2)ca(0)" | rex mode=sed "s/\(.*?\)/./g s/^\.+(\s+)?// s/\.$//" I get www.google.ca
... View more
05-03-2023
02:24 PM
Here are a few more examples; (3)www(6)google(2)ca(0) (7)outlook(9)office365(3)com(0) (7)updates(4)asdf(3)com(0) (4)test(4)test(3)com(0)
... View more
05-02-2023
03:11 PM
When I try the two samples provided; | rex mode=sed "s/\(.*?\)/./g s/\"\.+(\s+)?/\"/ s/\.\"/\"/" and | rex mode=sed "s/\"\(\d+\){1,}(\s+)?/\"/ s/\(\d+\)\"/\"/ s/\(\d+\)/./g" They run without error but don't actually modify the output. Similar to what I was seeing earlier. I really appreciate your help with this
... View more
- Tags:
- Reply
05-01-2023
04:47 PM
What I am trying to do is convert MS DNS Logs to readable text. I understand that there is probably an app for this but want to do it manually The input data is (3)www(6)google(3)com(0) and I want to change it to www.google.com I had this working fine - | rex field=query mode=sed "s/\(.*?\)/./g s/^\.+(\s+)?// s/\.$//" It takes all the (#) and converts it to a . and then goes through and removes the first and last .'s So I am trying to convert this to a sed command to do this on indexing but can't get it to work, I simplified what I was doing with examples that showed the same behavior.
... View more
04-28-2023
11:08 AM
Would this count as a calculated field, this is all I see in the props.conf currently for this particular field. FIELDALIAS-query = questionname AS query
... View more
04-27-2023
03:25 PM
I am trying to eventually get to the point where I can add this to props.conf but am trying out the searches in splunk first to make sure they work. I was following this example but it wasn't work for me so I backed it up a bit and simplified it If I run this search, it works and converts all instances abc to def....
| rex field=query mode=sed "s/abc/def/" However, when I do this, it doesn't throw an error but doesn't convert anything, all abc's are still present in the fields..
| rex mode=sed "s/abc/def/"
Been driving me nuts trying to figure out why.
... View more
Labels
- Labels:
-
rex
03-21-2023
04:23 PM
We have some MS dns logs we want to ingest and we want to clean up some of the text before processing.
Essentially the fielddata is coming in as (10)somedomain(3)diy(8)whatever(3)com(0) and we want to only show as somedomain.diy.whatever.com
I have the first part I think, and using the search as a test of course...
| rex field=query mode=sed "s/\(.*?\)/./g"
Which leaves me with .somedomain.diy.whatever.com. I can't seem to find a way to get rid of the leading and trailing .'s Is there away to do it in all one line? Bear with me here, this is new territory for me.
Thanks for your help
... View more
- Tags:
- clean up
Labels
- Labels:
-
field extraction
-
inputs.conf
03-16-2023
04:57 PM
Cool thanks for the reference info, but mine all of a sudden isn't passing the --execute and then is failing. Can you think of a reason why it wouldn't pass that, the script is being called by the custom alert app.
... View more