RegEx looking for a specific UserAgent.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

RegEx looking for a specific UserAgent.

L4 Transporter

I tried to migrate over my Cisco IPS regex to Palo Alto but it failed to load. Below is my Cisco Regex.

[Uu][Ss][Ee][Rr][-][Aa][Gg][Ee][Nn][Tt][:][\x20][^\x0d\x0a]*([Ss][Yy][Nn][Aa][Pp][Ss][Ee])

I tried creating a new pattern but it is to specific and not working.

I am looking to search the http header for User-Agent and if the value contains the word Synapse then alert.


Can someone help me to better understand what I am doing wrong?


Can someone educate me AND help generate the RegEx example for me.. (that is my real question)


Thanks


Steve

2 REPLIES 2

L4 Transporter

Steve,

The following works for XP detection:

Capture-xp user agent.PNG

So I would guess the pattern could be: User-Agent:.Synapse

One way to perfect it is to get a packet capture.  You may want to start with a pattern of just Synapse  and once you get a packet capture you can tune it up.

Phil

Thank You Phil,

Using your string and manipulating it a little bit, I was able to adapt it to my needs.

Much appreciated.

  • 2946 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!