Skip to main content

Trisul Probe Configuration File

All configuration parameters for each Trisul Probe is stored in a singleXMLmain configuration file calledtrisulProbeConfig.xml. This file is found on all Trisul-Probe nodes.

Location : /usr/local/etc/trisul-probe/domain0/probe0/context0/trisulProbeConfig.xml

for context named data1 the path would be …probe0/context_data1/trisulProbeConfig.xml

caution

Root privileges needed to edit

note

Also seetrisulHubConfig.xmlfor editing Hub node parameters

Sections

Click on a section to see the config parameters inside that section.

SectionWhat part of trisul does it configure
AppThe trisul running process
LoggingLogging policy – file sizes and rotation
RingFull content storage and retention policy
ReasseblyTCP reassembly and advanced metering
File ExtractionConfigure File Extraction
IDS AlertsUnix sockets for accepting Unified and Unified2 alerts
Offline ImportFor importing large pcap dumps (mostly used for testing
TuningTuning packet processing pipeline
EdgesOptions related to the Graph Analytics

App

Settings for the Trisul daemon process

note

Commonly modified parameters are Setuid, TrisulMode, LicenseFile

ParametersDefaultsDescription
usertrisul.trisulWhich user/group should trisul run as after dropping root privileges.
TempFolder/tmp
DBRoot/usr/local/var/lib/trisul-probe/domain0/probe0/context0The base directory under which Trisul stores all its data.
UsageRedMarkGenerate an alert when disk usage on this probe node cross this percent value. Leave blank or set to 0 to disable disk usage alerts
ConfigDB/usr/local/var/lib/trisul-probe/domain0/probe0/context0/ config/TRISULCONFIG.SQDBLocation of the configuration database.
PluginsLibDirectory/usr/local/lib/trisul/pluginsWhere trisul looks for dynamic (called so) plugins
PluginsConfDirectory/usr/local/etc/trisul-probe/domain0/probe0/context0Where trisul looks for additional configuration files and server certificates (for TRP).
PluginsDataDirectory/usr/local/share/trisul/pluginsWhere trisul looks for plugin configuration data.
ProbeIDSE-LINKA mnemonic to identify this instance of Trisul, this string is reported via TRP.
ProbeDescTrisul Probe monitors the S-E link traffic onlyA short description of this instance of trisul.
RunStateDirectory/usr/local/var/lib/trisul-probe/domain0/probe0/context0/runVolatile data for current run stored here
PluginsDataDirectory/usr/local/share/trisul-probe/pluginsPlugins store data here; eg from downloaded feeds
PidFile/usr/local/var/run/trisul.pidFile where trisul stores the process id of the current running instance.
TrisulModeTAPThis determines whether you run Trisul in raw packets mode or Netflow mode.TAP Processes all raw packets from the selected network adapters.NETFLOW_TAP Processes Netflow packets
ValidTrisulModesTAP,NETFLOW_TAPUnused – just a hint for the previous parameter.
LicenseFile/usr/local/etc/trisul-probe/LicenseKey.txtLocation of the license file.
ReportsDirectory../reportsThe directory where DDoS reports are stored in Netflow mode

Logging

Configures logging and rotation of the probe processtrisul

ParametersDefaultsDescription
Logdir/usr/local/var/log/trisulWhere the log files are stored.
Logfilens-???.logLog file pattern. The default is ns-001.log, ns-002.log, etc.
LoglevelDEBUGAll messages higher than this level are logged. The available log levels in order of severity (most severe one first is).
EMERG
FATAL
ALERT
CRIT
ERROR
WARN
NOTICE
INFO
DEBUG
— Recommended default level
LogRotateSize5000000Size of each log file is allowed to grow to this size before Trisul moves to the next file.
LogRotateCount5The number of files in the log ring, oldest files will be rotated.

Ring

Full content storage policy.

The Ring section allows you to control.

  • How big each full content file gets

  • How many such full content files are in a slice

  • How many slices in operational, reference, and archive areas

  • Passphrase file (the content files areAES-128CTRmode encrypted)

  • Flow rules for content trimming

ParametersDefaultsDescription
EnabledTrueSetting this to False will disable all options below, full content will not be saved.
BaseDir/usr/local/var/lib/
trisul/CONTEXT0/caps
Parent directory under which full content files are saved.
EncryptionAES-128-CTRThe encryption cipher. Currently supported modes are AES-128-CTR and NONE. Specify NONE to disable encryption of raw packet storage.
PassphraseFile/usr/local/etc/
trisul/certs/ringpass.txt
The encryption passphrase for the full content files.
FilePrefixRCF_Content files are called RCF_001.triscap, RCF_001.triscap, etc.. This options allows you to change the RCF_ part.
FileSizeMB100Size of each full content file in megabytes.
Maximum allowed value = 8000 (8GB). If you specify a size greater than this limit, Trisul will ignore it and use 8GB as the value.
SyncSeconds60Diagnostic use only.
SysStatsUpdateSecs2Diagnostic use only.
EnableDDosNetflowTapTrailSet this to TRUE to enable the DDoS Ring mechanism.
DefaultModeFULLTo cut down on full content data, Trisul allows you to apply a variety of policies. The supported modes are
FULL Everything is saved This is the default mode
FLOWCAP10M Only first 10MB of each TCP flow is saved.
FLOWCAP1M Only first 1MB of each TCP flow is saved.
FLOWCAP100K Only first 100KB of each TCP flow is saved.
FLOWCAP10K Only first 10KB of each TCP flow is saved.
HEADERS Only headers are saved, typically upto the TCP/UDP layer
IGNORE Nothing is saved
RuleChainEach packet is evaluated against a rule chain, which is a list of rules.

SlicePolicy

Controls how much of raw packet data is stored. There are three areasoper,ref, andarchiveThe packet slices are always written inoperthen slide intoref,archive, and then deleted as specified by the SlicePolicy below.

Oper

SliceCount32Number of operational slices. The size of each slices is fixed as specified by FileSizeKB parameter

Reference

SliceCount32Number of reference slices. Setting this to zero will move slices straight to the archive.

Archive

SLiceCount0Number of archive slices. If you set this to 0, slices move directly to /dev/null (ie are deleted).

Rule Chain

Rule chains are used to control full packet storage policies.

note

If you desire even more fine grained control of packet storage policy on a per-flow basis see thePacket StorageLUAScript type

  • Each rule is an expression in theTrisul filter format

  • Treatment of each packet is one of : Store full packet, Store header, or Ignore

  • The first rule to match determines the treatment given to the packet

  • If no rule matches, the treatment specified in theDefaultModeparameter is applied

Rule mode=“FULL”

If present, packets which match this rule get stored completely.

Rule mode=“FLOWCAP10M”

If present,

  • packets which match this rule and
  • belong to a flow which has transferred less than 10MB bidirectionally get stored fully.

Rule mode=“FLOWCAP1M”

If present,

  • packets which match this rule and
  • belong to a flow which has transferred less than 1MB bidirectionally get stored fully.

Rule mode=“FLOWCAP100K”

If present,

  • packets which match this rule and
  • belong to a flow which has transferred less than 100KB bidirectionally get stored fully.

Rule mode=“FLOWCAP10K”

If present,

  • packets which match this rule and
  • belong to a flow which has transferred less than 10KB bidirectionally get stored fully.

Rule mode=“HEADERS”

If present, packets which match get only their headers stored. The headers include at least the Ethernet/IP/TCP/UDPlayers.

Rule mode=“IGNORE”

If present, packets which match get ignored (sent to /dev/null).

slicePolicy

Specifies how many files you want to keep in each of the three areas. The size of each file is capped by the FileSizeKB parameter.

Example
You want this policy :

  • Each Slice file is 1GB
  • Store 20GB in the operational area (maybe you have limitedSSDor RAID5)
  • Store 500GB in the reference area
  • Store 1TB in the archive

Then the SliceCounts will be 20,500,1000 for the operational,ref, archive areas.

Reassembly

Controls how Trisul handles IP fragmentation andTCPreassembly.

IPDefrag

ParametersDefaultsDescription
EnabledMetricsOnlyReassembles IP fragments. This is disabled by default due to the CPU and Mem load it can place on Trisul on busy links. The values are
True
Full IP reassembly is enabled. Use this on light
links or if you suspect IP fragmentation on busy links
MetricsOnly*
Do not perform reassembly but collect metrics
about fragmentation in the Aggregates counter
group under the key ipfrag. This is the default option
False
Completely disable IP Defragmentation. Simply
ignore IP fragments. Use this on busy links
Hiwater1000Hi water mark for number of simultaneous fragment chains to track.
LoWater500Lo water mark for number of simultaneous fragment chains. If the number of fragments crosses the HiWater mark, Trisul gets rid of the LRU least-recently-used items and prunes it to the LoWater mark.

TCPFlowTrack

Flow tracking keeps track of how much data has been transmitted in either direction in a singleTCPflow.

  • Required for flow based full content storage policy (like storing first 1M of each flow)
  • Required forTCPReassembly
  • Required for all reassembly based applications likeXFFDeproxy,URILog, Content Type meters, etc
ParametersDefaultsDescription
EnabledTRUETrue or False values.
HiWater8000Hi water mark for number of simultaneous flows that can be tracked. If the number of simultaneous active flows exceeds the high water mark, Trisul will prune the oldest active flows until the number of flows goes one below the low water mark.
LoWater6000Lo water mark for TCP flow pruning. See explanation for HiWater.

TCPReassembly

ControlsTCPReassembly.

  • Required for all reassembly based applications likeXFFDeproxy,URILog
  • Required for reassembly based meters likeHTTPContent Types,HTTPHosts,URLFilter, etc
ParametersDefaultsDescription
EnabledTrueTrue or False values
MaxBytes0
KickoffBytes5000Some meter within Trisul must express an interest in reassembled data for a given flow before this limit is reached. Otherwise reassembly is stopped at this point for this flow.
PortsTraffic on these ports are reassembled. By default Trisul this is "" because uses heuristics to detect applications independent of port. You can override this behaviour by setting to a string like 3000,80,443,22,21 to reassemble only these ports
DirectionINOUTOptions

IN
Only the IN direction; direction of first SYN+ACK is reassembled
OUT
Only the OUT direction; direction of initial SYN is reassembled
INOUT
Both directions are reassembled

Applications

Some advanced applications.

Since these applications depend on theTCPReassembly feature, they are resistant toTCPfragmentation evasions.

ParametersDefaultsDescription
EnableXFFDeproxyTrueUseful in a corporate environment with web proxies. If set to true, Trisul can deproxy web traffic by looking at the X-Forwarded-For HTTP header. The actual IP is substituted for all metering and flow analysis instead of the proxy’s IP.
EnableURILogTrueLogs all HTTP URLs requested. These URLS show up as Resources in Trisul where they are correlated and made searchable.
EnableHostMeterTrueAdd traffic metering by HTTP Host header. The net effect of enabling this is that the HTTP Host counter group is made active.
EnableContentTypeMeterTrueAdd traffic metering by HTTP Content-Type header. Activates the HTTP Content Type counter group.
EnableSSLCertLogTrueLogs all SSL certificate chains
EnableHTTPFTSTrueFull Text Search (FTS) enabled for all HTTP Headers seen
EnableSSLFTSTrueFTS enabled for all SSL Certificates seen
MaxHTTPFTSPerFlowCurrently unused
EnableFTPTrackTrueTracks FTP data session by matching the corresponding control flows
EnableSSLRecordExtractionFalseIf you want access to the raw TLS Protocol PDUs. If set to “True” ; Trisul will generate “TLS:RECORD” callbacks you can hook on to in the Reassembly engine. Unless you are working deep with TLS you typically can leave this as False.

File Extraction

Controls theHTTPfile extraction feature.

note

Need tempfs partition : If you enable File Extraction you also need to create a special in-memoryTMPFSpartition (also known asRAMFSpartition).
Quickest way to create this is to usetrisulctl_probe createramfs probe0 defaultA 100MB partition would suffice for loads < 1Gbps. For more readFile ExtractionLUAAPIin detail

ParametersDefaultsDescription
EnabledFalseFeature is enabled or not
RamFsDirProbeRoot/tmp/ramfsThe directory mounted on the TMPFS file system
AutoDeleteTrueThe tmpfs file system is automatically cleaned as the files are processed by the LUA script framework. Set this to False for debugging purpose only or if you take control of deleting the filesystem from your LUA scripts
ChunkSizeMB5For large files your LUA script will be handed chunks of this size. Tweak this based on how much RAM you can allocate to the tmpfs filesystem

IDS Alerts

Controls how security alerts from Snort/Barnyard are handled

ParametersDefaultsDescription
EnabledTrueEnables this feature
SnortUnixSocket/tmp/snort_alertTrisul opens this unix socket and listens for alerts. The default socket name issnort_alertfor Unified events from Snort, andbarnyard2_alertfor Unified2 events from Barnyard2. The directory name is passed to snort or barnyard2 via the-lparameter**Multiple sockets :**You can add any number of<SnortUnixSocket>elements to listen to multiple sockets at once.
GenerateDDosReportSet this toTRUEto trigger Trisul Probe to generate a DDoS report on certainTCAfiring.
DDosReportTopCount100By default 100 top items are included in the DDoS report
DDosReportWindow>PastSeconds120By default, include in the report 2 minutes prior to the DDoS attack trigger
DDosReportWindow>FutureSeconds60By default, include in the report 1 minutes after the DDoS attack trigger

OfflineImport

Controls aspects ofPCAPfile import.

ParametersDefaultsDescription
LoopCount1Used for testing. Runs the same capture file/directory this many time past Trisul. Each run is appended time-wise to the end of the previous run. This is used internally by us to generate months of data from a few days of capture by repeating them over and over.
AppendModeTRUEAppends the run to the previous runs time-wise. The packet time stamps in the capture file are offset by the last time of the previous run.
InterfileGapSecs60When importing multiple files, this option puts a gap of this many seconds between each file. There is no purpose of this option other than to view a gap in the charts representing the capture files.
AutoSortByCaptimeTRUEWhenTRUE, the candidate capture files are sorted by time order (earliest to latest), and then imported into Trisul. WhenFALSE, the files and subdirectories are processed in alphabetical order.
ResumeStalledImportFALSEDependency:AutoSortByCaptime must beTRUE
Treats the import as a resumption of a previously stalled or aborted offline import. WhenTRUE, Trisul will first determine what timestamp was last flushed. Then it will skip all packets earlier than that timestamp and continue importing when newer timestamps are seen.
This feature is used to resume a stopped import without reprocessing everything again.
Use this feature with the following caution :
# Due to the discontinuous nature, some packets may be missed or double counted around the timestamp where the earlier import was aborted
# Flows may be duplicated around the time
AddEthernetFCSFALSEIf set to true, will add 12 bytes to every ethernet packet to account forFCS

Tuning

Fine tune the packet processing pipeline for peak performance.

ParametersDefaultsDescription
AnalysisQueueCapacity1000000Queue size for frontend packet stream to backend analytics stream
PcapQueueCapacity5000Queue for disk packet storage
FeedbackQueueCapacity1000000Queue size of backend to frontend (reverse/feedback) stream
PcapRAIDStripeSize1048576Sequential writes of this size.
GrainSize64Number of packets to process in a batch. You can increase this value if you have aCPUwith a large L1/L2 cache. If the entire batch fits in cache memory – it can increase concurrency – and decrease drops.
SpongeWindow1A key internal data structure parameter to help with multicore.
Number of seconds a single core must accumulate before synchronizing. In most cases, leave this alone.
InflightTokens2Number of work items in parallel. Maps to number of hardware threads you want to give to trisul.
TCPReassFilters2Number ofTCPFilters – Trisul will hash and load share. Typically matches the number of InflightTokens
CoreAffinityNetCPUcores you want you pin the packet processing threads to. Use “1,2,4” to pin toCPUCores 1,2,4
CoreAffinityRAIDCPUcores allowed to do disk writes for packet storage
CoreAffinityAnalysisCurrently unused
FBQDrainChunkSize-1Controls how fast an internal data structure called the Feedback Queue is drained
FlowMemcapPolicyFLEXIBLEDetermines how Trisul copes under severe load. This can happen on a very busy network or under a DDoS attack against Trisul itself or elsewhere on the network. Trisul detects this condition when Hi Water marks are crossed for counters or flows.
The available options are :
FLEXIBLETrisul is not too rigid about the Hi Water mark, it allows usage to grow beyond the high water mark within the streaming window (1-minute)
FIXEDWhen a Hi Water mark is hit, nonewcounters are flows are accepted. Existing ones are metered as usual. At the next flush interval, the counters or flows are pruned down to the low water mark and things proceed as usual
StreamingWindowMSecs60000The streaming window in milliseconds. The default value is 1 minute. Do not change this unless you have a very good reason
DisableFlowTupleFeedbackfalseFlow tuple feedback is a feature in Trisul that allows you to measure per-IP and per-APPconnection metrics. This can be overkill for some environments like ISP’s who deal with millions of flows/sec. Disable this in those environemts. We also suggest disabling this option when the FeedbackQueue (FBQ) sees pressure leading to spiky IP and App flow connection metrics.
MaxTCARangeAlerts100When using TCA range alerts (seeTCAgenerate only these many alerts. The reason we need a safety cap on this feature is an incorrect configuration with aTCArange can result in uncontrolled alerts (eg when any IP crosses 1Kbps). For safety we have chosen a cap or 100

Edges

Controls the streaming graph analytics part of Trisul

ParametersDefaultsDescription
EnabledTrueEnables this feature
EnableFlowEdgesTrueDo you want edge vertex data to be generated for every flow? For very large networks, consider disabling this option.