Dashboards & Visualizations

How do you mask sensitive data from Splunk?

Shashank_87
Explorer

Hi, I am trying to mask some data while indexing. Below is one single event where the tag "SecurityQuestion" is occuring multiple times and I want to mask all of its values.

Can someone please advice?

(SecurityQuestion)Favorite song(SecurityQuestion)(SecurityAnswer)TEST(SecurityAnswer)
(SecurityQuestion)Favorite band(SecurityQuestion)(SecurityAnswer)TEST123(SecurityAnswer)

Tags (2)
0 Karma
1 Solution

whrg
Motivator

Hi!

Check out the Splunk documentation on Anonymize data.

EDIT: Here is the sed command:

s/\(SecurityQuestion\).+?\(SecurityQuestion\)\(SecurityAnswer\).+?\(SecurityAnswer\)/(SecurityQuestion)########(SecurityQuestion)(SecurityAnswer)########(SecurityAnswer)/g

View solution in original post

0 Karma

burwell
SplunkTrust
SplunkTrust

What we did was to hide the data at the indexing layer when there was data we didn't want.

In our case there was secret_data= as a URL parameter that we wanted to removed.

So I updated the props.conf on the indexers.

[my_sourctype]
[source::/path/to/my/logs]
SEDCMD-remove_secret_data = s/(&)?secret_data=[^&\s.]+//g
0 Karma

whrg
Motivator

Hi!

Check out the Splunk documentation on Anonymize data.

EDIT: Here is the sed command:

s/\(SecurityQuestion\).+?\(SecurityQuestion\)\(SecurityAnswer\).+?\(SecurityAnswer\)/(SecurityQuestion)########(SecurityQuestion)(SecurityAnswer)########(SecurityAnswer)/g
0 Karma

Shashank_87
Explorer

I did already and I was trying using SED command but not able to get to anything. Could you give me a start on this?

0 Karma

whrg
Motivator

I edited my first reply and added the sed command because apparently comments cannot display backslashes.

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!

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

How to find the worst searches in your Splunk environment and how to fix them

Everyone knows Splunk is a powerful platform for running searches and doing data analytics. Your ...

Share Your Feedback: On Admin Config Service (ACS)!

Help Us Build a Better Admin Config Service Experience (ACS)   We Want Your Feedback on Admin Config Service ...