How to create a custom spyware signature for a plaintext ASCII file

How to create a custom spyware signature for a plaintext ASCII file

2272
Created On 06/27/23 08:11 AM - Last Modified 04/04/24 16:35 PM


Objective


To configure a custom spyware signature to match data within a plaintext ASCII file.

Environment


  • PanOS Firewall
  • Custom Spyware Object
  • Anti-Spyware Profile


Procedure


  1. Create a Spyware Custom Object
  2. Fill in the required fields based on the use-case
  3. For the Context, choose "file-html-body"
  4. Preferably use a hex pattern such as "\x6d65727303636f6d\x" for least performance impact
  5. Make sure the desired Action is selected for the custom object in the Anti-Spyware Profile under "Signature Exceptions"
  6. Make sure the Anti-Spyware Profile is used in the matching Security Policy
  7. Commit the changes


Additional Information


Note you cannot use the "file-data" context for plaintext ASCII files, as they do not match one of the file types required for "file-data":
https://docs.paloaltonetworks.com/pan-os/u-v/custom-app-id-and-threat-signatures/custom-application-and-threat-signatures/custom-signature-contexts/string-contexts/file-data

Note you cannot use the "file-unknown-body" context for plaintext ASCII files, as the "file-unknown-body" context is only for unknown type of file.
If the first 8 bytes of the testing file are all readable ascii characters, then internal logic will mark it as html file type.

For more details on creating custom signatures, please refer to our Tech Note:
Creating Custom Signatures Tech Note

For more details on measure performance impact of a Custom Signature, please refer to our Technical Documentation:
https://docs.paloaltonetworks.com/pan-os/u-v/custom-app-id-and-threat-signatures/custom-application-and-threat-signatures/testing-pattern-performance-impact ​​​​​​​


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000kIAgCAM&lang=en_US%E2%80%A9&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail