background image

Release 2008.2

Creating Extension Documents

11

Solving Specific 

Parsing Issues

This section provides you with XML examples that can be used when resolving 
specific parsing issues that may arise: 

Converting a Protocol

 

Making a Single Substitution

 

Generating Colon-Separated MAC Address

 

Combining IP Address and Port

 

Modifying an Event Category

 

Modifying Multiple Event Categories

 

Suppressing Identity Change Events

 

Converting a Protocol

The following example shows a typical protocol conversion that searches for TCP, 
UDP, ICMP or GRE anywhere in the payload, surrounded by any word boundary 
(for example, tab, space, end-of-line). Also, character case is ignored: 

<pattern id="Protocol" case-insensitive="true" 

xmlns=""><![CDATA[\b(tcp|udp|icmp|gre)\b]]> </pattern>

 

<matcher field="Protocol" order="1" pattern-id="Protocol" capture-group="1" />

Making a Single Substitution

The following is an example of a straight substitution that parses the source IP 
address, and then overrides the result and sets the IP address to 10.100.100.100, 
ignoring the IP address in the payload. The example assumes that the source IP 
address matches something similar to SrcAddress=10.3.111.33 followed by a 
comma: 

<pattern id="SourceIp_AuthenOK" xmlns=""> 

<![CDATA[SrcAddress=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}),]]></pattern

>

<matcher field="SourceIp" order="1" pattern-id="SourceIp_AuthenOK" 

capture-group="100.100.100.100" enable-substitutions="true"/>

Generating Colon-Separated MAC Address

STRM detects MAC addresses in a colon-separated form. Since all devices do not 
use this form, the following example shows how to correct that situation: 

<pattern id="SourceMACWithDashes" 

xmlns=""><![CDATA[SourceMAC=([0-9a-fA-F]{2})-([0-9a-fA-F]{2})-([0-9a-fA-F]{2})-([0-9

a-fA-F]{2})-([0-9a-fA-F]{2})-([0-9a-fA-F]{2})]]></pattern> 

<matcher field="SourceMAC" order="1" pattern-id=" SourceMACWithDashes" 

capture-group="\1:\2:\3:\4:\5:\6" /> 

In the above example 

SourceMAC=12-34-56-78-90-AB

 is converted to a MAC 

address of 

12:34:56:78:90:AB

Summary of Contents for NETWORKS STRM - TECHNICAL NOTE REV 6-2008

Page 1: ...to various device types Using an extension document you can resolve parsing issues such as Fixing an event that has missing or incorrect fields for example if the username is not being parsed Completi...

Page 2: ...ch groups may appear in the extension document Table 1 Pattern Parameters Parameter Description id Required Specify a regular string that is unique within the extension document case insensitive Optio...

Page 3: ...st be a valid device type ID represented as an integer A list of device type IDs is presented in Table 6 If not specified this parameter defaults to the device type of the device to which the extensio...

Page 4: ...nted with a straight group capture You can combine multiple groups together with extra text to form a value This parameter enables that behavior This parameter changes the meaning of the capture group...

Page 5: ...ource MAC address for the message SourcePortPreNAT Specify the source port for the message before NAT occurs SourcePortPostNAT Specify the source port for the message after NAT occurs DestinationIp Sp...

Page 6: ...port based protocols UserName Specify the user name associated with the event HostName Specify the host name associated with the event This field is usually only associated with identity events GroupN...

Page 7: ...ation on creating extension documents including Writing a Complete Extension Document Uploading Extension Documents Solving Specific Parsing Issues send identity Specifies the sending of identity chan...

Page 8: ...ld could use the exact same pattern in this case this may not be true in all FWSM events xml version 1 0 encoding UTF 8 device extension xmlns event_parsing device_extension pattern id EventNameFWSM x...

Page 9: ...l The FWSM uses the Cisco Pix QID and therefore includes the device type id override 6 parameter in the match group the Pix firewall s device type ID is 6 see Table 6 If the QID information is not spe...

Page 10: ...ce of TCP UDP ICMP or GRE the pattern is marked with the case insensitive parameter so that any occurrence matches Note You must search for the protocol when writing extension documents as STRM may no...

Page 11: ...The following is an example of a straight substitution that parses the source IP address and then overrides the result and sets the IP address to 10 100 100 100 ignoring the IP address in the payload...

Page 12: ...llowing example is similar to the above single event example except that this example matches all event codes starting with 7 and followed by one to five digits pattern id EventNameId xmlns CDATA 7 d...

Page 13: ...x login messages 12 WindowsAuthServer Windows Security Event Log 13 IIS Windows IIS Webserver logs 14 Iptables Linux iptables Firewall 15 Proventia ISS Proventia Device 16 Classify Q1Labs Classify Eng...

Page 14: ...niper Infranet Controller 60 PDSN Sprint PoC PDSN 61 RNC Sprint PoC RNC 62 BTS Sprint PoC BTS 63 ACS Cisco ACS 64 JuniperRouter Juniper Router 65 Sprint Sprint PoC 66 CallManager Cisco Call Manager 67...

Page 15: ...Nortel Switched Firewall 6000 105 Q1Labs QRadar Q1Labs QRadar 106 3Com 8800 Series Switch 3Com 8800 Series Switch 107 Nortel VPN Gateway Nortel VPN Gateway 108 NortelTPS Nortel Threat Protection Intru...

Page 16: ...trademarks or registered service marks in this document are the property of Juniper Networks or their respective owners All specifications are subject to change without notice Juniper Networks assumes...

Reviews: