: Create a Custom Threat Signature from a Snort Signature
Focus
Focus

Create a Custom Threat Signature from a Snort Signature

Table of Contents

Create a Custom Threat Signature from a Snort Signature

Convert a third-party signature a custom PAN-OS threat signature.
The following steps illustrate the process for converting a Snort signature into a custom spyware signature compatible with Palo Alto Networks firewalls. The use case below uses a Snort rule for a North Korean Trojan malware variant as identified by the Department of Homeland Security, the Federal Bureau of Investigation, and other US government partners.
With Panorama version 10.0 or later, you can use the IPS Signature Converter plugin to automatically convert Snort and Suricata rules into custom Palo Networks threat signatures instead of manually performing the following procedure.
Snort rule:
alert tcp any any -> any any (msg:"Malformed_UA"; content:"User-Agent: Mozillar/"; depth:500; sid:99999999;)
In this example you can:
  • Use the IP addresses provided as part of the IOC List to detect if a possible infection already exists by searching the firewall logs.
  • The IP addresses provided can be part of an EDL or Address group and added to a Policy to block traffic to and from the suspicious list.
  • Use the provided Snort signature and convert it to a custom spyware signature. This signature will become part of the spyware profile added to the appropriate policy.
For other use cases, see our companion article.
  1. Create a Custom Spyware Object.
    1. Navigate to ObjectsCustom ObjectsSpyware/Vulnerability.
    2. Click Add and provide a Threat ID, an optional comment, and fill out the Properties section.
    3. Under Signatures, press Add.
    4. Specify the following information:
      • Standard—Enter a name to identify the signature in the field.
      • Comment—Enter an optional description.
      • If the order in which the firewall attempts to match the signature definitions is important, keep Ordered Condition Match selected.
      • Scope—Indicate whether this signature applies to a full Session or a single Transaction.
    5. Add a condition by clicking Add And Condition or Add Or Condition.
    6. Select an Operator from the drop-down menu to define the conditions that must be true for the signature to match traffic.
      • If you select Pattern Match, identify a Context in the Snort pattern that matches our available contexts, provide a regular expression Pattern, and optionally, Add a qualifier/value pair. Select Negate to specify conditions under which the custom signature does not trigger.
      • If you select Equal To, Less Than, or Greater Than, select a Context and enter a Value.
    7. Click OK to finish creating the Spyware object.
  2. Verify that the custom Spyware object is part of your Anti-Spyware Profile.
    1. Go to Security ProfilesAnti-Spyware. Click an existing profile, then under Exceptions, search for your signature’s Threat ID and Enable it.
  3. Create an EDL object.
    1. Navigate to ObjectsExternal Dynamic Lists. Click Add.
    2. Add the suspicious IP address provided from the IOC list to a previously created EDL or a new EDL as shown below.
  4. Add the EDL and Anti-Spyware profiles to appropriate Policy Objects.
  5. Test policy is working as expected by looking at Threat logs.
  6. Change the action for the spyware object from alert to drop/reset after verification. Also, change the severity of the object created as needed.
  7. Commit your signature(s).
  8. Test your custom signature.