<?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: Need help with creating signature for pop3 in Custom Signatures</title>
    <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74391#M52</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For what it's worth, I think your signature is mostly valid but it has some extra spaces and it also should probably escape brackets, I am not completely sure what are you trying to match, do you need brackets or not? Anyways, that is regex-wise; for PAN-OS you are failing to meet another requirement: Problem you are seeing is that for any custom signature, you have to have at least 7 bytes of fixed string that must be fixed; so no regex can be used WITHIN those 7 characters / bytes. You can use regex together with that anchor, but you must have a 7-byte anchor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really don't have any pop3 service running or configurable to test this with, but there MUST be some string in email header that you can grab for this? (I still am not sure if my proposal works as I can't test it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would try - I would set:&lt;/P&gt;
&lt;P&gt;1. custom but simple application for pop3, as explained, just defining tcp/110,&lt;/P&gt;
&lt;P&gt;2. simple vulnerability signature catching onto fixed string, something like "subject",&lt;/P&gt;
&lt;P&gt;3. make an exception in all existing vuln profiles for this signature (you don't want it catching everything and anything before you test it!),&lt;/P&gt;
&lt;P&gt;4. create new vuln profile (that does not have this in exception),&lt;/P&gt;
&lt;P&gt;5. create new security policy applying only to sender/receiver of email, using custom app, using vulnerability protection profile from step 4 (only one that does not have new vuln profile in exception list)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way, you will start with very simple signature and work out if this works at all, if it does, than you can perhaps share with us how your headers usually look so maybe we can together find some 7-byte string that would work better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luciano&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2016 19:09:14 GMT</pubDate>
    <dc:creator>Lucky</dc:creator>
    <dc:date>2016-03-08T19:09:14Z</dc:date>
    <item>
      <title>Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74173#M46</link>
      <description>&lt;P&gt;I would need some assistance with setting up a custom signature for pop3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to make a signature for the USER&amp;nbsp; command returning "-ERR " currently the Pan vuln signature only triggers on the Pass command in vuln id 31709. I run into a fundamental issue which is the 7 bytes. pop3 does not have 7 bites min on return codes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm suspecting I will need to do something like the following but this is not triggering.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'Server Ack&lt;/P&gt;
&lt;P&gt;context unknown-rsp-tcp-payload&lt;/P&gt;
&lt;P&gt;pattern "\+OK.{0,70}(POP3 MDaemon).{0,70}"&lt;/P&gt;
&lt;P&gt;negate no&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'User passes username&lt;/P&gt;
&lt;P&gt;context unknown-req-tcp-payload&lt;/P&gt;
&lt;P&gt;pattern "/user/i .{0,100}"&lt;/P&gt;
&lt;P&gt;negate no&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;context unknown-rsp-tcp-payload&lt;/P&gt;
&lt;P&gt;pattern "/\-ERR/i.{0,70}"&lt;/P&gt;
&lt;P&gt;negate no&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any idea on how I can get this done would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 20:42:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74173#M46</guid>
      <dc:creator>apike</dc:creator>
      <dc:date>2016-03-04T20:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74176#M47</link>
      <description>&lt;P&gt;Good evening, apike!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand what you are requesting; however, given the current custom signature contexts available within PAN-OS, I am not certain if it is possible. I do not see any exposed POP3 contexts in our custom signature engine, meaning writing signatures for them is likely not possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The contexts unknown-req-tcp-payload and&amp;nbsp;context unknown-rsp-tcp-payload are for applications not successfully identified by the PAN-OS device (IE: application unknown-tcp);&amp;nbsp;since the traffic you are trying to trigger off of is nested within a properly interpretted application (POP3), this signature will not trigger.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The short version of my response is that I am uncertain if what you are trying to do via custom signature is possible; if it is, I do not know of a way to do it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 20:56:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74176#M47</guid>
      <dc:creator>rcole</dc:creator>
      <dc:date>2016-03-04T20:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74196#M48</link>
      <description>&lt;P&gt;Hi apike, welcome to community forums.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not completely sure but I am thinking this might help: you need to work around of Rick's comment because he is right; why don't you try creating custom app "myPOP3" and define it for port tcp/110; thus you will override built-in decoder for pop3 because custom apps should kick in first and disable further lookup therefore chance exists your vuln sigs will trigger now?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or just create a custom app for your condition (perhaps in the whole session) and block that app. You have an &lt;A href="https://live.paloaltonetworks.com/t5/Featured-Articles/How-to-prevent-brute-force-attacks-to-Wordpress-and-similar/ta-p/73358" target="_self"&gt;explanation here how to create signatures for the session&lt;/A&gt; (part of base signature creation).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try and let us know what was your mileage?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Luciano&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 04:40:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74196#M48</guid>
      <dc:creator>Lucky</dc:creator>
      <dc:date>2016-03-05T04:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74238#M49</link>
      <description>&lt;P&gt;I need help with the Regex according to my regex "user ([A-Z a-z 0-9._\ \@]{0,100})" this is vaild but not according to PANOS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any thoughts?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2016 21:13:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74238#M49</guid>
      <dc:creator>apike</dc:creator>
      <dc:date>2016-03-06T21:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74391#M52</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For what it's worth, I think your signature is mostly valid but it has some extra spaces and it also should probably escape brackets, I am not completely sure what are you trying to match, do you need brackets or not? Anyways, that is regex-wise; for PAN-OS you are failing to meet another requirement: Problem you are seeing is that for any custom signature, you have to have at least 7 bytes of fixed string that must be fixed; so no regex can be used WITHIN those 7 characters / bytes. You can use regex together with that anchor, but you must have a 7-byte anchor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really don't have any pop3 service running or configurable to test this with, but there MUST be some string in email header that you can grab for this? (I still am not sure if my proposal works as I can't test it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would try - I would set:&lt;/P&gt;
&lt;P&gt;1. custom but simple application for pop3, as explained, just defining tcp/110,&lt;/P&gt;
&lt;P&gt;2. simple vulnerability signature catching onto fixed string, something like "subject",&lt;/P&gt;
&lt;P&gt;3. make an exception in all existing vuln profiles for this signature (you don't want it catching everything and anything before you test it!),&lt;/P&gt;
&lt;P&gt;4. create new vuln profile (that does not have this in exception),&lt;/P&gt;
&lt;P&gt;5. create new security policy applying only to sender/receiver of email, using custom app, using vulnerability protection profile from step 4 (only one that does not have new vuln profile in exception list)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way, you will start with very simple signature and work out if this works at all, if it does, than you can perhaps share with us how your headers usually look so maybe we can together find some 7-byte string that would work better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luciano&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 19:09:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74391#M52</guid>
      <dc:creator>Lucky</dc:creator>
      <dc:date>2016-03-08T19:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74402#M53</link>
      <description>&lt;P&gt;Hi Luciano,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are targetting users sign-on failed auth message unfortunatly there is nothing more then the user command and the perameter the attacker uses. I don't need the brakets notice they did not make a diffrence if there in or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ietf.org/rfc/rfc1939.txt" target="_blank"&gt;https://www.ietf.org/rfc/rfc1939.txt&lt;/A&gt; (page 12-13) This is due to an attack we have seen and the last one was ~50K user attempts the bot never went to Pass command which would have trigger the failed login attempt. I have asked PA to step in at this point to develop some kind of recon signature for this type of attack/recon. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hopefully they will come up with something. Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 23:14:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74402#M53</guid>
      <dc:creator>apike</dc:creator>
      <dc:date>2016-03-08T23:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with creating signature for pop3</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74476#M54</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just to let you know - I checked, my idea with custom app won't work - it will not override settings of the default decoder. Scratch that and talk to PAN SE or TAC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Luciano&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 19:21:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/need-help-with-creating-signature-for-pop3/m-p/74476#M54</guid>
      <dc:creator>Lucky</dc:creator>
      <dc:date>2016-03-09T19:21:10Z</dc:date>
    </item>
  </channel>
</rss>

