RegEx - Pattern Match

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

RegEx - Pattern Match

Not applicable

Hey everyone,

I'm attempting to build a pattern match for a custom vulnerability.  Here are the criteria:

  • File is always a random 24 character file with a '.exe' extension
  • First three characters are always 'e54'

I had the following regex built, but the PA doesn't like it for some reason.

(e54([a-zA-Z0-9]{21})\.exe)

It gives me some invalid character internal error.  Any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello mrsold,

There should be a continuous 7 byte string.

Examples

-> pattern -> a -> regex 'abc[abc]{3}abc.*abc' is invalid.

->  'abc.{3}abcdefg.*abc' ----is valid >>>>>>>> 7 byte

        -> foo.*bar.*foobarfoo   (invalid)

        ->  foo.*fooba       (valid)

Hope this helps.

Thanks

View solution in original post

6 REPLIES 6

L7 Applicator

Hello mrsold,

A Pattern must be at least 7 bytes. In the entire pattern there must exist at least one 7 byte string that has fixed values.

Regular expression syntax for patterns in custom app signatures

Thanks

HULK wrote:

Hello mrsold,

A Pattern must be at least 7 bytes. In the entire pattern there must exist at least one 7 byte string that has fixed values.

Regular expression syntax for patterns in custom app signatures

Thanks

Thanks Hulk. 

Am I counting wrong?  I thought that string I posted is at least 7 bytes.

Hello mrsold,

There should be a continuous 7 byte string.

Examples

-> pattern -> a -> regex 'abc[abc]{3}abc.*abc' is invalid.

->  'abc.{3}abcdefg.*abc' ----is valid >>>>>>>> 7 byte

        -> foo.*bar.*foobarfoo   (invalid)

        ->  foo.*fooba       (valid)

Hope this helps.

Thanks

HULK wrote:

Hello mrsold,

There should be a continuous 7 byte string.

Examples

-> pattern -> a -> regex 'abc[abc]{3}abc.*abc' is invalid.

->  'abc.{3}abcdefg.*abc' ----is valid >>>>>>>> 7 byte

        -> foo.*bar.*foobarfoo   (invalid)

        ->  foo.*fooba       (valid)

Hope this helps.

Thanks

Ah yes, the continuous is a very important part.

Thanks!

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!