Splunk Search

How to search for DR string ../../../../ ??

ShinR
Explorer

Hi everyone,

I just wanted to do a quick search in URLs requested in Splunk but cannot get the directory traversal string  (../../../../ o similar) to stick - it gets stripped from the query.  I've tried using quotes and it seems escaping shouldn't be necessary.  

Any suggestions?

Thanks

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please share the troublesome query.

---
If this reply helps you, Karma would be appreciated.

ShinR
Explorer

Sorry, here's a simple example:

index=* url="*../../../../*"

or 

index=* "../../../../"

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I believe the problem is attempting to search for a string of minor blocker characters.  You may have better luck using a separate where command.

 

index=foo ```Always use explicit index names```
| where like(url, "../../../../%") ```Like is used instead of match to avoid escaping every character```

 

---
If this reply helps you, Karma would be appreciated.

ShinR
Explorer

Thanks again for the suggestion.  Unfortunately everything between the * and the % gets stripped when I execute the search.  

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The asterisk was a typo.  Please try again without it.  

---
If this reply helps you, Karma would be appreciated.
0 Karma

ShinR
Explorer

Same result unfortunately... does the same thing not happen on your splunk instance?

 

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It does not happen on my instance (8.1.2)

richgalloway_0-1629115577281.png

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

NatSec
Explorer

I have the same issue on Splunk v8.2.1

Any solution please?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...