Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[ScreenOS] How to block HTTP websites by creating custom Attack patterns in Deep Inspection to match specific keywords or patterns



Article ID: KB23591 KB Last Updated: 01 Aug 2012Version: 1.0

This article provides information on how to block HTTP websites by creating custom attack patterns in Deep Inspection to match specific keywords or patterns.

You can create a custom attack pattern in Deep Inspection to block HTTP websites that match the specified pattern.


For example, an attack pattern is created in DI, which will block all the HTTP websites that have webmail, mail, or email in the URL.

Go To the WebUI:
  1. Create the custom attack signature under Security > Deep Inspection > Attacks > Custom:

    When creating the attack pattern, the significance of the special characters are as follows (you can make use of them, as required):

    • \0 <octal_number>: For a direct binary match.

    • \X<hexadecimal-number>\X: For a direct binary match.

    • \[<character-set>\]: For case insensitive matches.

    • .: To match any symbol.

    • * : To match 0 or more symbols.

    • +: To match 1 or more symbols.

    • ?: To match 0 or 1 symbols.

    • (): Grouping of expressions.

    • |: Alternation. Typically used with ().

    • [<start>-<end>]: Character range.

    • [^<start>-<end>]: Negation of the character range.

  2. Similarly, create the other signatures as well:

  3. Create a custom Attack Group and include the three signatures as its members. This can be done under Security > Deep Inspection> Attack Groups> Custom:

  4. Under policies, edit the policies, to which the attach action has to be applied. Ensure that the policy action is Permit and then click Deep Inspection.

    Here, select the CS:Mail custom signature and set the attack action to Close. By selecting close, the device closes the connection to the URL by dropping the packet and sending TCP RST notifications to the hosts at the source and destination addresses:

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search