Custom App for CRL downloads

Reply
Highlighted
L1 Bithead

Custom App for CRL downloads

Hi,

I am trying to create a custom app that will match CRL downloads, to allow them without any questions ask. Shouldn't be too hard : on a previous web security gateway, I would match a pattern like the following: "http://([^/:])*crl.*\.crl"

When translated to an app signature, I already know I am looking for two patterns, on the following contexts:

  • http-req-host-header
  • http-req-uri-path

Now, my issue is that my pattern are incredibly simple. I am not able to reach the 7 bytes limit with this. One other way would be to match the MIME type in the RSP header I guess... application/pkix-crl or application/x-pkcs7-crl are fine. The issue is with the occasional misconfigured root CAs that still reports text/plain.

So....  Is there anything I can do with this to simply allow CRLs without creating a huge custom category?

Thank you.


Accepted Solutions
Highlighted
L1 Bithead

Re: Custom App for CRL downloads

Well, I was able to create a working signature. I just needed to increase my "scope" ; I used the http-req-headers instead of http-req-uri-path. So, I can match on something like  ".*\.crl HTTP.*User\-Agent.*, and I looking into the http-rsp-headers for the transaction as well. Simple enough... I feel like it was a worthy exercise after all.

I attached the file for other people to use, and I submitted the request as well.

Thank you.

View solution in original post


All Replies
Highlighted
L6 Presenter

Re: Custom App for CRL downloads

Perhaps creating an URL-filter instead?

Highlighted
L1 Bithead

Re: Custom App for CRL downloads

The URL-filter has severe limitations. Unless I maintain a huge custom category of all the common CRL distribution points on the Internet, I can't see how I would do this. I have two main issues with the URL-filter expressions.

1. matching hosts, the wildcard has to match a complete token. I can't use  *crl.*.* -> *crl is invalid because it is not the only character in the token. So, I can't restrict destination URLs based on the hostname.
2. The path is not predictable enough. All I know is that the file name is going to be .crl,, but it might a very long path (many subdirectories) or a short one. ex:  /*.crl, /*/*/*/*.crl ... Still, that's not so bad because I could create a dozen of URL filter expressions that would match the file up to 11 directories deep, as an exemple. And that would cover most case... But it still something that could be avoided with a custom appid, or less restrictive URL expressions.

Unless there is something I don't know yet about Pan-OS url-filter expressions...

Highlighted
L6 Presenter

Re: Custom App for CRL downloads

Sounds like a case where you should contact the appid team and submit this as a request: http://researchcenter.paloaltonetworks.com/tools/

Highlighted
L1 Bithead

Re: Custom App for CRL downloads

Well, I was able to create a working signature. I just needed to increase my "scope" ; I used the http-req-headers instead of http-req-uri-path. So, I can match on something like  ".*\.crl HTTP.*User\-Agent.*, and I looking into the http-rsp-headers for the transaction as well. Simple enough... I feel like it was a worthy exercise after all.

I attached the file for other people to use, and I submitted the request as well.

Thank you.

View solution in original post

Highlighted
L4 Transporter

Re: Custom App for CRL downloads

Thank you -

That was a very interesting work around, and will be useful.

Highlighted
L4 Transporter

Re: Custom App for CRL downloads

You can try to match on the http-rsp-headers for the content type of crl : application/pkix-crl, application/x-pkcs7-crl, etc.

Highlighted
L3 Networker

Re: Custom App for CRL downloads

Hello

 

I tested this custom APP ID but on PAN 9.1.1 and i think also on 9.0.7 it is not working. As i see, there is a problem in the http-rsp-headers match condition. Without the http-rsp-headers condition it is working. The other way around, only with the http-rsp-headers it does also not working, therefore it seems a problem in the http-rsp-headers condition. I tried to simplify this condition .*((pkix-crl)|(x-pkcs7-crl)|(plain)).* but it does not match. I also tried .*((pkix\-crl)|(x-pkcs7\-crl)|(plain)).* and only pkix\-crl , because my test  response is a pkix one, but nothing, the requests alwys recognized as web-browsing. Any ideas?

 

 

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 Live Community as a whole!

The Live Community thanks you for your participation!