|
Signatures
Signature Overview : How to use and write them
OverviewnetAnalyzer has a signature engine build in, quite similar to the one you found in signature based IDS but for application protocol information extraction. Signature syntax was inspirated by the one found in nmap service-signature. However because we have extended this format with many functionnalities and templates, they can't be imported directly. In particular we rely on rule priority rather than softmatch. An import script is available however. This engine aim to provides a flexible and convinient but yet powerful mean to gather advanced information on ongoing network flows. It allows administrator to gather specific information from application layer protocol without modifiying the analyzer code. This particulary useful as it provide an efficent and simple mean for the administrator to add it own evens or error triggers. What information can be reported ?Information that can be capturated range from simple thing such as protocol detection where no specifique information are captured to more advanced one such as client software version identification. Rules are compiled by netAnalyzer at runtime or when it receive a SIGUP signal. Reporting Events and Errors can be done in any signature using special templates See SignatureError. How signature are triggered ?The rule engine is build on top of the traffic engine. The traffic engine is responsible to trigger appropriatly each set of rules. By detecting for instance if it's a control or a data packet. If your are interessted in the engine by it self see engine. Signature Generic syntaxRules are written to use full perl regular expression power (in intern the analyzer use the PCRE library). Every rule must be in the forme: signatureType protocol i'Regexp' data_1/value_1/ data_2/value_2/... data_n/value_n/ optionname:optionvalue optionname:optionvalue where
Signature typeThere is mainly two groups of signature :
To be more readable, signatures are regrouped into files, but this is the syntax of the signature by itself that determines how it will be interpreted. However keeping signature of different type separated makes the database more clear. It also helps to prevents unwanted signature overlapping. The signature type keyword always end up by the term match. NetAnalyzer use the following type of signatures to gather information from the control and the content part of the session. Control part is intuitively the set of packets used to etablish the session and request or acknowledge files. Every sig that are triggered during control phases have a sigType that end with "cmatch", the c standing for control whereas every signature that are triggered during data phases have a sigType that end with "dmatch", the d standing for data. the content part allow to spot inconsitency between the file headers and it's true nature but also to gather additionnal information such as the one contained in the file headers.
Signature optionsoptions are applicable for any king of signature. They allow to modify how the analyzer will treat match and add extra information. Options include signature priority and matching policy. Here is a quick list of the options available. See [[Signature_option| Signature options]] for a more detailed explanation of each one. Options List
Not yet implemented
|
Sign in to add a comment