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:
- 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.
- Similarly, create the other signatures as well:

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


- 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:

