Custom App for CRL downloads

Reply
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
L1 Bithead

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
L6 Presenter

Perhaps creating an URL-filter instead?

L1 Bithead

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...

L6 Presenter

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

L1 Bithead

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

L4 Transporter

Thank you -

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

The inherent vice of capitalism is the unequal sharing of blessings; the inherent virtue of socialism is the equal sharing of miseries.
L4 Transporter

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

L3 Networker

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?

 

 

L1 Bithead

Hi Everyone

 

I'm new to the topic of custom App-IDs, i tried this custom App-ID. but when accessing these CRL urls then it never matches this rule. It is either incomplete or web-browsing. I am running 9.1.3 currently.

Has anyone this custom App-ID still running and working?

 

Thanks for any help and best regards

Alex

There's no home like 127.0.0.1
L1 Bithead

I've been testing the custom application and trying to figure out what is causing it to not work anymore.

My knowledge of custom App-ID's is very limited so if there is a mistake within the application please apologize and let me know.

For now I have adjusted the custom App-ID and got it to work (i was testing it out by blocking anything matching that App-ID) and checking if all the CRL URL's are being blocked now.

 

So far I got the following results:

http://crl.sca1b.amazontrust.com/sca1b.crl > working OK
http://crl.quovadisglobal.com/hydsslg2.crl > working OK
http://cdp.geotrust.com/GeoTrustRSACA2018.crl > working OK
http://cdp.geotrust.com/GeoTrustRSACA2018.crl > working OK
http://crl3.digicert.com/ssca-sha2-g6.crl > working OK
http://crl4.digicert.com/ssca-sha2-g6.crl > working OK
http://crl.pki.goog/GTS1O1core.crl > working OK
http://crl.godaddy.com/gdig2s1-1878.crl > working OK
http://crl3.digicert.com/sha2-ev-server-g2.crl > working OK
http://crl4.digicert.com/sha2-ev-server-g2.crl > working OK

http://mscrl.microsoft.com/pki/mscorp/crl/Microsoft%20IT%20TLS%20CA%205.crl > working OK > application/octet-stream

http://crl.swisssign.net/EEFD46CAF7275E91BC5AB6E787CD0AFA550A2642 > not working yet
http://crl.swisssign.net/E7F1E7FD2E53AD11E5811A57A4738F127D98C8AE > not working yet

 

Now I only need to know how to upload a file and i'll gladly share the app

There's no home like 127.0.0.1
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!