Skip to main content

Yara 2.0 String iteration

  • October 18, 2024
  • 1 reply
  • 22 views

Forum|alt.badge.img+1

I would like to get a clarification on How to iterate through all the values if a field consist multiple values in comma separated array format. For example if I use this line the $mesgid = re.capture($e2.network.email.mail_id, "[^,]+")- re.capture will assign only first entry of the array to $mesgid. If I want to assign each values of the array to $mesgid and match it with another variable. What could be the ideal solution? I would be grateful if  anyone could help me here 

1 reply

tameri
Staff
Forum|alt.badge.img+5
  • Staff
  • October 18, 2024

@VivekPuthan , did you try to use any as mentioned in the repeated fields here this https://cloud.google.com/chronicle/docs/detection/yara-l-2-0-syntax#repeated_fields