Knowledge Management

Is there a way to flip the values of fields? Ex: sourceIP to destinationIP by simply using a command

jrodriguez233
Engager

Here is what I'm trying to do. Say I have 10 servers being targeted by several public IP addresses, is there anyway to flip the values where instead of having to copy all the 10 internal IP address as source and finding all the public IP addresses?

Example query:

index=myfirewall | table srcIP,destIP,action

Output scenario:
100 attacking IPs -> 10 servers

Desired outcomes:

1

100 src attacking IPs -> 10 destination servers | "flip?"

10 src servers IPs -> 100 destination IP addresses

2

Any internal source IP -> 100 destination attacking IP addresses (without having to copy the entire list)

Tags (1)

woodcock
Esteemed Legend

Like this:

index=firewall
| stats dc(srcIP) AS count values(srcIP) AS destIPs BY destIP
| where count>100

daniel333
Builder

Maybe soemthing like this?

| eval  temp_src = src_ip 
| eval  temp_dest = dest_ip 
| eval src_ip = temp_test
| eval dest_ip = temp_src
0 Karma
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...