<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to write a custom app signature that allows only a specific DNS query? in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9625#M260</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a look at the post I updated (&lt;A __default_attr="25096" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://live.paloaltonetworks.com/"&gt;&lt;/A&gt;)- gives details of exactly how to do this via a custom app/custom threat signature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just done this to do the reverse of what you're trying - allow lookups to an entire domain, but block 1 specific dns entry out of the entire domain, so it is possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 10:38:11 GMT</pubDate>
    <dc:creator>markeating</dc:creator>
    <dc:date>2013-03-15T10:38:11Z</dc:date>
    <item>
      <title>How to write a custom app signature that allows only a specific DNS query?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9621#M256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We'd like to build a custom app ID that permits only one specific DNS query to make it through... for example, we want wireless clients (which have our Palo Alto as their default gateway) to only query for the DNS A record "vpngateway.example.com"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone built anything like this? The custom app signature tech note focuses specifically on HTTP... if we could get an example of building a DNS specific custom app signature, that would be awesome&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guys,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 15:03:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9621#M256</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2012-12-05T15:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom app signature that allows only a specific DNS query?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9622#M257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use context 'dns-req-section' and \x to start and end hex&lt;/P&gt;&lt;P&gt;bytes for length to construct the domain name in the question like the&lt;/P&gt;&lt;P&gt;example below, however I'm not aware of how to construct a valid&lt;/P&gt;&lt;P&gt;pattern to match case insensitive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the below will match www.hp.com but not www.HP.COM and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, if you could match case insensitive someone could use&lt;/P&gt;&lt;P&gt;name/label compression to subvert the pattern match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com signature www.hp.com and-condition "And Condition 1" or-condition "Or Condition 1" operator pattern-match pattern \x03\xwww\x02\xhp\x03\xcom\x0000010001\x&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com signature www.hp.com and-condition "And Condition 1" or-condition "Or Condition 1" operator pattern-match context dns-req-section&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com signature www.hp.com scope protocol-data-unit&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com signature www.hp.com order-free yes&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com signature www.hp.com comment "0001 is type A 0001 is class IN"&lt;/P&gt;&lt;P&gt;set application dns-qname-www.hp.com parent-app dns&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 21:35:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9622#M257</guid>
      <dc:creator>ksteves</dc:creator>
      <dc:date>2012-12-27T21:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom app signature that allows only a specific DNS query?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9623#M258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid you might be out of luck here. One of the many differences between DNS and HTTP is that the first one is 1 packet in each direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means in your case you won't be able to have the custom app matched unless DNS as a parent application is allowed but if you do this all DNS requests will be allowed through not just the one you specify in your customer app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's assume you create your custom_dns application where www.hp.com is detected and allow it in a policy from A(client) to B (dns server).&lt;/P&gt;&lt;P&gt;Now, if the default dns application is denied as soon as the firewall detects that this is a DNS request (It does it before the content is inspected) the request will be denied. Application has been detected as dns and there is an deny action associated wit it&lt;/P&gt;&lt;P&gt;On the other hand if the default dns application is allowed when the traffic goes through the firewall the application will shift from dns (the default one) to the custom_dns as soon as the firewall reads the content. So in the logs you'll see a correct match with the custom_dns app you created but being this the mechanism this implies all other dns requests will be allowed as well.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps to understand the logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Salvo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 00:02:41 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9623#M258</guid>
      <dc:creator>sberti</dc:creator>
      <dc:date>2013-01-22T00:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom app signature that allows only a specific DNS query?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9624#M259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to kind of follow up on this and provide some closure, the way we decided we're going to do this is via PA's DNS proxying... we're going to force proxying on and only allow the one specific domain we want to resolve via DNS to be explicitly resolved to the IP we want that one host record to resolve to. This basically solves our problem in a reasonably elegant way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 18:10:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9624#M259</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2013-01-31T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom app signature that allows only a specific DNS query?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9625#M260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a look at the post I updated (&lt;A __default_attr="25096" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://live.paloaltonetworks.com/"&gt;&lt;/A&gt;)- gives details of exactly how to do this via a custom app/custom threat signature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just done this to do the reverse of what you're trying - allow lookups to an entire domain, but block 1 specific dns entry out of the entire domain, so it is possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 10:38:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-write-a-custom-app-signature-that-allows-only-a-specific/m-p/9625#M260</guid>
      <dc:creator>markeating</dc:creator>
      <dc:date>2013-03-15T10:38:11Z</dc:date>
    </item>
  </channel>
</rss>

