Skip to main content
Solved

Port Reference List in Chronicle

  • August 22, 2024
  • 2 replies
  • 22 views

maxjunker
Forum|alt.badge.img+4

Hey folks, 

I wanted to dive into some network related use cases in Chronicle and stumpled upon a problem regarding managing ports in reference lists. When trying to query the ref-set inside YARAL, I receive a mismatch error, because ports are parsed as int: 

  • $network.target.port in %uncommon_ports
  • validating intermediate representation: type mismatch between "%uncommon_ports" of type string and "network.udm.target.port" of type int

As there is no type casting/conversion function available, what other options exits besides inputting all entries/ports inside the rule seperated by ORs? Thanks!

 

 

 

Best answer by David-French

Hi @maxjunker. Try this:

events: $e.metadata.event_type = "NETWORK_CONNECTION" $target_port = strings.concat($e.target.port,"") $target_port in %test_uncommon_ports_1

 

 

2 replies

David-French
Staff
Forum|alt.badge.img+9
  • Staff
  • Answer
  • August 22, 2024

Hi @maxjunker. Try this:

events: $e.metadata.event_type = "NETWORK_CONNECTION" $target_port = strings.concat($e.target.port,"") $target_port in %test_uncommon_ports_1

 

 


maxjunker
Forum|alt.badge.img+4
  • Author
  • Bronze 4
  • August 22, 2024

thanks @David-French! Thats exactly what is was hoping for.