icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Base64
SHA256 checksum (base64_11.tgz) 8acc1f2980e749b4be1481f7c53c30abb713d14bfa8b9b15092d47986cef1190 SHA256 checksum (base64_103.tgz) 9e4175c482076b1db1d4e52440aea562f9afb27be251b68da0a8663bab2cc061 SHA256 checksum (base64_100.tgz) dc032d7351f8c1c219d4ab718a463eb86592957d09e662cb85cb03ac9ed66243
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

Base64

Overview
Details
The base64 custom search command is a command that does Base64 encoding and decoding.

The base64 custom search command is a command that do Base64 encoding and decoding.

... | base64 field=your_field [action=(encode|decode)] [mode=(replace|append)] [suppress_error=(True|False)]
  • field : field to encode or decode.
  • action : encode (default) or decode the content. Optional.
  • mode : replace the existing field content (default) or create a new field named base64 (mode append). Optional.
  • suppress_error : do not raise errors if set to True. Optional, default to False.

Note on decoding:

While the input string can be anything for the encoding operation, it should respect the alphabet [a-zA-Z0-9/=] and its length should be a multiple of 4 while decoding. If the format is not respected, the command will throw errors (except if you set the flag suppress_error).

In the following example, we assume we are working on proxy/web logs and those will contains a field uri. This field will contains URI links and some of them will contains
an argument plop which refer to Base64 encoded data.

So, to get it working:

  • filter the results
  • extract the base64 content (command rex)
  • evaluate the length of the base64 content to avoid content with a wrong padding
  • decode the base64 content

Here is one way of doing it in Splunk:

... your search to get field 'uri' for example...

| fields uri

| rex field=uri "plop=(?<content_to_decode>[a-zA-Z0-9/=]*)”

| eval clength=len(content_to_decode)%4

| search clength=0

| base64 field=“content_to_decode" action=“decode" mode=“append"

History

v1.1
- non printable characters are presented as hexadecimal when decoding (ex: base64=<%PDF\x00\x00).
v1.0
- Initial release

Release Notes

Version 1.1
Sept. 21, 2015

Version 1.0.3
Feb. 12, 2015

Version 1.0.0
Dec. 8, 2014

872
Installs
2,387
Downloads
Share Subscribe LOGIN TO DOWNLOAD

Subscribe Share

AppInspect Tooling

Splunk AppInspect evaluates Splunk apps against a set of Splunk-defined criteria to assess the validity and security of an app package and components.

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 50GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
© 2005-2019 Splunk Inc. All rights reserved.
Splunk®, Splunk>®, Listen to Your Data®, The Engine for Machine Data®, Hunk®, Splunk Cloud™, Splunk Light™, SPL™ and Splunk MINT™ are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners.