I have read the "Creating Custom Signature" Tech Note for PAN-OS 5.0, because I tried to create an application that only allows snmp-read. But there I was blocked by a limitation that I need at least 7 bytes.
The snmp-payload looks like the follwing:
Now with a little bit more information:
30 35 02 01 --> SNMP Header
01 --> SNMP Version v2c
04 --> community name (string)
0c --> length of Community Name (in this case 12)
74 65 73 74 74 65 73 74 74 65 73 74 --> SNMP Community (in this case testtesttest)
a0 22 02 04 --> Identifier for SNMP get-request
5c 88 c1 c8 --> request id
and after the request id there is the snmp oid data.
So the only thing to match with an application signature are snmp header, version and the identifier for a get-request. In total these are 9 bytes but between thes values there is the snmp community which could be almost any length.
As a workaround I used the following pattern: (snmp-read)|\xa0220204\x
Like this I was able to save the custom application and to work around the 7 byte limitation.
But it seems that my idea was doomed to fail from the beginning because snmp-base and snmpv2 are already known applications from PaloAlto. So my custom application will never work right? Or does anyone know another possibility to only allow snmp-read request and drop snmp-write?
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!